Cross-cigarette factory data collaborative optimization method and system

By constructing a cross-factory quality data pool and utilizing dynamic time warping algorithm and gradient boosting decision tree, key process parameter features are extracted, and optimal process parameter adjustment schemes are generated. This solves the problem of low data utilization efficiency in cigarette factories and realizes collaborative optimization and parameter coordination of cross-factory quality data.

CN121998194APending Publication Date: 2026-05-08HONGYUN HONGHE TOBACCO (GRP) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONGYUN HONGHE TOBACCO (GRP) CO LTD
Filing Date
2026-01-28
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, the data utilization efficiency of cigarette factories is low, and it is impossible to achieve cross-factory, cross-model, and cross-quality comparisons, resulting in limited data value mining and the inability to grasp quality fluctuations in a timely manner.

Method used

Data is collected through the MES system, ETL cleaning and standardization are performed, a cross-factory quality data pool is built, a similarity matrix is ​​calculated based on the dynamic time warping algorithm, key process parameter features are extracted using gradient boosting decision trees, a cross-factory collaborative optimization objective function is constructed, and the optimal process parameter adjustment scheme is generated through a multi-objective global optimization algorithm.

Benefits of technology

It enabled collaborative optimization of data across factories, improved data utilization and accuracy, promoted the sharing of quality control experience and parameter coordination, and ensured data availability and structural consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998194A_ABST
    Figure CN121998194A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-cigarette-factory data collaborative optimization method and system, and relates to the technical field of tobacco, and the method comprises the steps: collecting multi-factory MES system data, and carrying out ETL cleaning standardization to form a unified quality data pool; grouping according to dimensions of brands, models and specifications; the similarity of different factory quality index sequences in the same dimension is calculated through a dynamic time warping algorithm, and a multi-dimensional benchmarking similarity matrix is obtained through integration; inputting the matrix into a feature importance evaluation model based on a gradient boosting decision tree, and extracting a key process parameter feature set influencing quality fluctuation; constructing a collaborative optimization objective function by using the key feature set, searching a Pareto optimal solution set through a multi-target global optimization algorithm, and generating an optimal process parameter adjustment scheme for balancing multiple targets; and the Pareto optimal solution set is taken as a scheme to be issued to each factory MES control end, so that a closed loop of collaborative scheme generation and implementation is realized, and the data utilization rate and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of tobacco technology, and in particular to a data collaborative optimization method and system for cross-cigarette factories. Background Technology

[0002] Currently, the higher authorities mainly use sampling inspection to assess the cigarette packaging workshops of cigarette factories, and to count the full score rate, the rate of high-quality products, the rate of appearance defects, and the rate of physical defect rates. Since sampling is only done once a month, the sample size within an assessment cycle is small, and the sampled samples have a large degree of uncertainty. Therefore, the assessment indicators of a certain factory may fluctuate significantly. As a result, the data reports from the higher authorities have limited value mining effect on cigarette factories and are not conducive to timely grasping the quality fluctuations of each factory.

[0003] The existing data notification from higher authorities is issued in the form of documents. Even if the data is displayed through FineReport, the physical indicators only assess whether they meet the design range. The analysis of appearance data is inadequate, which requires cigarette factories to conduct secondary analysis of the notification data. This results in low data utilization efficiency and fails to intuitively reflect quality trends and key issues. At the same time, the existing notifications do not establish multi-dimensional correlations and cannot achieve cross-factory, cross-model, and cross-quality comparisons, making it difficult to improve data utilization efficiency. Summary of the Invention

[0004] The main objective of this application is to provide a data collaborative optimization method and system across cigarette factories to solve the problem of low data utilization efficiency in cross-factory, cross-model, and cross-quality comparisons in the prior art.

[0005] To achieve the above objectives, this application provides the following technical solution: A data collaborative optimization method for multiple cigarette factories, wherein the data collaborative optimization method is applied to multiple cigarette factories with MES systems, the data collaborative optimization method comprising: Step S1: Collect outgoing quality inspection data, process inspection data, and equipment information data through the MES system of each cigarette factory, and clean and standardize them through the ETL process to obtain a cross-factory quality data pool with a unified format. Step S2: Based on preset data dimensions, the cross-factory quality data pool is grouped according to brand, model, and specification dimensions, and the grouping results are integrated to obtain a set of results. Step S3: Calculate the similarity of quality index sequences among different factories of the same brand, different factories of the same model, and different factories of the same specification in the grouping result set using the dynamic time warping algorithm, and integrate them to obtain a multi-dimensional benchmarking similarity matrix; Step S4: Input the multidimensional benchmark similarity matrix into the feature importance evaluation model based on gradient boosting decision tree to extract key process parameter features that affect quality fluctuations and integrate them to obtain a key process parameter feature set. Step S5: Construct a cross-factory collaborative optimization objective function based on the key process parameter feature set, and find the Pareto optimal solution set of the cross-factory collaborative optimization objective function through a multi-objective global optimization algorithm; Step S6: The Pareto optimal solution set is sent as the optimal process parameter adjustment scheme to the control terminal of the MES system of each cigarette factory.

[0006] Beneficial effects of steps S1 to S6: Step S1 involves collecting data from multiple factory MES systems and standardizing it through ETL to form a unified quality data pool, laying the foundation for cross-factory data collaboration. Step S2 involves grouping data by brand, model, and specification to achieve structured data organization and support dimensional benchmarking. Step S3 uses a dynamic time warping algorithm to calculate the similarity of quality indicator sequences from different factories within the same dimension, integrating a multi-dimensional benchmarking similarity matrix to quantify the correlation of quality performance between factories. Step S4 inputs this matrix into a feature importance assessment model based on a gradient boosting decision tree to extract the key process parameter feature set affecting quality fluctuations and clarify the optimization direction. Step S5 constructs a collaborative optimization objective function using the key feature set and uses a multi-objective global optimization algorithm to find the Pareto optimal solution set, generating an optimal process parameter adjustment scheme that balances multiple objectives. Step S6 distributes the Pareto optimal solution set as the scheme to the MES control terminals of each factory, promoting the implementation of cross-factory process collaborative optimization. The overall process achieves a closed loop from data collection and integration, dimensional benchmarking, key factor identification to collaborative scheme generation and implementation, promoting the sharing of quality control experience and parameter collaboration among cigarette factories, and improving overall data utilization and accuracy.

[0007] As a further improvement to this application, in step S1, outgoing quality inspection data, process inspection data, and equipment information data are collected through the MES system of each cigarette factory, and cleaned and standardized through an ETL process to obtain a cross-factory quality data pool with a unified format, including: Step S11: Extract factory quality inspection data, process inspection data, and equipment information data in real time through the automated data interface of each cigarette factory's MES system to obtain an original dataset based on a cigarette factory. Step S12: The original datasets of each cigarette factory are preprocessed and missing values ​​are filled by outlier removal and median filling, respectively, to obtain a preliminary cleaned dataset based on an original dataset. Step S13: Map the heterogeneous fields of the current preliminary cleaning dataset to a unified name and type according to the cross-factory unified metadata specification, and perform dimensional normalization on the numerical data through Min-Max normalization to obtain an intermediate dataset with a unified format. Step S14: Classify the current intermediate dataset according to the factory identifier to obtain the classified dataset; Step S15: Integrate the classified datasets from all cigarette factories to obtain a cross-factory quality data pool in a unified format.

[0008] Beneficial effects of steps S11 to S15: A series of operations are used to achieve standardized collection and integration of quality data across factories. Step S11 utilizes the automated interfaces of each factory's MES system to extract factory quality inspection data, process inspection data, and equipment information data in real time, forming independent raw datasets for each factory, laying the foundation for multi-source data collection. Step S12 performs outlier removal and median imputation on each raw dataset, preprocessing noise and filling in missing data to improve the integrity of data from a single factory. Step S13 maps heterogeneous fields to a unified naming type according to a unified cross-factory metadata standard, and uses Min-Max normalization to process the dimensions of numerical data, eliminating format and scale differences to obtain a uniform intermediate dataset. Step S14 classifies the intermediate datasets according to factory identifiers, forming factory-based datasets for easier subsequent branch factory management. Step S15 integrates all factory-classified datasets, ultimately forming a unified format cross-factory quality data pool, achieving centralized storage and standardized organization of multi-factory data, providing a consistent data foundation for subsequent cross-factory analysis. The overall focus is on the standardized flow of data from source to pooling, ensuring data availability and structural uniformity.

[0009] As a further improvement to this application, step S2 involves grouping the cross-factory quality data pool according to brand, model, and specification dimensions based on preset data dimensions, and integrating the grouping results to obtain a set, including: Step S21: Extract field data of three dimensions—brand, model, and specification—from the cross-factory quality data pool to form a grouped benchmark dataset including identification records and dimension fields; Step S22: Using the brand field as the grouping key, the identifier records with the same brand value in the grouping benchmark dataset are grouped together using a grouping aggregation algorithm to obtain the brand dimension grouping result set; Step S23: Using the model field as the grouping key, the identifier records with the same model value in the grouping benchmark dataset are grouped together using a grouping aggregation algorithm to obtain the model dimension grouping result set; Step S24: Using the specification field as the grouping key, the identifier records with the same specification value in the grouping benchmark dataset are grouped into one group using the grouping aggregation algorithm to obtain the specification dimension grouping result set; Step S25: Integrate the brand dimension grouping result set, the model dimension grouping result set, and the product specification dimension grouping result set into a grouping result set grouped by brand, model, and product specification dimensions.

