**5. Conclusions**

In order to realize intelligent SPC, this paper proposes a pattern recognition method based on multilayer Bi-LSTM for quality control, which uses feature learning to realize end-to-end HPR and CCPR. After experimental study, the following conclusions can be drawn. First of all, the convergence speed, recognition accuracy and over fitting degree of the network are related to the optimization algorithm, batch size and network layer number, and these parameters should be properly selected. Secondly, after learning, the network can extract the optimal feature set adaptively from the raw data, which has higher quality than the traditional manual expert feature set. Finally, with the raw data as input, the recognition rate of multilayer Bi-LSTM is 99.89% for HPs and 99.26% for CCPs. The recognition accuracy of this model is significantly better than that of traditional methods and other deep learning methods.

To sum up, the proposed multilayer Bi-LSTM method reduces the trouble of manual feature extraction, is competent for HPR and CCPR with high accuracy, and can e ffectively improve the level of intelligence and automation of SPC. It will likely become an integral part of industry 4.0 technology.

There is still a problem in this study. The length of the control chart and the number of histogram groups input into the network must be fixed, for example, the length of the data in this study is 25. However, in practical application, it may be necessary to adjust the data length to adapt to the production process. The current method must retrain the network, which will cause inconvenience. In the future, we will solve this problem, so that the network can adapt to di fferent data lengths.

**Author Contributions:** Conceptualization, T.Z. and Z.L.; software, T.Z. and Z.L.; validation, M.W., X.G.; resources, Z.S. and D.C.; writing—original draft preparation, Z.L.; writing—review and editing, T.Z., M.W. and X.G. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research is supported by China Scholarship Council, gran<sup>t</sup> number 201806545032, and National Natural Science Foundation of China, gran<sup>t</sup> number 51575014, 51875008, and 51975020.

**Acknowledgments:** The production data used in this study are from Tongyu Heavy Industry Co., Ltd.

**Conflicts of Interest:** The authors declare no conflict of interest.
