Early warning rule generation method based on machine learning
By building an industrial data early warning parameter knowledge graph and machine learning model, combined with particle swarm optimization algorithm, the problem of the inability to adapt to the early warning parameters of the industrial production system is solved, and the rapid and accurate early warning parameter settings are achieved, reducing the burden on operators and improving the System intelligence and stability.
Patent Information
- Application Number
- CN202411168585.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2025-01-10
AI Technical Summary
Industrial production systems need to be continuously adjusted and updated during use, resulting in the inability to adapt to the warning parameters, resulting in the problem that it takes too long for operators to set the warning parameters.
Using the early warning rule generation method based on machine learning, the industrial data early warning parameter knowledge graph is constructed by obtaining industrial production system data, the machine learning model is used to predict early warning parameter, and the model is optimized through the particle swarm optimization algorithm to achieve real-time early warning parameter adaptation.
It improves the adaptability of early warning parameters, reduces the work burden of operators, improves the accuracy and timeliness of early warnings, improves the intelligence level and stability of the system, and promotes the intelligent development of Industry 4.0.
Smart Images

Figure CN119292196A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of association graph technology in machine learning artificial intelligence, and in particular to a method for generating early warning rules based on machine learning. Background Art
[0002] With the advent of the Industrial 4.0 era, machine learning and knowledge graph technology are increasingly used in industrial automation production. Machine learning technology can establish accurate prediction models through the analysis of historical data to achieve early warning of abnormal situations in the production process. At the same time, knowledge graph technology is also constantly developing. Knowledge graph technology can effectively integrate multi-source heterogeneous data, reveal the deep relationship between data, and provide more intelligent decision support for industrial automation production. The progress of machine learning and knowledge graph technology provides a new technical development direction for the early warning system of industrial automation production.
[0003] In industrial automation production, machine learning and knowledge graph technology are widely used in early warning systems. Machine learning algorithms can identify abnormal situations and issue early warnings by learning various parameters in the production process, thereby preventing accidents. For example, on the production line, machine learning can monitor the operating status of equipment, predict the maintenance time of equipment, and avoid production interruptions caused by equipment failure. Knowledge graph technology is used to integrate various data in the production process, including equipment information, production processes, raw material quality, etc., to provide a more comprehensive view of the production status. Through the knowledge graph, production managers can more intuitively understand the various relationships in the production process, identify potential problems in a timely manner, and deal with them.
[0004] Although machine learning and knowledge graph technology play an important role in the early warning system of industrial automation production, there are still the following technical pain points. In the industrial production process, data is often scattered in different systems and equipment. In the process of building a knowledge graph, it is necessary to effectively integrate the data scattered in different systems and equipment and find the correlation between them. In actual use, the industrial production system needs to be constantly adjusted and updated, resulting in the inability of various early warning parameters in the industrial production system to adapt to the updated industrial automation system. The operator has to re-set the early warning parameters in the industrial production system, which consumes a long time for the operator. To solve this problem, the present invention provides a method for generating early warning rules based on machine learning. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a warning rule generation method based on machine learning to solve the problem that in actual use, the industrial production system needs to be constantly adjusted and updated, resulting in the various warning parameters in the industrial production system being unable to adapt to the updated industrial automation system. The operator has to re-set the warning parameters of the industrial production system, which consumes a long time of the operator.
[0006] In order to solve the above technical problems, the specific technical solutions of the present invention are as follows:
[0007] Step S101, acquiring industrial production system data, the industrial production system data including production and operation data of the industrial production system before updating, update logs of the industrial production system, operation data of the industrial automation system after updating, process records of operators resetting warning parameters, and structure or configuration information of the updated industrial automation system, and constructing an industrial data warning parameter knowledge graph based on the industrial production system data;
[0008] Step S102, preprocessing the acquired industrial production system data, extracting features from the preprocessed data, using the extracted features to train a machine learning model to obtain an early warning parameter prediction model, and deploying the early warning parameter prediction model in an actual production environment for real-time prediction of early warning parameters;
[0009] Step S103, receiving a warning rule setting request, the pre-examination rule setting request includes industrial threshold setting, abnormal data setting, rule group relationship setting, monitoring frequency setting, warning notification setting and reminder cycle setting, and the warning rule setting request is processed by the warning parameter prediction model to obtain predicted warning parameters, and the predicted warning parameters are substituted into the industrial generation system for operation;
[0010] Step S104, real-time collection of operating data of each device and each subsystem in the industrial production system during the test phase, data preprocessing of the operating data of each device and each subsystem in the industrial production system during the test phase collected in real time, data preprocessing including data cleaning and data conversion, aggregation of the operating data of each device and each subsystem in the industrial production system during the test phase after preprocessing, classification of the aggregation results, obtaining data aggregation classification results, establishing data coding for each data in the data aggregation classification results, real-time monitoring of the operating conditions of each device and each subsystem in the industrial production system during the test phase, if an error occurs during operation, retrieving the data coding corresponding to the error information, obtaining device information or subsystem information corresponding to the data coding;
[0011] Step S105, the data storage and optimization unit encodes the data corresponding to the device information or subsystem information and the operation data of each device and each subsystem in the industrial production system during the test phase obtained by real-time monitoring, optimizes the early warning parameter prediction model through the particle swarm optimization algorithm, obtains the optimized early warning parameter prediction model, deploys the optimized early warning parameter prediction model to the industrial production system, and generates updated early warning rule parameters.
[0012] Furthermore, the method for generating early warning rules based on machine learning provided by the present invention, in step S105, further includes:
[0013] The data storage is set as distributed storage, and the data generated during the operation of step S101, step S102, step S103 and step S104 are cached and archived, and the file volume of the data is monitored in real time. When the file volume is greater than 100MB, the files greater than 100MB are compressed, the compressed data is stored, the stored data is backed up according to a preset time period, and the backed-up data is uploaded to the cloud server.
[0014] Furthermore, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S101:
[0015] In the acquired industrial production system data, the operation data before and after the update, the update log, the process record of the operator setting the warning parameters, the system structure information and the system configuration information are screened out to obtain the data to be processed in the knowledge graph;
[0016] Use natural language processing to extract the relationships between devices, between subsystems, and between devices and subsystems from the data to be processed in the knowledge graph;
[0017] Define the association relationship between devices and subsystems in the knowledge graph data to be processed, define the connection relationship between devices, the connection relationship between devices and subsystems, the connection relationship between subsystems, the association between devices and warning parameters, and the association between subsystems and warning parameters, and obtain the knowledge graph data set of association relationships to be processed;
[0018] Use the graph database to store and query the knowledge graph to associate the equipment and subsystems in the data to be processed, and build a knowledge graph of industrial data warning parameters.
[0019] Furthermore, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S102:
[0020] The production operation data of the industrial production system before the update, the update log of the industrial production system, the operation data of the industrial automation system after the update, the process records of the operator resetting the warning parameters, and the structure or configuration information of the updated industrial automation system are preprocessed, and the data format is converted into structured data, and the data is cleaned to remove outliers and noise.
[0021] Furthermore, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S103:
[0022] Analyze the parameters of industrial threshold settings, abnormal data settings, rule group relationship settings, monitoring frequency settings, warning notification settings, and reminder cycle settings in the warning rule setting request;
[0023] The parsed warning rule setting parameters are used as input and passed to the warning parameter prediction model. The parsed warning rule setting parameters include the threshold set by the user, the definition of abnormal data, the logical relationship between the rules, and the frequency of system monitoring;
[0024] After the warning parameter prediction model data processing is completed, the warning parameter prediction model outputs the predicted warning parameters. The predicted warning parameters include the warning level expected to be triggered, the expected abnormal data range, and the expected warning occurrence time.
[0025] Furthermore, the method for generating early warning rules based on machine learning provided by the present invention, in step S103, further includes:
[0026] Clean and format the industrial production system data, remove invalid or abnormal data, and convert it into a structured data format to obtain preprocessed data, extract features from the preprocessed data, and select a machine learning algorithm to train an early warning parameter prediction model to obtain a trained early warning parameter prediction model;
[0027] The trained warning parameter prediction model is deployed to the actual production environment. The trained warning parameter prediction model receives new data input in real time and outputs predicted warning parameters.
[0028] Furthermore, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S104:
[0029] Determine the coding rules, assign a data code to each item in the data aggregation and classification results according to the coding rules, and create the code in the format of device ID-data type-timestamp;
[0030] Create an indexing system to associate data codes with corresponding device information or subsystem information;
[0031] Use monitoring tools to collect and process the operating data of each device and subsystem in the industrial production system in real time, and match the real-time data with the established data codes to identify the data source and equipment status;
[0032] When an error is detected, the data code corresponding to the error information is automatically retrieved, and the corresponding device information or subsystem information is obtained therefrom using the data code.
[0033] Furthermore, the method for generating early warning rules based on machine learning provided by the present invention, in step S104, further includes:
[0034] The server-side configuration monitoring tool establishes data connections with various devices and subsystems, and sets network parameters and authentication information;
[0035] Determine the frequency of data collection and the data storage format, convert the storage format of the operating data of each device and subsystem in the industrial production system in real time, and complete the data storage.
[0036] Furthermore, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S105:
[0037] Set the number of particles in the particle swarm, each particle represents a potential parameter configuration of the early warning parameter prediction model, and initialize the position and velocity of each particle;
[0038] Each particle, i.e. each model parameter configuration, is evaluated by applying it to the early warning parameter prediction model, and the performance of the model is evaluated using a score of 1, which is used as the fitness of the particle;
[0039] After each evaluation, the current fitness of each particle is compared with its historical best fitness, i.e., the individual extreme value. If the current fitness is better, the individual extreme value is updated; the global best fitness, i.e., the global extreme value, is found among all particles, i.e., the particle with the best fitness.
[0040] Furthermore, the method for generating early warning rules based on machine learning provided by the present invention, in step S105, further includes:
[0041] According to the update formula of the particle swarm optimization algorithm, the speed and position of each particle are updated. The speed update of the particle depends on its current speed, the relative position between itself and the individual extreme value, and the relative position between the group and the global extreme value. The position update is based on the updated speed.
[0042] Iteration processing is performed until a preset number of iterations is reached or other stopping conditions are met, and the particle position corresponding to the final global extreme value is the parameter configuration of the optimized early warning parameter prediction model, and the parameter configuration of the optimized early warning parameter prediction model is applied to the early warning parameter prediction model to obtain the optimized early warning parameter prediction model.
[0043] Beneficial effects of the present invention:
[0044] Improve the adaptability of warning parameters: The present invention constructs an industrial data warning parameter knowledge graph and uses a machine learning model to predict the warning parameters, so that the warning parameters can adapt to the constantly updated and adjusted industrial automation system, avoiding the warning parameter mismatch problem caused by system updates.
[0045] Reducing the workload of operators: Traditional warning parameter settings require operators to spend a lot of time to adjust. The present invention reduces the workload of operators and improves work efficiency by automatically generating warning rules.
[0046] Improve the accuracy and timeliness of early warnings: Through real-time predictions of machine learning models, the present invention can more accurately predict early warning parameters and promptly notify relevant personnel when an early warning occurs, thereby improving the accuracy and timeliness of early warnings.
[0047] Improve the intelligence level of the system: This invention combines machine learning and knowledge graph technology to improve the intelligence level of industrial automation production systems and provide a more comprehensive and intelligent data analysis basis for decision support in the production process.
[0048] Realize distributed storage and optimization of data: The present invention adopts a distributed storage method to cache, archive and compress the large amount of data generated, and regularly backs up and uploads it to the cloud server, ensuring the security and accessibility of the data. At the same time, the early warning parameter prediction model is optimized through the particle swarm optimization algorithm, thereby improving the prediction performance of the model.
[0049] Improve the stability and reliability of the system: By real-time monitoring of the operation of each device and each subsystem in the industrial production system and automatically retrieving the data code corresponding to the error information when an error is detected, the present invention can quickly locate the source of the problem and improve the stability and reliability of the system.
[0050] Promote the intelligent development of Industry 4.0: The application of this invention conforms to the development trend of the Industry 4.0 era, promotes the widespread application of machine learning and knowledge graph technology in industrial automation production, and provides strong technical support for the construction of intelligent manufacturing and smart factories.
[0051] In summary, the beneficial effects of the present invention are to improve the adaptability of warning parameters, reduce the workload of operators, enhance the accuracy and timeliness of warnings, improve the intelligence level of the system, realize distributed storage and optimization of data, promote the stability and reliability of the system, and promote the intelligent development of Industry 4.0. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0053] Figure 1 A schematic diagram of a method flow chart provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. The technical solutions provided by the embodiments of the present invention are described in detail below in conjunction with the drawings.
[0055] In order to better understand the purpose of the present invention, the present invention is described in further detail below.
[0056] The present invention provides a method for generating early warning rules based on machine learning, comprising:
[0057] Step S101, acquiring industrial production system data, the industrial production system data including production and operation data of the industrial production system before updating, update logs of the industrial production system, operation data of the industrial automation system after updating, process records of operators resetting warning parameters, and structure or configuration information of the updated industrial automation system, and constructing an industrial data warning parameter knowledge graph based on the industrial production system data;
[0058] Step S101 mainly involves obtaining relevant data of the industrial production system and constructing a knowledge graph of industrial data warning parameters based on these data. Specifically:
[0059] Data collection: Collect the operating data of the industrial production system before the update, which helps to understand the system's past status and performance. Obtain the update log of the industrial production system, which can reveal the history and specific content of the system changes. Collect the operating data of the industrial automation system after the update to observe the behavior and performance of the system after the update. Record the process of operators resetting the warning parameters, which reflects the impact of human intervention and adjustment on the system. Obtain the structure or configuration information of the updated industrial automation system, which helps to understand the current configuration of the system and the problems that exist.
[0060] Knowledge graph construction: Based on the data collected above, a knowledge graph of industrial data warning parameters is constructed. A knowledge graph is a graphical data structure that can clearly display the relationship between entities. In this knowledge graph, various data elements (such as operating data, update logs, warning parameters, etc.) are represented as nodes, and the relationship between them is represented as edges. In this way, a comprehensive and structured data view can be formed to facilitate subsequent analysis and processing.
[0061] Effects of step S101:
[0062] Providing a comprehensive data foundation: By collecting multiple types of data, step S101 provides a comprehensive data foundation for subsequent early warning parameter prediction and optimization. These data not only reflect the history and current status of the industrial production system, but also contain information on human intervention, which helps to more fully understand the operation and problems of the system.
[0063] Enhanced data visualization and understanding: By building a knowledge graph of industrial data warning parameters, complex data relationships can be displayed in a graphical way for easy analysis and understanding. This helps to discover the relationships and patterns between data and provides a basis for subsequent warning parameter setting and optimization.
[0064] Support intelligent decision-making: Based on comprehensive data and structured knowledge graphs, machine learning and other intelligent algorithms can be more effectively applied to predict and optimize early warning parameters, which will improve the accuracy and efficiency of the early warning system, thereby enhancing the safety and stability of industrial production.
[0065] Step S102, preprocessing the acquired industrial production system data, extracting features from the preprocessed data, using the extracted features to train a machine learning model to obtain an early warning parameter prediction model, and deploying the early warning parameter prediction model to an actual production environment for real-time prediction of early warning parameters;
[0066] Step S102 mainly involves preprocessing of industrial production system data, feature extraction, training and deployment of machine learning models. The specific process includes:
[0067] Data preprocessing: Clean the raw data obtained in step S101 to remove duplicate, invalid or abnormal data. Standardize or normalize the data to ensure that the dimensions and ranges of different features are consistent, which is convenient for machine learning model processing.
[0068] Feature extraction: Analyze the preprocessed data and extract features related to the warning parameters. Features related to the warning parameters include data statistics, specific patterns of time series, frequency components, etc. The purpose of feature extraction is to reduce the dimension of the data while retaining information that is useful for predicting warning parameters.
[0069] Model training: Select appropriate machine learning algorithms (such as linear regression, support vector machine, neural network, etc.) to train the warning parameter prediction model. Use the extracted features and corresponding warning parameters as training data, and optimize the model's prediction performance by adjusting the model's parameters and structure.
[0070] Model deployment: Deploy the trained warning parameter prediction model to the actual production environment. Configure the model running environment and parameters to ensure that the model can receive new data input in real time and output the predicted value of the warning parameter.
[0071] Effects of step S102:
[0072] Improve data quality: Through data preprocessing, noise and outliers can be removed to make the data cleaner and more standardized, thereby improving the training effect and prediction accuracy of the machine learning model.
[0073] Reduce data dimension: Feature extraction can effectively reduce the dimension of data and reduce computational complexity while retaining information useful for prediction, making machine learning models more efficient and accurate.
[0074] Real-time prediction: By deploying the trained early warning parameter prediction model to the actual production environment, real-time prediction of early warning parameters can be achieved. This helps to timely discover potential problems and risks and improve the safety and stability of industrial production.
[0075] Improve the level of automation: The entire process of step S102 realizes automatic data processing, automatic feature extraction, and automatic training and deployment of models, which improves the level of automation in industrial production and reduces the need for manual intervention.
[0076] Step S103, receiving a warning rule setting request, the pre-examination rule setting request includes industrial threshold setting, abnormal data setting, rule group relationship setting, monitoring frequency setting, warning notification setting and reminder cycle setting, and the warning rule setting request is processed by the warning parameter prediction model to obtain predicted warning parameters, and the predicted warning parameters are substituted into the industrial generation system for operation;
[0077] Step S103 mainly involves receiving warning rule setting requests, and processing these requests through the warning parameter prediction model to obtain predicted warning parameters, and applying these parameters to the industrial production system. The specific process includes:
[0078] Receiving alert rule setting requests: The system receives alert rule setting requests from users or other automated systems.
[0079] The request includes multiple settings, such as industrial threshold settings (used to define the normal operating range), abnormal data settings (define which data is considered abnormal), rule group relationship settings (define the logical relationship between different rules), monitoring frequency settings (determine the frequency of the system checking warning conditions), warning notification settings (determine the notification method and content when the warning is triggered), and reminder cycle settings (determine the cycle of regular reminders).
[0080] Data processing of the warning parameter prediction model: The relevant parameters in the received warning rule setting request are input into the warning parameter prediction model. The warning parameter prediction model processes and analyzes the data based on these input parameters and the data features and patterns learned during its training. Through the calculation of the model, the warning parameter value triggered under the current settings is predicted.
[0081] Apply the predicted warning parameters to the industrial production system: Substitute the predicted warning parameter values output by the warning parameter prediction model into the actual operation of the industrial production system. These warning parameters will be used as part of the system monitoring and warning mechanism to monitor and control various indicators in the industrial production process in real time.
[0082] Effects of step S103:
[0083] Flexibility and customization: Step S103 allows the user or the automation system to flexibly set the warning rules according to needs, thereby achieving customization and personalized configuration of the warning system.
[0084] Predictive and forward-looking: Through data processing of the early warning parameter prediction model, it is possible to predict the early warning parameter values based on the current settings, providing forward-looking monitoring and early warning capabilities for the industrial production system.
[0085] Improve safety and efficiency: By applying the predicted warning parameters to the industrial production system, the risks in the production process can be more effectively monitored and controlled, and potential problems can be discovered and dealt with in a timely manner, thereby improving the safety and operating efficiency of the system.
[0086] Intelligent decision support: The introduction of early warning parameter prediction model provides support for intelligent decision-making of industrial production systems, enabling the system to respond to complex and changing production environments more intelligently.
[0087] Step S104, real-time collection of operating data of each device and each subsystem in the industrial production system during the test phase, data preprocessing of the operating data of each device and each subsystem in the industrial production system during the test phase collected in real time, data preprocessing including data cleaning and data conversion, aggregation of the operating data of each device and each subsystem in the industrial production system during the test phase after preprocessing, classification of the aggregation results, obtaining data aggregation classification results, establishing data coding for each data in the data aggregation classification results, real-time monitoring of the operating conditions of each device and each subsystem in the industrial production system during the test phase, if an error occurs during operation, retrieving the data coding corresponding to the error information, obtaining device information or subsystem information corresponding to the data coding;
[0088] Step S104 is the process of real-time data collection, preprocessing, aggregation classification, encoding and error detection during the testing phase of the industrial production system. The specific steps include:
[0089] Real-time data collection: During the testing phase of industrial production systems, the operating data of each device and subsystem in the system is collected in real time through sensors, monitoring systems, etc. These data are important bases for understanding the operating status of the system and discovering potential problems.
[0090] Data preprocessing: Clean the data collected in real time to remove duplicate, invalid or abnormal data to ensure the accuracy and validity of the data.
[0091] Perform data conversion to convert raw data into a format suitable for subsequent analysis and processing, such as converting analog signals into digital signals, or unifying data in different units into the same metric.
[0092] Data aggregation and classification: Aggregate the pre-processed data, that is, integrate and summarize the data according to the equipment or subsystem. Classify the aggregated data and divide it into different categories according to the characteristics or sources of the data, such as temperature data, pressure data, flow data, etc.
[0093] Data coding: Create data coding for each item in the data aggregation and classification results, that is, assign a unique identifier to each type of data. This facilitates subsequent data retrieval, analysis, and storage.
[0094] Real-time error detection: During the testing phase, the operation of each device and each subsystem in the industrial production system is monitored in real time. By comparing the preset normal operating parameters and real-time data, it is determined whether the system has errors or abnormalities. If an operating error is found, the data code corresponding to the error information is immediately retrieved, and the device or subsystem with the problem is quickly located through the data code.
[0095] Effects of step S104:
[0096] Improve data processing efficiency: Through data preprocessing and aggregation classification, the original data is converted into a more regular and easier to analyze form, which improves the efficiency and accuracy of data processing.
[0097] Facilitates error location and troubleshooting: By establishing data coding and real-time monitoring mechanisms, once a system error occurs, it can be quickly located to the specific device or subsystem, shortening the time for troubleshooting and repair.
[0098] Enhance system stability and security: Through real-time monitoring and error detection, potential problems in the system can be discovered and handled in a timely manner, thereby enhancing the stability and security of industrial production systems.
[0099] Optimizing the test process: Step S104 provides a systematic and process-based data processing and error detection method for the test phase of the industrial production system, which helps to optimize the test process and improve test efficiency and accuracy.
[0100] Step S105, the data storage and optimization unit encodes the data corresponding to the device information or subsystem information and the operation data of each device and each subsystem in the industrial production system during the test phase obtained by real-time monitoring, optimizes the early warning parameter prediction model through the particle swarm optimization algorithm, obtains the optimized early warning parameter prediction model, deploys the optimized early warning parameter prediction model to the industrial production system, and generates updated early warning rule parameters.
[0101] Specifically, the method for generating early warning rules based on machine learning provided by the present invention, in step S105, further includes:
[0102] The data storage is set as distributed storage, and the data generated during the operation of step S101, step S102, step S103 and step S104 are cached and archived, and the file volume of the data is monitored in real time. When the file volume is greater than 100MB, the files greater than 100MB are compressed, the compressed data is stored, the stored data is backed up according to a preset time period, and the backed-up data is uploaded to the cloud server.
[0103] Specifically, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S101:
[0104] In the acquired industrial production system data, the operation data before and after the update, the update log, the process record of the operator setting the warning parameters, the system structure information and the system configuration information are screened out to obtain the data to be processed in the knowledge graph;
[0105] Use natural language processing to extract the relationships between devices, between subsystems, and between devices and subsystems from the data to be processed in the knowledge graph;
[0106] Define the association relationship between devices and subsystems in the knowledge graph data to be processed, define the connection relationship between devices, the connection relationship between devices and subsystems, the connection relationship between subsystems, the association between devices and warning parameters, and the association between subsystems and warning parameters, and obtain the knowledge graph data set of association relationships to be processed;
[0107] Use the graph database to store and query the knowledge graph to associate the equipment and subsystems in the data to be processed, and build a knowledge graph of industrial data warning parameters.
[0108] Specifically, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S102:
[0109] The production operation data of the industrial production system before the update, the update log of the industrial production system, the operation data of the industrial automation system after the update, the process records of the operator resetting the warning parameters, and the structure or configuration information of the updated industrial automation system are preprocessed, and the data format is converted into structured data, and the data is cleaned to remove outliers and noise.
[0110] Specifically, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S103:
[0111] Analyze the parameters of industrial threshold settings, abnormal data settings, rule group relationship settings, monitoring frequency settings, warning notification settings, and reminder cycle settings in the warning rule setting request;
[0112] The parsed warning rule setting parameters are used as input and passed to the warning parameter prediction model. The parsed warning rule setting parameters include the threshold set by the user, the definition of abnormal data, the logical relationship between the rules, and the frequency of system monitoring;
[0113] After the warning parameter prediction model is processed, the warning parameter prediction model outputs the predicted warning parameters, which include the warning level expected to be triggered, the expected abnormal data range, and the expected warning occurrence time.
[0114] Specifically, the method for generating early warning rules based on machine learning provided by the present invention, in step S103, further includes:
[0115] Clean and format the industrial production system data, remove invalid or abnormal data, and convert it into a structured data format to obtain preprocessed data, extract features from the preprocessed data, and select a machine learning algorithm to train an early warning parameter prediction model to obtain a trained early warning parameter prediction model;
[0116] The trained warning parameter prediction model is deployed to the actual production environment. The trained warning parameter prediction model receives new data input in real time and outputs predicted warning parameters.
[0117] Specifically, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S104:
[0118] Determine the coding rules, and assign a data code to each item in the data aggregation and classification results according to the coding rules. Use the format of device ID-data type-timestamp to create the code.
[0119] Create an indexing system to associate data codes with corresponding device information or subsystem information;
[0120] Use monitoring tools to collect and process the operating data of each device and subsystem in the industrial production system in real time, match the real-time data with the established data coding to identify the data source and equipment status.
[0121] When an error is detected, the data code corresponding to the error information is automatically retrieved, and the corresponding device information or subsystem information is obtained therefrom using the data code.
[0122] Specifically, the method for generating early warning rules based on machine learning provided by the present invention, in step S104, further includes:
[0123] The server-side configuration monitoring tool establishes data connections with various devices and subsystems, and sets network parameters and authentication information;
[0124] Determine the frequency of data collection and the data storage format, convert the storage format of the operating data of each device and subsystem in the industrial production system in real time, and complete the data storage.
[0125] Specifically, the method for generating early warning rules based on machine learning provided by the present invention includes, in step S105,
[0126] Set the number of particles in the particle swarm, each particle represents a potential parameter configuration of the early warning parameter prediction model, and initialize the position and velocity of each particle;
[0127] Each particle, i.e. each model parameter configuration, is evaluated by applying it to the early warning parameter prediction model, and the performance of the model is evaluated using a score of 1, which is used as the fitness of the particle;
[0128] After each evaluation, compare the current fitness of each particle with its historical best fitness, i.e., individual extreme value. If the current fitness is better, update the individual extreme value. Find the global best fitness, i.e., global extreme value, among all particles, i.e., the particle with the best fitness.
[0129] According to the update formula of the particle swarm optimization algorithm, the speed and position of each particle are updated. The speed update of the particle depends on its current speed, the relative position between itself and the individual extreme value, and the relative position between the group and the global extreme value. The position update is based on the updated speed.
[0130] Iteration processing is performed until a preset number of iterations is reached or other stopping conditions are met, and the particle position corresponding to the final global extreme value is the parameter configuration of the optimized early warning parameter prediction model, and the parameter configuration of the optimized early warning parameter prediction model is applied to the early warning parameter prediction model to obtain the optimized early warning parameter prediction model.
[0131] Initialize the particle swarm: First, set the number of particles in the particle swarm. Each particle represents a potential parameter configuration of the early warning parameter prediction model, which means that each particle is a combination of model parameters. Next, initialize the position and velocity of each particle. In PSO, "position" represents the value of the parameter, and "velocity" determines the direction and step size of the parameter update.
[0132] Evaluate particle fitness: Evaluate each particle (i.e., each model parameter configuration). This is done by applying the parameter configuration to the early warning parameter prediction model and testing the model's performance. Use a specific evaluation criterion (such as a 1 score) to measure the performance of the model, and this performance indicator is used as the particle's fitness. The higher the fitness, the better the model performance under this parameter configuration.
[0133] Update individual extrema and global extrema: After each evaluation, compare the current fitness of each particle with its historical best fitness (individual extrema). If the current fitness is better, update the individual extrema. At the same time, find the global best fitness (global extrema) among all particles, that is, the particle with the best fitness. This represents the best parameter configuration found so far.
[0134] Update particle state: According to the PSO update formula, adjust the speed and position of each particle. The particle speed update takes into account its current speed, relative position to the individual extreme value, and relative position to the global extreme value. The position update is based on the updated speed, which determines the next adjustment direction of the parameter configuration.
[0135] Iterative optimization: Repeat the above steps and perform iterative processing until the preset number of iterations is reached or other stop conditions are met. Finally, the particle position corresponding to the global extreme value is the parameter configuration of the optimized early warning parameter prediction model.
[0136] Improve model performance: By optimizing the warning parameter prediction model through the PSO algorithm, the prediction performance of the model can be significantly improved. The optimized model can predict the warning parameters more accurately, thereby improving the accuracy and efficiency of the warning system.
[0137] Automation and intelligence: This step realizes the automatic optimization of model parameters, reduces the tedious process of manual parameter adjustment, and improves work efficiency. At the same time, through the use of machine learning technology, the early warning system is made more intelligent.
[0138] Adaptability and flexibility: Since industrial production systems need to be constantly adjusted and updated, the early warning parameter prediction model optimized by the PSO algorithm can better adapt to these changes and maintain the effectiveness and real-time nature of the early warning system.
[0139] In order to solve the problem that the warning parameters of the industrial production system cannot be adapted due to adjustment and update in actual use, and the operator consumes a long time to re-set the warning parameters, the specific operation steps are as follows:
[0140] Obtaining industrial production system data: Collecting industrial production system operation data before and after updates, update logs, operator process records of resetting warning parameters, etc., in order to build an industrial data warning parameter knowledge graph.
[0141] Data preprocessing and model training: Preprocess the acquired data, including data cleaning, conversion, and feature extraction. Use the preprocessed data to train the machine learning model, obtain the early warning parameter prediction model, and deploy it in the actual production environment.
[0142] Receive and process warning rule setting requests: Receive various warning rule setting requests and process these requests through the warning parameter prediction model to obtain predicted warning parameters. Apply the predicted warning parameters to the industrial production system.
[0143] Real-time data collection and error detection: During the testing phase, real-time data collection of each device and subsystem in the industrial production system is performed. Data is pre-processed, aggregated, and classified, and data coding is established. Equipment operation is monitored in real time, and errors are discovered and handled in a timely manner.
[0144] Data storage and model optimization: Distributed storage and file compression technology are used to store real-time data, equipment or subsystem information, and data generated during the optimization process. The particle swarm optimization algorithm is used to optimize the early warning parameter prediction model to improve its prediction accuracy. The optimized early warning parameter prediction model is deployed to the industrial production system to generate updated early warning rule parameters.
[0145] The present invention automatically adapts to the update and adjustment of the industrial production system and generates adaptive early warning rules, thereby reducing the manual setting time of operators and improving production efficiency and safety.
[0146] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations, and the above-described embodiments of the present invention do not constitute a limitation on the scope of protection of the present invention.
Claims
1. A method for generating early warning rules based on machine learning, characterized in that: include: Step S101, acquiring industrial production system data, the industrial production system data including production and operation data of the industrial production system before updating, update logs of the industrial production system, operation data of the industrial automation system after updating, process records of operators resetting warning parameters, and structure or configuration information of the updated industrial automation system, and constructing an industrial data warning parameter knowledge graph based on the industrial production system data; Step S102, preprocessing the acquired industrial production system data, extracting features from the preprocessed data, using the extracted features to train a machine learning model to obtain an early warning parameter prediction model, and deploying the early warning parameter prediction model in an actual production environment for real-time prediction of early warning parameters; Step S103, receiving a warning rule setting request, the pre-examination rule setting request includes industrial threshold setting, abnormal data setting, rule group relationship setting, monitoring frequency setting, warning notification setting and reminder cycle setting, and the warning rule setting request is processed by the warning parameter prediction model to obtain predicted warning parameters, and the predicted warning parameters are substituted into the industrial generation system for operation; Step S104, real-time collection of operating data of each device and each subsystem in the industrial production system during the test phase, data preprocessing of the operating data of each device and each subsystem in the industrial production system during the test phase collected in real time, data preprocessing including data cleaning and data conversion, aggregation of the operating data of each device and each subsystem in the industrial production system during the test phase after preprocessing, classification of the aggregation results, obtaining data aggregation classification results, establishing data coding for each data in the data aggregation classification results, real-time monitoring of the operating conditions of each device and each subsystem in the industrial production system during the test phase, if an error occurs during operation, retrieving the data coding corresponding to the error information, obtaining device information or subsystem information corresponding to the data coding; Step S105, the data storage and optimization unit encodes the data corresponding to the device information or subsystem information and the operation data of each device and each subsystem in the industrial production system during the test phase obtained by real-time monitoring, optimizes the early warning parameter prediction model through the particle swarm optimization algorithm, obtains the optimized early warning parameter prediction model, deploys the optimized early warning parameter prediction model to the industrial production system, and generates updated early warning rule parameters.
2. The method for generating early warning rules based on machine learning according to claim 1, characterized in that: In step S105, it also includes: The data storage is set as distributed storage, and the data generated during the operation of step S101, step S102, step S103 and step S104 are cached and archived, and the file volume of the data is monitored in real time. When the file volume is greater than 100MB, the files greater than 100MB are compressed, the compressed data is stored, the stored data is backed up according to a preset time period, and the backed-up data is uploaded to the cloud server.
3. The method for generating early warning rules based on machine learning according to claim 1, characterized in that: In step S101, it includes: In the acquired industrial production system data, the operation data before and after the update, the update log, the process record of the operator setting the warning parameters, the system structure information and the system configuration information are screened out to obtain the data to be processed in the knowledge graph; Use natural language processing to extract the relationships between devices, between subsystems, and between devices and subsystems from the data to be processed in the knowledge graph; Define the association relationship between devices and subsystems in the knowledge graph data to be processed, define the connection relationship between devices, the connection relationship between devices and subsystems, the connection relationship between subsystems, the association between devices and warning parameters, and the association between subsystems and warning parameters, and obtain the knowledge graph data set of association relationships to be processed; Use the graph database to store and query the knowledge graph to associate the equipment and subsystems in the data to be processed, and build a knowledge graph of industrial data warning parameters.
4. The method for generating early warning rules based on machine learning according to claim 1, characterized in that: In step S102, it includes: The production operation data of the industrial production system before the update, the update log of the industrial production system, the operation data of the industrial automation system after the update, the process records of the operator resetting the warning parameters, and the structure or configuration information of the updated industrial automation system are preprocessed, and the data format is converted into structured data, and the data is cleaned to remove outliers and noise.
5. The method for generating early warning rules based on machine learning according to claim 1, characterized in that: In step S103, it includes: Analyze the parameters of industrial threshold settings, abnormal data settings, rule group relationship settings, monitoring frequency settings, warning notification settings, and reminder cycle settings in the warning rule setting request; The parsed warning rule setting parameters are used as input and passed to the warning parameter prediction model. The parsed warning rule setting parameters include the threshold set by the user, the definition of abnormal data, the logical relationship between the rules, and the frequency of system monitoring; After the warning parameter prediction model data processing is completed, the warning parameter prediction model outputs the predicted warning parameters. The predicted warning parameters include the warning level expected to be triggered, the expected abnormal data range, and the expected warning occurrence time.
6. The method for generating early warning rules based on machine learning according to claim 5, characterized in that: In step S103, it also includes: Clean and format the industrial production system data, remove invalid or abnormal data, and convert it into a structured data format to obtain preprocessed data, extract features from the preprocessed data, and select a machine learning algorithm to train an early warning parameter prediction model to obtain a trained early warning parameter prediction model; The trained warning parameter prediction model is deployed to the actual production environment. The trained warning parameter prediction model receives new data input in real time and outputs predicted warning parameters.
7. The method for generating early warning rules based on machine learning according to claim 1, characterized in that: In step S104, it includes: Determine the coding rules, assign a data code to each item in the data aggregation and classification results according to the coding rules, and create the code in the format of device ID-data type-timestamp; Create an indexing system to associate data codes with corresponding device information or subsystem information; Use monitoring tools to collect and process the operating data of each device and subsystem in the industrial production system in real time, and match the real-time data with the established data codes to identify the data source and equipment status; When an error is detected, the data code corresponding to the error information is automatically retrieved, and the corresponding device information or subsystem information is obtained therefrom using the data code.
8. The method for generating early warning rules based on machine learning according to claim 7, characterized in that: In step S104, it also includes: The server-side configuration monitoring tool establishes data connections with various devices and subsystems, and sets network parameters and authentication information; Determine the frequency of data collection and the data storage format, convert the storage format of the operating data of each device and subsystem in the industrial production system in real time, and complete the data storage.
9. The method for generating early warning rules based on machine learning according to claim 2, characterized in that: In step S105, it includes: Set the number of particles in the particle swarm, each particle represents a potential parameter configuration of the early warning parameter prediction model, and initialize the position and velocity of each particle; Each particle, i.e. each model parameter configuration, is evaluated by applying it to the early warning parameter prediction model, and the performance of the model is evaluated using a score of 1, which is used as the fitness of the particle; After each evaluation, the current fitness of each particle is compared with its historical best fitness, i.e., the individual extreme value. If the current fitness is better, the individual extreme value is updated; the global best fitness, i.e., the global extreme value, is found among all particles, i.e., the particle with the best fitness.
10. The method for generating early warning rules based on machine learning according to claim 9, characterized in that: In step S105, it also includes: According to the update formula of the particle swarm optimization algorithm, the speed and position of each particle are updated. The speed update of the particle depends on its current speed, the relative position between itself and the individual extreme value, and the relative position between the group and the global extreme value. The position update is based on the updated speed. Iteration processing is performed until a preset number of iterations is reached or other stopping conditions are met, and the particle position corresponding to the final global extreme value is the parameter configuration of the optimized early warning parameter prediction model, and the parameter configuration of the optimized early warning parameter prediction model is applied to the early warning parameter prediction model to obtain the optimized early warning parameter prediction model.