[0010] Beneficial effects of steps S21 to S25: This process achieves dimensional and structured organization of cross-factory quality data. Step S21 extracts brand, model, and specification data from the cross-factory quality data pool, combining them with unique record identifiers to form a grouped benchmark dataset, clarifying the basic elements for dimensional comparison. Step S22 uses the brand field as the grouping key and a grouping aggregation algorithm to merge records with the same brand value, forming a brand-dimensional grouping result set, enabling centralized comparison of data within the same brand. Step S23 similarly merges data using the model field as the grouping key, obtaining a model-dimensional grouping result set, supporting benchmarking of data within the same model. Step S24 merges data using the specification field as the grouping key, obtaining a specification-dimensional grouping result set, achieving data aggregation within the same specification. Step S25 integrates the brand, model, and specification grouping result sets to form a grouped result set after grouping according to preset dimensions. Overall, through dimensional aggregation, data is categorized according to business attributes, providing a structured data foundation for subsequent similarity calculations and benchmarking analysis of quality indicator sequences from different factories within the same dimension. This ensures that cross-factory comparisons focus on core business units such as brand, model, and specification, avoiding disordered and mixed data.

[0011] As a further improvement to this application, step S3 involves calculating the similarity of quality indicator sequences among different factories of the same brand, different factories of the same model, and different factories of the same specification in the grouping result set using a dynamic time warping algorithm, and integrating them to obtain a multi-dimensional benchmarking similarity matrix, including: Step S31: Extract the grouping result set based on the quality indicator sequences of different factories under the brand dimension, the quality indicator sequences of different factories under the model dimension, and the quality indicator sequences of different factories under the specification dimension, to obtain the factory quality sequence set under the brand dimension, the factory quality sequence set under the model dimension, and the factory quality sequence set under the specification dimension in sequence. Step S32: Calculate the similarity of the quality indicator sequences between different factories of the same brand based on the factory quality sequence set of the brand dimension using the dynamic time warping algorithm, and obtain the brand dimension factory similarity matrix. Step S33: Calculate the similarity of the quality index sequences between different factories of the same model based on the factory quality sequence set of the model dimension using the dynamic time warping algorithm, and obtain the model dimension factory similarity matrix. Step S34: Calculate the similarity of the quality index sequences between different factories of the same specification using the dynamic time warping algorithm to obtain the factory similarity matrix of the specification dimension. Step S35: Integrate the brand-dimensional factory similarity matrix, the model-dimensional factory similarity matrix, and the product specification-dimensional factory similarity matrix according to dimensions to obtain a multi-dimensional benchmarking similarity matrix.

[0012] Beneficial effects of steps S31 to S35: It enables the quantitative calculation and integration of dimensional similarity of quality data across factories. Specifically, step S31 extracts quality indicator sequences from different factories under the brand, model, and specification dimensions from the grouping result set, forming a factory quality sequence set for the brand dimension, a factory quality sequence set for the model dimension, and a factory quality sequence set for the specification dimension, providing a sequence data foundation for comparing the quality performance of factories within the same dimension; step S32 applies the dynamic time warping algorithm to calculate the similarity of quality indicator sequences from different factories of the same brand within the brand dimension factory quality sequence set, obtaining a brand dimension factory similarity matrix to quantify the quality correlation across factories within the same brand; step S33 similarly applies the dynamic time warping algorithm to the model dimension factory quality sequence set to calculate the similarity of quality indicator sequences from different factories of the same model, obtaining a model dimension factory similarity matrix to reflect the quality relationship across factories within the same model; step S34 applies the dynamic time warping algorithm to the specification dimension factory quality sequence set to calculate the similarity of quality indicator sequences from different factories within the same specification, obtaining a specification dimension factory similarity matrix to reflect the quality connection across factories within the same specification; step S35 integrates the factory similarity matrices of the brand, model, and specification dimensions by dimension to form a multi-dimensional benchmarking similarity matrix. Overall, by extracting sequences from different dimensions, calculating similarity using dynamic time warping algorithms, and integrating matrices, the system achieves a quantitative expression of the similarity of quality indicator sequences across factories of the same brand, model, and specification, providing a multi-dimensional data foundation for subsequent analysis.

[0013] As a further improvement to this application, in step S4, the multidimensional benchmarking similarity matrix is ​​input into a feature importance evaluation model based on a gradient boosting decision tree to extract key process parameter features affecting quality fluctuations, and the resulting key process parameter feature set includes: Step S41: Extract process parameter feature data and corresponding quality fluctuation index data from the cross-factory quality data pool, and integrate them to obtain a process parameter quality dataset. Step S42: The multidimensional benchmarking similarity matrix and the process parameter quality dataset are correlated dimensionally according to factory identification, brand, model, and specification to obtain the similarity and feature fusion target dataset; Step S43: Input the similarity and feature fusion target dataset into the feature importance evaluation model based on gradient boosting decision tree, and use quality fluctuation index data as target variable and process parameter feature data as input features. Train the feature importance evaluation model through gradient boosting decision tree algorithm to obtain a pre-trained feature importance evaluation model. Step S44: Calculate the importance score of the process parameter feature data using a pre-trained gradient boosting decision tree model; Step S45: Sort the importance scores and extract the process parameter feature data that are higher than the median of the feature importance scores to obtain the key process parameter feature set.

[0014] Beneficial effects of steps S41 to S45: This process integrates multi-source data and extracts key process parameter features. Step S41 extracts process parameter feature data and corresponding quality fluctuation index data from a cross-plant quality data pool, integrating them to form a process parameter quality dataset, providing foundational data for feature analysis. Step S42 associates a multi-dimensional benchmarking similarity matrix with this dataset according to factory identification and brand, model, and specification dimensions, forming a target dataset that integrates similarity and features, enhancing the expression of data-factory correlation. Step S43 inputs this integrated dataset into a gradient boosting decision tree-based feature importance assessment model, using quality fluctuation indicators as target variables and process parameter features as input features. The model is trained using the gradient boosting decision tree algorithm to obtain a pre-trained model, establishing a framework for evaluating the correlation between features and quality fluctuations. Step S44 calculates the importance score of each process parameter feature using the pre-trained model, quantifying the impact of features on quality fluctuations. Step S45 sorts the importance scores and extracts process parameter feature data with scores above the median, forming a key process parameter feature set. Overall, through data integration, association, model training, and feature selection, the key process parameters affecting quality fluctuations are clearly identified, providing precise targets for subsequent collaborative optimization.

[0015] As a further improvement to this application, step S5 involves constructing a cross-plant collaborative optimization objective function based on the key process parameter feature set, and finding the Pareto optimal solution set of the cross-plant collaborative optimization objective function using a multi-objective global optimization algorithm, including: Step S51: Extract historical adjustment data and quality index data corresponding to the key process parameter feature set from the cross-factory quality data pool; Step S52: Using the historical adjustment data as decision variables, and with the goal of minimizing the variance of quality indicator data for each cigarette factory and minimizing the mean difference of quality indicator data under the same brand, model, or specification, a cross-factory collaborative optimization objective function is constructed. Step S53: Use the upper and lower limits of the historical adjustment data as boundary constraints for the decision variables to form a domain of the decision variables with constraints. Step S54: Input the cross-factory collaborative optimization objective function and the domain of the decision variables into the non-dominated sorting genetic algorithm, and use the non-dominated sorting genetic algorithm to perform global optimization on the cross-factory collaborative optimization objective function to obtain a non-dominated solution set; Step S55: Repeated solutions are removed and feasibility is verified on the non-dominated solution set to obtain the Pareto optimal solution set.

[0016] Beneficial effects of steps S51 to S55: This process involves extracting relevant data from key process parameters and generating a Pareto optimal solution set through collaborative optimization. Step S51 extracts historical adjustment data and quality index data corresponding to the feature sets of key process parameters from a cross-plant quality data pool, providing historical data for optimization modeling. Step S52 uses historical adjustment data as decision variables, aiming to minimize the variance of quality index data across plants and the mean difference of quality index data within the same brand, model, or specification dimension, thus constructing a cross-plant collaborative optimization objective function and clarifying the multi-objective optimization direction. Step S53 uses the upper and lower limits of historical adjustment data as boundary constraints for decision variables, forming a constrained domain of decision variables and limiting the parameter adjustment range. Step S54 inputs the objective function and domain into a non-dominated sorting genetic algorithm, which performs global optimization to obtain a non-dominated solution set covering potential solutions under multi-objective trade-offs. Step S55 removes duplicate solutions and verifies feasibility of the non-dominated solution set to form a Pareto optimal solution set. The entire process, from data preparation, target definition, constraint setting to multi-objective optimization and solution set screening, is completed, providing an optimized set of candidate solutions for collaborative adjustment of process parameters across plants.

[0017] As a further improvement to this application, step S6, sending the Pareto optimal solution set as the optimal process parameter adjustment scheme to the control terminal of the MES system of each cigarette factory, includes: Step S61: Using the factory identifier as the grouping key, the process parameter adjustment schemes corresponding to each cigarette factory in the Pareto optimal solution set are grouped into independent subsets using a grouping aggregation algorithm to form a set of adjustment schemes grouped by cigarette factory. Step S62: Each subset of cigarette factories in the set of adjustment schemes is converted into a structured transmission format supported by the control terminal of the MES system of each cigarette factory by using a data serialization algorithm, so as to obtain the set of factory-adaptive adjustment schemes. Step S63: Push the set of factory adaptation and adjustment schemes to the control terminal of the corresponding cigarette factory MES system through the open control terminal automation data interface of each cigarette factory MES system.

[0018] Beneficial effects of steps S61 to S63: This process enables the transformation and precise distribution of Pareto optimal solutions to executable adjustment schemes for each factory. Step S61 uses factory identifiers as grouping keys and a grouping aggregation algorithm to merge the corresponding process parameter adjustment schemes for each factory in the Pareto optimal solution set into independent subsets, forming an adjustment scheme set grouped by cigarette factory, ensuring each factory's scheme is independently grouped. Step S62 uses a data serialization algorithm to convert each factory subset in the set into a structured transmission format supported by its MES system control terminal, obtaining a factory-adapted adjustment scheme set and resolving cross-system format compatibility issues. Step S63 utilizes the open automated data interfaces of each factory's MES system control terminal to push the factory-adapted adjustment scheme set to the corresponding control terminal. This completes the entire process from solution set grouping and format adaptation to targeted push, ensuring that the optimal process parameter adjustment scheme is implemented in a form that each factory can recognize and receive, providing direct operational basis for cross-factory collaborative optimization.

