A fault prevention method and device for the Internet of Things
By applying DNN and LSTM neural network models in industrial control networks, combined with EtherCAT fieldbus technology, predicting the failure probability and value of network equipment, the problem of difficulty in preventing industrial control network failure in the existing technology is solved, and high accuracy is achieved and efficient failure prevention.
Patent Information
- Application Number
- CN202411588283.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The prior art is difficult to prevent industrial control network failures in advance, resulting in network equipment downtime and production interruptions, and the accuracy and reliability of the detection results are not high.
Using the Internet of Things fault prevention method based on EtherCAT fieldbus, the failure probability and failure value of network equipment in the future is predicted through the DNN and LSTM neural network models, and combining the graph feature factor and bandwidth demand factor of network equipment to improve the accuracy of detection. Sex and efficiency.
It realizes accurate prediction of industrial control network failures, prevents failures in advance, improves the accuracy and efficiency of network failure prevention, and avoids business interruptions and economic losses caused by failures.
Smart Images

Figure CN119135556B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network fault processing, and in particular to a fault prevention method and device for the Internet of Things, as well as a storage medium and an electronic device. Background Art
[0002] Since the 21st century, industrial control systems have been widely used in the fields of electricity, natural gas, transportation, aviation, nuclear power plants, etc. With the continuous development of industrial technology and the increasing maturity of computer technology and communication technology, new technologies are constantly being applied to industrial control systems. In the field of Internet of Things, industrial control networks are an important part of industrial control systems. Generally, they use Ethernet control automation technology EtherCAT (Ethernet for Control Automation Technology) fieldbus or industrial Ethernet as communication media, controllers, sensors, actuators, and measurement and control instruments with communication capabilities as network nodes, and adopt an open, digital, and multi-node communication method to complete industrial measurement or control. A special network. In recent years, under the influence of artificial intelligence technology, industrial control networks have applied a large number of new technologies. Industrial control networks have been applied in many industrial systems, and the problem of industrial control network failures has attracted more and more attention.
[0003] When an industrial control network fails, network equipment will go down, production interruptions will lead to economic losses, and in serious cases, human life safety may be threatened. Therefore, how to prevent industrial control networks in advance becomes a difficult problem. The current network fault detection method usually adopts manual detection, which can only detect whether there is a fault in the network at the current moment, and cannot detect whether the industrial control network will fail in a certain period of time in the future. At present, it is mainly through analyzing a certain specific physical property of the equipment in each node of the industrial control network (such as the power of the received signal, etc.) to find the fault characteristics of the industrial control network equipment, and finally diagnose the fault of the industrial control network node, ignoring the location information and importance of the network equipment in the network, resulting in low accuracy and reliability of the detection results. Summary of the invention
[0004] In view of this, the present invention provides an Internet of Things fault prevention method and device based on EtherCAT field bus, as well as a storage medium and electronic device, which can predict fault values in the future, prevent the occurrence of faults in advance, and effectively improve the accuracy of network fault prevention.
[0005] In a first aspect, the present invention provides a fault prevention method for an Internet of Things, wherein the Internet of Things is an industrial control network based on an EtherCAT fieldbus, wherein the industrial control network is a bus-type network topology structure in a master-slave communication mode, wherein the mth device is a master device and the remaining devices are slave devices, including:
[0006] S1. Collect network signals according to a preset sampling period and transmit them to the server;
[0007] S2. Preprocess the collected signals to obtain characteristic data of network devices in the industrial control network;
[0008] S3. Establish a DNN network model, divide the collected normal state data of network devices into training data and test data, train and test the DNN network model, and obtain the granularity constant of the DNN network model; input the obtained characteristic data of each network device into the trained DNN network model, calculate and output the failure probability of each network device at the sampling time;
[0009] S4, calculating the network graph characteristic factor and the network bandwidth requirement factor of the master device and the slave device in the bus topology at the sampling time, and obtaining the failure factor of each network device at the sampling time according to the network graph characteristic factor and the network bandwidth requirement factor;
[0010] S5. Obtain a fault value of each network device at the sampling time based on the fault probability and fault factor of each network device at the sampling time, and obtain a fault value of the industrial control network at the sampling time based on the fault value of each network device at the sampling time;
[0011] S6. Establish an LSTM network model and use historical data to train the LSTM model to obtain the optimal weight coefficient of the LSTM model. Input the historical window duration, prediction time interval, and future prediction time interval to obtain the network fault value at the current time and within the preset historical time interval. Obtain the network fault value of the future prediction time interval through the LSTM model. Compare the network fault value of the future prediction time interval with the preset threshold. If it is greater than the preset threshold, the output is faulty and an alarm message is issued. If it is less than the preset threshold, the output is no fault.
[0012] Optionally, in the above method embodiments of the present invention, the DNN network model includes an input layer, two hidden layers, and an output layer, wherein the input layer and the hidden layer constitute an encoder, and the hidden layer and the output layer constitute a decoder; the LSTM model includes two LSTM layers and two dense layers, the two LSTM layers are directly connected, the two dense layers are directly connected, and the outputs of the two LSTM layers are connected to the inputs of the two dense layers.
[0013] Optionally, in the above-mentioned method embodiments of the present invention, when obtaining the fault value of the network in the future prediction time interval, the network fault value at the current moment, the historical window length, the prediction time interval, the future prediction time interval and the sampling period are obtained, and the fault value in the historical time interval is obtained based on the historical window length, the prediction time interval and the sampling period. Based on the fault value in the historical time interval and the current network fault value, a sliding window method is used to obtain the network fault values at multiple sampling moments in the future prediction time interval, and the network fault value in the future prediction time interval is obtained according to the network fault values at multiple sampling moments in the future prediction time interval.
[0014] Optionally, in the above-mentioned method embodiments of the present invention, the historical window length is used as the sliding window length, and the statistical fault value is the normal value F according to the fault value of the network at each sampling time within the sliding window length. normal The number and error value F abnormal The number of faults in the network is calculated, and then the fault value of the network at the next moment is calculated. The calculation formula is: ,
[0015] Where M is the number of sampling points within the sliding window length, , is the network fault value at sampling time t, when is less than the threshold, F normal ,when is greater than the threshold, F abnormal , = - is the change in network fault value between two adjacent sampling moments;
[0016] Slide according to time with the sampling interval as the sliding unit, and repeat the above steps until the fault value covers the future prediction time interval;
[0017] According to the network fault values at all sampling times in the future prediction time interval, the fault value of the future prediction time interval is obtained. The formula is:
[0018] ,
[0019] Among them, O is the number of sampling points in the future prediction time interval length, , F a is the fault value of the network at the ath sampling point in the future prediction time interval;
[0020] The difference between the network fault values at two adjacent historical sampling moments is obtained respectively, and the change of the network fault value is obtained based on the difference between the network fault values. The network fault value at each sampling point in the future prediction time interval is obtained based on the change. The network fault value at each sampling point in the future prediction time interval is then obtained.
[0021] The network fault value of the future predicted time interval is compared with the preset threshold. If it is greater than the preset threshold, it is output as a fault and an alarm is issued. If it is less than the preset threshold, it is output as no fault.
[0022] Optionally, in the above-mentioned method embodiments of the present invention, the optimal weight coefficient of the LSTM model is obtained, specifically: in the training stage, the historical window length, prediction time interval, and future prediction time interval set in the historical time are input, and the fault values of the device at the current time and the device at the historical time are input into the LSTM model, and the predicted value of the network device failure probability at each sampling time in the future prediction time interval set in the historical time is obtained, combined with the true value of the failure probability of the network device at each sampling time in the future prediction time interval set in the historical time, the number of network device nodes whose predicted value is abnormal and the true value is normal is obtained by statistics, the number of network devices whose preset value is abnormal, and the number of network devices whose preset value is normal are obtained; the loss weight of the LSTM neural network is obtained, and the calculation formula is:
[0023]
[0024] Among them, p is the number of network devices whose preset value is healthy, N is the number of network devices whose preset value is abnormal, and num is the number of network device nodes whose predicted value is abnormal but the actual value is normal.
[0025] Optionally, in the above-mentioned method embodiments of the present invention, the network graph characteristic factor and the network bandwidth requirement factor of the master device and the slave device in the bus topology structure at the sampling time are calculated, and the failure factor of each network device at the sampling time is obtained according to the network graph characteristic factor and the network bandwidth requirement factor, which is specifically:
[0026] The test data x i As the input of the DNN network model, L samplings are performed to obtain the hidden layer variable z={z i1 ,z i2 ,...,z il ,...,z iL}, get x according to the hidden layer variable z i Restore data x il c Then we get the average restored data under multiple samplings and calculate the input test data x iThe restoration error between the average restoration data :
[0027]
[0028] The restored error vector S = {s(x1), s(x2),..., s(x n )}, then the failure probability of the i-th industrial control network equipment is:
[0029]
[0030] Where c0 is the particle size constant, which is:
[0031]
[0032] In the formula, K represents the number of normal samples used to calculate c0, C pre is a constant, with a value of 0.95; if s(x i )<0.5, then s(x i )for ;
[0033] The network graph characteristic factor of the jth network slave device in the network at the sampling time is:
[0034]
[0035] Where N represents the total number of network devices, g m (j) represents the total number of shortest paths between the master device m and all slave devices passing through the slave device j, Indicates the shortest path between the master device and the slave device i; the network graph characteristic factor B(m) of the network master device is 1; the network graph characteristic factors of all network devices are normalized and calculated:
[0036] ,i=1,2,...,N; where is the network graph characteristic factor of the i-th device in the network;
[0037] The network bandwidth requirement factor of the i-th network device in the network is:
[0038]
[0039] Where P i Indicates the process data bandwidth occupancy of the i-th network device in a cycle;
[0040] The failure factor calculation formula of network equipment is:
[0041]
[0042] in, represent the failure factors of devices 1, 2, ..., N respectively.
[0043] Optionally, in the above-mentioned method embodiments of the present invention, the failure value of each network device at the sampling time is obtained based on the failure probability and failure factor of each network device at the sampling time, and the failure value of the industrial control network at the sampling time is obtained based on the failure value of each network device at the sampling time, specifically:
[0044] i=1,2,...,N;
[0045] ,
[0046] Where i=1,2,...,N, N is the total number of devices, F i is the fault value of device i at the sampling time, is the fault value of the industrial control network at the sampling time.
[0047] In a second aspect, the present invention provides a fault prevention device for an Internet of Things, wherein the Internet of Things is an industrial control network based on an EtherCAT field bus, wherein the industrial control network is a bus-type network topology structure in a master-slave communication mode, wherein the mth device is a master device and the remaining devices are slave devices, wherein the device comprises:
[0048] Data collection and transmission module; used to collect and transmit network signals according to preset sampling intervals;
[0049] Data preprocessing module: used to preprocess the collected signals to obtain characteristic data of network devices in the industrial control network;
[0050] The model building and data analysis module is used to build a DNN network model, divide the collected normal state data of network devices into training data and test data, train and test the DNN network model, and obtain the granularity constant of the DNN network model; input the obtained characteristic data of each network device into the trained DNN network model, and calculate and output the failure probability of each network device at the sampling time;
[0051] Calculating the network graph characteristic factor and the network bandwidth requirement factor of the master device and the slave device in the bus topology at the sampling time, and obtaining the failure factor of each network device at the sampling time according to the network graph characteristic factor and the network bandwidth requirement factor;
[0052] Obtaining a fault value of each network device at the sampling time based on the fault probability and the fault factor of each network device at the sampling time, and obtaining a fault value of the industrial control network at the sampling time based on the fault value of each network device at the sampling time;
[0053] Establish an LSTM network model, and use historical data to train the LSTM model to obtain the optimal weight coefficient of the LSTM model, input the historical window length, prediction time interval, and future prediction time interval, obtain the fault value of the network at the current time and the preset historical time interval, obtain the fault value of the network in the future prediction time interval through the LSTM model, and compare the network fault value in the future prediction time interval with the preset threshold. If it is greater than the preset threshold, the output is faulty and an alarm message is issued. If it is less than the preset threshold, the output is no fault.
[0054] Optionally, in the above method embodiments of the present invention, the DNN network model includes an input layer, two hidden layers, and an output layer, wherein the input layer and the hidden layer constitute an encoder, and the hidden layer and the output layer constitute a decoder; the LSTM model includes two LSTM layers and two dense layers, the two LSTM layers are directly connected, the two dense layers are directly connected, and the outputs of the two LSTM layers are connected to the inputs of the two dense layers.
[0055] Optionally, in the above-mentioned method embodiments of the present invention, when obtaining the fault value of the network in the future prediction time interval, the network fault value at the current moment, the historical window length, the prediction time interval, the future prediction time interval and the sampling period are obtained, and the fault value in the historical time interval is obtained based on the historical window length, the prediction time interval and the sampling period. Based on the fault value in the historical time interval and the current network fault value, a sliding window method is used to obtain the network fault values at multiple sampling moments in the future prediction time interval, and the network fault value in the future prediction time interval is obtained according to the network fault values at multiple sampling moments in the future prediction time interval.
[0056] Optionally, in the above-mentioned method embodiments of the present invention, the historical window length is used as the sliding window length, and the statistical fault value is the normal value F according to the fault value of the network at each sampling time within the sliding window length. normal The number and error value F abnormal The number of faults in the network is calculated, and then the fault value of the network at the next moment is calculated. The calculation formula is: ,
[0057] Where M is the number of sampling points within the sliding window length, , is the network fault value at sampling time t, when is less than the threshold, F normal ,when is greater than the threshold, F abnormal , = - is the change in network fault value between two adjacent sampling moments;
[0058] Slide according to time with the sampling interval as the sliding unit, and repeat the above steps until the fault value covers the future prediction time interval;
[0059] According to the network fault values at all sampling times in the future prediction time interval, the fault value of the future prediction time interval is obtained. The formula is:
[0060] ,
[0061] Among them, O is the number of sampling points in the future prediction time interval length, , F a is the fault value of the network at the ath sampling point in the future prediction time interval;
[0062] The difference between the network fault values at two adjacent historical sampling moments is obtained respectively, and the change of the network fault value is obtained based on the difference between the network fault values. The network fault value at each sampling point in the future prediction time interval is obtained based on the change. The network fault value at each sampling point in the future prediction time interval is then obtained.
[0063] The network fault value of the future predicted time interval is compared with the preset threshold. If it is greater than the preset threshold, it is output as a fault and an alarm is issued. If it is less than the preset threshold, it is output as no fault.
[0064] Optionally, in the above-mentioned method embodiments of the present invention, the optimal weight coefficient of the LSTM model is obtained, specifically: in the training stage, the historical window length, prediction time interval, and future prediction time interval set in the historical time are input, and the fault values of the device at the current time and the device at the historical time are input into the LSTM model, and the predicted value of the network device failure probability at each sampling time in the future prediction time interval set in the historical time is obtained, combined with the true value of the failure probability of the network device at each sampling time in the future prediction time interval set in the historical time, the number of network device nodes whose predicted value is abnormal and the true value is normal is obtained by statistics, the number of network devices whose preset value is abnormal, and the number of network devices whose preset value is normal are obtained; the loss weight of the LSTM neural network is obtained, and the calculation formula is:
[0065]
[0066] Among them, p is the number of network devices whose preset value is healthy, N is the number of network devices whose preset value is abnormal, and num is the number of network device nodes whose predicted value is abnormal but the actual value is normal.
[0067] Optionally, in the above-mentioned method embodiments of the present invention, the network graph characteristic factor and the network bandwidth requirement factor of the master device and the slave device in the bus topology structure at the sampling time are calculated, and the failure factor of each network device at the sampling time is obtained according to the network graph characteristic factor and the network bandwidth requirement factor, which is specifically:
[0068] The test data x i As the input of the DNN network model, L samplings are performed to obtain the hidden layer variable z={z i1 ,z i2 ,...,z il ,...,z iL}, get x according to the hidden layer variable z i Restore data x il c Then we get the average restored data under multiple samplings and calculate the input test data x i The restoration error between the average restoration data :
[0069]
[0070] The restored error vector S = {s(x1), s(x2),..., s(x n )}, then the failure probability of the i-th industrial control network equipment is:
[0071]
[0072] Where c0 is the particle size constant, which is:
[0073]
[0074] In the formula, K represents the number of normal samples used to calculate c0, C pre is a constant, with a value of 0.95; if s(x i )<0.5, then s(x i )for ;
[0075] The network graph characteristic factor of the jth network slave device in the network at the sampling time is:
[0076]
[0077] Where N represents the total number of network devices, g m(j) represents the total number of shortest paths between the master device m and all slave devices passing through the slave device j, Indicates the shortest path between the master device and the slave device i; the network graph characteristic factor B(m) of the network master device is 1; the network graph characteristic factors of all network devices are normalized and calculated:
[0078] ,i=1,2,...,N; where is the network graph characteristic factor of the i-th device in the network;
[0079] The network bandwidth requirement factor of the i-th network device in the network is:
[0080]
[0081] Where P i Indicates the process data bandwidth occupancy of the i-th network device in a cycle;
[0082] The failure factor calculation formula of network equipment is:
[0083]
[0084] in, represent the failure factors of devices 1, 2, ..., N respectively.
[0085] Optionally, in the above-mentioned method embodiments of the present invention, the failure value of each network device at the sampling time is obtained based on the failure probability and failure factor of each network device at the sampling time, and the failure value of the industrial control network at the sampling time is obtained based on the failure value of each network device at the sampling time, specifically:
[0086] i=1,2,...,N;
[0087] ,
[0088] Where i=1,2,...,N, N is the total number of devices, F i is the fault value of device i at the sampling time, is the fault value of the industrial control network at the sampling time.
[0089] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the method provided in the first aspect.
[0090] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, including a computer program, which, when executed on an electronic device, enables the electronic device to execute the method provided in the first aspect.
[0091] The embodiment of the present invention provides an Internet of Things fault prevention method and device based on EtherCAT field bus, which can accurately predict whether the network will fail in the future, and effectively avoid business interruption and economic loss or even life safety in the network caused by the failure. By adopting DNN and LSTM neural networks, the efficiency and accuracy of detection are effectively improved. At the same time, the fault factor of the network device is obtained through the graph feature factor and bandwidth demand factor of the network device, and the fault value of the network device is obtained through the fault factor and the fault probability, and then the fault value of the network is obtained. A variety of attributes are used for analysis to improve the accuracy and efficiency of fault prediction. At the same time, by calculating the loss weight of the LSTM neural network in the LSTM model, the problem that most of the data in real applications are in a normal state, the fault data is extremely rare, and the data categories are extremely unbalanced, resulting in high difficulty in training models and low prediction accuracy, improves the efficiency of model training and the accuracy of fault prediction.
[0092] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0093] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0095] Figure 1 A flow chart of a method for preventing Internet of Things faults based on EtherCAT fieldbus provided by one embodiment of the present invention;
[0096] Figure 2 It is a structural schematic diagram of the model of the present invention;
[0097] Figure 3 This is a structural diagram of a DNN model provided in an embodiment of the present invention.
[0098] Figure 4 This is a structural diagram of the LSTM model provided in an embodiment of the present invention.
[0099] Figure 5 A schematic diagram of a sliding window structure provided in an embodiment of the present invention.
[0100] Figure 6 A schematic structural diagram of a device provided by an exemplary embodiment of the present invention.
[0101] Figure 7 This is a bus network topology diagram of the master-slave communication method of the present invention. DETAILED DESCRIPTION
[0102] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.
[0103] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0104] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0105] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0106] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0107] The invention provides an industrial control network fault prevention method based on EtherCAT field bus. Figure 1 It is a method flow chart of an embodiment of the fault prediction method provided by the present invention.
[0108] like Figure 1 As shown, according to one embodiment of the present invention, the network failure prevention method at least includes the steps of:
[0109] S1. Collect network signals according to a preset sampling period and transmit them to the server.
[0110] The Internet of Things of the present application is an industrial control network. The industrial control network is a bus-type structure, adopts a master-slave communication mode, the network master device is the only device that initiates communication, and all other devices are network slave devices. Only one network master device sends a master message, and other network slave devices respond to the master message and send slave messages. Multiple industrial control network subnets are connected to form a network through a repeater, and the repeater realizes signal shaping and phase resynchronization. Different industrial control network devices are connected to each other through connectors and communication cables. The industrial control network in the present invention mainly refers to a single industrial control network subnet. The main communication modes of the industrial control network include process communication and information communication. For control commands, status messages and other data with high real-time requirements, the process communication mode is adopted, and data is transmitted by the master-slave polling mode of dividing time slices, and the transmission message type is a process data message. In order to ensure the real-time performance of data transmission, the industrial control network master device divides the polling time into fixed basic cycles, each basic cycle includes a process phase and a non-process phase, and the network bandwidth pre-allocated according to the cycle scanning table is transmitted in the process phase. The process data message is transmitted, and the information data message is transmitted in the non-process phase.
[0111] The network signal is collected by the sensor at the sampling interval, the master / slave frame and port number are identified by data frame splitting and decoding, the signal segment corresponding to the master / slave start delimiter is selected, and the collected network signal is transmitted to the server.
[0112] S2, preprocessing the collected signals to obtain characteristic data of network devices in the industrial control network.
[0113] In actual applications, the network signals collected are sometimes messy, often containing incomplete data, repeated data, empty data values, etc. In order to improve the quality of the data, data cleaning, data filling, and normalization are required in the data preprocessing stage to obtain the characteristic data of each network device.
[0114] S3, establish a DNN network model, divide the collected normal status data of network devices into training data and test data, train and test the DNN network model, and obtain the granularity constant of the DNN network model; input the characteristic data of each network device into the trained DNN network model, calculate and output the failure probability of each network device at the sampling time.
[0115] like Figure 3 As shown, the DNN network model used in the present invention includes an input layer, two hidden layers, and an output layer, wherein the input layer and the hidden layer constitute an encoder, and the hidden layer and the output layer constitute a decoder. The encoded representation of the input information can be obtained in the hidden layer, and the original input can be restored based on this encoded representation. The output of the hidden layer or the output layer of the encoder can be obtained according to different purposes.
[0116] In order to obtain the overall failure probability of the industrial control network at a certain moment, we must first obtain the failure probability of each network device, and then obtain the failure probability of the entire industrial control network based on the failure probability of each network device. By collecting normal state signal fragments of network devices, a normal state data set of network devices is established and used to train the DNN network model. The trained DNN network model has learned the probability distribution of normal state samples, and can restore normal state samples well, but cannot correctly restore abnormal state samples, resulting in a small restoration error for normal state samples and a large restoration error for abnormal state samples. Therefore, the restoration error of the DNN network model can effectively reflect the deviation between the abnormal samples and the probability distribution of normal state samples learned by the DNN network model, and characterize the current state of the network device by the degree to which the test sample deviates from the normal state sample distribution.
[0117] S4. Calculate the network graph characteristic factor and the network bandwidth requirement factor of the master device and the slave device in the bus topology at the sampling time, and obtain the failure factor of each network device at the sampling time according to the network graph characteristic factor and the network bandwidth requirement factor.
[0118] The test data x i As the input of the DNN network model, L samplings are performed to obtain the hidden layer variable z={z i1 ,z i2 ,...,z il ,...,z iL}, according to the latent variable Z, we get x i Restore data x il c Then we get the average restored data under multiple sampling, and input the test data x i , and the restoration error between it and its average restoration data is used to reflect the deviation between the test data and the probability distribution of the normal state samples learned by the DNN network model, which can be defined as:
[0119]
[0120] The restored error vector S = {s(x1), s(x2),..., s(x n )}. For normal state samples, the trained fault assessment model can restore them well, and the restoration error between the test data xi and its average restoration data is small; for abnormal samples, the model cannot restore them correctly, and the restoration error between the test data xi and its average restoration data is large. Therefore, the failure probability of the i-th industrial control network device can be:
[0121]
[0122] Where c0 is the particle size constant, which is:
[0123]
[0124] In the formula, K represents the number of normal samples used to calculate c0, C pre is a constant with a value of 0.95. If s(x i )<0.5, then s(x i )for .
[0125] Since the industrial control network is a bus-type topology with a master-slave communication mode, all network slave devices need to establish a connection with the network master device to communicate. The data transmission path between the network master device and each network slave device is the most important. The more network slave devices share the data transmission path, the greater the impact on the entire network when a failure occurs. Combined with the topology and functional application characteristics of the industrial control network, only the shortest path between the network master device and all network slave devices is considered. The network graph characteristic factor of the jth network slave device at the sampling time is:
[0126]
[0127] Where N is the total number of network devices, the mth one is the master device, g m (j) represents the total number of shortest paths between the master device and all slave devices passing through slave device j, represents the shortest path between the master device and slave device i; the communication process of the entire industrial control network is centered on the network master device, so the network graph characteristic factor B(m) of the network master device is set to 1. The network graph characteristic factors of all network devices are normalized and calculated:
[0128] ,i=1,2,...,N;
[0129] The graph characteristic factor of each network device is not fixed. When the number and position of network slave devices change, the network master device is handed over, etc., the graph characteristic factor of the network device will change dynamically, thereby effectively reflecting the graph topology of the current industrial control network.
[0130] For network slave devices that are far away from the network master device, their network graph characteristic factors are small. However, if the network slave device is polled by the network master device multiple times in one cycle and transmits more control instructions, status information, etc., then if only the network graph characteristic factor is considered, it cannot truly reflect the importance of the network device in the entire network data transmission process. Therefore, the network occupancy needs must also be considered. In industrial control networks, control instructions and important status information are usually transmitted using process data. In one cycle, the network master device performs periodic polling of process data according to the periodic scanning table. The bandwidth resources of the industrial control network are very limited. Therefore, the bandwidth occupancy ratio of the process data of the network device in one cycle is used as its network bandwidth demand factor. The network bandwidth demand factor of the i-th network device is:
[0131]
[0132] Where P i It represents the process data bandwidth occupation of the i-th network device in a cycle. The network bandwidth demand factor of all network devices is not fixed. Therefore, considering the network graph characteristic factor and bandwidth demand factor of the network device, the failure factor calculation formula of the network device is:
[0133]
[0134] in, represent the failure factors of devices 1, 2, ..., N respectively.
[0135] S5. Obtain the fault value of each network device at the sampling time based on the fault probability and fault factor of each network device at the sampling time, and obtain the fault value of the industrial control network at the sampling time based on the fault value of each network device at the sampling time, specifically:
[0136] i=1,2,...,N;
[0137] ,
[0138] Where i=1,2,...,N, N is the total number of devices, F i is the fault value of device i at the sampling time, is the fault value of the industrial control network at the sampling time.
[0139] S6. Establish an LSTM network model and use historical data to train the LSTM model to obtain the optimal weight coefficient of the LSTM model. Input the historical window duration, prediction time interval, and future prediction time interval to obtain the network fault value at the current time and within the preset historical time interval. Obtain the network fault value of the future prediction time interval through the LSTM model. Compare the network fault value of the future prediction time interval with the preset threshold. If it is greater than the preset threshold, the output is faulty and an alarm message is issued. If it is less than the preset threshold, the output is no fault.
[0140] like Figure 4 As shown, the LSTM model adopted in the present invention includes two LSTM layers and two dense layers, the two LSTM layers are directly connected, the two dense layers are directly connected, and the outputs of the two LSTM layers are connected to the inputs of the two dense layers.
[0141] When obtaining the fault value of the network in the future prediction time interval, the network fault value at the current moment, the historical window length, the prediction time interval, the future prediction time interval, and the sampling interval are obtained. The fault value in the historical time interval is obtained based on the historical window length, the prediction time interval, and the sampling interval. Based on the fault value in the historical time interval and the current network fault value, a sliding window method is used to obtain the network fault values at multiple sampling moments in the future prediction time interval. The network fault value for the future prediction time interval is obtained based on the network fault values at multiple sampling moments in the future prediction time interval.
[0142] According to an embodiment of the present invention, in Embodiment 1, a sliding window method is used to obtain multiple network fault values within a future prediction time interval based on historical network fault values and current network fault values, and a network fault value within a future prediction time interval is obtained according to the multiple network fault values within the future prediction time interval, specifically:
[0143] The historical window length is used as the sliding window length. According to the network fault value at each sampling time within the sliding window length, the statistical fault value is the normal value F normal The number and error value F abnormal The number of faults in the network is calculated, and then the fault value of the network at the next moment is calculated. The calculation formula is: ,
[0144] Where M is the number of sampling points within the sliding window length, , is the network fault value at sampling time t, when is less than the threshold, F normal ,when is greater than the threshold, F abnormal , = - is the change in network fault value between two adjacent sampling moments.
[0145] Slide according to time with the sampling interval as the sliding unit, and repeat the above steps until the fault value covers the future prediction time interval.
[0146] According to the network fault values at all sampling times in the future prediction time interval, the fault value of the future prediction time interval is obtained. The formula is:
[0147] ,
[0148] Among them, O is the number of sampling points in the future prediction time interval length, , F a is the fault value of the network at the ath sampling point in the future prediction time interval.
[0149] The difference between the network fault values at two adjacent historical sampling moments is obtained respectively, and the change of the network fault value is obtained based on the difference of the network fault value. The network fault value at each sampling point in the future prediction time interval is obtained based on the change. Based on the network fault value at each sampling point in the future prediction time interval, the network fault value in the future prediction time interval is obtained.
[0150] The network fault value of the future predicted time interval is compared with the preset threshold. If it is greater than the preset threshold, the output is faulty; if it is less than the preset threshold, the output is no fault.
[0151] See also Figure 5, is a schematic diagram of the sliding window of the present invention. For example, the current time is 6:00 on January 1, the historical window duration is 3 hours, the prediction time interval is 1 hour, the future prediction time interval is 7-8 o'clock on January 1, and the sampling interval is 10 minutes. Then, the network fault value between 3 o'clock and 6 o'clock is obtained. Since the sampling interval is 10 minutes, the network fault values at the sampling times within the historical window duration are 3 o'clock on January 1, 3:10 on January 1, 3:20 on January 1, ..., 5:50 on January 1st; and the network fault value at the current time of 6:00 on January 1st; calculate the change in fault values between two adjacent sampling times, that is, the network fault value at 3:10 on January 1st minus the network fault value at 3:00 on January 1st, the network fault value at 3:20 on January 1st minus the network fault value at 3:10 on January 1st, …, the network fault value at 6:00 on January 1st minus the network fault value at 5:50 on January 1st, and at the same time count the number of normal values and the number of error values of the network fault value within the historical window length, and calculate the network fault value at 6:00 on January 1st based on the above values. 10 minutes network fault value; take the historical window length as the window, take the sampling interval as the time unit sliding window, calculate the network fault value difference between adjacent sampling intervals between 6:10 on January 1 and 3:10 on January 1, and at the same time count the number of normal values and the number of error values of the network fault value within the time period from 6:10 on January 1 to 3:10 on January 1; calculate the network fault value at 6:20 on January 1 based on the above values; repeat the above calculation steps to obtain the network fault values at 7:00 on January 1, 7:10 on January 1, 7:20 on January 1, …, 7:50 on January 1, and 8:00 on January 1; based on the network fault values at 7:00 on January 1, 7:10 on January 1, 7:20 on January 1, …, 7:50 on January 1, and 8:00 on January 1, the fault value of the time interval is calculated.
[0152] In another embodiment of the present invention, the optimal weight coefficient of the LSTM model is obtained in Embodiment 1, specifically:
[0153] In the training phase, the historical window length, prediction time interval, and future prediction time set in the historical time are input, and the current and historical fault values of the equipment are input into the LSTM model to obtain the predicted value of the network equipment failure probability at each sampling time in the future prediction time interval set in the historical time. Combined with the true value of the failure probability of the network equipment at each sampling time in the future prediction time interval set in the historical time, the number of network equipment nodes with abnormal predicted values and normal true values is obtained, and the number of network equipment with abnormal preset values and the number of network equipment with normal preset values are obtained; the loss weight of the LSTM neural network is obtained, and the calculation formula is:
[0154]
[0155] Among them, p is the number of network devices whose preset value is normal, N is the number of network devices whose preset value is abnormal, and num is the number of network device nodes whose predicted value is abnormal but the actual value is normal.
[0156] When the industrial control network is working, most of the data is in a normal state, fault data is extremely rare, and the data categories are extremely unbalanced. In order to improve the accuracy of fault prediction, the present invention trains the LSTM model through historical network data combined with a dynamic weight loss function to obtain the loss weight of the LSTM neural network, thereby improving the accuracy of fault prediction.
[0157] Corresponding to the aforementioned embodiment of an industrial control network fault prevention method based on EtherCAT fieldbus, the present application also provides an embodiment of an industrial control network fault prevention device based on EtherCAT fieldbus.
[0158] See also Figure 6 , is a block diagram of an embodiment of an industrial control network fault prevention device based on EtherCAT field bus shown in this application:
[0159] like Figure 6 As shown, the device comprises:
[0160] Data acquisition and transmission module; used to acquire and transmit network signals according to preset sampling intervals.
[0161] Data preprocessing module: used to preprocess the collected signals to obtain characteristic data of network devices in the industrial control network.
[0162] The model building and data analysis module is used to build a DNN network model, divide the collected normal state data of the network equipment into training data and test data, train and test the DNN network model, and obtain the granularity constant of the DNN network model; input the characteristic data of each network device into the trained DNN network model, calculate and output the network failure probability of each network device; obtain the failure value of each network device at the sampling time based on the failure probability and failure factor of each device, and then obtain the failure value of the industrial control network at the sampling time; build an LSTM network model, and use historical data to train the LSTM model to obtain the optimal weight coefficient of the LSTM model, input the historical window length, prediction time interval, and future prediction time interval, obtain the network failure value at the current time and within the preset historical time interval, obtain the network failure value of the future prediction time interval through the LSTM model, compare the network failure value of the future prediction time interval with the preset threshold, if it is greater than the preset threshold, then the output is a fault, and an alarm message is issued, if it is less than the preset threshold, then the output is no fault.
[0163] The present invention also provides an electronic device, the electronic device comprising:
[0164] processor;
[0165] A memory having computer-readable instructions stored thereon, which, when executed by a processor, implements the industrial control network fault prevention method based on the EtherCAT field bus as shown above.
[0166] The electronic device may be Figure 6 The device shown.
[0167] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed on an electronic device, the electronic device executes the aforementioned industrial control network fault prevention method for the EtherCAT field bus.
[0168] The above-mentioned computer-readable storage medium may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read only memory (EPROM) or flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0169] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0170] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0171] Computer program code for performing the operations of the present specification may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0172] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute part or all of the steps in the above method embodiment.
[0173] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0174] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limiting. The above details do not limit the present disclosure to be implemented by adopting the above specific details.
[0175] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0176] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.
[0177] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
[0178] It should also be noted that in the apparatus, equipment and method of the present disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present disclosure. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present disclosure. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown here, but to the widest scope consistent with the principles and novel features disclosed herein.
[0179] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A fault prevention method for the Internet of Things, wherein the Internet of Things is an industrial control network based on the Ethernet control automation technology EtherCAT field bus, wherein the industrial control network is a bus-type network topology structure with a master-slave communication mode, wherein the mth device is the master device and the remaining devices are slave devices, characterized in that: include: S1. Collect network signals according to a preset sampling period and transmit them to the server; S2. Preprocessing the collected signals to obtain characteristic data of network devices in the industrial control network; S3. Establish a DNN network model, divide the collected normal state data of network devices into training data and test data, train and test the DNN network model, and obtain the granularity constant of the DNN network model; input the obtained characteristic data of each network device into the trained DNN network model, calculate and output the failure probability of each network device at the sampling time; S4, calculating the network graph characteristic factor and the network bandwidth requirement factor of the master device and the slave device in the bus network topology at the sampling time, and obtaining the failure factor of each network device at the sampling time according to the network graph characteristic factor and the network bandwidth requirement factor; S5. Obtain a fault value of each network device at the sampling time based on the fault probability and fault factor of each network device at the sampling time, and obtain a fault value of the industrial control network at the sampling time based on the fault value of each network device at the sampling time; S6. Establish an LSTM network model, and use historical data to train the LSTM model, obtain the optimal weight coefficient of the LSTM model, input the historical window duration, prediction time interval, and future prediction time interval, obtain the network fault value at the current time and in the preset historical time interval, obtain the network fault value in the future prediction time interval through the LSTM model, and compare the network fault value in the future prediction time interval with the preset threshold value. If it is greater than the preset threshold value, the output is that there is a fault and an alarm message is issued. If it is less than the preset threshold value, the output is that there is no fault; The calculating of the network graph characteristic factor and the network bandwidth requirement factor of the master device and the slave device in the bus topology at the sampling time, and obtaining the failure factor of each network device at the sampling time according to the network graph characteristic factor and the network bandwidth requirement factor is specifically: The test data x i As the input of the DNN network model, L samplings are performed to obtain the hidden layer variable z={z i1 ,z i2 ,...,z il ,...,z iL }, get x according to the hidden layer variable z i Restore data x il c Then we get the average restored data under multiple samplings and calculate the input test data x i The restoration error between the average restoration data : From the restored error, we can get the restored error vector S={s(x1), s(x2),...,s(x n )}, then the failure probability of the i-th industrial control network equipment is: Where c0 is the particle size constant, which is: In the formula, K represents the number of normal samples used to calculate c0, C pre is a constant, with a value of 0.95; if s(x i )<0.5, then s(x i )for The network graph characteristic factor of the jth network slave device in the network at the sampling time is: Where N represents the total number of network devices, g m (j) represents the total number of shortest paths between the master device m and all slave devices passing through the slave device j, Indicates the shortest path between the master device and the slave device i; the network graph characteristic factor B(m) of the network master device is 1; the network graph characteristic factors of all network devices are normalized and calculated: in is the network graph characteristic factor of the i-th device in the network; The network bandwidth requirement factor of the i-th network device in the network is: Where P i Indicates the process data bandwidth occupancy of the i-th network device in a cycle; The failure factor calculation formula of network equipment is: in, represent the failure factors of devices 1, 2, ..., N respectively.
2. The fault prevention method according to claim 1, characterized in that: The DNN network model includes an input layer, two hidden layers, and an output layer, wherein the input layer and the hidden layer constitute an encoder, and the hidden layer and the output layer constitute a decoder; the LSTM model includes two LSTM layers and two dense layers, the two LSTM layers are directly connected, the two dense layers are directly connected, and the outputs of the two LSTM layers are connected to the inputs of the two dense layers.
3. The fault prevention method according to claim 1, characterized in that: When obtaining the fault value of the network in the future prediction time interval, the network fault value at the current moment, the historical window length, the prediction time interval, the future prediction time interval and the sampling period are obtained. The fault value of the network in the historical time interval is obtained based on the historical window length, the prediction time interval and the sampling period. Based on the fault value in the historical time interval and the current network fault value, a sliding window method is used to obtain the network fault values at multiple sampling moments in the future prediction time interval. The network fault value for the future prediction time interval is obtained based on the network fault values at multiple sampling moments in the future prediction time interval.
4. The fault prevention method according to claim 3, characterized in that: The historical window length is used as the sliding window length. According to the network fault value at each sampling time within the sliding window length, the statistical fault value is the normal value F normal The number and error value F abnormal The number of faults in the network is calculated, and then the fault value of the network at the next moment is calculated. The calculation formula is: , Where M is the number of sampling points within the sliding window length, , is the network fault value at sampling time t, when is less than the threshold, F normal ,when is greater than the threshold, F abnormal , = - is the change in network fault value between two adjacent sampling moments; Slide according to time with the sampling interval as the sliding unit, and repeat the above steps until the fault value covers the future prediction time interval; According to the network fault values at all sampling times in the future prediction time interval, the fault value of the future prediction time interval is obtained. The formula is: in, is the number of sampling points within the future prediction time interval, , F a is the fault value of the network at the ath sampling point in the future prediction time interval; The difference between the network fault values at two adjacent historical sampling moments is obtained respectively, and the change of the network fault value is obtained based on the difference between the network fault values. The network fault value at each sampling point in the future prediction time interval is obtained based on the change. The network fault value at each sampling point in the future prediction time interval is then obtained. The network fault value of the future predicted time interval is compared with the preset threshold. If it is greater than the preset threshold, it is output as a fault and an alarm is issued. If it is less than the preset threshold, it is output as no fault.
5. The fault prevention method according to claim 1, characterized in that: The optimal weight coefficient of the LSTM model is obtained as follows: in the training phase, the historical window length, prediction time interval, future prediction time interval, current time of the device, and historical time fault value of the device are input into the LSTM model, and the predicted value of the network device failure probability at each sampling time in the future prediction time interval set in the historical time is obtained. Combined with the actual value of the failure probability of the network device at each sampling time in the future prediction time interval set in the historical time, the number of network device nodes whose predicted value is abnormal but whose actual value is normal is obtained, and the number of network devices whose preset value is abnormal and the number of network devices whose preset value is normal are obtained; the loss weight of the LSTM neural network is obtained, and the calculation formula is: Among them, p is the number of network devices whose preset value is healthy, N is the number of network devices whose preset value is abnormal, and num is the number of network device nodes whose predicted value is abnormal but the actual value is normal.
6. The fault prevention method according to claim 1, characterized in that: The fault value of each network device at the sampling time is obtained based on the fault probability and fault factor of each network device at the sampling time, and the fault value of the industrial control network at the sampling time is obtained based on the fault value of each network device at the sampling time: Where i=1,2,...,N, N is the total number of devices, F i is the fault value of device i at the sampling time, is the fault value of the industrial control network at the sampling time.
7. A fault prevention device for an Internet of Things, used to execute the fault prevention method according to claim 1, wherein the Internet of Things is an industrial control network based on the EtherCAT field bus, and the industrial control network is a bus-type network topology structure with a master-slave communication mode, wherein the mth device is a master device and the remaining devices are slave devices, characterized in that: The device comprises: Data collection and transmission module; used to collect and transmit network signals according to preset sampling intervals; Data preprocessing module: used to preprocess the collected signals to obtain characteristic data of network devices in the industrial control network; The model building and data analysis module is used to build a DNN network model, divide the collected normal state data of network devices into training data and test data, train and test the DNN network model, and obtain the granularity constant of the DNN network model; input the obtained characteristic data of each network device into the trained DNN network model, and calculate and output the failure probability of each network device at the sampling time; Calculating the network graph characteristic factor and the network bandwidth requirement factor of the master device and the slave device in the bus topology at the sampling time, and obtaining the failure factor of each network device at the sampling time according to the network graph characteristic factor and the network bandwidth requirement factor; Obtaining a fault value of each network device at the sampling time based on the fault probability and the fault factor of each network device at the sampling time, and obtaining a fault value of the industrial control network at the sampling time based on the fault value of each network device at the sampling time; Establish an LSTM network model, and use historical data to train the LSTM model to obtain the optimal weight coefficient of the LSTM model, input the historical window length, prediction time interval, and future prediction time interval, obtain the fault value of the network at the current time and the preset historical time interval, obtain the fault value of the network in the future prediction time interval through the LSTM model, and compare the network fault value in the future prediction time interval with the preset threshold. If it is greater than the preset threshold, the output is faulty and an alarm message is issued. If it is less than the preset threshold, the output is no fault.
8. An electronic device, characterized in that: The electronic device comprises: a memory and a processor, wherein the memory and the processor are coupled; the memory stores program instructions, and when the program instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The method comprises a computer program, which, when executed on an electronic device, enables the electronic device to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Training method and device for fault prediction neural network model
CN112115024A
Network fault prediction method and device based on generative adversarial network
CN115935180A