A production line control system for optimized preparation weight calibration
Formulation weight calibration and data analysis are performed by adopting machine learning and artificial intelligence technologies in formulation production line control systems, combining improved random forest and extreme gradient lift models, and automatic calibration using dual-time scale reinforcement learning and isolated forest models and Abnormal detection solves the problems of preparation weight calibration accuracy and control difficulties, and achieves efficient, automatic and reliable preparation production line control.
Patent Information
- Application Number
- CN202411579044.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-11-07
AI Technical Summary
In the existing formulation production line control system, there are technical difficulties in the accuracy and control of formulation weight calibration. Traditional methods rely on manual operations and fixed rules, resulting in insufficient automation and insufficient accuracy, and a single machine learning model cannot meet the accuracy and real-time prediction. need.
The production line control system based on machine learning and artificial intelligence is adopted, combined with the two-way integration of improved random forest model and extreme gradient lift model, integrated control decision optimization of formulation weight calibration, data analysis and abnormality detection is carried out. Automatic calibration control is performed using reinforcement learning methods with dual time scale random optimization, and the real-timeness of anomaly detection is improved by combining unsupervised models of isolated forests.
It improves the accuracy of formulation weight calibration and the reliability of automatic control, enhances the accuracy of data analysis and the real-time nature of abnormal detection, reduces production errors and waste rates, and optimizes resource utilization.
Smart Images