[0019] To achieve the above objectives, this application also provides the following technical solutions: A data collaborative optimization system across cigarette factories, wherein the data collaborative optimization system is applied to the data collaborative optimization method described above, and the data collaborative optimization system includes: The cross-factory quality data pool construction module is used to collect outgoing quality inspection data, process inspection data, and equipment information data through the MES system of each cigarette factory, and clean and standardize them through the ETL process to obtain a cross-factory quality data pool with a unified format. The cross-factory quality data grouping module is used to group the cross-factory quality data pool according to brand, model, and specification dimensions based on preset data dimensions, and integrate them to obtain a set of grouping results. The quality data similarity calculation module is used to calculate the similarity of quality indicator sequences between different factories of the same brand, different factories of the same model, and different factories of the same specification in the grouping result set through dynamic time warping algorithm, and integrate them to obtain a multi-dimensional benchmarking similarity matrix. The key process parameter feature acquisition module is used to input the multidimensional benchmark similarity matrix into the feature importance evaluation model based on gradient boosting decision tree in order to extract the key process parameter features that affect quality fluctuations and integrate them to obtain the key process parameter feature set. The cross-factory collaborative optimization module is used to construct a cross-factory collaborative optimization objective function based on the key process parameter feature set, and to find the Pareto optimal solution set of the cross-factory collaborative optimization objective function through a multi-objective global optimization algorithm; The optimal solution set distribution module is used to distribute the Pareto optimal solution set as the optimal process parameter adjustment scheme to the control terminal of the MES system of each cigarette factory.

[0020] To achieve the above objectives, this application also provides the following technical solutions: An electronic device includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the data collaborative optimization method as described above.

[0021] To achieve the above objectives, this application also provides the following technical solutions: A computer-readable storage medium storing program instructions that, when executed by a processor, enable the data collaborative optimization method described above. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating the steps of an embodiment of a data collaborative optimization method across cigarette factories according to this application; Figure 2 This is a schematic diagram of the functional modules of an embodiment of a cross-cigarette factory data collaborative optimization system according to this application; Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device of this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the storage medium of this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0024] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0026] like Figure 1 As shown, this embodiment provides an example of a data collaborative optimization method across cigarette factories. In this embodiment, the data collaborative optimization method is applied to multiple cigarette factories with MES systems.

[0027] Specifically, the data collaborative optimization method includes the following steps: Step S1: Collect outgoing quality inspection data, process inspection data, and equipment information data through the MES system of each cigarette factory, and clean and standardize them through the ETL process to obtain a cross-factory quality data pool with a unified format.

[0028] Further, in step S1, outgoing quality inspection data, process inspection data, and equipment information data are collected through the MES system of each cigarette factory, and cleaned and standardized through the ETL process to obtain a cross-factory quality data pool with a unified format. Specifically, this includes the following steps: Step S11: Extract factory quality inspection data, process inspection data, and equipment information data in real time through the automated data interface of each cigarette factory's MES system to obtain a raw dataset based on a cigarette factory.

[0029] Preferably, the following three types of data can be extracted through the RESTful API or OPC UA industrial protocol opened by the MES system of each cigarette factory to form the original dataset for a single factory: ① Factory quality inspection data: factory ID, brand, specification, cigarette weight, circumference, resistance, and hardness. ② Process inspection data: Drying outlet temperature (dry_temp), flavoring precision (flavor_precision), tipping position (tipping_pos), and tobacco filling value (tobacco_fill). ③ Device information data: Device ID (device_id), Model (model), Cumulative runtime (runtime_hours), Last maintenance date (last_maintain_date).

[0030] Step S12 involves preprocessing the original dataset of each cigarette factory by removing outliers and filling in missing values, resulting in a preliminary cleaned dataset based on the original dataset.

[0031] Preferably, outlier detection uses the Z-score outlier detection algorithm, and data exceeding 3 times the standard deviation are considered outliers and removed; numeric fields can be filled with the median.

[0032] It is worth noting that Z-score outlier detection and median imputation are mature existing technologies, and the specific calculation process will not be elaborated in this embodiment. They can also be implemented directly using the following code block: import pandas as pd df = pd.DataFrame(raw_data) # Z-score outlier removal numeric_cols = df.select_dtypes(include='number').columns for col in numeric_cols: z_scores = (df[col] - df[col].mean()) / df[col].std() df = df[abs(z_scores)<= 3] # Keep records where |Z|≤3 # Median Filling for Missing Values df.fillna(df.median(numeric_only=True), inplace=True) # Fill numeric fields with the median. preliminary_cleaned_data = df # Preliminary cleaning of the dataset Step S13: Map the heterogeneous fields of the current preliminary cleaned dataset to a unified name and type according to the cross-factory unified metadata specification, and perform dimensional normalization on the numerical data through Min-Max normalization to obtain an intermediate dataset with a unified format.

[0033] Preferably, the data format is standardized according to the unified metadata specification across factories. The metadata specification is achieved by defining field names, such as unifying the original "factory_name" to "factory_code", and "product_type" to "spec". The data type specification is string UTF-8 encoding and numerical float64. Non-null constraints such as factory_code and brand are required. The heterogeneous field mapping is achieved by establishing a mapping table. For example, the original field "cigarette weight (g)" → unified field "cig_weight", and "model number" → "model".

[0034] It is worth noting that Min-Max normalization is also a mature existing technology, and the specific calculation process will not be described in detail in this embodiment. It can also be implemented directly using the following code block: import MinMaxScaler # Min-Max Normalization scaler = MinMaxScaler(feature_range=(0, 1)) numeric_features = df_mapped.select_dtypes(include='number').columns df_mapped[numeric_features] = scaler.fit_transform(df_mapped[numeric_features]) intermediate_data = df_mapped # A uniformly formatted intermediate dataset Step S14: Classify the current intermediate dataset according to the factory identifier to obtain the classified dataset.

[0035] Preferably, the intermediate dataset is grouped by factory using "factory_code" as the grouping key and a grouping aggregation algorithm (such as Pandas groupby) is used. Specifically, the intermediate dataset is traversed, grouped by the value of the factory_code field, and each group of data is stored independently to form a classified dataset with the structure of a dictionary {factory_code: sub_dataset}.

[0036] Step S15: Integrate the classified datasets from all cigarette factories to obtain a cross-factory quality data pool in a unified format.

[0037] Preferably, all factory sub_datasets can be vertically concatenated using the Pandas concat function, with a "data_timestamp" field added to record the collection time, forming a DataFrame structure for a cross-factory quality data pool. This data pool structure includes standardized fields (factory_code, brand, spec, model, numeric_features, etc.), factory identifiers, and timestamps to support subsequent cross-factory queries and analysis.

[0038] Beneficial effects of steps S11 to S15: A series of operations are used to achieve standardized collection and integration of quality data across factories. Step S11 utilizes the automated interfaces of each factory's MES system to extract factory quality inspection data, process inspection data, and equipment information data in real time, forming independent raw datasets for each factory, laying the foundation for multi-source data collection. Step S12 performs outlier removal and median imputation on each raw dataset, preprocessing noise and filling in missing data to improve the integrity of data from a single factory. Step S13 maps heterogeneous fields to a unified naming type according to a unified cross-factory metadata standard, and uses Min-Max normalization to process the dimensions of numerical data, eliminating format and scale differences to obtain a uniform intermediate dataset. Step S14 classifies the intermediate datasets according to factory identifiers, forming factory-based datasets for easier subsequent branch factory management. Step S15 integrates all factory-classified datasets, ultimately forming a unified format cross-factory quality data pool, achieving centralized storage and standardized organization of multi-factory data, providing a consistent data foundation for subsequent cross-factory analysis. The overall focus is on the standardized flow of data from source to pooling, ensuring data availability and structural uniformity.

[0039] Step S2: Based on preset data dimensions, the cross-factory quality data pool is grouped according to brand, model, and specification, and the grouped results are integrated to obtain a set of results.

[0040] Further, in step S2, the cross-factory quality data pool is grouped according to brand, model, and specification dimensions based on preset data dimensions, and the grouped result set is obtained. This specifically includes the following steps: Step S21: Extract field data of three dimensions—brand, model, and specification—from the cross-factory quality data pool to form a grouped benchmark dataset that includes identification records and dimension fields.

[0041] Preferably, since the cross-factory quality data pool is a structured DataFrame, including a unique record identifier (record_id, UUID format), brand (brand, string type), model (model, string type), specification (spec, string type), and quality-related fields (such as cigarette weight, drying temperature, etc.), only the record_id, brand, model, and spec columns are extracted, and other redundant fields are removed to reduce the workload of subsequent grouping calculations.

[0042] Preferably, an automatic null value filtering algorithm can be applied to the brand, model, and spec fields to remove records where any dimension field is empty, generating a grouped baseline dataset (DataFrame) with columns in the order of [record_id, brand, model, spec]. Each row corresponds to a unique identifier and three-dimensional attributes of a valid record.

[0043] Step S22: Using the brand field as the grouping key, the identifier records with the same brand value in the grouping benchmark dataset are grouped together using the grouping aggregation algorithm to obtain the brand dimension grouping result set.

[0044] Preferably, the grouping key in step S22 is the brand field, and it is recommended that the string be exactly matched and case-sensitive, for example, “BrandA” and “branda” are considered to be in different groups.

[0045] Preferably, for each brand, group all record_ids within the group to form a set of record identifiers under that brand, in order to achieve the aggregation effect. The standard name of the group aggregation algorithm is Pandas GroupBy aggregation, which is based on a hash table to achieve efficient grouping with a time complexity of O(n).

[0046] Preferably, the brand dimension grouping result set is a dictionary or a MultiIndex DataFrame, where the key is the brand value such as "BrandA", and the value is a list or sub-DataFrame of all record_ids under that brand.

