| In the current era,China’s manufacturing industry in the wave of industry 4.0revolution in order to achieve the grand goal of "China to step into the ranks of manufacturing powers by 2025" proposed in the strategy of "Made in China 2025",China’s traditional manufacturing industry must accelerate the pace of intelligent manufacturing transformation.In the process of transformation,the Manufacturing Execution System(MES)has been favored by more and more enterprises because of its powerful function of closely linking the planning management and the field control layer.However,the traditional monomeric MES has many significant problems such as high coupling degree,poor scalability and poor versatility,which can no longer meet the needs of enterprises in the new era.This thesis takes the automatic bar processing workshop as the basic research object.After the field investigation of the actual needs of various enterprises for MES and the problems existing in MES,this thesis proposes to integrate microservice architecture into MES to solve many problems existing in traditional monomer MES.On this basis,aiming at the problem of hidden safety risks in workshop operation,an improved target detection algorithm is introduced to enhance the safety monitoring capability of MES and escort the safe production of enterprises.This thesis mainly from the following aspects:(1)Aiming at the problems of high coupling,poor scalability,and poor universality of traditional MES,this thesis divides the MES into multiple microservices based on the bounded context method.Firstly,this thesis conducts research on the production status and problems of the workshop based on the PDCA cycle analysis method,and combines market research to analyze the requirements of the MES;Then,based on the actual needs,this thesis divides the MES into three microservice groups: common layer service,device layer service,and business layer service,totaling 14 microservices.The division of microservices greatly reduces the granularity of the MES and achieves decoupling.The extraction of MES common layer microservices improves the universality and scalability of the MES.(2)Aiming at the potential safety hazards in workshop production and the complex problems of calling and management among multiple Microservices,this thesis proposes an improved YOLOv3 personnel and helmet wearing detection method,and combines multiple key technologies of Microservices to solve the complex problems of service calling and management.Firstly,the overall architecture design of the workshop MES based on microservices architecture was carried out according to specific requirements;Then,in response to the complex issue of MES microservice invocation and management,this thesis designed corresponding gateway filters and combined Nacos and Sentinel to ensure security,improve the efficiency of service invocation,and ensure that upper level software failures do not affect workshop production;Finally,in response to the problems of low recognition accuracy and slow recognition speed of existing object detection algorithms in complex industrial backgrounds,this thesis improves the YOLOv3 object detection method by optimizing its network structure,positioning loss function,introducing spatial pyramid pooling module,and K-means clustering algorithm.This achieves real-time and accurate detection of personnel and helmet wearing,ensuring safe production in the workshop.(3)This thesis constructs Microservices through database design,interface design and other methods.At the same time,in view of the difficulty of hardware device data collection and not real-time data,this thesis combines multiple communication methods and device secondary development technology to solve this problem.Firstly,for the construction of microservices in the common layer of the system,this thesis designs the IT model,database design,interface design,and UML model based on functional requirements;Then,for device level data collection,this thesis utilized dynamic link library,Siemens S7 communication protocol,and other hardware devices such as PLC,machine tools,cameras,etc.for secondary development.At the same time,Redis cache database and Web Socket communication technology were used to solve the problem of not real-time data;Finally,for the construction of microservices in the business layer,this thesis analyzes the manufacturing execution process in the business layer and designs ER diagrams and time series diagrams.At the same time,an inventory management model is proposed to efficiently manage materials.(4)Functional testing was conducted on the core functional modules of the MES,while quantitative testing was conducted on the reliability,response time,and throughput of the MES using JMeter testing tool.The results indicate that the workshop MES based on microservice architecture designed in this thesis not only solves many problems of high coupling,low scalability,and poor universality of traditional single architecture MES,but also has high reliability,fast response speed,and suitable throughput.At the same time,the introduction of improved YOLOv3 object detection algorithm improves the intelligent security monitoring ability of MES. |