1. The establishment of the Quality Management module quality management is a coordinated activity for directing and controlling the quality. At present, the main function of quality management of cigarette processing enterprises is to develop sound technical and management standards to achieve the organization's quality policies and objectives, implement monitoring and measurement throughout the process, and pass quality control and improvement, ensure the entire process is stable and controlled. In the process of integration of quality management and MES, on the basis of quality management standards, four functional modules (iterspec, Unilab, SPC, and report) were established in the MES system (Figure 1 ), the quality management system (qz_mes) is composed of different functions. Through the connection between function modules and quality management functions, and the interaction between function modules, the closed-loop management of quality management is realized. 2. Design of the quality management function module 2.1 Technical Standards and technical standards are the standardized information established to ensure product quality and the technical basis for common compliance in the production process. The entry, maintenance, and output of these specifications are implemented through the iterspec function module of MES, the iterspec function module contains the specifications of tobacco raw materials, auxiliary materials, process products and finished products, such as processing process parameters, BOM, quality inspection, and assessment standards, with mes, the information is sent to the production ticket after the order is decomposed by Er P to each production process segment, which guides the production and can be called repeatedly after being input (maintained) and stored. 2.2 The monitoring and measurement function module is the client for quality inspectors to input raw data for inspection, this module includes the quality inspection content of raw materials, materials, silk manufacturing process, packaging and rolling, mainstream flue gas, sensory quality, and cigarette finished product warehouse receiving judgment throughout the production process. In production, the system automatically triggers inspection requests according to preset rules. The system automatically, semi-automatically, and manually enters original quality inspection data, the system automatically determines, stores, and outputs the results based on the inspection data. 2.3 Quality Control: Through the computing process capability index, the processing capability of the process is evaluated, and the process quality control is implemented for the production process. The SPC function module uses the principle of the control chart and the sampling and detection methods to provide multiple control charts, including Xba r-r, Xba R-S, U, P, and C, in order to facilitate selection based on different quality characteristics, timely quality warning, eliminate interference from abnormal factors in the production process, and prevent the occurrence of nonconforming products. 2.4 Quality Improvement the quality management module collects the quality information of each function module and generates reports automatically based on the date, person, machine, material, process, and other conditions or compound conditions, for storage and printing. At the same time, statistical analysis tools such as pie chart, bar chart, and trend chart can intuitively reflect the quality control status. On the one hand, they are helpful for discovering key quality problems and implementing quality improvement, on the other hand, it can verify the effect before and after quality improvement, and effectively promote the development of quality research activities. 3. functions implemented by the Quality Management Module 3.1 The quality management module provides the storage function and the quality management module provides a powerful space for storing information, it can store routine technical standard change information, quality inspection raw data, and process quality control status to facilitate query of historical data and trace quality problems, this reduces the time required for routine record management and manual query operations, saves storage space for raw records, and allows quality management personnel to spend more time and space on other tasks, improving work efficiency. 3.2 The quality management module provides the statistical report function. In order to facilitate quality management information, the quality management module provides a statistical report template based on a large amount of data stored, preset calculation formulas, and statistical report templates, the system automatically generates multi-level and multi-angle statistical reports, concatenates point-level quality data into a mesh, and shares data in the factory. Different departments and personnel in different positions are configured based on their respective permissions, it can query and browse quality information related to itself through a browser, improving the timeliness and accuracy of quality information communication. 3.3 The quality management module explores the application of statistical analysis tools. Mes is a management system built on the basis of a database, which contains a large amount of quality data, in order to convert the data into useful quality information, to achieve accurate data management quality, as a quality decision-making service, on the basis of statistical reports, exploratory application of statistical analysis tools such as control charts, pie charts, and trend charts, intuitively reflect the quality control status of the production process, analyze the current major quality problems, and prevent the occurrence of nonconforming products, provide basis for quality improvement. 4. the Key Technical Quality Inspection Module implemented by the Quality Management module uses SIMATIC it Unilab as the development tool and Oracle as the C/S structure application system developed by the background database, the application uses configuration to connect to the database. When MES is started, the production modeling tool PM (production modeler) of Siemens calls the com method of Unilab to automatically create the test sample. For automatic data collection, the Historial component of Siemens is used to connect to the automatic control system for real-time data collection, the SIMATIC it uniconnect component is used to connect the package inspection data with the comprehensive test bench to collect physical inspection indicator data. This avoids manual data input errors, reduces labor costs, and improves productivity. For the sample score, Unilab uses VBA in the background to calculate the score based on the interspec criteria. The C/S mode has the advantages of strong interactivity, secure storage mode, and fast speed. 5. summary through the MES system in the Quality Management Application Research, initially achieved quality management functions such as quality standard information transmission, quality inspection, quality control, and improved quality management means, enhances the quality management capability. At the same time, in the application process, we are more aware of strengthening the quality management infrastructure, improving the quality management system, standardizing the quality management process, and improving the integration capability of MES system operation and quality management functions, it is the key to ensure efficient integration of MES system and quality management.