[0047] Step S23: Using the model number field as the grouping key, the identification records with the same model number value in the grouping benchmark dataset are grouped together using the grouping aggregation algorithm to obtain the model number dimension grouping result set.

[0048] Preferably, the grouping key in step S23 is the model field, which also requires exact string matching. For example, “ModelX” and “ModelX-1” are considered to be different groups, and the aggregation operation collects all record_ids under the same model.

[0049] Preferably, the result set grouped by model dimension is a dictionary {model_value:[record_id1, record_id2,...]}.

[0050] Step S24: Using the specification field as the grouping key, the identifier records with the same specification value in the grouping benchmark dataset are grouped into one group using the grouping aggregation algorithm to obtain the specification dimension grouping result set.

[0051] Preferably, the grouping key in step S24 is the spec field, which also requires exact string matching. For example, “Spec001” and “Spec001-A” are considered to be different groups, and the aggregation operation collects all record_ids under the same specification.

[0052] Preferably, the result set of the specification dimension grouping is a dictionary {spec_value:[record_id1, record_id2,...]}.

[0053] Step S25: Integrate the brand dimension grouping result set, model dimension grouping result set, and product specification dimension grouping result set into a grouping result set after grouping by brand, model, and product specification dimensions.

[0054] Preferably, a nested dictionary structure can be used for storage, with the top-level keys being the dimension names "brand", "model", and "spec", and the values ​​being the dictionary type of the corresponding dimension grouping result set, ensuring that the record_id of each dimension grouping result set comes from the grouping benchmark dataset in step S21.

[0055] Beneficial effects of steps S21 to S25: This process achieves dimensional and structured organization of cross-factory quality data. Step S21 extracts brand, model, and specification data from the cross-factory quality data pool, combining them with unique record identifiers to form a grouped benchmark dataset, clarifying the basic elements for dimensional comparison. Step S22 uses the brand field as the grouping key and a grouping aggregation algorithm to merge records with the same brand value, forming a brand-dimensional grouping result set, enabling centralized comparison of data within the same brand. Step S23 similarly merges data using the model field as the grouping key, obtaining a model-dimensional grouping result set, supporting benchmarking of data within the same model. Step S24 merges data using the specification field as the grouping key, obtaining a specification-dimensional grouping result set, achieving data aggregation within the same specification. Step S25 integrates the brand, model, and specification grouping result sets to form a grouped result set after grouping according to preset dimensions. Overall, through dimensional aggregation, data is categorized according to business attributes, providing a structured data foundation for subsequent similarity calculations and benchmarking analysis of quality indicator sequences from different factories within the same dimension. This ensures that cross-factory comparisons focus on core business units such as brand, model, and specification, avoiding disordered and mixed data.

[0056] Step S3: Calculate the similarity of quality indicator sequences among different factories of the same brand, different factories of the same model, and different factories of the same specification in the grouping result set using the dynamic time warping algorithm, and integrate them to obtain a multi-dimensional benchmarking similarity matrix.

[0057] Further, in step S3, the similarity of quality indicator sequences among different factories of the same brand, different factories of the same model, and different factories of the same specification is calculated using a dynamic time warping algorithm, and integrated to obtain a multi-dimensional benchmarking similarity matrix. This specifically includes the following steps: Step S31: Extract the grouping result set based on the quality indicator sequences of different factories under the brand dimension, the quality indicator sequences of different factories under the model dimension, and the quality indicator sequences of different factories under the specification dimension, to obtain the factory quality sequence set under the brand dimension, the factory quality sequence set under the model dimension, and the factory quality sequence set under the specification dimension in sequence.

[0058] Preferably, the data in step S31 comes from the grouping result set output in step S25 (including the record_id set of brand / model / spec dimensions) and the cross-factory quality data pool output in step S15 (including the factory identifier factory_code associated with record_id and quality indicator fields).

[0059] Preferably, the core indicators collected in step S1 include seven indicators: cigarette weight (cig_weight), circumference (cig_circumference), resistance (cig_resistance), and hardness (cig_hardness) and process inspection indicators (dry_temp at the tobacco drying outlet, flavoring precision (flavor_precision), and tipping_pos at the rolling tip). These seven indicators constitute the quality indicator vector q=[q1,q2,...,q7].

[0060] Preferably, the logic for sequence extraction is as follows: ① Traverse the grouped result set by dimension (brand / model / spec). For each dimension value (such as brand "BrandA"), retrieve all record_ids under that dimension from the grouped results.

[0061] ② Associate the cross-factory quality data pool, match the factory_code (factory identifier) ​​by record_id, and aggregate quality indicators by time granularity (e.g., every 8-hour shift) to form a time series (length T, e.g., 30 shifts).

[0062] ③ For the time-series index vectors of different factories under the same dimension, construct a set of factory quality index sequences (each factory corresponds to a sequence of length T and dimension 7).

[0063] Preferably, the extraction of the quality sequence can be achieved through the following code block: import numpy as np # Load the grouping result set (output of step S25) and the cross-plant quality data pool (output of step S15) grouped_result_collection = S2_grouped_result_collection # {dim:{dim_val: [record_id...]}} cross_factory_pool = pd.read_csv("cross_factory_quality_pool.csv") # Contains record_id, factory_code, and quality index fields def extract_sequence(dim, dim_val, grouped_result, pool): """Extract the factory quality indicator sequence for a specific dimension under a given dimension""" record_ids = grouped_result[dim][dim_val] # The collection of record_ids for this dimension. dim_pool = pool[pool['record_id'].isin(record_ids)].sort_values('data_timestamp') # Sort by time factories = dim_pool['factory_code'].unique() # List of factories under this dimension value seq_dict = {} for fac in factories: fac_data = dim_pool[dim_pool['factory_code'] == fac] # Aggregate by 8-hour shifts to form a time series (T×7 matrix) fac_seq = fac_data[['cig_weight','cig_circumference','cig_resistance','cig_hardness', 'dry_temp','flavor_precision','tipping_pos']].values seq_dict[fac] = fac_seq # The sequence of quality indicators for factory f (numpy array) return seq_dict # Extract the three-dimensional sequence set (for the brand dimension, take the first brand value). brand_val = list(grouped_result_collection['brand'].keys())[0] S_brand = extract_sequence('brand', brand_val, grouped_result_collection, cross_factory_pool) # Brand-dimensional factory quality sequence set S_model = extract_sequence('model', list(grouped_result_collection['model'].keys())[0], ...) # Model dimension... S_spec = extract_sequence('spec', list(grouped_result_collection['spec'].keys())[0], ...) # Specification dimensions... Among them, S_brand is the factory quality sequence set in the brand dimension, S_model is the factory quality sequence set in the model dimension, and S_spec is the factory quality sequence set in the specification dimension.

[0064] Step S32: Calculate the similarity of the quality indicator sequences between different factories of the same brand based on the factory quality sequence set of the brand dimension using the dynamic time warping algorithm, and obtain the brand dimension factory similarity matrix.

[0065] Preferably, the specific calculation process of the Dynamic Time Warping (DTW) algorithm can be implemented using the Python dtaidistance library: from dtaidistance import dtw import numpy as np def compute_dtw_similarity(seq_dict): """Calculate the DTW similarity matrix of the factory sequence set""" factories = list(seq_dict.keys()) n = len(factories) sim_matrix = np.eye(n) # Initialize the diagonal matrix (self-similarity = 1) for i in range(n): for j in range(i+1, n): x = seq_dict[factories[i]] # Sequence of factory i (T×7 matrix, needs to be flattened into a 1D sequence or calculated index by index) y = seq_dict[factories[j]] # Multi-indicator fusion: Calculate the DTW distance mean of each indicator (with equal weighting) dists = [] for k in range(7): # 7 quality indicators dist = dtw.distance(x[:,k], y[:,k], window=5) # Window constraint (threshold w=5, limiting path offset) dists.append(dist) d_dtw = np.mean(dists) # Combine DTW distance s = 1 / (1 + d_dtw) # Similarity conversion (the calibration threshold is implicit in the distance scale) sim_matrix[i,j] = sim_matrix[j,i]= s return sim_matrix, factories # Calculate the brand-dimensional similarity matrix (input S_brand generated in step S31) brand_sim_matrix, brand_factories = compute_dtw_similarity(S_brand) # Brand-dimensional factory similarity matrix Step S33: Using the dynamic time warping algorithm, calculate the similarity of the quality index sequences between different factories of the same model based on the quality sequence set of the model-dimensional factory to obtain the model-dimensional factory similarity matrix.

[0066] Preferably, the logic of step S33 is the same as that of step S32. Step S33 takes the factory quality sequence set S_model of the model dimension as input, calculates the similarity of the quality index sequences of different factories of the same model through the DTW algorithm, and obtains the factory similarity matrix of the model dimension.

[0067] Preferably, step S33 only needs to reuse the function from step S32: # Computational similarity matrix (input S_model generated in step S31) model_sim_matrix, model_factories = compute_dtw_similarity(S_model) # Model-level factory similarity matrix Step S34: Calculate the similarity of the quality index sequences between different factories of the same specification using the dynamic time warping algorithm to obtain the factory similarity matrix of the specification dimension.

[0068] Preferably, the logic of step S34 is the same as that of step S33. Taking the product specification dimension factory quality sequence set S_spec as input, the similarity of quality index sequences of different factories of the same product specification is calculated by the DTW algorithm to obtain the product specification dimension factory similarity matrix.

[0069] Preferably, step S34 only requires reusing the function from step S32: # Calculate the specification-dimensional similarity matrix (input S_spec generated in step S31) spec_sim_matrix, spec_factories = compute_dtw_similarity(S_spec) # Spec-level factory similarity matrix Step S35: Integrate the factory similarity matrix by brand dimension, factory similarity matrix by model dimension, and factory similarity matrix by specification dimension to obtain a multi-dimensional benchmarking similarity matrix.

