Industrial Internet of Things has become an important tool to promote the transformation and upgrading of the manufacturing industry and enhance it's competitiveness. With the popularization of IIOT, the cyber security threats faced by industrial systems are also increasing, and intrusion detection techniques have emerged. However, due to the complex structure of IIOT and the variety of network traffic data generated, the Intrusion detection that has been studied accuracy is not high. To improve the accuracy of intrusion detection, we introduce an intrusion detection method for IIoT utilizing an Optimized Bidirectional Long Short-Term Memory network. We first enhance BiLSTM by substituting the inverse Long Short-term Memory network with a Gated Recurrent Unit, followed by designing a novel neural network, OBiLSTM. We also designed a weighting method for the Cross-entropy Loss function, which makes the detection accuracy further improved. Finally, We implemented the proposed intrusion detection prototype and tested it based on two datasets, UNSW-NB15 and NSL-KDD. The experimental outcomes indicate that our proposed prototype surpasses previous methods in terms of accuracy, recall, precision, and F1_score.