Figure CN119090319B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of preparation production line control, and in particular relates to a production line control system for optimizing preparation weight calibration. Background Art
[0002] The production line control system for preparation weight calibration optimization is an intelligent system that combines machine learning technology to monitor and optimize weight calibration in the preparation production process in real time. The system analyzes relevant data from the production line and uses machine learning and artificial intelligence algorithms to accurately calibrate, judge and predict the weight of the preparation. Its main function is to improve the efficiency of the production line and product quality, ensuring that each batch of preparations meets the set weight standards, thereby reducing production errors, reducing scrap rates, and optimizing resource utilization.
[0003] However, in the existing control systems of the preparation production line, the accuracy and control of the preparation weight calibration are largely the technical difficulties of the preparation production line control, and the traditional technology usually adopts fixed rules or manual control and regulation methods to optimize the calibration of the preparation weight, and then realizes the production line control, so it is inevitable that there are technical problems of insufficient automation and reliance on the accuracy of manual operation; in the existing weight analysis function module, there is a problem that the traditional method has insufficient accuracy when applying the preparation weight analysis, and the application of historical data to analyze the weight of the current preparation has higher requirements for model accuracy, and the traditional single machine learning model cannot meet the technical problems of accuracy and real-time prediction; in the existing calibration auxiliary function module, there is a technical problem that the decision prediction results of automatic calibration greatly affect the reliability of production line control, and the basic reinforcement learning ideas cannot meet the automatic calibration in terms of strategy updating, and both control stability and real-time strategy updating are required; in the existing anomaly detection function module, there is a technical problem that the traditional method has insufficient real-time when combining the functions of weight analysis and calibration assistance. Summary of the invention
[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a production line control system for optimizing the preparation weight calibration. In view of the fact that in the existing preparation production line control system, the accuracy and control of the preparation weight calibration are largely the technical difficulties in the preparation production line control, and the traditional technology usually adopts fixed rules or manual control and regulation methods to optimize the calibration of the preparation weight, and then realizes the production line control, so it is inevitable that there are technical problems such as insufficient automation and reliance on manual operation accuracy. The present solution creatively adopts a production line control system based on machine learning and artificial intelligence technology to realize the integrated control decision optimization of preparation weight calibration, data analysis and anomaly detection, thereby assisting the automatic control of the production line; in view of the fact that in the existing weight analysis function module, the traditional method has the problem of insufficient accuracy when applying the preparation weight analysis, and the application of historical data to analyze the weight of the current preparation has higher requirements on the model accuracy, and the traditional single machine learning model cannot meet the technical problems of accuracy and real-time prediction. The present solution creatively adopts a combination of improved The two-way integration of the random forest model and the extreme gradient boosting model improves the overall prediction accuracy of the model by improving the random forest model and designing integrated stacking prediction results, providing good pre-data support for subsequent control and detection; in the existing calibration auxiliary function module, there is a problem that the decision prediction results of automatic calibration greatly affect the reliability of production line control, and the basic reinforcement learning idea cannot meet the technical problem of automatic calibration in terms of strategy update, which requires both control stability and real-time strategy update. This solution creatively adopts the reinforcement learning method of dual-time scale random optimization for automatic calibration control, optimizes strategy updates through fast time scales, and optimizes the stability of control strategies through slow time scales, thereby improving the availability and reliability of the calibration auxiliary function; in the existing anomaly detection function module, there is a technical problem that the traditional method has insufficient real-time performance when combining weight analysis and calibration auxiliary functions. This solution creatively adopts an unsupervised model combined with isolation forest for anomaly detection and processing, thereby improving the real-time performance of anomaly detection and processing.
[0005] The technical solution adopted by the present invention is as follows: A production line control system for optimizing preparation weight calibration provided by the present invention comprises a weight monitoring module, a data analysis and optimization module, a calibration auxiliary module, an abnormality handling module and a recording and reporting module;
[0006] The weight monitoring module is used for weight measurement and data collection, and obtains the original data set of production line control through weight measurement and data collection, and sends the original data set of production line control to the data analysis and optimization module, the calibration auxiliary module and the abnormality handling module;
[0007] The data analysis and optimization module is used to analyze the weight parameters and indicators of the current preparation to determine whether the preparation needs calibration optimization, obtain the weight analysis optimization production line control decision reference data through weight parameter and indicator analysis, and send the weight analysis optimization production line control decision reference data to the calibration auxiliary module;
[0008] The calibration auxiliary module is used to perform production line control adjustment according to the preparation weight, obtain calibration optimization production line control decision reference data through production line control adjustment, and send the calibration optimization production line control decision reference data to the exception handling module and the record reporting module;
[0009] The abnormality handling module is used to synchronously detect the production line and the weight of the preparation, obtain the production line abnormality control decision reference data through the synchronous detection of the production line and the weight of the preparation, and send the production line abnormality control decision reference data to the recording and reporting module;
[0010] The recording and reporting module is used to record data and generate control management reports regularly, and obtain production line control feedback data through control management report generation.
[0011] Furthermore, the weight monitoring module is used for system initialization and basic data collection, and specifically includes an initialization unit and a data collection unit;
[0012] The initialization unit is used for system initialization and system self-checking, specifically, after starting the system, performing hardware device self-checking, confirming the working status of the sensor and the calibration device, and obtaining self-checking feedback data, and the self-checking feedback data is used to assist subsequent abnormality detection and processing;
[0013] The data acquisition unit is used for real-time data, specifically, to collect the weight data of the preparations in each production line in real time through sensors to obtain the original weight data of the preparations, and to perform filtering, denoising and error correction operations on the original weight data of the preparations through basic preprocessing to obtain the original data set for production line control;
[0014] The production line control original data set specifically includes preparation production line historical data, real-time preparation weight data and production line status data.
[0015] Furthermore, the data analysis and optimization module is used to analyze the historical data of the preparation production line, and to judge and predict whether the preparations in the production line need to be calibrated. Specifically, based on the historical data of the preparation production line in the original data set of the production line control, a machine learning method combining improved random forest and extreme gradient boosting is used to perform data analysis and optimization to obtain reference data for weight analysis optimization production line control decision;
[0016] The machine learning method combining improved random forest and extreme gradient boosting includes the following specific steps: basic data processing, building an improved random forest model, building an extreme gradient boosting model, model integration optimization, and data analysis optimization;
[0017] The basic data processing is used to pre-process the historical data of the preparation production line, specifically to obtain optimized preparation production line data through data cleaning, data feature extraction and data segmentation, and the optimized preparation production line data is used for machine learning model training;
[0018] The improved random forest model is constructed to construct a random forest model and perform model improvement and optimization required for adaptive weight analysis, specifically to construct a basic random forest model, and to select the best split point of the basic random forest model by the information gain ratio method, and to construct an improved random forest model, specifically including the following steps:
[0019] Construct a basic random forest model, specifically by building a basic random forest model through decision tree generation and majority voting integration;
[0020] Optimize the split point selection, specifically by calculating the information entropy of the tree node, calculating the information gain and calculating the information gain ratio, taking the feature with the maximum information gain ratio as the key feature for splitting, and obtaining the splitting optimized feature data;
[0021] The random forest model is improved by applying the information gain ratio as a splitting criterion when generating a decision tree of the basic random forest model based on the split optimization feature data, optimizing the decision tree generation process and constructing an improved random forest model;
[0022] The extreme gradient boosting model is constructed to construct a basic extreme gradient model to optimize large-scale data processing capabilities, specifically to construct a basic extreme gradient model and optimize the performance of the basic extreme gradient model by minimizing the cross entropy loss function combined with regularization
[0023] The model integration optimization is used to perform bidirectional integration of the prediction results of the two models and improve the overall data analysis accuracy optimization. Specifically, it constructs a bidirectional model output integration to obtain integrated prediction data. The calculation formula is:
[0024] ;
[0025] In the formula, It is the integrated prediction data, which is used to represent the final prediction output result. is the ensemble prediction weight, is the integrated prediction output, which is used to represent the integrated prediction results of the random forest model and the extreme gradient boosting model using the weighted integration method. is the stacked prediction weight, is the stacked prediction output, which is used to represent the ensemble prediction results of the random forest model and the extreme gradient boosting model using the stacked ensemble method;
[0026] is the weighted ensemble weight, is the predicted output of the random forest model, is the predicted output of the extreme gradient boosting model;
[0027] is the stacked ensemble bias weight, and the stacked ensemble is specifically trained through a logistic regression model. is the weight of the stacked integrated raw data, x is the raw feature data in the optimized preparation production line data, is the stacked ensemble random forest weight, It is the stacked integrated extreme gradient boosting weight;
[0028] The data analysis optimization is used to train the model and perform data analysis optimization, specifically, through the basic data processing, the construction of the improved random forest model, the construction of the extreme gradient boosting model and the model integration optimization, to perform machine learning model training to obtain the data analysis optimization model Model DF , and optimize the model by using the data analysis DF , performing data analysis and optimization based on the historical data of the preparation production line in the original data set of the production line control, and obtaining the reference data for the weight analysis optimization production line control decision;
[0029] The weight analysis optimization production line control decision reference data specifically refers to calibration requirement classification data, and the calibration requirement classification data specifically includes preparation data that requires automatic calibration control and preparation data that does not require automatic calibration control. The preparation data that requires automatic calibration control will be automatically calibrated and controlled through a calibration auxiliary module.
[0030] Furthermore, the calibration auxiliary module is used to optimize the calibration process of the preparation weight and provide a control strategy reference, specifically, based on the real-time preparation weight data in the production line control original data set and the weight analysis optimization production line control decision reference data, a reinforcement learning method of dual-time scale stochastic optimization is used to perform automatic calibration control to obtain calibration optimization production line control decision reference data;
[0031] The reinforcement learning method of dual-time-scale random optimization performs automatic calibration control to obtain the calibration optimization production line control decision reference data, including: automatic calibration control problem definition, parameter initialization, dual-time-scale update and automatic calibration assistance;
[0032] The automatic calibration control problem definition is used to define the automatic calibration control problem as a Markov decision process, specifically to define a combination of automatic calibration control decision parameters;
[0033] The parameter initialization is used to initialize the reinforcement learning parameters, specifically the initialization strategy parameters and value function parameters. The strategy parameters are used to determine the specific actions taken by the model, and the value function parameters are used to estimate the expected cumulative reward value under a given state;
[0034] The dual time scale update is used to update parameters through a fast time scale and a slow time scale, specifically updating the value function parameters through a fast time scale and updating the strategy parameters through a slow time scale, including the following steps:
[0035] The fast time scale update of the value function parameters is used to quickly adapt to the adjustment of the current control strategy and timely reflect the long-term effects of different calibration operations. Specifically, the value function approximation method is adopted, and the value function parameters are updated by the stochastic gradient method to obtain the updated value function parameters;
[0036] The slow time scale update of the policy parameters is used to prevent the model from oscillating or becoming unstable during the calibration process due to excessively frequent policy adjustments, thereby ensuring that the model can gradually optimize the calibration policy. Specifically, after the value function parameters are updated on a fast time scale, the policy gradient method is used to update the policy parameters to obtain updated policy parameters.
[0037] The automatic calibration assistance is used to train the model and implement the calibration assistance, specifically, through the automatic calibration control problem definition, the parameter initialization and the dual time scale update, iterative model training is performed to obtain the automatic calibration control model Model IC , and by using the automatic calibration control model Model IC , performing automatic calibration control according to the real-time preparation weight data in the production line control original data set and the weight analysis optimized production line control decision reference data, to obtain calibration optimized production line control decision reference data;
[0038] The calibration optimization production line control decision reference data specifically refers to the calibration control adjustment strategy of the preparation weight of the current production line.
[0039] Furthermore, the exception processing module is used to monitor the status of the production line in real time and perform anomaly detection, specifically, based on the production line status data in the production line control original data set, the weight analysis optimization production line control decision reference data and the calibration optimization production line control decision reference data, anomaly detection and processing are performed using an unsupervised model combined with isolation forest to obtain production line abnormality control decision reference data;
[0040] The steps of performing anomaly detection and processing in combination with the unsupervised model of the isolation forest specifically include: random sub-sample selection, construction of an isolation tree, calculation of root-leaf paths, calculation of anomaly detection scores, and anomaly detection;
[0041] The random sub-sample selection is used to construct an anomaly detection original data set and select a subset sample therefrom, specifically, the production line status data in the production line control original data set, the weight analysis optimization production line control decision reference data and the calibration optimization production line control decision reference data are constructed as an anomaly detection original data set, and a sub-sample set is selected from the anomaly detection original data set by random selection, and the sub-sample set is used to construct an isolation tree;
[0042] The construction of the isolated tree specifically includes dividing the samples in the sub-sample set into a left subset and a right subset by random feature selection and random split point selection, and recursively until a maximum tree depth is reached;
[0043] The root-leaf path calculation is specifically to calculate the path length from the root node to the leaf node where the point is located in each isolated tree, and obtain the expected path length data;
[0044] The abnormality detection score calculation is specifically to calculate the expected path length data, perform average path length calculation, and calculate the abnormality score according to the average path length;
[0045] The anomaly detection is specifically to set an anomaly threshold. When the anomaly score is greater than the anomaly threshold, the real-time data sample at this time is marked as an abnormal data point, and the anomaly processing model is trained in an unsupervised manner to perform real-time anomaly detection and processing to obtain reference data for production line abnormality control decision-making;
[0046] The production line abnormal control decision reference data specifically refers to the current production line control status classification data, and the current production line control status classification data specifically includes abnormal data and non-abnormal data.
[0047] Furthermore, the recording and reporting module is used for intelligent report generation and data visualization, specifically, based on the weight analysis optimization production line control decision reference data, the calibration optimization production line control decision reference data and the production line abnormality control decision reference data, combined with the specific production line data and the results of the model analysis, to automatically generate a control data report for the preparation production line, and through data visualization technology, generate an intuitive analysis data schematic diagram to obtain the production line control feedback data, and assist the automatic control of the production line based on the production line control feedback data.
[0048] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0049] (1) In the existing control systems of pharmaceutical production lines, the accuracy and control of pharmaceutical weight calibration are largely technical difficulties in pharmaceutical production line control. Traditional technologies usually use fixed rules or manual control and regulation methods to optimize the calibration of pharmaceutical weight, thereby achieving production line control. As a result, there are inevitable technical problems of insufficient automation and reliance on manual operation accuracy. This solution creatively uses a production line control system based on machine learning and artificial intelligence technology to achieve integrated control decision optimization of pharmaceutical weight calibration, data analysis and anomaly detection, thereby assisting in the automatic control of the production line.
[0050] (2) In the existing weight analysis function module, the traditional method has the problem of insufficient accuracy when applying the weight analysis of the preparation. The application of historical data to analyze the weight of the current preparation has higher requirements for model accuracy. The traditional single machine learning model cannot meet the technical problems of accuracy and real-time prediction. This solution creatively adopts a two-way integration of the improved random forest model and the extreme gradient boosting model. By improving the random forest model and designing an integrated stacking prediction result, the overall prediction accuracy of the model is improved, providing good pre-data support for subsequent control and detection;
[0051] (3) In the existing calibration auxiliary function module, the decision prediction results of automatic calibration greatly affect the reliability of production line control, and the basic reinforcement learning idea cannot meet the technical problem of automatic calibration in terms of strategy update, which requires both control stability and real-time strategy update. This scheme creatively adopts the reinforcement learning method of dual-time scale stochastic optimization for automatic calibration control, optimizes strategy update by fast time scale, and optimizes the stability of control strategy by slow time scale, thus improving the availability and reliability of calibration auxiliary function;
[0052] (4) In view of the technical problem that the traditional method in the existing anomaly detection function module has insufficient real-time performance when combining weight analysis and calibration assistance functions, this solution creatively adopts an unsupervised model combined with isolation forest for anomaly detection and processing, thereby improving the real-time performance of anomaly detection and processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A schematic diagram of the structure of a production line control system for optimizing preparation weight calibration provided by the present invention;
[0054] Figure 2 A flowchart of the steps performed by the data analysis optimization module;
[0055] Figure 3 A flowchart of the steps performed to calibrate the auxiliary module;
[0056] Figure 4 A flowchart of the steps executed by the exception handling module;
[0057] Figure 5 Schematic diagram of the calibration result data visualization of the calibration auxiliary module.
[0058] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0059] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0060] Example 1, see Figure 1 and Figure 2 The present invention provides a production line control system for optimizing preparation weight calibration, comprising a weight monitoring module, a data analysis and optimization module, a calibration auxiliary module, an abnormality handling module and a recording and reporting module;
[0061] The weight monitoring module is used for weight measurement and data collection, and obtains the original data set of production line control through weight measurement and data collection, and sends the original data set of production line control to the data analysis and optimization module, the calibration auxiliary module and the abnormality handling module;
[0062] The data analysis and optimization module is used to analyze the weight parameters and indicators of the current preparation to determine whether the preparation needs calibration optimization, obtain the weight analysis optimization production line control decision reference data through weight parameter and indicator analysis, and send the weight analysis optimization production line control decision reference data to the calibration auxiliary module;
[0063] The calibration auxiliary module is used to perform production line control adjustment according to the preparation weight, obtain calibration optimization production line control decision reference data through production line control adjustment, and send the calibration optimization production line control decision reference data to the exception handling module and the record reporting module;
[0064] The abnormality handling module is used to synchronously detect the production line and the weight of the preparation, obtain the production line abnormality control decision reference data through the synchronous detection of the production line and the weight of the preparation, and send the production line abnormality control decision reference data to the recording and reporting module;
[0065] The recording and reporting module is used to record data and generate control management reports regularly, and obtain production line control feedback data through control management report generation.
[0066] By performing the above operations, in the existing preparation production line control system, the accuracy and control of preparation weight calibration are largely the technical difficulties of preparation production line control, and traditional technology usually adopts fixed rules or manual control and regulation methods to optimize the calibration of preparation weight, and then realize production line control. Therefore, it is inevitable that there are technical problems such as insufficient automation and dependence on manual operation accuracy. This solution creatively adopts a production line control system based on machine learning and artificial intelligence technology to realize integrated control decision optimization of preparation weight calibration, data analysis and anomaly detection, thereby assisting the automatic control of the production line.
[0067] Embodiment 2, this embodiment is based on the above embodiment, see Figure 1 ,Further, the weight monitoring module is used for system initialization and basic data collection, and specifically includes an initialization unit and a data collection unit;
[0068] The initialization unit is used for system initialization and system self-checking, specifically, after starting the system, performing hardware device self-checking, confirming the working status of the sensor and the calibration device, and obtaining self-checking feedback data, and the self-checking feedback data is used to assist subsequent abnormality detection and processing;
[0069] The hardware equipment specifically includes a weight sensor, an automatic calibration device and a central controller;
[0070] The weight sensor is used to measure the weight of the preparation in real time;
[0071] The automatic calibration device is used to adjust the weight of the preparation in real time;
[0072] The central controller is used to control the signal processing, control logic execution and data transmission of the entire system;
[0073] The data acquisition unit is used for real-time data, specifically, to collect the weight data of the preparations in each production line in real time through sensors to obtain the original weight data of the preparations, and to perform filtering, denoising and error correction operations on the original weight data of the preparations through basic preprocessing to obtain the original data set for production line control;
[0074] The production line control original data set specifically includes preparation production line historical data, real-time preparation weight data and production line status data.
[0075] Embodiment 3, this embodiment is based on the above embodiment, see Figure 2The data analysis and optimization module is used to analyze the historical data of the preparation production line and judge and predict whether the preparations in the production line need to be calibrated. Specifically, based on the historical data of the preparation production line in the original data set of the production line control, a machine learning method combining improved random forest and extreme gradient boosting is used to perform data analysis and optimization to obtain reference data for weight analysis optimization production line control decision;
[0076] The machine learning method combining improved random forest and extreme gradient boosting includes the following specific steps: basic data processing, building an improved random forest model, building an extreme gradient boosting model, model integration optimization, and data analysis optimization;
[0077] The basic data processing is used to pre-process the historical data of the preparation production line, specifically to obtain optimized preparation production line data through data cleaning, data feature extraction and data segmentation, and the optimized preparation production line data is used for machine learning model training;
[0078] The improved random forest model is constructed to construct a random forest model and perform model improvement and optimization required for adaptive weight analysis, specifically to construct a basic random forest model, and to select the best split point of the basic random forest model by the information gain ratio method, and to construct an improved random forest model, specifically including the following steps:
[0079] Construct a basic random forest model, specifically by building a basic random forest model through decision tree generation and majority voting integration;
[0080] Optimize the split point selection, specifically by calculating the information entropy of the tree node, calculating the information gain and calculating the information gain ratio, taking the feature with the maximum information gain ratio as the key feature for splitting, and obtaining the splitting optimized feature data;
[0081] The calculation formula of the tree node information entropy is:
[0082] ;
[0083] Where H(·) is the tree node information entropy calculation function, u is the node index, I is the total number of data categories, i is the category index, and p i is the probability of the i-th data category in the tree node u;
[0084] The calculation formula of the information gain is:
[0085] ;
[0086] Where IG(·) is the information gain calculation function, H(u) is the information entropy of tree node u, V is the total number of child nodes corresponding to tree node u, v is the child node index, and u vis the vth child node of the tree node u, |·| is the modulus operator, H(u v ) is the child node u v Information entropy of
[0087] The calculation formula of the information gain ratio is:
[0088] ;
[0089] Where, IGR(A) is the information gain ratio corresponding to feature A, IG(u) is the information gain corresponding to feature A and tree node u, IV(A) is the original value corresponding to feature A, and A is the feature data index, which is used to represent the original feature data in the optimized preparation production line data;
[0090] The random forest model is improved by applying the information gain ratio as a splitting criterion when generating a decision tree of the basic random forest model based on the split optimization feature data, optimizing the decision tree generation process and constructing an improved random forest model;
[0091] The extreme gradient boosting model is constructed to construct a basic extreme gradient model to optimize large-scale data processing capabilities, specifically to construct a basic extreme gradient model and optimize the performance of the basic extreme gradient model by minimizing the cross entropy loss function combined with regularization
[0092] The model integration optimization is used to perform bidirectional integration of the prediction results of the two models and improve the overall data analysis accuracy optimization. Specifically, it constructs a bidirectional model output integration to obtain integrated prediction data. The calculation formula is:
[0093] ;
[0094] In the formula, It is the integrated prediction data, which is used to represent the final prediction output result. is the ensemble prediction weight, is the integrated prediction output, which is used to represent the integrated prediction results of the random forest model and the extreme gradient boosting model using the weighted integration method. is the stacked prediction weight, is the stacked prediction output, which is used to represent the ensemble prediction results of the random forest model and the extreme gradient boosting model using the stacked ensemble method;
[0095] is the weighted ensemble weight, is the predicted output of the random forest model, is the predicted output of the extreme gradient boosting model;
[0096] is the stacked ensemble bias weight, and the stacked ensemble is specifically trained through a logistic regression model. is the weight of the stacked integrated raw data, x is the raw feature data in the optimized preparation production line data, is the stacked ensemble random forest weight, It is the stacked integrated extreme gradient boosting weight;
[0097] The ensemble prediction weights , the specific value is 0.45, the stack prediction weight , the specific value is 0.55; the weighted integration weight , the specific value is 0.42; the stacked integration bias weight , the specific value is 0.1, the stacking integration raw data weight , the specific value is 0.08, the stacked ensemble random forest weight , the specific value is 0.36, the stacked integrated limit gradient boost weight , the specific value is 0.46;
[0098] The data analysis optimization is used to train the model and perform data analysis optimization, specifically, through the basic data processing, the construction of the improved random forest model, the construction of the extreme gradient boosting model and the model integration optimization, to perform machine learning model training to obtain the data analysis optimization model Model DF , and optimize the model by using the data analysis DF , performing data analysis and optimization based on the historical data of the preparation production line in the original data set of the production line control, and obtaining the reference data for the weight analysis optimization production line control decision;
[0099] The weight analysis optimization production line control decision reference data specifically refers to calibration requirement classification data, and the calibration requirement classification data specifically includes preparation data that requires automatic calibration control and preparation data that does not require automatic calibration control. The preparation data that requires automatic calibration control will be automatically calibrated and controlled through a calibration auxiliary module.
[0100] By performing the above operations, in the existing weight analysis function module, there is a problem of insufficient accuracy when applying traditional methods to preparation weight analysis, and the application of historical data to analyze the weight of the current preparation has higher requirements for model accuracy. The traditional single machine learning model cannot meet the technical problems of accuracy and real-time prediction. This solution creatively adopts a two-way integration combining an improved random forest model and an extreme gradient boosting model. By improving the random forest model and designing integrated stacking prediction results, the overall prediction accuracy of the model is improved, providing good advance data support for subsequent control and detection.
[0101] Embodiment 4, this embodiment is based on the above embodiment, see Figure 3 and Figure 5 The calibration auxiliary module is used to optimize the calibration process of the preparation weight and provide a control strategy reference, specifically, based on the real-time preparation weight data in the production line control original data set and the weight analysis optimization production line control decision reference data, a reinforcement learning method of dual-time scale stochastic optimization is used to perform automatic calibration control to obtain the calibration optimization production line control decision reference data;
[0102] The reinforcement learning method of dual-time-scale random optimization performs automatic calibration control to obtain the calibration optimization production line control decision reference data, including: automatic calibration control problem definition, parameter initialization, dual-time-scale update and automatic calibration assistance;
[0103] The automatic calibration control problem definition is used to define the automatic calibration control problem as a Markov decision process, specifically to define the automatic calibration control decision parameter combination, and the calculation formula is:
[0104] ;
[0105] Where O is the combination of automatic calibration control decision parameters, S is the state parameter set, A is the action parameter set, is the model state transition probability, which is used to indicate that the model transfers from state s to state after executing action a The probability of, where s is the state parameter, a is the action parameter, and R(s,a) is the immediate reward parameter, which is used to represent the immediate reward obtained by the model in state s after executing action a. is the strategy parameter, which is used to indicate that the model uses the strategy parameter in state s The probability of choosing to perform action a;
[0106] The parameter initialization is used to initialize the reinforcement learning parameters, specifically the initialization strategy parameters and value function parameters. The strategy parameters are used to determine the specific actions taken by the model, and the value function parameters are used to estimate the expected cumulative reward value under a given state;
[0107] The dual time scale update is used to update parameters through a fast time scale and a slow time scale, specifically updating the value function parameters through a fast time scale and updating the strategy parameters through a slow time scale, including the following steps:
[0108] The fast time scale update of the value function parameters is used to quickly adapt to the adjustment of the current control strategy and timely reflect the long-term effects of different calibration operations. Specifically, the value function approximation method is adopted, and the value function parameters are updated by the stochastic gradient method to obtain the updated value function parameters. The calculation formula is:
[0109] ;
[0110] In the formula, w t+1 is the update value function parameter, which is used to represent the value function parameter at the t+1 iteration, t is the iteration index, and w t is the value function parameter at t iterations, is the learning rate for updating the value function parameters at the tth iteration, which is used to control the update step size of the value function parameters. t is the immediate reward at the tth iteration, is a discount factor with a value range of [0,1), is the value function estimation function, s t+1 is the state parameter at the t+1 iteration, s t is the state parameter at the tth iteration, is the value function parameter gradient operator;
[0111] The slow time scale update of the policy parameters is used to prevent the model from oscillating or becoming unstable during the calibration process due to excessively frequent policy adjustments, thereby ensuring that the model can gradually optimize the calibration strategy. Specifically, after the value function parameters are updated on a fast time scale, the policy gradient method is used to update the policy parameters to obtain the updated policy parameters. The calculation formula is:
[0112] ;
[0113] In the formula, is the update strategy parameter, which is used to represent the strategy parameter at the t+1 iteration, t is the iteration index, is the strategy parameter at the tth iteration, is the learning rate for updating the policy parameters at the tth iteration, is the policy parameter gradient operator, r t is the immediate reward at the tth iteration, is a discount factor with a value range of [0,1), is the value function estimation function, s t+1 is the state parameter at the t+1 iteration, s t is the state parameter at the tth iteration;
[0114] The automatic calibration assistance is used to train the model and implement the calibration assistance, specifically, through the automatic calibration control problem definition, the parameter initialization and the dual time scale update, iterative model training is performed to obtain the automatic calibration control model Model IC , and by using the automatic calibration control model Model IC, performing automatic calibration control according to the real-time preparation weight data in the production line control original data set and the weight analysis optimized production line control decision reference data, to obtain calibration optimized production line control decision reference data;
[0115] The calibration optimization production line control decision reference data specifically refers to the calibration control adjustment strategy of the preparation weight of the current production line;
[0116] See also Figure 5 , as shown in the figure, the upper sub-figure is a schematic diagram of the preparation weight calibration control strategy, and the lower sub-figure is a schematic diagram of the strategy parameter update and the value function parameter update;
[0117] In the upper sub-figure, the horizontal direction is the time variable, the vertical direction is the weight variable, the gray dotted line is the calibration target weight value, and the black discount is the actual calibration weight change in the formulation weight calibration control strategy;
[0118] In the sub-figure below, the horizontal direction is the time variable, the vertical direction is the parameter variable, the black curve is the update change process of the value function parameter, and the gray curve is the update change process of the strategy parameter;
[0119] By executing the above operations, in the existing calibration auxiliary function module, there is a problem that the decision prediction results of automatic calibration greatly affect the reliability of production line control, and the basic reinforcement learning idea cannot meet the technical problem of automatic calibration in terms of strategy update, which requires both control stability and real-time strategy update. This scheme creatively adopts the reinforcement learning method of dual-time scale stochastic optimization for automatic calibration control, optimizes strategy updates through fast time scale, and optimizes the stability of control strategy through slow time scale, thereby improving the availability and reliability of the calibration auxiliary function.
[0120] Embodiment 5, this embodiment is based on the above embodiment, see Figure 4 The exception processing module is used to monitor the status of the production line in real time and perform anomaly detection. Specifically, based on the production line status data in the production line control original data set, the weight analysis optimization production line control decision reference data and the calibration optimization production line control decision reference data, anomaly detection and processing are performed using an unsupervised model combined with isolation forest to obtain production line abnormality control decision reference data;
[0121] The steps of performing anomaly detection and processing in combination with the unsupervised model of the isolation forest specifically include: random sub-sample selection, construction of an isolation tree, calculation of root-leaf paths, calculation of anomaly detection scores, and anomaly detection;
[0122] The random sub-sample selection is used to construct an anomaly detection original data set and select a subset sample therefrom, specifically, the production line status data in the production line control original data set, the weight analysis optimization production line control decision reference data and the calibration optimization production line control decision reference data are constructed as an anomaly detection original data set, and a sub-sample set is selected from the anomaly detection original data set by random selection, and the sub-sample set is used to construct an isolation tree;
[0123] The construction of the isolated tree specifically includes dividing the samples in the sub-sample set into a left subset and a right subset by random feature selection and random split point selection, and recursively until a maximum tree depth is reached;
[0124] The root-leaf path calculation is specifically to calculate the path length from the root node to the leaf node where the point is located in each isolated tree, and obtain the expected path length data;
[0125] The abnormality detection score calculation is specifically to calculate the expected path length data, perform average path length calculation, and calculate the abnormality score according to the average path length;
[0126] The anomaly detection is specifically to set an anomaly threshold. When the anomaly score is greater than the anomaly threshold, the real-time data sample at this time is marked as an abnormal data point, and the anomaly processing model is trained in an unsupervised manner to perform real-time anomaly detection and processing to obtain reference data for production line abnormality control decision-making;
[0127] The production line abnormal control decision reference data specifically refers to the current production line control status classification data, and the current production line control status classification data specifically includes abnormal data and non-abnormal data.
[0128] By executing the above operations, in order to address the technical problem that the traditional method in the existing anomaly detection function module has insufficient real-time performance when combining weight analysis and calibration assistance functions, this solution creatively adopts an unsupervised model combined with isolation forest for anomaly detection and processing, thereby improving the real-time performance of anomaly detection and processing.
[0129] Embodiment 6, this embodiment is based on the above embodiment, see Figure 1The recording and reporting module is used for intelligent report generation and data visualization. Specifically, based on the weight analysis optimization production line control decision reference data, the calibration optimization production line control decision reference data and the production line abnormality control decision reference data, combined with the specific production line data and the results of the model analysis, a control data report of the preparation production line is automatically generated, and through data visualization technology, an intuitive analysis data schematic diagram is generated to obtain the production line control feedback data, and the production line automatic control is assisted based on the production line control feedback data.
[0130] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process and method including a series of elements include not only those elements, but also other elements not explicitly listed, or also include elements inherent to such process and method.
[0131] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and alterations may be made to the embodiments without departing from the principles and spirit of the invention.
[0132] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A production line control system for optimizing preparation weight calibration, characterized in that: It includes weight monitoring module, data analysis and optimization module, calibration auxiliary module, exception handling module and record reporting module; The weight monitoring module is used for weight measurement and data collection, and obtains the original data set of production line control through weight measurement and data collection, and sends the original data set of production line control to the data analysis and optimization module, the calibration auxiliary module and the abnormality handling module; The data analysis and optimization module is used to analyze the historical data of the preparation production line and judge and predict whether the preparations in the production line need to be calibrated. Specifically, based on the historical data of the preparation production line in the original data set of the production line control, a machine learning method combining improved random forest and extreme gradient boosting is used to perform data analysis and optimization to obtain the reference data for the control decision of the weight analysis optimization production line, and the reference data for the control decision of the weight analysis optimization production line is sent to the calibration auxiliary module; The machine learning method combining improved random forest and extreme gradient boosting includes the following specific steps: basic data processing, building an improved random forest model, building an extreme gradient boosting model, model integration optimization, and data analysis optimization; The basic data processing is used to pre-process the historical data of the preparation production line, specifically to obtain optimized preparation production line data through data cleaning, data feature extraction and data segmentation, and the optimized preparation production line data is used for machine learning model training; The construction of the improved random forest model is used to construct the random forest model and perform model improvement and optimization required for adaptive weight analysis, specifically to construct a basic random forest model, and select the best split point of the basic random forest model through the information gain ratio method to construct the improved random forest model; The extreme gradient boosting model is constructed to construct a basic extreme gradient model to optimize large-scale data processing capabilities, specifically to construct a basic extreme gradient model and optimize the performance of the basic extreme gradient model by minimizing the cross entropy loss function combined with regularization; The model integration optimization is used to perform bidirectional integration of the prediction results of the two models and improve the overall data analysis accuracy optimization. Specifically, it constructs a bidirectional model output integration to obtain integrated prediction data. The calculation formula is: In the formula, is the integrated prediction data, which is used to represent the final prediction output result, α1 is the integrated prediction weight, is the integrated prediction output, which is used to represent the integrated prediction results of the random forest model and the extreme gradient boosting model using the weighted integration method. α2 is the stacking prediction weight. is the stacked prediction output, which is used to represent the ensemble prediction results of the random forest model and the extreme gradient boosting model using the stacked ensemble method; δ is the weighted integration weight, y RF is the predicted output of the random forest model, y XGB is the predicted output of the extreme gradient boosting model; ω0 is the stacking ensemble bias weight, and the stacking ensemble is specifically learned and trained through a logistic regression model, ω1 is the stacking ensemble original data weight, x is the original feature data in the optimized formulation production line data, ω2 is the stacking ensemble random forest weight, and ω3 is the stacking ensemble extreme gradient boosting weight; The data analysis optimization is used to train the model and perform data analysis optimization, specifically, through the basic data processing, the construction of the improved random forest model, the construction of the extreme gradient boosting model and the model integration optimization, to perform machine learning model training to obtain the data analysis optimization model Model DF , and optimize the model by using the data analysis DF , performing data analysis and optimization based on the historical data of the preparation production line in the original data set of the production line control, and obtaining the reference data for the weight analysis optimization production line control decision; The weight analysis optimization production line control decision reference data specifically refers to calibration requirement classification data, and the calibration requirement classification data specifically includes preparation data that needs automatic calibration control and preparation data that does not need automatic calibration control. The preparation data that needs automatic calibration control will be automatically calibrated and controlled by the calibration auxiliary module; The calibration auxiliary module is used to perform production line control adjustment according to the preparation weight, obtain calibration optimization production line control decision reference data through production line control adjustment, and send the calibration optimization production line control decision reference data to the exception handling module and the record reporting module; The calibration assistance module adopts a dual-time-scale stochastic optimization reinforcement learning method to perform automatic calibration control, and the specific steps include: automatic calibration control problem definition, parameter initialization, dual-time-scale update and automatic calibration assistance; The abnormality handling module is used to synchronously detect the production line and the weight of the preparation, obtain the production line abnormality control decision reference data through the synchronous detection of the production line and the weight of the preparation, and send the production line abnormality control decision reference data to the recording and reporting module; The anomaly handling module uses an unsupervised model combined with isolation forest to perform anomaly detection and processing; The recording and reporting module is used to record data and generate control management reports regularly, and obtain production line control feedback data through control management report generation.
2. A production line control system for optimizing preparation weight calibration according to claim 1, characterized in that: The weight monitoring module is used for system initialization and basic data collection, and specifically includes an initialization unit and a data collection unit; The initialization unit is used for system initialization and system self-checking, specifically, after starting the system, performing hardware device self-checking, confirming the working status of the sensor and the calibration device, and obtaining self-checking feedback data; The data acquisition unit is used for real-time data, specifically, to collect the weight data of the preparations in each production line in real time through sensors to obtain the original weight data of the preparations, and to perform filtering, denoising and error correction operations on the original weight data of the preparations through basic preprocessing to obtain the original data set for production line control; The production line control original data set specifically includes preparation production line historical data, real-time preparation weight data and production line status data.
3. A production line control system for optimizing preparation weight calibration according to claim 2, characterized in that: The calibration auxiliary module is used to optimize the calibration process of the preparation weight and provide a control strategy reference. Specifically, based on the real-time preparation weight data in the production line control original data set and the weight analysis optimization production line control decision reference data, a reinforcement learning method of dual-time scale stochastic optimization is used to perform automatic calibration control to obtain the calibration optimization production line control decision reference data; The reinforcement learning method of dual-time-scale random optimization performs automatic calibration control to obtain the calibration optimization production line control decision reference data, including: automatic calibration control problem definition, parameter initialization, dual-time-scale update and automatic calibration assistance; The automatic calibration control problem definition is used to define the automatic calibration control problem as a Markov decision process, specifically to define a combination of automatic calibration control decision parameters; The parameter initialization is used to initialize the reinforcement learning parameters, specifically the initialization strategy parameters and value function parameters. The strategy parameters are used to determine the specific actions taken by the model, and the value function parameters are used to estimate the expected cumulative reward value under a given state; The dual time scale update is used to update parameters through a fast time scale and a slow time scale, specifically updating the value function parameters through a fast time scale and updating the strategy parameters through a slow time scale; The automatic calibration assistance is used to train the model and implement the calibration assistance, specifically, iterative model training is performed through the automatic calibration control problem definition, the parameter initialization and the dual time scale update to obtain the automatic calibration control model ModelIC, and by using the automatic calibration control model ModelIC, automatic calibration control is performed according to the real-time preparation weight data in the production line control original data set and the weight analysis optimization production line control decision reference data to obtain the calibration optimization production line control decision reference data; The calibration optimization production line control decision reference data specifically refers to the calibration control adjustment strategy of the preparation weight of the current production line.
4. A production line control system for optimizing preparation weight calibration according to claim 3, characterized in that: The dual time scale update specifically includes the following steps: The fast time scale update of the value function parameters is used to quickly adapt to the adjustment of the current control strategy and timely reflect the long-term effects of different calibration operations. Specifically, the value function approximation method is adopted, and the value function parameters are updated by the stochastic gradient method to obtain the updated value function parameters; The slow time scale update of the policy parameters is used to prevent the model from oscillating or becoming unstable during the calibration process due to overly frequent policy adjustments, thereby ensuring that the model can gradually optimize the calibration strategy. Specifically, after the value function parameters are updated on a fast time scale, the policy gradient method is used to update the policy parameters to obtain updated policy parameters.
5. A production line control system for optimizing preparation weight calibration according to claim 4, characterized in that: The exception processing module is used to monitor the status of the production line in real time and perform anomaly detection, specifically, based on the production line status data in the production line control original data set, the weight analysis optimization production line control decision reference data and the calibration optimization production line control decision reference data, anomaly detection and processing are performed using an unsupervised model combined with isolation forest to obtain production line abnormality control decision reference data; The steps of performing anomaly detection and processing in combination with the unsupervised model of the isolation forest specifically include: random sub-sample selection, construction of an isolation tree, calculation of root-leaf paths, calculation of anomaly detection scores and anomaly detection.
6. A production line control system for optimizing preparation weight calibration according to claim 5, characterized in that: The random sub-sample selection is used to construct an anomaly detection original data set and select a subset sample therefrom, specifically, the production line status data in the production line control original data set, the weight analysis optimization production line control decision reference data and the calibration optimization production line control decision reference data are constructed as an anomaly detection original data set, and a sub-sample set is selected from the anomaly detection original data set by random selection, and the sub-sample set is used to construct an isolation tree; The construction of the isolated tree specifically includes dividing the samples in the sub-sample set into a left subset and a right subset by random feature selection and random split point selection, and recursively until a maximum tree depth is reached; The root-leaf path calculation is specifically to calculate the path length from the root node to the leaf node where the point is located in each isolated tree, and obtain the expected path length data; The abnormality detection score calculation is specifically to calculate the expected path length data, perform average path length calculation, and calculate the abnormality score according to the average path length; The anomaly detection is specifically to set an anomaly threshold. When the anomaly score is greater than the anomaly threshold, the real-time data sample at this time is marked as an abnormal data point, and the anomaly processing model is trained in an unsupervised manner to perform real-time anomaly detection and processing to obtain reference data for production line abnormality control decision-making; The production line abnormal control decision reference data specifically refers to the current production line control status classification data, and the current production line control status classification data specifically includes abnormal data and non-abnormal data.
7. A production line control system for optimizing preparation weight calibration according to claim 6, characterized in that: The recording and reporting module is used for intelligent report generation and data visualization. Specifically, based on the weight analysis optimization production line control decision reference data, the calibration optimization production line control decision reference data and the production line abnormality control decision reference data, combined with the specific production line data and the results of the model analysis, the control data report of the preparation production line is automatically generated, and through data visualization technology, an intuitive analysis data schematic diagram is generated to obtain the production line control feedback data, and the production line automatic control is assisted based on the production line control feedback data.
Citation Information
Patent Citations
Intelligent raw material screening and weighing system
CN118179989A
Internet intelligent manufacturing service platform
CN118261439A