[0070] Preferably, a nested dictionary structure can also be used for storage, with the top-level keys being the dimension names "brand", "model", and "spec", and the values ​​being the similarity matrix and factory list for the corresponding dimension, including factory identifiers and matrix index mappings.

[0071] Beneficial effects of steps S31 to S35: It enables the quantitative calculation and integration of dimensional similarity of quality data across factories. Specifically, step S31 extracts quality indicator sequences from different factories under the brand, model, and specification dimensions from the grouping result set, forming a factory quality sequence set for the brand dimension, a factory quality sequence set for the model dimension, and a factory quality sequence set for the specification dimension, providing a sequence data foundation for comparing the quality performance of factories within the same dimension; step S32 applies the dynamic time warping algorithm to calculate the similarity of quality indicator sequences from different factories of the same brand within the brand dimension factory quality sequence set, obtaining a brand dimension factory similarity matrix to quantify the quality correlation across factories within the same brand; step S33 similarly applies the dynamic time warping algorithm to the model dimension factory quality sequence set to calculate the similarity of quality indicator sequences from different factories of the same model, obtaining a model dimension factory similarity matrix to reflect the quality relationship across factories within the same model; step S34 applies the dynamic time warping algorithm to the specification dimension factory quality sequence set to calculate the similarity of quality indicator sequences from different factories within the same specification, obtaining a specification dimension factory similarity matrix to reflect the quality connection across factories within the same specification; step S35 integrates the factory similarity matrices of the brand, model, and specification dimensions by dimension to form a multi-dimensional benchmarking similarity matrix. Overall, by extracting sequences from different dimensions, calculating similarity using dynamic time warping algorithms, and integrating matrices, the system achieves a quantitative expression of the similarity of quality indicator sequences across factories of the same brand, model, and specification, providing a multi-dimensional data foundation for subsequent analysis.

[0072] Step S4: Input the multidimensional benchmark similarity matrix into the feature importance evaluation model based on gradient boosting decision tree to extract key process parameter features that affect quality fluctuations, and integrate them to obtain a key process parameter feature set.

[0073] Further, in step S4, the multidimensional benchmarking similarity matrix is ​​input into the feature importance evaluation model based on gradient boosting decision tree to extract key process parameter features affecting quality fluctuations, and integrated to obtain a key process parameter feature set, specifically including the following steps: Step S41: Extract process parameter feature data and corresponding quality fluctuation index data from the cross-plant quality data pool, and integrate them to obtain the process parameter quality dataset.

[0074] Preferably, process control and equipment parameters that affect quality can be selected, including equipment operating parameters (cumulative runtime_hours, spindle speed_rpm), process control parameters (dry_temp outlet temperature, flavoring flow_rate, rolling pressure_tipping_pressure_kpa), and material parameters (tobacco_fill value, tobacco_moisture% of tobacco leaves), totaling 7 features, forming a feature vector p=[p1,p2,...,p7].

[0075] Preferably, the quality fluctuation index data can be measured by the variance of the factory quality index series under the same brand / model / specification, and the process parameters and quality indicators are associated by record_id to ensure that each record contains complete features and fluctuation values. The specific implementation code block is as follows: import pandas as pd # Cross-plant quality data pool (output of step S15) cross_factory_pool = pd.read_csv("cross_factory_quality_pool.csv") # Process parameter characteristic fields (7 items) process_params = ['runtime_hours','spindle_speed_rpm','dry_temp','flavor_flow_rate', 'tipping_pressure_kpa','tobacco_fill','tobacco_moisture'] # Quality Indicator Fields (7 items, used to calculate volatility) quality_metrics = ['cig_weight','cig_circumference','cig_resistance','cig_hardness', 'dry_temp','flavor_precision','tipping_pos'] # Calculate the variance (volatility index) of the quality indicator by grouping by record_id `quality_variance = cross_factory_pool.groupby('record_id')[quality_metrics].var().mean(axis=1)` # Mean of the variances of the 7 metrics # Extract process parameter features and fluctuation indicators, and integrate the dataset process_param_quality_dataset = cross_factory_pool[['record_id','factory_code','brand','model','spec'] + process_params].copy() process_param_quality_dataset['quality_volatility'] = process_param_quality_dataset['record_id'].map(quality_variance) # Associated volatility indicator process_param_quality_dataset.dropna(subset=['quality_volatility'],inplace=True) # Remove records with no volatility. Step S42: The multidimensional benchmarking similarity matrix and the process parameter quality dataset are correlated dimensionally according to factory identification, brand, model, and specification to obtain the similarity and feature fusion target dataset.

[0076] Preferably, the association key is factory identifier (factory_code), brand, model, and specification (spec), ensuring data matching within the same business unit (e.g., the combination "BrandA-ModelX-Spec001"). The similarity values ​​of corresponding factory pairs (e.g., the similarity between factories of the same brand under the brand dimension) are extracted from the multi-dimensional benchmarking similarity matrix as additional features, such as "brand_similarity".

[0077] Preferably, precise association can be achieved through inner join, and the core code block is as follows: # Multidimensional benchmarking similarity matrix (output of step S3, taking the first brand value of the brand dimension) multi_dim_sim_matrix = S3_multi_dim_similarity_matrix brand_dim = multi_dim_sim_matrix['brand'] brand_sim_matrix = brand_dim['matrix'] # Brand dimension similarity matrix (N×N) brand_factories = brand_dim['factories'] # Factory list (corresponding to the rows and columns of the matrix) brand_val = brand_dim['dim_value'] # Current brand value (e.g., "BrandA") # Construct a factory similarity mapping dictionary (factory pair → similarity) brand_sim_dict = {} for i, fac_i in enumerate(brand_factories): for j, fac_j in enumerate(brand_factories): if i < j: # Avoid duplicates brand_sim_dict[(fac_i, fac_j)] = brand_sim_matrix[i, j] brand_sim_dict[(fac_j, fac_i)] = brand_sim_matrix[i, j] # Target dataset that fuses similarity and features fused_similarity_feature_dataset = fused_dataset[['record_id', 'factory_code', 'brand','model','spec'] + process_params + ['quality_volatility', 'brand_similarity']] Step S43: Input the target dataset that fuses similarity and features into the feature importance evaluation model based on gradient boosting decision tree, use the quality volatility index data as the target variable and the process parameter feature data as the input features, and train the feature importance evaluation model through the gradient boosting decision tree algorithm to obtain a pre-trained feature importance evaluation model.

[0078] Preferably, the Gradient Boosting Decision Tree (GBDT) is implemented using the XGBoost library (XGBRegressor model, used for regression tasks to predict quality volatility). The input features are process parameters (7 items) + similarity features (e.g., brand_similarity), and the target variable is quality_volatility (quality volatility index). The learning rate is set to 0.1, the tree depth to 5, and the number of iterations to 100. Mean squared error (MSE) is used as the loss function. The core code block is as follows: import xgboost as xgb from sklearn.model_selection import train_test_split # Separate features from target variables X = fused_similarity_feature_dataset[process_params + ['brand_similarity']] # Input features (7 process parameters + 1 similarity parameter) y = fused_similarity_feature_dataset['quality_volatility'] # Target variable (quality volatility) # Split the training set / test set (7:3) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42) # Initialize the XGBoost regression model (implemented using gradient boosting decision tree) gbdt_model = xgb.XGBRegressor( learning_rate=0.1, max_depth=5, n_estimators=100, objective='reg:squarederror' ) # Training Model gbdt_model.fit(X_train, y_train, eval_set=[(X_test, y_test)], early_stopping_rounds=10, verbose=False) # Pre-trained gradient boosting decision tree model pretrained_gbdt_model = gbdt_model Step S44: Calculate the importance score of process parameter feature data using a pre-trained gradient boosting decision tree model.

[0079] Preferably, the Gini importance algorithm can be used to evaluate the contribution of features to quality fluctuations. In gradient boosting decision trees, the feature importance score is based on the sum of the Gini exponential decreases of the feature across all tree node splits. The normalized importance score is obtained by calling the `feature_importances_` attribute of the XGBoost model, and the unit is the relative contribution ratio. # Obtain feature importance scores (Gini importance) feature_names = X.columns.tolist() # List of feature names importance_scores = pretrained_gbdt_model.feature_importances_ # Importance scores for each feature (array) # Construct a score dictionary (feature name → score) feature_importance_dict = dict(zip(feature_names, importance_scores)) # Sort by score in descending order sorted_importance = sorted(feature_importance_dict.items(), key=lambda x: x[1], reverse=True) Step S45: Sort the importance scores and extract the process parameter feature data that are higher than the median of the feature importance scores to obtain the key process parameter feature set.

[0080] Preferably, NumPy can be used to calculate the median, filter feature names with scores higher than the threshold, and form a list of key process parameter feature sets.

[0081] Beneficial effects of steps S41 to S45: This process integrates multi-source data and extracts key process parameter features. Step S41 extracts process parameter feature data and corresponding quality fluctuation index data from a cross-plant quality data pool, integrating them to form a process parameter quality dataset, providing foundational data for feature analysis. Step S42 associates a multi-dimensional benchmarking similarity matrix with this dataset according to factory identification and brand, model, and specification dimensions, forming a target dataset that integrates similarity and features, enhancing the expression of data-factory correlation. Step S43 inputs this integrated dataset into a gradient boosting decision tree-based feature importance assessment model, using quality fluctuation indicators as target variables and process parameter features as input features. The model is trained using the gradient boosting decision tree algorithm to obtain a pre-trained model, establishing a framework for evaluating the correlation between features and quality fluctuations. Step S44 calculates the importance score of each process parameter feature using the pre-trained model, quantifying the impact of features on quality fluctuations. Step S45 sorts the importance scores and extracts process parameter feature data with scores above the median, forming a key process parameter feature set. Overall, through data integration, association, model training, and feature selection, the key process parameters affecting quality fluctuations are clearly identified, providing precise targets for subsequent collaborative optimization.

