PLC gateway equipment operation status monitoring system and method based on open source Hongmeng
By using a PLC gateway device operation status monitoring system based on the open-source HarmonyOS, and employing long short-term memory networks and autoencoder models for data analysis, combined with particle swarm optimization algorithms, the system solves the problems of PLC system interoperability and intelligent analysis, and achieves intelligent management and efficient operation of the equipment.
Patent Information
- Application Number
- CN202411139364.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Existing PLC systems struggle to achieve interoperability between devices from different brands, suffer from high integration complexity, lack intelligent analysis and adaptive capabilities, and negatively impact the overall efficiency and reliability of the equipment.
A PLC gateway device operation status monitoring system based on open-source HarmonyOS is adopted. It uses a long short-term memory network model and an autoencoder model for data prediction and anomaly detection, and combines a particle swarm optimization algorithm for parameter configuration management.
It enables intelligent and automated management of PLC gateway devices, improves the stability of equipment operation and management efficiency, and ensures that the equipment can quickly return to a stable state in abnormal situations.
Smart Images

Figure CN118659992B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of equipment monitoring technology, and more specifically, to a PLC gateway equipment operation status monitoring system and method based on open source Hongmeng. Background Art
[0002] Programmable Logic Controller (PLC) is an important device in the field of industrial automation and is widely used in various control systems to achieve automatic control and process management. With the rapid development of Industrial Internet of Things (IIoT), more and more PLC devices are interconnected through the network to achieve remote monitoring and management.
[0003] A PLC gateway device is a device used to connect and integrate multiple PLC (Programmable Logic Controller) devices and enable communication between these devices and other network systems. It acts as a bridge between PLC devices and host computer systems, SCADA (Supervisory Control and Data Acquisition) systems, MES (Manufacturing Execution System), etc., ensuring seamless data exchange and control instruction transmission between different systems.
[0004] Deficiencies in existing technologies: Traditional PLC systems mostly use proprietary protocols of their respective manufacturers, making it difficult to achieve interoperability between PLC devices of different brands, resulting in high complexity of system integration and increased costs. PLC monitoring systems are mostly closed architectures, making it difficult to expand or upgrade functions according to specific needs, limiting the flexibility and scalability of the system, and lacking the ability to intelligently analyze and adapt to the operating status of gateway devices, making it impossible to make intelligent decisions and optimizations based on real-time data, which in turn affects the overall efficiency and reliability of PLC gateway devices. Summary of the invention
[0005] In order to overcome the above-mentioned defects of the prior art, the present invention provides a PLC gateway device operation status monitoring system and method based on open source Hongmeng, so as to solve the problem that the PLC gateway device proposed in the above background technology is unable to make intelligent decisions and optimizations based on real-time data, thereby affecting the overall efficiency and reliability of the PLC gateway device.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] The method for monitoring the operating status of a PLC gateway device based on open source Hongmeng includes the following steps:
[0008] Install and configure PLC gateway devices, obtain the operating status data of PLC gateway devices and perform data preprocessing;
[0009] Build a long short-term memory network model based on the preprocessed data, predict the equipment operation status, and build an autoencoder model to detect data anomalies;
[0010] The PLC gateway operation status monitoring process after combining the long short-term memory network model with the autoencoder model is analyzed to obtain the operation fluctuation information generated during the status monitoring process and determine the status of the PLC gateway device monitored in real time;
[0011] If the PLC gateway is running in a stable state, a gateway device running stable signal is generated and no management measures are taken; if the PLC gateway is running in an abnormal state, a gateway device running fluctuation signal is generated and the particle swarm optimization algorithm is used to determine the optimal device running parameters and perform configuration management.
[0012] In a preferred embodiment, the operating status data of the PLC gateway device is obtained and the data is preprocessed. The specific process is as follows:
[0013] Data preprocessing includes denoising, standardization and data verification;
[0014] Use mean filtering and Kalman filtering to denoise the operating status data;
[0015] Use Z-score standardization and Min-Max normalization to standardize the operating status data;
[0016] Parity check and cyclic redundancy check are used to perform data verification processing on the operating status data.
[0017] In a preferred embodiment, a long short-term memory network model is constructed based on the preprocessed data, and the equipment operation status is predicted. The specific process is as follows:
[0018] After preprocessing the collected operating status data, the data was divided into training set, validation set and test set, and a long short-term memory network model was constructed using a deep learning framework;
[0019] Define the LSTM model structure, including the input layer, LSTM layer, fully connected layer, and output layer, and set the learning rate, batch size, and sequence length;
[0020] Use mean square error as the loss function, use the training set to train the model, and update the model parameters through back propagation;
[0021] The validation set is used to evaluate the performance of the LSTM model and adjust the hyperparameters. The test set is used to evaluate the LSTM model. The LSTM model is then applied to real-time data streams to make real-time predictions on the equipment operating status.
[0022] In a preferred embodiment, an autoencoder model is simultaneously constructed to detect data anomalies. The specific process is as follows:
[0023] The operating status data collected from the PLC gateway device is pre-processed and divided into normal data and data containing abnormalities;
[0024] Define the autoencoder structure, including encoder, bottleneck layer and decoder, and set the learning rate, batch size and bottleneck layer size;
[0025] Use mean square error as loss function and use normal data for model training to reconstruct normal data;
[0026] Use data containing anomalies to evaluate model performance and identify outliers based on reconstruction errors;
[0027] The autoencoder is applied to the real-time data stream to calculate the reconstruction error of each data point. Based on the comparison between the reconstruction error and the threshold, anomalies are identified as early warning information.
[0028] In a preferred embodiment, the PLC gateway operation status monitoring process after the long short-term memory network model and the autoencoder model are combined is analyzed to obtain the operation fluctuation information generated during the status monitoring process. The specific process is as follows:
[0029] Operation fluctuation information includes reconstruction detection information and model response information;
[0030] The reconstruction detection information includes a reconstruction detection fluctuation index, and the model response information includes a model response stability index;
[0031] The obtained reconstruction detection fluctuation index and model response stability index are calculated jointly to obtain the equipment operation coefficient.
[0032] In a preferred embodiment, if the PLC gateway operation state is stable, a gateway device operation stability signal is generated, and no management measures are taken; if the PLC gateway operation state is abnormal, a gateway device operation fluctuation signal is generated. The specific process is as follows:
[0033] Compare the equipment operation coefficient with the operation status determination threshold;
[0034] If the equipment operation coefficient is greater than or equal to the operation status determination threshold, a gateway equipment operation stability signal is generated and no scheduling management measures are taken;
[0035] If the equipment operation coefficient is less than the operation status judgment threshold, a gateway equipment operation fluctuation signal is generated, an early warning signal is issued, and scheduling management is performed.
[0036] In a preferred embodiment, the particle swarm optimization algorithm is used to determine the optimal equipment operating parameters and perform configuration management. The specific steps are as follows:
[0037] Set the particle swarm size, initialize the position and velocity of each particle, and define the fitness function based on stability, energy consumption, and failure rate;
[0038] Update the speed and position according to the current state, local optimal position and global optimal position of the particle, calculate the fitness value of each particle's new position, and update the local optimal and global optimal positions;
[0039] Repeat the speed and position update and fitness evaluation until the stopping condition is met;
[0040] During the optimization process, the physical limitations and safe operating range of the equipment are determined, and the optimal operating parameter configuration obtained by the particle swarm optimization algorithm is output based on the results.
[0041] The PLC gateway device operation status monitoring system based on open source Hongmeng is used to implement the above-mentioned PLC gateway device operation status monitoring method based on open source Hongmeng, including:
[0042] Configuration preprocessing module, used to install and configure PLC gateway device, obtain the running status data of PLC gateway device and perform data preprocessing;
[0043] The model building module is used to build a long short-term memory network model based on the preprocessed data, predict the equipment operation status, and build an autoencoder model to detect data anomalies;
[0044] The monitoring and analysis module is used to analyze the PLC gateway operation status monitoring process after the long short-term memory network model and the autoencoder model are combined, obtain the operation fluctuation information generated during the status monitoring process, and determine the status of the PLC gateway device monitored in real time;
[0045] Management module, if the PLC gateway operation status is stable, it will generate a gateway device operation stability signal and no management measures will be taken; if the PLC gateway operation status is abnormal, it will generate a gateway device operation fluctuation signal, use the particle swarm optimization algorithm to determine the optimal device operation parameters and perform configuration management.
[0046] Technical effects and advantages of the present invention:
[0047] The present invention achieves comprehensive monitoring and prediction of the equipment operation status by installing and configuring PLC gateway equipment, acquiring and preprocessing operation status data, constructing a long short-term memory network model for equipment status prediction, and combining the autoencoder model for data anomaly detection. By analyzing the operation status data after combining LSTM with the autoencoder, the fluctuation information generated during the operation of the equipment can be accurately obtained, and the operation status of the equipment can be determined in real time.
[0048] When the equipment is running in a stable state, an operation stability signal is generated to avoid unnecessary management intervention, thereby improving the automation and management efficiency of the system. If an abnormality is detected, an operation fluctuation signal is generated, and the particle swarm optimization algorithm is used to determine the optimal equipment operation parameter configuration, and corresponding management and scheduling are performed to ensure that the equipment can quickly return to a stable state under abnormal conditions, realizing intelligent and automated management of PLC gateway equipment, and significantly improving the equipment's operating stability and management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flow chart of the method for monitoring the operating status of a PLC gateway device based on open source Hongmeng in the present invention.
[0050] Figure 2 This is a structural diagram of the PLC gateway device operation status monitoring system based on open source Hongmeng of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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.
[0052] Example 1: Figure 1 As shown, the PLC gateway device operation status monitoring method based on open source Hongmeng includes the following steps:
[0053] Install and configure PLC gateway devices, obtain the operating status data of PLC gateway devices and perform data preprocessing;
[0054] Build a long short-term memory network model based on the preprocessed data, predict the equipment operation status, and build an autoencoder model to detect data anomalies;
[0055] The PLC gateway operation status monitoring process after combining the long short-term memory network model with the autoencoder model is analyzed to obtain the operation fluctuation information generated during the status monitoring process and determine the status of the PLC gateway device monitored in real time;
[0056] If the PLC gateway is running in a stable state, a gateway device running stable signal is generated and no management measures are taken; if the PLC gateway is running in an abnormal state, a gateway device running fluctuation signal is generated and the particle swarm optimization algorithm is used to determine the optimal device running parameters and perform configuration management.
[0057] Hongmeng operating system is an open source project that allows developers to freely access and modify source code, supports secondary development and innovation, supports multi-device collaboration, can run on different hardware platforms, and achieve seamless interconnection and resource sharing between devices.
[0058] The PLC gateway device converts the proprietary industrial protocols (such as Modbus, Profinet, EtherNet / IP, etc.) used by different PLC devices into universal protocols to ensure that PLC devices of different brands and models can be interconnected. It collects operating data from each PLC device and transmits the data to the host computer system or the cloud for analysis and storage, and monitors the operating status of the PLC device in real time, including device health status, operating parameters, alarm information, etc.
[0059] Pre-process the collected data, such as denoising, filtering, data verification, etc., to ensure the accuracy and reliability of the data, remotely access and manage PLC equipment, remotely monitor, configure and maintain through the network, and provide network security measures such as firewalls, data encryption, identity authentication, etc., to ensure the security of data transmission and equipment operation.
[0060] Combining the characteristics of the Hongmeng operating system, it integrates multiple industrial protocols to ensure the interconnection and interoperability of PLC devices of different brands, and collects and processes real-time data on the operating status of PLC gateway devices, and conducts intelligent analysis and optimization decisions on the collected real-time operating data.
[0061] For example, in the production workshop of a large manufacturing company, there are multiple brands and models of PLC equipment used to control various mechanical equipment on the production line;
[0062] There are multiple production lines in the workshop environment, and PLC devices of different brands are used to control various machines, such as conveyor belts, robot arms, processing machine tools, etc. It is necessary to monitor the operating status of each PLC device in real time, including key parameters such as temperature, pressure, and speed, and realize intelligent analysis and optimization management. The PLC gateway device based on the open source Hongmeng is connected to each PLC device through the network to realize data collection, processing, analysis and display;
[0063] First, install and configure the PLC gateway device. The specific steps are as follows:
[0064] Install and configure the PLC gateway device, ensure that the hardware and network environment are ready, configure the multi-protocol adapter, and ensure that PLC devices of different brands can communicate with the gateway device through the adapter. The specific steps are as follows:
[0065] Install the PLC gateway device, connect the power supply and necessary input and output devices, such as monitor, keyboard, mouse, etc.;
[0066] Connect the gateway device to the enterprise internal network. The device can communicate with other devices through the local area network (LAN). Configure a static IP address to ensure the uniqueness and accessibility of the device in the network.
[0067] Install Hongmeng operating system on the PLC gateway device to ensure that the system can start and run normally, and select appropriate system configuration and parameters during the installation process;
[0068] Perform protocol adaptation and configuration, install adapter modules that support multiple industrial protocols, and make the adapter compatible with the gateway device hardware;
[0069] Protocol configuration: configure each protocol adapter in the Hongmeng operating system and set necessary communication parameters, such as baud rate, data bit, stop bit, etc. PLC devices of different brands can communicate with the gateway device through the adapter;
[0070] Data collection and transmission, set the collection frequency and collection parameters, the operating status data collected from each PLC device can accurately reflect the real-time status of the device, and connect the PLC device to the gateway device through an adapter to ensure that the data collection module can access the PLC device and start data collection;
[0071] Perform low-latency data transmission, optimize the network configuration of PLC gateway devices, ensure the shortest data transmission path and lowest latency, use high-performance network interfaces and switch devices to increase data transmission speed, and set data transmission protocols such as MQTT and CoAP to enable fast data transmission and data processing;
[0072] Perform data preprocessing on the operating status data, and use signal processing algorithms such as mean filtering and Kalman filtering to denoise the collected data and eliminate random noise in the data;
[0073] Mean filtering reduces noise by calculating the average value of data over a period of time. The window size N used to calculate the average value is determined, and a sliding window is applied to the time series data to calculate the average value of the data in each window. For the time series data x(t), the calculation formula for the mean filtered data y(t) is: , where N is the window size and t is the time point.
[0074] Standardize the data and convert data of different dimensions to the same dimension to facilitate subsequent analysis and processing. Common methods include Z-score standardization and Min-Max normalization.
[0075] Z-score normalization (also called standard deviation normalization) transforms the data into a standard normal distribution with a mean of 0 and a standard deviation of 1.
[0076] For the dataset , calculate the mean μ and standard deviation σ, the calculation formula for the mean μ is: , the calculation formula of standard deviation σ is: ;
[0077] Use the calculated mean μ and standard deviation σ for each data point Perform standardization, the standardization formula is: ;
[0078] Min-Max normalization determines the size of a data set by linearly transforming the data to a specified range (usually [0, 1]). Minimum and maximum value ;
[0079] Use minimum value and maximum value For each data point Perform normalization processing, the normalization formula is: ;
[0080] These two normalization methods are suitable for different scenarios. Z-score normalization is suitable for situations where the data has a normal distribution, while Min-Max normalization is suitable for situations where the data range is known and the data needs to be limited to a specific range. Choose the appropriate method for data normalization according to specific needs.
[0081] Verify the data. Data verification is to determine the integrity and accuracy of the data during data transmission. Parity check and cyclic redundancy check are used to determine the integrity and accuracy of the data.
[0082] Parity checking detects single-bit errors by adding a parity bit at the end of the data. The specific steps are as follows:
[0083] Select the parity type to determine whether to use odd or even parity. Odd parity: If the number of 1s in the data is even, the parity bit is 1; if the number of 1s is odd, the parity bit is 0;
[0084] Even parity: If the number of 1s in the data is odd, the parity bit is 1; if the number of 1s is even, the parity bit is 0;
[0085] Calculate the check bit, perform XOR operation on all bits in the data, and get a check result bit;
[0086] For odd parity, if the check result bit is 0, the check bit is set to 1; if the check result bit is 1, the check bit is set to 0. The formula for the odd parity bit is: ,in, Indicates the i-th bit in the data, mod is the modulus operation, which means taking the remainder. If P=0, then check ; If P = 1, then the check bit ;
[0087] For even parity, if the check result bit is 0, the check bit is set to 0; if the check result bit is 1, the check bit is set to 1. , if P=0, then the check bit ; If P = 1, then the check bit ;
[0088] The calculated check digit is added to the end of the data to form the checked data.
[0089] At the same time, the data is checked twice by combining the cyclic redundancy check to generate the polynomial. The specific steps are as follows:
[0090] Choose a standard generating polynomial: ,in, is the data bit, i represents the position of the data bit, is the generator polynomial bit, usually represented by a binary number;
[0091] Represent the data bit string as a polynomial: , append n zeros to the data, where n is the order of the generating polynomial, and divide M(x) modulo G(x) to get the remainder: ;
[0092] The remainder R(x) is added to the end of the data as a check code to form the checked data. The checked data is expressed as: ;
[0093] The receiving end performs the same modulo G(x) division on the received data. If the remainder is 0, the data is correct; otherwise, the data is incorrect.
[0094] Parity check and CRC check can effectively detect the integrity and accuracy of data transmission.
[0095] The time series prediction algorithm based on the long short-term memory (LSTM) network is used to predict the operating status of the equipment and diagnose faults. The autoencoder is used for anomaly detection to analyze and identify the operating status problems of the PLC gateway equipment. The specific steps are as follows:
[0096] After preprocessing the collected running status data, split the data into training set, validation set and test set, build a long short-term memory network model, use a deep learning framework (such as TensorFlow or PyTorch) to define the LSTM model structure, including the input layer, LSTM layer, fully connected layer and output layer, and set hyperparameters such as learning rate, batch size and sequence length;
[0097] Use mean square error (MSE) as the loss function, use the training set to train the model, and update the model parameters through back propagation;
[0098] Use the validation set to evaluate the performance of the LSTM model, adjust the hyperparameters to improve the model's predictive ability, use the test set to perform a final evaluation of the model to ensure the model's generalization ability, and apply the model to real-time data streams to make real-time predictions on the equipment's operating status;
[0099] Use the autoencoder model for anomaly detection. The autoencoder is an unsupervised learning model used to learn low-dimensional representations of data. In anomaly detection, the autoencoder can detect anomalies by reconstructing errors.
[0100] After pre-processing, the running status data collected from the PLC gateway device is divided into normal data and data containing abnormalities;
[0101] Build an autoencoder model, define the autoencoder structure, including the encoder, bottleneck layer, and decoder, and set hyperparameters such as learning rate, batch size, and bottleneck layer size;
[0102] Using mean square error (MSE) as the loss function and using normal data for model training, the autoencoder can effectively reconstruct normal data;
[0103] Perform autoencoder evaluation and tuning, use data containing anomalies to evaluate model performance, and determine anomalies based on reconstruction errors. Anomalies are identified by setting reconstruction error thresholds.
[0104] The autoencoder is applied to real-time data streams to calculate the reconstruction error of each data point. Based on the comparison between the reconstruction error and the threshold, potential anomalies are identified and early warning information is generated.
[0105] The long short-term memory network is combined with the autoencoder to analyze the PLC gateway operation status monitoring process, obtain the operation fluctuation information generated during the status monitoring process, and determine the status of the PLC gateway device monitored in real time. The operation fluctuation information includes reconstruction detection information and model response information.
[0106] The reconstruction detection information includes the reconstruction detection fluctuation index and is calibrated as CJJ, and the model response information includes the model response stability index and is calibrated as MXX;
[0107] The reconstruction detection fluctuation index in the reconstruction detection information is a comprehensive indicator used to evaluate and monitor the operating status of the equipment. The index combines the reconstruction error, the fluctuation of the equipment operating parameters and the historical abnormal detection records to identify potential equipment failures and abnormal conditions. The main role of RDFI is to provide a more accurate and comprehensive abnormality identification capability to help find problems at an early stage, thereby avoiding equipment failures and downtime. It has the following functions:
[0108] The combination of machine learning and big data analysis algorithms enables the monitoring system to have intelligent anomaly detection and fault prediction capabilities, which improves the intelligence level of the monitoring system, reduces the need for manual intervention, and improves the accuracy and efficiency of monitoring. It also includes analysis of historical anomaly detection records, which can comprehensively evaluate the operating status of equipment in different time periods. Operation and maintenance personnel can understand the long-term operating trend of equipment by analyzing historical data and formulate more reasonable maintenance plans;
[0109] The reconstruction detection fluctuation index is obtained as follows:
[0110] Get the original data YS input by the encoder and the reconstructed data CJ after analysis, and calculate the reconstruction error CW of the encoder. The calculation expression is: , represents the i-th original data, represents the i-th reconstruction data, n is the number of data;
[0111] Obtain the operating parameters of the equipment at different time points and calculate the parameter change rate at adjacent time points , the calculation expression is: , where is the operating parameter at the jth time point, and the average volatility is calculated based on the parameter change rate at adjacent time points. The calculation expression is: , m is the number of time points;
[0112] Record historical anomaly detection data, obtain the total number of historical records K, record whether anomalies occur at each time point, and calculate the frequency of anomaly records , where is the abnormal detection value of the kth historical record, 1 indicates abnormality and 0 indicates normality. The reconstruction detection fluctuation index is calculated: .
[0113] It should be noted that the reconstruction error is used to measure the ability of the autoencoder model to reconstruct the input data. The higher the reconstruction error, the more abnormal the data is or the equipment operating status has changed significantly. The equipment operating parameter fluctuation value is used to measure the volatility of the equipment operating parameters between different time points. The greater the volatility, the more likely it is that the equipment is unstable or abnormal; operating parameters, such as temperature, pressure, speed, etc.
[0114] By comprehensively reconstructing errors, fluctuations in equipment operating parameters, and historical anomaly detection records, the Reconstructed Detection Fluctuation Index provides a method for comprehensively evaluating the operating status of equipment. This comprehensive index can help identify potential abnormal situations, improve the reliability and effectiveness of equipment monitoring, and ensure that the equipment operates in the best condition.
[0115] The model response stability index in the model response information is a comprehensive indicator used to evaluate and measure the responsiveness and stability of the prediction model in real-time applications. The model response stability index combines the stability and responsiveness of the model to provide a comprehensive evaluation standard to ensure the performance and reliability of the model when processing real-time data streams.
[0116] Model stability measures the predictive stability of the model when processing continuous data, that is, whether the prediction results of the model at different time points are consistent and reliable;
[0117] Model responsiveness measures the time delay and accuracy of the model in making predictions after receiving new data. The shorter the response time and the higher the prediction accuracy, the better the model responsiveness.
[0118] The model response stability index is obtained as follows:
[0119] Get the time it takes for the LSTM model to complete a prediction after receiving new data: , where is the time point of data input, At the time point when the prediction result is output, obtain the predicted value YC and the true value ZS when the model makes predictions, and calculate the prediction accuracy: , where N represents the number of data, the number of parameters NP for training and the total training time TT are obtained, and the model complexity is calculated: MC=NP / TT;
[0120] Get the long short-term memory network model prediction result set , calculate the continuous value of the model, the calculation expression is: , M represents the number of prediction data, and obtains the prediction result set of the model under the same conditions , get the average predicted value of the prediction result set , calculate the predicted consistency value, the calculation expression is: , where D is the number of predicted data, B is the number of predictions, and the model response stability index is calculated using the following expression: .
[0121] It should be noted that the model continuous value measures the continuity of the model prediction results, that is, whether the prediction value is smooth and has no drastic fluctuations. The smaller the relative change of the prediction value, the higher the prediction continuity. The prediction result set of the model under the same conditions refers to the prediction results obtained when the model's built-in parameters are the same, such as learning rate, loss value, etc.
[0122] The reconstruction detection fluctuation index and model response stability index are obtained for grey correlation analysis, and the reconstruction detection fluctuation index and model response stability index are combined to obtain the equipment operation coefficient. An optional expression is: , where is the equipment operation coefficient, , is the comprehensive correlation coefficient of the reconstruction detection fluctuation index and the model response stability index, and , Both are greater than 0.
[0123] It should be noted that the size of the comprehensive correlation proportional coefficient is a specific value obtained by quantifying each parameter. In order to facilitate subsequent comparison, the size of the comprehensive correlation proportional coefficient depends on the amount of sample data and the technical personnel in this field preliminarily set the corresponding comprehensive correlation proportional coefficient for each group of sample data. The coefficient is not unique as long as it does not affect the proportional relationship between the parameter and the quantified value, just like the model response stability index is proportional to the equipment operation coefficient.
[0124] The larger the reconstruction detection fluctuation index is, the smaller the model response stability index is, that is, the smaller the performance value of the equipment operation coefficient is, which indicates the following points:
[0125] The larger the reconstruction detection fluctuation index, the more fluctuations and errors the device has in the anomaly detection process, reflecting the low accuracy of anomaly detection. Low detection accuracy may make it difficult to accurately identify and warn potential problems during device operation. The smaller the model response stability index, the poorer the response speed and stability of the model in dealing with changes in the device's operating status. Poor response capability may result in unsatisfactory results in adjusting and optimizing operating parameters when the device faces changes or emergencies.
[0126] The smaller the equipment operation coefficient is, the worse the overall operation status of the equipment is. There may be frequent fluctuations, abnormalities and unstable operation conditions, which will affect the operation efficiency and reliability of the equipment.
[0127] Compare the generated equipment operation coefficient with the operation status judgment threshold, generate different management signals, and adjust the corresponding management strategy according to the generated management signals;
[0128] After obtaining the equipment operation coefficient, the equipment operation coefficient is compared with the operation status judgment threshold;
[0129] If the device operation coefficient is greater than or equal to the operation status determination threshold, a gateway device operation stability signal is generated, and no additional PLC gateway management is required. This indicates that the device can operate normally under the current configuration and operating parameters, the PLC gateway device is in good operating condition, the parameter fluctuation is within the acceptable range, no abnormalities or potential faults are detected, and no further manual or automatic intervention is required;
[0130] If the equipment operation coefficient is less than the operation status judgment threshold, a gateway equipment operation fluctuation signal is generated, indicating that the current equipment operation status is unstable and additional PLC gateway management and adjustment may be required. This may include adjusting equipment operation parameters, fault diagnosis and maintenance to ensure that the equipment returns to a stable state. The equipment may have abnormalities, fluctuations or potential failures, which require further attention and management.
[0131] Based on the analysis results, when the gateway device operation fluctuation signal is generated, the particle swarm optimization algorithm is used to determine the optimal device operation parameter configuration, and the actual operating environment and device characteristics are considered to ensure the feasibility of the optimization plan. The specific steps are as follows:
[0132] After receiving the operation fluctuation signal of the gateway equipment, corresponding measures should be taken in time to optimize the management;
[0133] Initialize the particle swarm. Each particle represents a set of device operating parameter configurations. Assuming that the device has n operating parameters, each particle searches in the n-dimensional space and sets the size of the particle swarm to N (usually 20-50).
[0134] Randomly initialize the position and velocity of each particle, set the initial position of each particle to its local optimal position (Pbest), and find the current global optimal position (Gbest);
[0135] Define the fitness function, which is used to evaluate the performance of each particle. Depending on the specific situation of the device, the fitness function can be a comprehensive evaluation indicator of the operating parameter configuration, such as operating stability, energy consumption, failure rate, etc.
[0136] Update speed and position. Update the speed of the particle according to the current speed, local optimal position and global optimal position of the particle, and update the position of the particle according to the updated speed. Recalculate the fitness value of the new position of each particle, update the local optimal position (Pbest) and the global optimal position (Gbest), and perform iterative search until the stop condition is met (for example, the maximum number of iterations is reached or the change in fitness value is less than the preset threshold);
[0137] During the optimization process, the actual operating environment and equipment characteristics are considered to set constraints on the position and speed of particles. For example, the physical limitations of equipment parameters, safe operating range, etc.
[0138] Output the optimal operating parameter configuration. The parameter configuration corresponding to the final global optimal position Gbes is the optimal operating parameter configuration. Output and apply the optimal parameter configuration to the operation of the PLC gateway device.
[0139] Through these steps, the particle swarm optimization algorithm can be effectively used to determine the optimal equipment operating parameter configuration, thereby improving the operating efficiency and stability of the equipment and ensuring the feasibility of the optimization solution.
[0140] It should be noted that the setting of the operating status determination threshold can be determined according to specific scenarios and needs, and is usually adjusted and optimized based on factors such as historical data and real-time data.
[0141] The present invention achieves comprehensive monitoring and prediction of the equipment operation status by installing and configuring PLC gateway equipment, acquiring and preprocessing operation status data, constructing a long short-term memory network model for equipment status prediction, and combining the autoencoder model for data anomaly detection. By analyzing the operation status data after combining LSTM with the autoencoder, the fluctuation information generated during the operation of the equipment can be accurately obtained, and the operation status of the equipment can be determined in real time.
[0142] When the equipment is running in a stable state, an operation stability signal is generated to avoid unnecessary management intervention, thereby improving the automation and management efficiency of the system. If an abnormality is detected, an operation fluctuation signal is generated, and the particle swarm optimization algorithm is used to determine the optimal equipment operation parameter configuration, and corresponding management and scheduling are performed to ensure that the equipment can quickly return to a stable state under abnormal conditions, realizing intelligent and automated management of PLC gateway equipment, and significantly improving the equipment's operating stability and management efficiency.
[0143] Embodiment 2: This embodiment is a system embodiment of embodiment 1, which is used to implement the PLC gateway device operation status monitoring method based on open source Hongmeng introduced in embodiment 1, such as Figure 2 As shown, specifically including:
[0144] Configuration preprocessing module, used to install and configure PLC gateway device, obtain the running status data of PLC gateway device and perform data preprocessing;
[0145] The model building module is used to build a long short-term memory network model based on the preprocessed data, predict the equipment operation status, and build an autoencoder model to detect data anomalies;
[0146] The monitoring and analysis module is used to analyze the PLC gateway operation status monitoring process after the long short-term memory network model and the autoencoder model are combined, obtain the operation fluctuation information generated during the status monitoring process, and determine the status of the PLC gateway device monitored in real time;
[0147] Management module, if the PLC gateway operation status is stable, it will generate a gateway device operation stability signal and no management measures will be taken; if the PLC gateway operation status is abnormal, it will generate a gateway device operation fluctuation signal, use the particle swarm optimization algorithm to determine the optimal device operation parameters and perform configuration management.
[0148] The above formulas are all dimensionless and calculated numerically. Specific dimension removal can be achieved by various means such as standardization, which will not be elaborated here. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0149] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, an ATA hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state ATA hard disk.
[0150] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0151] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0152] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0153] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0154] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0155] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A PLC gateway device operation status monitoring method based on open source Hongmeng, characterized in that: The steps include: Install and configure PLC gateway devices, obtain the operating status data of PLC gateway devices and perform data preprocessing; Build a long short-term memory network model based on the preprocessed data, predict the equipment operation status, and build an autoencoder model to detect data anomalies; The PLC gateway operation status monitoring process after combining the long short-term memory network model with the autoencoder model is analyzed to obtain the operation fluctuation information generated during the status monitoring process and determine the status of the PLC gateway device monitored in real time; If the PLC gateway is in a stable operating state, a gateway device stable operating signal is generated and no management measures are taken; If the PLC gateway is in an abnormal operating state, a gateway device operation fluctuation signal is generated, and the particle swarm optimization algorithm is used to determine the optimal device operation parameters and perform configuration management; Obtain the operating status data of the PLC gateway device and perform data preprocessing. The specific process is as follows: Data preprocessing includes denoising, standardization and data verification; Use mean filtering and Kalman filtering to denoise the operating status data; Use Z-score standardization and Min-Max normalization to standardize the operating status data; Use parity check and cyclic redundancy check to perform data verification on the operation status data; A long short-term memory network model is constructed based on the preprocessed data, and the equipment operation status is predicted. The specific process is as follows: After preprocessing the collected operating status data, the data was divided into training set, validation set and test set, and a long short-term memory network model was constructed using a deep learning framework; Define the LSTM model structure, including the input layer, LSTM layer, fully connected layer, and output layer, and set the learning rate, batch size, and sequence length; Use mean square error as the loss function, use the training set to train the model, and update the model parameters through back propagation; Use the validation set to evaluate the performance of the LSTM model and adjust the hyperparameters. Use the test set to evaluate the LSTM model and apply the LSTM model to real-time data streams to make real-time predictions on the equipment operating status. At the same time, an autoencoder model is built to detect data anomalies. The specific process is as follows: The operating status data collected from the PLC gateway device is pre-processed and divided into normal data and data containing abnormalities; Define the autoencoder structure, including encoder, bottleneck layer and decoder, and set the learning rate, batch size and bottleneck layer size; Use mean square error as loss function and use normal data for model training to reconstruct normal data; Use data containing anomalies to evaluate model performance and identify outliers based on reconstruction errors; Apply the autoencoder to the real-time data stream, calculate the reconstruction error of each data point, and identify anomalies as early warning information based on the comparison between the reconstruction error and the threshold; The PLC gateway operation status monitoring process after combining the long short-term memory network model with the autoencoder model is analyzed to obtain the operation fluctuation information generated during the status monitoring process. The specific process is as follows: Operation fluctuation information includes reconstruction detection information and model response information; The reconstruction detection information includes a reconstruction detection fluctuation index, and the model response information includes a model response stability index; The obtained reconstruction detection fluctuation index and model response stability index are calculated jointly to obtain the equipment operation coefficient.
2. According to the open source Hongmeng-based PLC gateway device operation status monitoring method of claim 1, it is characterized by: If the PLC gateway is in a stable operating state, a gateway device stable operating signal is generated and no management measures are taken; If the PLC gateway is in an abnormal operating state, a gateway device operation fluctuation signal is generated. The specific process is as follows: Compare the equipment operation coefficient with the operation status determination threshold; If the equipment operation coefficient is greater than or equal to the operation status determination threshold, a gateway equipment operation stability signal is generated and no scheduling management measures are taken; If the equipment operation coefficient is less than the operation status judgment threshold, a gateway equipment operation fluctuation signal is generated, an early warning signal is issued, and scheduling management is performed.
3. According to the open source Hongmeng-based PLC gateway device operation status monitoring method of claim 2, it is characterized by: Use the particle swarm optimization algorithm to determine the optimal equipment operating parameters and perform configuration management. The specific steps are as follows: Set the particle swarm size, initialize the position and velocity of each particle, and define the fitness function based on stability, energy consumption, and failure rate; Update the speed and position according to the current state, local optimal position and global optimal position of the particle, calculate the fitness value of each particle's new position, and update the local optimal and global optimal positions; Repeat the speed and position update and fitness evaluation until the stopping condition is met; During the optimization process, the physical limitations and safe operating range of the equipment are determined, and the optimal operating parameter configuration obtained by the particle swarm optimization algorithm is output based on the results.
4. A PLC gateway device operation status monitoring system based on open source Hongmeng, used to implement the PLC gateway device operation status monitoring method based on open source Hongmeng as described in any one of claims 1-3, characterized in that: include: Configuration preprocessing module, used to install and configure PLC gateway device, obtain the running status data of PLC gateway device and perform data preprocessing; The model building module is used to build a long short-term memory network model based on the preprocessed data, predict the equipment operation status, and build an autoencoder model to detect data anomalies; The monitoring and analysis module is used to analyze the PLC gateway operation status monitoring process after the long short-term memory network model and the autoencoder model are combined, obtain the operation fluctuation information generated during the status monitoring process, and determine the status of the PLC gateway device monitored in real time; Management module, if the PLC gateway is in stable operation state, it generates a gateway device operation stable signal and does not take any management measures; If the PLC gateway is operating abnormally, a gateway device operation fluctuation signal is generated, and the particle swarm optimization algorithm is used to determine the optimal device operation parameters and perform configuration management.