[0082] Step S5: Construct a cross-plant collaborative optimization objective function based on the feature set of key process parameters, and find the Pareto optimal solution set of the cross-plant collaborative optimization objective function through a multi-objective global optimization algorithm.

[0083] Further, step S5 involves constructing a cross-plant collaborative optimization objective function based on the key process parameter feature set, and finding the Pareto optimal solution set of the cross-plant collaborative optimization objective function through a multi-objective global optimization algorithm. This specifically includes the following steps: Step S51: Extract historical adjustment data and quality index data corresponding to the key process parameter feature set from the cross-plant quality data pool.

[0084] Preferably, historical adjustment data and quality index data corresponding to the key process parameter feature set key_process_parameter_feature_set produced in step S47 are extracted from the cross_factory_quality_pool output in step S15 to form a key process parameter adjustment and quality response dataset.

[0085] Among them, historical adjustment data refers to the adjustment range of key process parameters (such as dry_temp outlet temperature and flavoring flow_rate) in past production cycles, defined as the difference between parameter values ​​in adjacent cycles Δpt=p t -p t−1 (p) tThe parameters are stored according to the dimensions of factory code, brand, model, and specification. The quality index data and the quality results corresponding to the adjustment amount are selected from the 7 core indicators (cigarette weight, circumference, etc.) defined in step S1 and aggregated according to the same time period.

[0086] Step S52: Using historical adjustment data as decision variables, and with the objectives of minimizing the variance of quality indicator data for each cigarette factory and minimizing the mean difference of quality indicator data under the same brand, model, or specification, a cross-factory collaborative optimization objective function is constructed.

[0087] Preferably, objective 1 (data utilization and accuracy within the factory) is to minimize the variance of the quality indicator series for each factory, and objective 2 (quality consistency across factories) is to minimize the difference in the mean of quality indicators across factories within the same brand / model / specification dimension. The specific implementation code block is as follows: import numpy as np import pandas as pd def build_collaborative_optimization_objective(historical_dataset,key_features, brand_col='brand', model_col='model', spec_col='spec', quality_metrics=None): """ Construct a cross-plant collaborative optimization objective function F(x) = [f1(x), f2(x)] :param historical_dataset: The historical adjustment-quality response dataset (DataFrame) produced in step S51. :param key_features: Key process parameter feature set (list, e.g., ['dry_temp', 'flavor_flow_rate']) :param brand_col / model_col / spec_col: Brand / Model / Specification field name (defaults to be consistent with the data pool) :param quality_metrics: List of quality metric fields (7 core metrics by default) :return: Objective function F(x), input adjustment vector x, output [f1, f2] """ # Default quality metrics (consistent with those collected in step S1) if quality_metrics is None: quality_metrics = [ 'cig_weight','cig_circumference','cig_resistance','cig_hardness', 'dry_temp','flavor_precision','tipping_pos' ] def objective_function(x): """ Core logic for objective function calculation :param x: Decision variables (adjustment vector, length = number of key process parameters, order is consistent with key_features) :return: [f1, f2] Two objective function values """ # The impact of simulated adjustment x on quality indicators adjusted_dataset = historical_dataset.copy() for i, feat in enumerate(key_features): # Assume that the adjustment amount x[i] directly affects the current process parameter value (added to historical values). adjusted_dataset[feat] += x[i] # Based on the correlation between process parameters and quality indicators (for every 1°C increase in drying temperature, the cigarette weight decreases by 0.1mg), update the quality indicators. if feat =='dry_temp': adjusted_dataset['cig_weight'] -= 0.1 * x[i] # Association rule elif feat =='flavor_flow_rate': adjusted_dataset['flavor_precision'] += 0.05 * x[i] # Association rule # Calculation Objective 1: Minimize the variance of quality indicators for each factory, f1(x) # Calculate the variance of quality indicators by factory group (mean of variance of 7 indicators) factory_variances = [] for factory in adjusted_dataset['factory_code'].unique(): fac_data = adjusted_dataset[adjusted_dataset['factory_code'] ==factory] # Calculate the variance of quality indicators for a single factory (mean of the variances of 7 indicators) var_per_metric = fac_data[quality_metrics].var().mean() factory_variances.append(var_per_metric) f1 = sum(factory_variances) # Sum of variances of all factories # Calculate Objective 2: Minimize the mean difference of quality indicators within the same dimension, f2(x) f2 = 0.0 # Traversing three dimensions: brand, model, and product specification for dim_col in [brand_col, model_col, spec_col]: dim_values ​​= adjusted_dataset[dim_col].unique() for dim_val in dim_values: # Extract factory quality indicators under the current dimension value dim_data = adjusted_dataset[adjusted_dataset[dim_col] == dim_val] factory_means = dim_data.groupby('factory_code')[quality_metrics].mean().mean(axis=1) # Mean values ​​for quality metrics in a single factory (7 metrics) global_mean = factory_means.mean() # Global mean of dimensions # Calculate the sum of the Euclidean distances (L2 norm) between the mean of each factory and the global mean. for mean_val in factory_means: f2 += np.linalg.norm(mean_val - global_mean) # Euclidean distance accumulation return [f1, f2] return objective_function Preferably, the core logic constructs the objective function through the build_collaborative_optimization_objective function, and the internal objective_function calculates F(x), taking the adjustment vector x as input and outputting [f1,f2].

[0088] Preferably, the quality index adjustment simulation directly superimposes the simplified assumption adjustment amount x onto the process parameters, and updates the quality index through example rules (such as the correlation between drying temperature and cigarette weight) (in actual applications, it needs to be replaced by a process mechanism model or a data-driven model).

[0089] Preferably, objective 1 (f1) calculates the variance of quality indicators (mean of the variance of 7 indicators) by factory grouping, and sums up the variances of all factories.

[0090] Preferably, objective 2 (f2) iterates through the brand / model / specification dimensions and calculates the sum of the Euclidean distances between the mean quality of each factory and the global mean under the same dimension.

[0091] Step S53: Use the upper and lower limits of historical adjustment data as boundary constraints for decision variables to form a domain of decision variables with constraints.

[0092] Preferably, the 95% confidence interval of the historical adjustment can be used as the boundary, and quantiles are calculated using NumPy to generate a constraint dictionary: import numpy as np # Extract historical adjustment data (output of step S51) adjustment_data = historical_adjustment_quality_dataset[[f'{feat}_delta'for feat in key_features]] # Calculate the upper and lower limits (95% confidence interval) for each adjustment. bounds = [] for feat in key_features: delta_col = f'{feat}_delta' lower = np.percentile(adjustment_data[delta_col].dropna(), 2.5) #Q0.025 upper = np.percentile(adjustment_data[delta_col].dropna(), 97.5) #Q0.975 bounds.append((lower, upper)) # Domain of decision variables with constraints (list form: (min, max) tuple) constrained_decision_variable_domain = bounds Step S54: Input the cross-factory collaborative optimization objective function and the domain of decision variables into the non-dominated sorting genetic algorithm. The non-dominated sorting genetic algorithm is used to perform global optimization on the cross-factory collaborative optimization objective function to obtain the non-dominated solution set.

[0093] Preferably, the Non-dominated Sorting Genetic Algorithm II (NSGA-II) is a multi-objective global optimization algorithm that iteratively searches for the Pareto front through non-dominated sorting, crowding calculation, and selection-crossover-mutation operations.

[0094] The population size is N=100, the crossover probability is pc=0.9 (simulated binary crossover SBX), the mutation probability is pm=0.1 (polynomial mutation), and the number of iterations is G=200.

[0095] Preferably, the implementation steps of the non-dominated sorting genetic algorithm are as follows: ① Population initialization: Randomly generate N individuals (adjustment vector) within the domain of the decision variables.

[0096] ② Non-dominated ranking: Calculate the Pareto rank for each individual (the rank of a non-dominated solution is 1).

[0097] ③ Crowding density calculation: measures the distribution density of individuals of the same level.

[0098] ④ Selection-Crossover-Mutation: Select the parent generation based on rank and crowding, and generate offspring through crossover and mutation.

[0099] ⑤ Iterative update: merge parent and child generations, reorder and select the next generation population, until the iteration ends.

[0100] Preferably, the core code block of the non-dominated sorting genetic algorithm is as follows: from pymoo.algorithms.moo.nsga2 import NSGA2 from pymoo.core.problem import Problem from pymoo.optimize import minimize # Define a multi-objective optimization problem (inheriting from the PyMOO Problem class) class CollaborativeOptimizationProblem(Problem): def __init__(self, n_var, n_obj, bounds, target_func): super().__init__(n_var=n_var, n_obj=n_obj, xl=[b[0] for b inbounds], xu=[b[1] for b in bounds]) self.target_func = target_func # The target function F(x) in step S52 def _evaluate(self, x, out, *args, **kwargs): f1 = []; f2 = [] for ind in x: res = self.target_func(ind) # Calculate the target function value f1.append(res[0]); f2.append(res[1]) out["F"] = np.column_stack([f1, f2]) # Initialization problem (n_var=k is the number of critical process parameters, n_obj=2 is the target number) n_var = len(key_features); n_obj = 2 problem = CollaborativeOptimizationProblem(n_var, n_obj, constrained_decision_variable_domain, target_func=F) # F is the objective function of step S52 # Configure NSGA-II algorithm algorithm = NSGA2(pop_size=100, crossover_prob=0.9, mutation_prob=0.1) # Perform global optimization res = minimize(problem, algorithm, ('n_gen', 200), seed=42, verbose=False) # Non-dominated solution set (res.F is the objective function value, res.X is the decision variable value) non_dominated_solution_set = {'X': res.X,'F': res.F} Step S55: Repeated solutions are removed and feasibility is verified on the non-dominated solution set to obtain the Pareto optimal solution set.

[0101] Preferably, duplicate removal and feasibility verification can be implemented using the following code block: import numpy as np # Non-dominated solution set (output of step S54) nd_X = non_dominated_solution_set['X'] # Decision variable matrix (n_samples × k) nd_F = non_dominated_solution_set['F'] # Objective function value matrix (n_samples × 2) # Duplicate removal (Euclidean distance threshold method) unique_indices = [] for i in range(len(nd_X)): is_unique = True for j in unique_indices: if np.linalg.norm(nd_X[i] - nd_X[j])<0.05: # Calibrate threshold d_th=0.05 is_unique = False break if is_unique: unique_indices.append(i) filtered_X = nd_X[unique_indices]; filtered_F = nd_F[unique_indices] # Feasibility verification (checking boundary constraints) feasible_mask = [] for x in filtered_X: feasible = True for i in range(len(x)): if not (constrained_decision_variable_domain[i][0]<= x[i]<=constrained_decision_variable_domain[i][1]): feasible = False break feasible_mask.append(feasible) pareto_optimal_X = filtered_X[feasible_mask]; pareto_optimal_F =filtered_F[feasible_mask] # Pareto optimal solution set (final output of step S5) pareto_optimal_solution_set = {'X': pareto_optimal_X,'F': pareto_optimal_F} Beneficial effects of steps S51 to S55: This process involves extracting relevant data from key process parameters and generating a Pareto optimal solution set through collaborative optimization. Step S51 extracts historical adjustment data and quality index data corresponding to the feature sets of key process parameters from a cross-plant quality data pool, providing historical data for optimization modeling. Step S52 uses historical adjustment data as decision variables, aiming to minimize the variance of quality index data across plants and the mean difference of quality index data within the same brand, model, or specification dimension, thus constructing a cross-plant collaborative optimization objective function and clarifying the multi-objective optimization direction. Step S53 uses the upper and lower limits of historical adjustment data as boundary constraints for decision variables, forming a constrained domain of decision variables and limiting the parameter adjustment range. Step S54 inputs the objective function and domain into a non-dominated sorting genetic algorithm, which performs global optimization to obtain a non-dominated solution set covering potential solutions under multi-objective trade-offs. Step S55 removes duplicate solutions and verifies feasibility of the non-dominated solution set to form a Pareto optimal solution set. The entire process, from data preparation, target definition, constraint setting to multi-objective optimization and solution set screening, is completed, providing an optimized set of candidate solutions for collaborative adjustment of process parameters across plants.

[0102] Step S6: The Pareto optimal solution set is sent as the optimal process parameter adjustment scheme to the control terminal of the MES system of each cigarette factory.

[0103] Further, step S6 involves distributing the Pareto optimal solution set as the optimal process parameter adjustment scheme to the control terminal of the MES system in each cigarette factory. This specifically includes the following steps: Step S61: Using the factory identifier as the grouping key, the process parameter adjustment schemes corresponding to each cigarette factory in the Pareto optimal solution set are grouped into independent subsets using a grouping aggregation algorithm, forming a set of adjustment schemes grouped by cigarette factory.

[0104] Preferably, using the factory identifier factory_code as the grouping key, the process parameter adjustment schemes corresponding to each cigarette factory in the Pareto optimal solution set produced in step S55 are aggregated into independent subsets using the Pandas GroupBy aggregation algorithm, forming a set of adjustment schemes grouped by cigarette factory.

[0105] The Pareto optimal solution set includes a decision variable matrix `pareto_optimal_X` with dimensions M×K, where M is the number of non-dominated solutions and K is the number of key process parameters. Each row corresponds to an adjustment scheme `xm=[Δp1,...,Δp]`. K [ ], and a factory identification mapping table, which records the cigarette factories to which each scheme applies.

[0106] Preferably, the solutions in the Pareto optimal solution set are associated with the factory identifier to form a "solution-factory" correspondence table, and grouped by factory_code. All solutions of the same factory are merged into independent subsets, and the subsets contain multiple sets of adjustment parameters for that factory.

[0107] Step S62: Each subset of cigarette factories in the adjustment scheme set is converted into a structured transmission format supported by the MES system control terminal of each cigarette factory through a data serialization algorithm, thereby obtaining the factory-adaptive adjustment scheme set.

[0108] Preferably, the structured transmission format adopts JSON format, and the field naming follows the MES control terminal interface specification. For example, "adjustment_params" is the root field of the adjustment parameter, containing parameter name-adjustment amount key-value pairs. The key process parameter name "dry_temp" is mapped to the MES interface field "oven_temp_adjust", and the adjustment amount unit is uniformly consistent with the physical unit required by the interface, such as ℃ or L / h.

[0109] Preferably, for each subset of factories, the data is organized into an array of JSON objects according to the scheme number. Each object contains a scheme ID, parameter adjustment key-value pairs, and the applicable time window for the next production shift by default.

[0110] Step S63: Push the factory adaptation and adjustment scheme set to the control terminal of the corresponding cigarette factory MES system through the open control terminal automation data interface of each cigarette factory MES system.

[0111] Beneficial effects of steps S61 to S63: This process enables the transformation and precise distribution of Pareto optimal solutions to executable adjustment schemes for each factory. Step S61 uses factory identifiers as grouping keys and a grouping aggregation algorithm to merge the corresponding process parameter adjustment schemes for each factory in the Pareto optimal solution set into independent subsets, forming an adjustment scheme set grouped by cigarette factory, ensuring each factory's scheme is independently grouped. Step S62 uses a data serialization algorithm to convert each factory subset in the set into a structured transmission format supported by its MES system control terminal, obtaining a factory-adapted adjustment scheme set and resolving cross-system format compatibility issues. Step S63 utilizes the open automated data interfaces of each factory's MES system control terminal to push the factory-adapted adjustment scheme set to the corresponding control terminal. This completes the entire process from solution set grouping and format adaptation to targeted push, ensuring that the optimal process parameter adjustment scheme is implemented in a form that each factory can recognize and receive, providing direct operational basis for cross-factory collaborative optimization.

[0112] Beneficial effects of steps S1 to S6: Step S1 involves collecting data from multiple factory MES systems and standardizing it through ETL to form a unified quality data pool, laying the foundation for cross-factory data collaboration. Step S2 involves grouping data by brand, model, and specification to achieve structured data organization and support dimensional benchmarking. Step S3 uses a dynamic time warping algorithm to calculate the similarity of quality indicator sequences from different factories within the same dimension, integrating a multi-dimensional benchmarking similarity matrix to quantify the correlation of quality performance between factories. Step S4 inputs this matrix into a feature importance assessment model based on a gradient boosting decision tree to extract the key process parameter feature set affecting quality fluctuations and clarify the optimization direction. Step S5 constructs a collaborative optimization objective function using the key feature set and uses a multi-objective global optimization algorithm to find the Pareto optimal solution set, generating an optimal process parameter adjustment scheme that balances multiple objectives. Step S6 distributes the Pareto optimal solution set as the scheme to the MES control terminals of each factory, promoting the implementation of cross-factory process collaborative optimization. The overall process achieves a closed loop from data collection and integration, dimensional benchmarking, key factor identification to collaborative scheme generation and implementation, promoting the sharing of quality control experience and parameter collaboration among cigarette factories, and improving overall data utilization and accuracy.

[0113] like Figure 2 As shown, this embodiment provides an example of a data collaborative optimization system across cigarette factories. In this embodiment, the data collaborative optimization system is applied to the data collaborative optimization method as described in the above embodiment.

[0114] Specifically, the data collaborative optimization system includes a cross-factory quality data pool construction module 1, a cross-factory quality data grouping module 2, a quality data similarity calculation module 3, a key process parameter feature acquisition module 4, a cross-factory collaborative optimization module 5, and an optimal solution set distribution module 6.

[0115] The cross-factory quality data pool construction module 1 collects outgoing quality inspection data, process inspection data, and equipment information data from the MES system of each cigarette factory, and cleans and standardizes them through an ETL process to obtain a cross-factory quality data pool with a unified format. The cross-factory quality data grouping module 2 groups the cross-factory quality data pool according to brand, model, and specification dimensions based on preset data dimensions, and integrates them to obtain a set of grouped results. The quality data similarity calculation module 3 calculates the similarity of quality indicator sequences between different factories of the same brand, different factories of the same model, and different factories of the same specification in the grouped result set using a dynamic time warping algorithm. The similarity is integrated to obtain a multi-dimensional benchmark similarity matrix; the key process parameter feature acquisition module 4 is used to input the multi-dimensional benchmark similarity matrix into the feature importance evaluation model based on gradient boosting decision tree to extract key process parameter features affecting quality fluctuations and integrate them to obtain a key process parameter feature set; the cross-factory collaborative optimization module 5 is used to construct a cross-factory collaborative optimization objective function based on the key process parameter feature set, and find the Pareto optimal solution set of the cross-factory collaborative optimization objective function through a multi-objective global optimization algorithm; the optimal solution set distribution module 6 is used to distribute the Pareto optimal solution set as the optimal process parameter adjustment scheme to the control terminal of the MES system of each cigarette factory.

[0116] It should be noted that this embodiment is a functional module embodiment based on the above method embodiment. For additional content such as extensions, optimizations, limitations, examples, principle explanations, and beneficial effects of this embodiment, please refer to the above embodiments. This embodiment will not repeat them here.

[0117] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Figure 3 As shown, the electronic device 7 includes a processor 71 and a memory 72 coupled to the processor 71.

[0118] The memory 72 stores program instructions for implementing the federated learning-based collaborative energy-saving method for government data clusters in any of the above embodiments.

[0119] The processor 71 is used to execute program instructions stored in the memory 72 for collaborative energy saving of government data clusters based on federated learning.

[0120] The processor 71 can also be referred to as a CPU (Central Processing Unit). The processor 71 may be an integrated circuit chip with signal processing capabilities. The processor 71 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0121] Furthermore, Figure 4 This is a schematic diagram of the structure of a storage medium according to an embodiment of this application. See also: Figure 4 In this embodiment of the application, the storage medium 8 stores program instructions 81 capable of implementing all the above methods. These program instructions 81 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.

[0122] In the several embodiments provided in this application, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, signal, or other forms.

[0123] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A data collaborative optimization method across cigarette factories, wherein the data collaborative optimization method is applied to multiple cigarette factories with MES systems, characterized in that, The data collaborative optimization method includes: Step S1: Collect outgoing quality inspection data, process inspection data, and equipment information data through the MES system of each cigarette factory, and clean and standardize them through the ETL process to obtain a cross-factory quality data pool with a unified format. Step S2: Based on preset data dimensions, the cross-factory quality data pool is grouped according to brand, model, and specification dimensions, and the grouping results are integrated to obtain a set of results. Step S3: Calculate the similarity of quality index sequences among different factories of the same brand, different factories of the same model, and different factories of the same specification in the grouping result set using the dynamic time warping algorithm, and integrate them to obtain a multi-dimensional benchmarking similarity matrix; Step S4: Input the multidimensional benchmark similarity matrix into the feature importance evaluation model based on gradient boosting decision tree to extract key process parameter features that affect quality fluctuations and integrate them to obtain a key process parameter feature set. Step S5: Construct a cross-factory collaborative optimization objective function based on the key process parameter feature set, and find the Pareto optimal solution set of the cross-factory collaborative optimization objective function through a multi-objective global optimization algorithm; Step S6: The Pareto optimal solution set is sent as the optimal process parameter adjustment scheme to the control terminal of the MES system of each cigarette factory.

2. The data collaborative optimization method according to claim 1, characterized in that, Step S1 involves collecting outgoing quality inspection data, process inspection data, and equipment information data from the MES system of each cigarette factory, and then cleaning and standardizing this data through an ETL process to obtain a unified format cross-factory quality data pool, including: Step S11: Extract factory quality inspection data, process inspection data, and equipment information data in real time through the automated data interface of each cigarette factory's MES system to obtain an original dataset based on a cigarette factory. Step S12: The original datasets of each cigarette factory are preprocessed and missing values ​​are filled by outlier removal and median filling, respectively, to obtain a preliminary cleaned dataset based on an original dataset. Step S13: Map the heterogeneous fields of the current preliminary cleaning dataset to a unified name and type according to the cross-factory unified metadata specification, and perform dimensional normalization on the numerical data through Min-Max normalization to obtain an intermediate dataset with a unified format. Step S14: Classify the current intermediate dataset according to the factory identifier to obtain the classified dataset; Step S15: Integrate the classified datasets from all cigarette factories to obtain a cross-factory quality data pool in a unified format.

3. The data collaborative optimization method according to claim 1, characterized in that, Step S2: Based on preset data dimensions, the cross-factory quality data pool is grouped according to brand, model, and specification, and the grouping results are integrated to obtain a set of results, including: Step S21: Extract field data of three dimensions—brand, model, and specification—from the cross-factory quality data pool to form a grouped benchmark dataset including identification records and dimension fields; Step S22: Using the brand field as the grouping key, the identifier records with the same brand value in the grouping benchmark dataset are grouped together using a grouping aggregation algorithm to obtain the brand dimension grouping result set; Step S23: Using the model field as the grouping key, the identifier records with the same model value in the grouping benchmark dataset are grouped together using a grouping aggregation algorithm to obtain the model dimension grouping result set; Step S24: Using the specification field as the grouping key, the identifier records with the same specification value in the grouping benchmark dataset are grouped into one group using the grouping aggregation algorithm to obtain the specification dimension grouping result set; Step S25: Integrate the brand dimension grouping result set, the model dimension grouping result set, and the product specification dimension grouping result set into a grouping result set grouped by brand, model, and product specification dimensions.

4. The data collaborative optimization method according to claim 1, characterized in that, Step S3: Calculate the sequence similarity of quality indicators among different factories of the same brand, different factories of the same model, and different factories of the same specification in the grouping result set using a dynamic time warping algorithm, and integrate them to obtain a multi-dimensional benchmarking similarity matrix, including: Step S31: Extract the grouping result set based on the quality indicator sequences of different factories under the brand dimension, the quality indicator sequences of different factories under the model dimension, and the quality indicator sequences of different factories under the specification dimension, to obtain the factory quality sequence set under the brand dimension, the factory quality sequence set under the model dimension, and the factory quality sequence set under the specification dimension in sequence. Step S32: Calculate the similarity of the quality indicator sequences between different factories of the same brand based on the factory quality sequence set of the brand dimension using the dynamic time warping algorithm, and obtain the brand dimension factory similarity matrix. Step S33: Calculate the similarity of the quality index sequences between different factories of the same model based on the factory quality sequence set of the model dimension using the dynamic time warping algorithm, and obtain the model dimension factory similarity matrix. Step S34: Calculate the similarity of the quality index sequences between different factories of the same specification using the dynamic time warping algorithm to obtain the factory similarity matrix of the specification dimension. Step S35: Integrate the brand-dimensional factory similarity matrix, the model-dimensional factory similarity matrix, and the product specification-dimensional factory similarity matrix according to dimensions to obtain a multi-dimensional benchmarking similarity matrix.

5. The data collaborative optimization method according to claim 1, characterized in that, Step S4: Input the multidimensional benchmark similarity matrix into the feature importance evaluation model based on gradient boosting decision tree to extract key process parameter features affecting quality fluctuations, and integrate them to obtain a key process parameter feature set, including: Step S41: Extract process parameter feature data and corresponding quality fluctuation index data from the cross-factory quality data pool, and integrate them to obtain a process parameter quality dataset. Step S42: The multidimensional benchmarking similarity matrix and the process parameter quality dataset are correlated dimensionally according to factory identification, brand, model, and specification to obtain the similarity and feature fusion target dataset; Step S43: Input the similarity and feature fusion target dataset into the feature importance evaluation model based on gradient boosting decision tree, and use quality fluctuation index data as target variable and process parameter feature data as input features. Train the feature importance evaluation model through gradient boosting decision tree algorithm to obtain a pre-trained feature importance evaluation model. Step S44: Calculate the importance score of the process parameter feature data using a pre-trained gradient boosting decision tree model; Step S45: Sort the importance scores and extract the process parameter feature data that are higher than the median of the feature importance scores to obtain the key process parameter feature set.

6. The data collaborative optimization method according to claim 1, characterized in that, Step S5: Construct a cross-plant collaborative optimization objective function based on the key process parameter feature set, and find the Pareto optimal solution set of the cross-plant collaborative optimization objective function through a multi-objective global optimization algorithm, including: Step S51: Extract historical adjustment data and quality index data corresponding to the key process parameter feature set from the cross-factory quality data pool; Step S52: Using the historical adjustment data as decision variables, and with the goal of minimizing the variance of quality indicator data for each cigarette factory and minimizing the mean difference of quality indicator data under the same brand, model, or specification, a cross-factory collaborative optimization objective function is constructed. Step S53: Use the upper and lower limits of the historical adjustment data as boundary constraints for the decision variables to form a domain of the decision variables with constraints. Step S54: Input the cross-factory collaborative optimization objective function and the domain of the decision variables into the non-dominated sorting genetic algorithm, and use the non-dominated sorting genetic algorithm to perform global optimization on the cross-factory collaborative optimization objective function to obtain a non-dominated solution set; Step S55: Repeated solutions are removed and feasibility is verified on the non-dominated solution set to obtain the Pareto optimal solution set.

7. The data collaborative optimization method according to claim 1, characterized in that, Step S6 involves sending the Pareto optimal solution set as the optimal process parameter adjustment scheme to the control terminal of the MES system in each cigarette factory, including: Step S61: Using the factory identifier as the grouping key, the process parameter adjustment schemes corresponding to each cigarette factory in the Pareto optimal solution set are grouped into independent subsets using a grouping aggregation algorithm to form a set of adjustment schemes grouped by cigarette factory. Step S62: Each subset of cigarette factories in the set of adjustment schemes is converted into a structured transmission format supported by the control terminal of the MES system of each cigarette factory by using a data serialization algorithm, so as to obtain the set of factory-adaptive adjustment schemes. Step S63: Push the set of factory adaptation and adjustment schemes to the control terminal of the corresponding cigarette factory MES system through the open control terminal automation data interface of each cigarette factory MES system.

8. A cross-cigarette factory data collaborative optimization system, wherein the data collaborative optimization system is applied to the data collaborative optimization method as described in any one of claims 1 to 7, characterized in that, The data collaborative optimization system includes: The cross-factory quality data pool construction module is used to collect outgoing quality inspection data, process inspection data, and equipment information data through the MES system of each cigarette factory, and clean and standardize them through the ETL process to obtain a cross-factory quality data pool with a unified format. The cross-factory quality data grouping module is used to group the cross-factory quality data pool according to brand, model, and specification dimensions based on preset data dimensions, and integrate them to obtain a set of grouping results. The quality data similarity calculation module is used to calculate the similarity of quality indicator sequences between different factories of the same brand, different factories of the same model, and different factories of the same specification in the grouping result set through dynamic time warping algorithm, and integrate them to obtain a multi-dimensional benchmarking similarity matrix. The key process parameter feature acquisition module is used to input the multidimensional benchmark similarity matrix into the feature importance evaluation model based on gradient boosting decision tree in order to extract the key process parameter features that affect quality fluctuations and integrate them to obtain the key process parameter feature set. The cross-factory collaborative optimization module is used to construct a cross-factory collaborative optimization objective function based on the key process parameter feature set, and to find the Pareto optimal solution set of the cross-factory collaborative optimization objective function through a multi-objective global optimization algorithm; The optimal solution set distribution module is used to distribute the Pareto optimal solution set as the optimal process parameter adjustment scheme to the control terminal of the MES system of each cigarette factory.

9. An electronic device, characterized in that, The method includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the data collaborative optimization method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions that, when executed by a processor, enable the data collaborative optimization method as described in any one of claims 1 to 7.