Gateway fault detection method, device, equipment, storage medium and product

The identification of historical and real-time data exceptions of the gateway through Gaussian hybrid model and sliding window algorithm is solved, and the problem of insufficient real-time and accuracy of gateway fault detection in complex environments in the prior art is solved, achieving more efficient fault identification and processing.

CN118764366BActive Publication Date: 2024-12-17CHINA MOBILE ZIJIN INNOVATION INST CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411255381.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-17
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

Existing gateway fault detection methods are difficult to meet the requirements of real-time and accuracy in complex industrial environments. Traditional methods rely on logic based on rules or simple statistical analysis, and cannot effectively process massive data and quickly identify equipment failures.

Method used

Gaussian hybrid model is used to identify outliers in historical data, and abnormal patterns in real-time data are identified through sliding window algorithms to generate fault detection results of the gateway.

Benefits of technology

It improves the accuracy and real-time nature of gateway fault detection, and can effectively identify abnormal situations in complex industrial environments to ensure data integrity and real-time nature.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764366B_ABST
    Figure CN118764366B_ABST
Patent Text Reader

Abstract

The present application relates to the field of communication technology, and discloses a gateway fault detection method, device, equipment, storage medium and computer program product. The method comprises: obtaining historical data of a gateway, identifying abnormal values ​​in the historical data by using a Gaussian mixture model, obtaining real-time data of a gateway, identifying abnormal patterns in the real-time data by using a sliding window algorithm, and generating a fault detection result of the gateway according to the abnormal values ​​and the abnormal patterns; since the present application adopts a Gaussian mixture model to identify abnormal values ​​in the historical data, the accuracy of the gateway fault detection is improved, and since the present application adopts a sliding window algorithm to identify abnormal patterns in the real-time data, the real-time performance of the gateway fault detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a gateway fault detection method, apparatus, device, storage medium and computer program product. Background Art

[0002] In today's industrial age, the Industrial Internet of Things (IIoT) is becoming an indispensable part of manufacturing and other industrial fields. It connects various machines and devices through the Internet to achieve real-time data collection, exchange and analysis, thereby improving production efficiency, reducing costs and improving product quality. However, with the continuous expansion of the Industrial Internet, how to effectively process and utilize massive amounts of equipment data, especially to quickly and accurately diagnose and handle equipment failures, has become an important challenge.

[0003] Fault detection is a critical task in the Industrial Internet of Things gateway, which requires accurate identification and response to abnormal conditions in devices or networks. Data is often missing or damaged during collection and transmission, which is a major challenge for data-based decision-making processes. With the continuous expansion of Industrial Internet of Things systems, data security issues have become particularly important.

[0004] Traditional fault detection methods mainly rely on rule-based logic or simple statistical analysis, which may be effective enough when dealing with simple systems, but in complex industrial environments, due to the large amount of data, complex environment and rapid changes, these methods often fail to meet the requirements of real-time and accuracy. Summary of the invention

[0005] The main purpose of the present application is to provide a gateway fault detection method, device, equipment, storage medium and computer program product, aiming to solve the technical problem that the existing gateway fault detection method is difficult to meet the requirements of real-time and accuracy in complex industrial environments.

[0006] To achieve the above object, the present application provides a gateway fault detection method, the gateway fault detection method comprising:

[0007] Obtain historical data of the gateway, and identify abnormal values ​​in the historical data by using a Gaussian mixture model;

[0008] Acquire real-time data of the gateway, and identify abnormal patterns in the real-time data through a sliding window algorithm;

[0009] A fault detection result of the gateway is generated according to the abnormal value and the abnormal pattern.

[0010] Optionally, before acquiring historical data of the gateway and identifying abnormal values ​​in the historical data by using a Gaussian mixture model, the method further includes:

[0011] Constructing a Gaussian mixture model, and setting a probability density threshold according to the training data set and the Gaussian mixture model;

[0012] Accordingly, the acquiring of historical data of the gateway and identifying abnormal values ​​in the historical data by using a Gaussian mixture model include:

[0013] Acquire historical data of the gateway, and calculate the probability density of the historical data based on the Gaussian mixture model;

[0014] The probability density is compared with the probability density threshold, and abnormal values ​​in the historical data are identified according to the comparison result.

[0015] Optionally, setting a threshold according to the training data set and the Gaussian mixture model specifically includes:

[0016] Input the training data in the training data set into the Gaussian mixture model to calculate the probability density of the training data;

[0017] The probability density distribution of the training data set is statistically calculated according to the probability density of the training data, and a probability density threshold is set according to the probability density distribution.

[0018] Optionally, the acquiring the real-time data of the gateway and identifying abnormal patterns in the real-time data by using a sliding window algorithm specifically includes:

[0019] Obtaining real-time data of the gateway;

[0020] Processing the real-time data through a stream processing framework;

[0021] Identify unusual patterns in processed real-time data using a sliding window algorithm.

[0022] Optionally, before generating a fault detection result of the gateway according to the abnormal value and the abnormal pattern, the method further includes:

[0023] Obtaining a key corresponding to the industrial device connected to the gateway, and / or sending an authorization request to a management terminal corresponding to the industrial device, and receiving an authorization code fed back by the management terminal according to the authorization request;

[0024] Acquire business data corresponding to the industrial equipment according to the key and / or the authorization code;

[0025] Accordingly, generating the fault detection result of the gateway according to the abnormal value and the abnormal mode includes:

[0026] A fault detection result of the gateway is generated according to the abnormal value, the abnormal pattern and the business data.

[0027] Optionally, the acquiring historical data of the gateway and identifying abnormal values ​​in the historical data by using a Gaussian mixture model specifically includes:

[0028] Obtain historical data of the gateway, and detect whether there are missing values ​​in the historical data;

[0029] The missing values ​​are filled to obtain filled historical data, and outliers in the filled historical data are identified through a Gaussian mixture model.

[0030] In addition, to achieve the above purpose, the present application also proposes a gateway fault detection device, the gateway fault detection device comprising:

[0031] An outlier identification module, used to obtain historical data of the gateway and identify outliers in the historical data through a Gaussian mixture model;

[0032] An abnormal pattern recognition module, used to obtain the real-time data of the gateway and recognize abnormal patterns in the real-time data through a sliding window algorithm;

[0033] A detection result generating module is used to generate a fault detection result of the gateway according to the abnormal value and the abnormal mode.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a gateway fault detection device, which includes a memory, a processor, and a gateway fault detection program stored in the memory and executable on the processor, and the gateway fault detection program is configured to implement the gateway fault detection method described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which a gateway fault detection program is stored, and when the gateway fault detection program is executed by a processor, the gateway fault detection method as described above is implemented.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a gateway fault detection program, and when the gateway fault detection program is executed by a processor, it implements the gateway fault detection method described above.

[0037] One or more technical solutions proposed in this application have at least the following technical effects:

[0038] In the present application, it is disclosed to obtain historical data of a gateway, identify abnormal values ​​in the historical data through a Gaussian mixture model, obtain real-time data of the gateway, identify abnormal patterns in the real-time data through a sliding window algorithm, and generate fault detection results of the gateway according to the abnormal values ​​and abnormal patterns; because the present application adopts a Gaussian mixture model to identify abnormal values ​​in historical data, the accuracy of gateway fault detection is improved, and because the present application adopts a sliding window algorithm to identify abnormal patterns in real-time data, the real-time performance of gateway fault detection is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 This is a flow chart of the first embodiment of the gateway fault detection method of the present application;

[0042] Figure 2 This is a flow chart of a second embodiment of the gateway fault detection method of the present application;

[0043] Figure 3 This is a flow chart of a third embodiment of the gateway fault detection method of the present application;

[0044] Figure 4 This is a flow chart of a fourth embodiment of the gateway fault detection method of the present application;

[0045] Figure 5 This is a schematic diagram of the module structure of the gateway fault detection device according to an embodiment of the present application;

[0046] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the gateway fault detection method in the embodiment of the present application.

[0047] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0050] In today's industrial age, the Industrial Internet of Things (IIoT) is becoming an indispensable part of manufacturing and other industrial fields. It connects various machines and devices through the Internet to achieve real-time data collection, exchange and analysis, thereby improving production efficiency, reducing costs and improving product quality. However, with the continuous expansion of the Industrial Internet, how to effectively process and utilize massive amounts of equipment data, especially to quickly and accurately diagnose and handle equipment failures, has become an important challenge.

[0051] Fault detection is a critical task in the Industrial Internet of Things gateway, which requires accurate identification and response to abnormal conditions in devices or networks. Data is often missing or damaged during collection and transmission, which is a major challenge for data-based decision-making processes. With the continuous expansion of Industrial Internet of Things systems, data security issues have become particularly important.

[0052] Traditional fault detection methods mainly rely on rule-based logic or simple statistical analysis, which may be effective enough when dealing with simple systems, but in complex industrial environments, due to the large amount of data, complex environment and rapid changes, these methods often fail to meet the requirements of real-time and accuracy.

[0053] Existing industrial gateway fault detection methods use rule-based logic or simple statistical analysis, and only analyze based on historical fault data. Such methods may be effective when the system is simple, but when the data volume explodes, the environment is complex, the gateway data changes rapidly, or there are missing data, it will interfere with the analysis results. Therefore, these traditional methods are often difficult to meet the requirements of real-time and accuracy.

[0054] For example, the related technology discloses an industrial Internet of Things gateway intelligent fault learning and processing method and system, which counts the causes and solutions of historical faults and the number of times the solution is executed. When a gateway fails, the cause of the fault is determined and a solution is found and executed based on the cause of the fault.

[0055] The related technology simply determines the fault type based on the process running before the equipment fails, and the solution is selected by sorting the solutions according to the number of times they are executed. The logic is relatively simple and relies on the integrity of historical data. At the same time, this method only applies to the situation after the gateway fails completely, and it is difficult to meet the real-time and timeliness requirements for industrial control system fault discovery. At the same time, each solution is executed in sequence to solve the problem, and the accuracy level of fault diagnosis is difficult to guarantee.

[0056] Therefore, in order to solve the above technical problems, the present application provides a solution, which includes: obtaining historical data of the gateway, identifying outliers in the historical data through a Gaussian mixture model, obtaining real-time data of the gateway, identifying abnormal patterns in the real-time data through a sliding window algorithm, and generating gateway fault detection results based on the abnormal values ​​and abnormal patterns; since the present application adopts a Gaussian mixture model to identify outliers in historical data, the accuracy of gateway fault detection is improved, and since the present application adopts a sliding window algorithm to identify abnormal patterns in real-time data, the real-time performance of gateway fault detection is improved.

[0057] It should be noted that the executor of this embodiment may be a gateway fault detection device with data processing, network communication and program running functions, such as a gateway control device, etc., or other electronic devices that can achieve the same or similar functions, and this embodiment does not impose any restrictions on this.

[0058] Based on this, the present application embodiment provides a gateway fault detection method, referring to Figure 5 , Figure 5 This is a flow chart of the first embodiment of the gateway fault detection method of the present application.

[0059] In this embodiment, the gateway fault detection method includes:

[0060] Step S10: Acquire historical data of the gateway, and identify abnormal values ​​in the historical data using a Gaussian mixture model.

[0061] It should be noted that historical data includes but is not limited to historical operating conditions, performance logs, error logs, hardware status and network conditions, etc. The frequency of gateway failures and the causes of the failures can be known based on the historical data of the gateway. The method of adaptively adjusting the frequency and quality of data collection based on the historical network status and gateway performance can be used to optimize the accuracy and efficiency of fault prediction.

[0062] When the gateway is running stably, reduce the collection frequency to reduce the network burden; when potential problems are detected, increase the collection frequency to monitor the gateway status in detail, and dynamically adjust the collection strategy based on historical data and gateway performance indicators (such as CPU usage, memory usage, network latency, etc.).

[0063] It can be understood that in this embodiment, the threshold can be determined by using a Gaussian mixture model to identify anomalies in historical data. The Gaussian mixture model is a probabilistic model that assumes that all data points are generated by a mixture of a finite number of Gaussian distributions. Each Gaussian distribution represents a "group" or "component" in the data, and each component has its own mean and covariance. By learning these Gaussian components of the data, the Gaussian mixture model can be effectively used for clustering and anomaly detection;

[0064] For ease of understanding, the following examples are provided, but are not intended to limit the present application. In one example, for example, data points can be divided into two clusters based on CPU and memory usage. The two clusters may represent different operating states. One cluster may correspond to a gateway under normal operating load, while the other cluster may correspond to a high load or potential failure state. By further analyzing the characteristics of the two clusters, such as the center of the cluster or the distance between the data point and the center, the example is defined as a threshold. For example, if the probability of a data point is lower than a certain threshold, that is, it is unlikely to belong to these two known normal operating clusters, it can be marked as an anomaly. Such an anomaly may indicate that the gateway is experiencing an atypical load, or that a failure may have occurred.

[0065] Furthermore, in order to maintain the continuity and integrity of historical data and improve detection accuracy, step S10 includes: obtaining historical data of the gateway, detecting whether there are missing values ​​in the historical data; filling the missing values ​​to obtain filled historical data, and identifying abnormal values ​​in the filled historical data through a Gaussian mixture model.

[0066] It should be understood that in this embodiment, the missing values ​​in the historical data are filled by interpolation technology, wherein the interpolation technology is used to fill the missing values ​​in the data for subsequent analysis and prediction. Missing values ​​refer to the situation where data is missing or lost due to various reasons during the monitoring process. The interpolation technology estimates the missing values ​​by utilizing the patterns and trends of the existing data, thereby maintaining the continuity and integrity of the data.

[0067] In the specific implementation, linear interpolation can be used to maintain the continuity and integrity of the data by assuming that the changes between the data are linear. For missing values, linear interpolation estimates the missing values ​​based on the known linear relationship between adjacent data points;

[0068] For ease of understanding, the following examples are provided, but are not intended to limit this application. In one example, for example, CPU usage and memory usage are obtained. At certain time points, due to monitoring equipment failures or communication problems, there may be some missing values ​​in the data set. Interpolation techniques can be used to fill these missing values ​​for subsequent fault prediction and analysis. Linear interpolation can be used to fill the missing values ​​in CPU usage and memory usage. Assume that the data set is as shown in Table 1:

[0069] Table 1

[0070]

[0071] For the missing CPU usage and memory usage, linear interpolation can be performed using known adjacent data points. For example, the CPU usage on 2024-01-02 can be estimated by linear interpolation using the CPU usage on 2024-01-01 and 2024-01-03. Similarly, the memory usage on 2024-01-04 can be estimated by linear interpolation using the memory usage at adjacent time points. After interpolation, the data set will become as shown in Table 2:

[0072] Table 2

[0073]

[0074] In this way, missing values ​​are successfully filled and the continuity and integrity of the data are maintained for subsequent fault prediction and analysis.

[0075] Step S20: Acquire the real-time data of the gateway, and identify abnormal patterns in the real-time data by using a sliding window algorithm.

[0076] As you can understand, the sliding window algorithm is a technique in time series data analysis that is particularly suitable for real-time monitoring and analysis, such as monitoring of IIoT gateways. The algorithm works by sliding a fixed-size window over the data stream and continuously calculating the statistical properties of the data within the window to identify abnormal patterns. Use the sliding window algorithm to identify abnormal patterns in the data, which may indicate an impending failure.

[0077] It should be understood that in order to maintain the continuity and integrity of real-time data and improve recognition accuracy, in this embodiment, missing values ​​in real-time data can also be filled by interpolation technology. The specific steps are the same as the steps for filling missing values ​​of historical data and will not be repeated here.

[0078] Step S30: Generate a fault detection result of the gateway according to the abnormal value and the abnormal pattern.

[0079] It can be understood that generating a gateway fault detection result based on anomalies and abnormal patterns may be to perform a first marking process on the abnormal values, send the first mark to the user terminal, and perform a second marking process on the abnormal patterns, and send the second mark to the user terminal.

[0080] In this embodiment, after being determined as an abnormal value, a first marking process is performed on the abnormal value, and the first mark is sent to the user terminal. The abnormal value can be known through the user terminal, and the corresponding problem can be determined according to the abnormal value;

[0081] For example, abnormal CPU usage may indicate that the gateway is at risk of overload or resource exhaustion. For example, CPU usage that is continuously above the threshold may indicate that the gateway is facing performance issues; abnormal memory usage may indicate that the gateway has a memory leak or resource management problem; abnormal network traffic patterns, such as sudden traffic increases or decreases, may indicate network problems or attacks; abnormal number of error logs may indicate that the gateway has encountered more abnormal situations, which may be an early indicator of failure; abnormal number of connections may indicate that the gateway is facing resource exhaustion or network congestion.

[0082] In this embodiment, after being determined as an abnormal mode, a second marking process is performed on the abnormal mode, and the second mark is sent to the user terminal. The abnormal mode can be known through the user terminal, and the corresponding problem can be determined according to the abnormal mode.

[0083] This embodiment uses a Gaussian mixture model to identify abnormal values ​​in historical data, thereby improving the accuracy of gateway fault detection, and because this embodiment uses a sliding window algorithm to identify abnormal patterns in real-time data, the real-time performance of gateway fault detection is improved.

[0084] Reference Figure 2 , Figure 2 This is a flow chart of the second embodiment of the gateway fault detection method of the present application, based on the above Figure 1 The first embodiment shown provides a second embodiment of the gateway fault detection method of the present application.

[0085] In the second embodiment, before step S10, the method further includes:

[0086] Step S01: construct a Gaussian mixture model, and set a probability density threshold according to a training data set and the Gaussian mixture model.

[0087] It should be understood that when constructing a Gaussian mixture model, a Gaussian mixture model is composed of the weighted sum of multiple Gaussian distributions, and the mathematical formula can be expressed as:

[0088]

[0089] In the formula, It is a data point The probability density function of is the number of components in the model, It is The mixing coefficient of the components satisfies represents the weight of each Gaussian distribution in the mixture, So is the mean, is the covariance matrix of the multidimensional Gaussian distribution, It is The mean vector of a Gaussian distribution, It is The covariance matrix of a Gaussian distribution.

[0090] For ease of understanding, the following examples are given, but are not intended to limit the present application. In one example, it is assumed that K=2, which means that two Gaussian distributions are used to model the normal operation state of the gateway.

[0091] It can be understood that, in this embodiment, the historical monitoring data (CPU and memory usage) of the gateway is used as a training data set to train a Gaussian Mixture Model (GMM) to set a probability density threshold.

[0092] Furthermore, in order to improve the accuracy of the probability density threshold, in this embodiment, the probability density threshold is set according to the probability density distribution of the training data in the training data set so that the probability density of most training data is higher than the probability density threshold. The step S01 includes: inputting the training data in the training data set into a Gaussian mixture model to calculate the probability density of the training data; calculating the probability density distribution of the training data set according to the probability density of the training data, and setting the probability density threshold according to the probability density distribution.

[0093] It should be understood that outlier identification is based on the probability density of data points ,if Below a predetermined threshold, this means that this data point is unlikely to be generated by any Gaussian distribution of the current model, and can therefore be considered an anomaly. In summary, the threshold can be selected based on the probability density distribution of the training data set, for example, a probability density threshold is selected so that 99% of the training data points have a probability density higher than it.

[0094] Accordingly, the step S10 includes:

[0095] Step S101: Acquire historical data of a gateway, and calculate the probability density of the historical data based on the Gaussian mixture model.

[0096] Step S102: Compare the probability density with the probability density threshold, and identify abnormal values ​​in the historical data according to the comparison result.

[0097] For ease of understanding, the following examples are provided, but are not intended to limit the present application. In one example, for each monitoring data point ,calculate ,if < threshold, then Marked as abnormal.

[0098] Suppose that a data point x=[85%,95%] is observed in the gateway monitoring data, which represents the CPU and memory usage at a certain point in time.

[0099] Calculate the probability density: For , calculate the probability density generated by the trained GMM .

[0100] Anomaly Detection: If If the threshold is lower than the normal behavior data distribution, it is considered Represents an abnormal state that may indicate that the gateway is experiencing performance issues or other types of failures;

[0101] A Gaussian mixture model (GMM) was used to cluster a set of example data representing the CPU usage and memory usage of the gateway. Two Gaussian distributions were chosen, meaning that the model would try to cluster the data into two different components, and the GMM successfully separated the data points into two clusters based on CPU and memory usage. The two clusters may represent different operating states, for example, one cluster may correspond to a gateway under normal working load, while the other cluster may correspond to a high load or potential failure state.

[0102] This embodiment pre-constructs a Gaussian mixture model, sets a probability density threshold based on a training data set and the Gaussian mixture model, calculates the probability density of historical data based on the Gaussian mixture model, and determines outliers in the historical data by comparing the probability density with the probability density threshold, thereby improving the accuracy of outlier identification.

[0103] Reference Figure 3 , Figure 3 This is a flow chart of the third embodiment of the gateway fault detection method of the present application. Based on the above embodiments, the third embodiment of the gateway fault detection method of the present application is proposed.

[0104] In the third embodiment, the step S20 includes:

[0105] Step S201: Acquire the real-time data of the gateway.

[0106] It should be understood that in this embodiment, real-time data of the gateway is obtained, and the data flow can be monitored in real time. The real-time data is processed through a streaming processing framework, and the statistical data characteristics of the sliding window algorithm are used to determine whether the threshold is exceeded, thereby identifying abnormal patterns in the data.

[0107] Step S202: Process the real-time data through a streaming processing framework.

[0108] In this embodiment, real-time data of the gateway is obtained and a stream processing framework is constructed. The stream processing framework is a technology for processing continuous stream data. It allows real-time processing and analysis of monitoring data from the gateway and instant identification of potential faults or abnormal situations.

[0109] The stream processing framework needs to be able to access streaming data from different data sources. These data sources can be sensor data, log data, event data, etc. from the gateway. The data source access module is responsible for converting the data in these data sources into streaming data for subsequent processing; the stream data processing module processes and analyzes the data in real time. This may involve various operations such as data cleaning, feature extraction, anomaly detection, and model training. The stream processing framework needs to be able to output the processing results to the appropriate destination. This may be storing the results in a database, sending them to a message queue, real-time visualization, etc. The result output module is responsible for delivering the processing results to downstream systems or users.

[0110] For example, to obtain real-time data from gateway sensors, such as CPU usage and memory usage, a series of data processing operations can be defined, such as filtering out outliers, calculating rolling averages, applying machine learning models for anomaly detection, etc., historical anomalies of each gateway, cumulative number of anomalies, etc. In the stream processing framework, a state backend can be used to manage this state information and output the processing results to the appropriate destination, such as writing anomalies to a database, sending alert messages to the operation and maintenance team, and visualizing anomalies in real time;

[0111] You can use Apache Flink to monitor the CPU usage of the gateway in real time. If the CPU usage continues to exceed a certain threshold, it can be marked as an abnormal situation and timely measures can be taken to solve the problem to avoid gateway failure. Apache Flink is a streaming data processing engine and distributed data processing framework that supports event-driven, real-time data stream processing and batch processing jobs. It can be used to build real-time data processing applications, including real-time analysis, data pipelines, and event-driven applications.

[0112] Step S203: Identify abnormal patterns in the processed real-time data through a sliding window algorithm.

[0113] It is understood that in this embodiment, real-time data is identified by a predetermined algorithm, and a sliding window algorithm can be used to identify real-time data, such as monitoring of an industrial Internet of Things gateway. The algorithm slides a fixed-size window on the data stream and continuously calculates the statistical characteristics of the data in the window, thereby identifying abnormal patterns;

[0114] Define the size of the window based on the type of anomaly to be detected and the characteristics of the data. The window size determines the sensitivity of the algorithm to changes in time series data; the window slides backward from the beginning on the time series data, and each movement can be one time unit or multiple time units, depending on the specific application requirements; for the data in the window, calculate its statistical characteristics, such as mean, standard deviation, maximum, minimum, etc., to help identify abnormal patterns in the data, set thresholds or use machine learning models to determine whether the data in the current window is abnormal. The threshold can be fixed or dynamically adjusted, for example, based on the historical statistical characteristics of the data in the window; once an anomaly is detected, take appropriate processing measures, such as issuing an alarm, recording a log, etc. At the same time, the results of anomaly detection can be used to adjust the threshold or optimize the model to improve the accuracy of future detection.

[0115] For example, if a 10-minute sliding window is used to analyze the time series data of CPU usage, the CPU usage data in the previous 10 minutes will be considered at each time point. Every 1 minute, the window will slide forward to start analyzing the latest 10 minutes of data. For each window, the average, standard deviation, and maximum value of the CPU usage are calculated. If the average CPU usage in a window is found to exceed 90%, or the standard deviation is abnormally high, it indicates that the CPU usage has unusually fluctuated, which may be a sign of performance problems or failures. At the same time, if the maximum value reaches 100% usage and this occurs in multiple consecutive windows, this further confirms that there may be problems with the system. Once an abnormal pattern is detected, the system will automatically send an alarm to the maintenance team and record the specific time point and CPU usage when the abnormality occurred for further analysis and processing.

[0116] This embodiment can monitor the data flow in real time by acquiring real-time data from the gateway, process the real-time data through a streaming processing framework, and use the statistical data characteristics of a sliding window algorithm to determine whether a threshold is exceeded, thereby accurately identifying abnormal patterns in real-time data.

[0117] Reference Figure 4 , Figure 4 This is a flow chart of the fourth embodiment of the gateway fault detection method of the present application. Based on the above embodiments, the fourth embodiment of the gateway fault detection method of the present application is proposed.

[0118] In the fourth embodiment, before step S30, the method further includes:

[0119] Step S210: obtaining a key corresponding to the industrial device connected to the gateway, and / or sending an authorization request to a management terminal corresponding to the industrial device, and receiving an authorization code fed back by the management terminal according to the authorization request.

[0120] Step S220: Acquire the business data corresponding to the industrial device according to the key and / or the authorization code.

[0121] Accordingly, the step S30 includes:

[0122] Step S30': generating a fault detection result of the gateway according to the abnormal value, the abnormal pattern and the service data.

[0123] It should be understood that in order to identify whether the data anomaly is caused by a gateway failure or a failure of the industrial equipment attached to the gateway, in this embodiment, it is also necessary to obtain the business data of the industrial equipment attached to the gateway to generate a fault detection result. In order to improve data security, in this embodiment, the business data corresponding to the industrial equipment is obtained based on the key and / or authorization code corresponding to the industrial equipment.

[0124] For ease of understanding, the following examples are provided, but are not intended to limit this application. In one example, real-time data is encrypted, and a blockchain-based data access control mechanism can ensure that only authorized users can access sensitive data, thereby further protecting data security and privacy. After encrypting real-time data, a corresponding key is generated, and the encrypted real-time data is unlocked with the key, which can prevent the data from being stolen or tampered with during transmission. For particularly sensitive data, end-to-end encryption can be considered to ensure that the data is protected throughout the entire transmission link;

[0125] For example, a highly secure encrypted communication method can be used. Through the quantum key distribution protocol, the gateway and the data processing center can securely establish an encrypted channel, protect the security of data during transmission, authenticate data transmission, and ensure that only authorized devices or users can send data to the gateway. This can be achieved by using authentication mechanisms such as key-based authentication or digital certificates.

[0126] In this embodiment, an authorization code is sent to the user terminal. The user needs to enter the authorization code when accessing the gateway. Only after entering the correct authorization code can the gateway be accessed and the encrypted data can be downloaded or browsed. The access control list is stored on the blockchain to record which users have access to which data. Only users included in the access control list can obtain access rights to sensitive data. The authorization code is matched with the corresponding user to ensure that the data in the gateway cannot be accessed when only the authorization code is used;

[0127] For example, an industrial gateway is responsible for monitoring the status of equipment in a factory and collecting relevant data. Factory managers, engineers, and data analysts need to access this data for monitoring and analysis. Using a blockchain-based data access control mechanism, the factory can establish an access control list on the blockchain to record the permissions of each user. Only authenticated and authorized users can query data on the smart contract, while others cannot access it. At the same time, the security of the data is enhanced because advanced encryption technologies such as homomorphic encryption or quantum encryption are used during data transmission and processing.

[0128] In this embodiment, the accessed data is backed up, the stored data is backed up regularly, and the security of the backup data is ensured. In the event of data loss or damage, the data can be restored in time to ensure the availability of the gateway.

[0129] This embodiment uses a Gaussian mixture model to continuously learn the threshold of the fault state. Taking into account the complexity of the industrial site, data is prone to missing, so interpolation technology is used to fill in the missing values ​​to continuously improve the accuracy of the threshold calculation, thereby improving the detection accuracy.

[0130] This embodiment aims to solve the problem that the amount of industrial data is huge but the real-time monitoring of gateway status is high. This proposal adopts a sliding window algorithm. According to the actual situation, such as machine resource conditions, accuracy requirements, real-time requirements, etc., the window size can be customized or dynamically adjusted by machine learning methods, and then further judged whether there are any abnormalities in the data in the window.

[0131] This embodiment aims at the confidentiality requirements of industrial data. This proposal encrypts data through blockchain-related technologies, strictly controls data-related permissions, and takes data risks into consideration and performs regular backups.

[0132] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the gateway fault detection method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0133] This application also provides a gateway fault detection device, please refer to Figure 5 , the gateway fault detection device comprises:

[0134] The outlier identification module 10 is used to obtain historical data of the gateway and identify outliers in the historical data through a Gaussian mixture model.

[0135] The abnormal pattern recognition module 20 is used to obtain the real-time data of the gateway and recognize the abnormal pattern in the real-time data through a sliding window algorithm.

[0136] The detection result generating module 30 is used to generate a fault detection result of the gateway according to the abnormal value and the abnormal mode.

[0137] The gateway fault detection device provided by the present application adopts the gateway fault detection method in the above embodiment, which can solve the technical problem that the existing gateway fault detection method is difficult to meet the requirements of real-time and accuracy in a complex industrial environment. Compared with the prior art, the beneficial effects of the gateway fault detection device provided by the present application are the same as the beneficial effects of the gateway fault detection method provided by the above embodiment, and the other technical features in the gateway fault detection device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0138] The present application provides a gateway fault detection device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the gateway fault detection method in the above-mentioned embodiment 1.

[0139] Reference below Figure 6 , which shows a schematic diagram of the structure of a gateway fault detection device suitable for implementing an embodiment of the present application. The gateway fault detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The gateway fault detection device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0140] like Figure 6As shown, the gateway fault detection device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the gateway fault detection device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the gateway fault detection device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a gateway fault detection device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0141] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0142] The gateway fault detection device provided by the present application adopts the gateway fault detection method in the above embodiment, which can solve the technical problem that the existing gateway fault detection method is difficult to meet the requirements of real-time and accuracy in complex industrial environments. Compared with the prior art, the beneficial effects of the gateway fault detection device provided by the present application are the same as the beneficial effects of the gateway fault detection method provided by the above embodiment, and the other technical features in the gateway fault detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0143] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0144] 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.

[0145] The present application provides a storage medium having computer-readable program instructions (ie, computer programs) stored thereon, the computer-readable program instructions being used to execute the gateway fault detection method in the above-mentioned embodiment.

[0146] The storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: RandomAccess Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0147] The above storage medium may be included in the gateway fault detection device; or may exist independently without being assembled into the gateway fault detection device.

[0148] The above-mentioned storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the gateway fault detection device, the gateway fault detection device: obtains historical data of the gateway, identifies abnormal values ​​in the historical data through a Gaussian mixture model, obtains real-time data of the gateway, identifies abnormal patterns in the real-time data through a sliding window algorithm, and generates a gateway fault detection result based on the abnormal values ​​and abnormal patterns.

[0149] Computer program code for performing the operations of the present application 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 the case of 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).

[0150] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0151] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0152] The storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned gateway fault detection method, and can solve the technical problem that the existing gateway fault detection method is difficult to meet the requirements of real-time performance and accuracy in a complex industrial environment. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the gateway fault detection method provided in the above-mentioned embodiment, and will not be repeated here.

[0153] The present application also provides a computer program product, including a computer program, which implements the above-mentioned gateway fault detection method when executed by a processor.

[0154] The computer program product provided by the present application can solve the technical problem that the existing gateway fault detection method is difficult to meet the requirements of real-time performance and accuracy in a complex industrial environment. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the gateway fault detection method provided by the above embodiment, which will not be repeated here.

[0155] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A gateway fault detection method, characterized in that: The gateway fault detection method comprises: Obtain historical data of the gateway, and identify abnormal values ​​in the historical data by using a Gaussian mixture model; Acquire real-time data of the gateway, and identify abnormal patterns in the real-time data by using a sliding window algorithm, wherein the abnormal pattern is used to indicate an impending failure, and the sliding window algorithm dynamically adjusts the sliding window size by using a machine learning method according to machine resource conditions, accuracy requirements, and real-time requirements, and identifies abnormal patterns in the real-time data according to the adjusted sliding window; generating a fault detection result of the gateway according to the abnormal value and the abnormal pattern; Before generating the fault detection result of the gateway according to the abnormal value and the abnormal pattern, the method further includes: Obtaining a key corresponding to the industrial device connected to the gateway, and / or sending an authorization request to a management terminal corresponding to the industrial device, and receiving an authorization code fed back by the management terminal according to the authorization request; Obtaining business data corresponding to the industrial equipment on a smart contract on the blockchain according to the key and / or the authorization code; Accordingly, generating the fault detection result of the gateway according to the abnormal value and the abnormal mode includes: A fault detection result of the gateway is generated according to the abnormal value, the abnormal pattern and the business data.

2. The gateway fault detection method according to claim 1, characterized in that: Before acquiring the historical data of the gateway and identifying abnormal values ​​in the historical data by using a Gaussian mixture model, the method further includes: Constructing a Gaussian mixture model, and setting a probability density threshold according to the training data set and the Gaussian mixture model; Accordingly, the acquiring of historical data of the gateway and identifying abnormal values ​​in the historical data by using a Gaussian mixture model include: Acquire historical data of the gateway, and calculate the probability density of the historical data based on the Gaussian mixture model; The probability density is compared with the probability density threshold, and abnormal values ​​in the historical data are identified according to the comparison result.

3. The gateway fault detection method according to claim 2, characterized in that: The setting of the threshold according to the training data set and the Gaussian mixture model specifically includes: Input the training data in the training data set into the Gaussian mixture model to calculate the probability density of the training data; The probability density distribution of the training data set is statistically calculated according to the probability density of the training data, and a probability density threshold is set according to the probability density distribution.

4. The gateway fault detection method according to any one of claims 1 to 3, characterized in that: The acquiring of the real-time data of the gateway and identifying abnormal patterns in the real-time data by a sliding window algorithm specifically includes: Obtaining real-time data of the gateway; Processing the real-time data through a stream processing framework; Identify unusual patterns in processed real-time data using a sliding window algorithm.

5. The gateway fault detection method according to any one of claims 1 to 3, characterized in that: The acquiring of historical data of the gateway and identifying abnormal values ​​in the historical data by using a Gaussian mixture model specifically includes: Obtain historical data of the gateway, and detect whether there are missing values ​​in the historical data; The missing values ​​are filled to obtain filled historical data, and outliers in the filled historical data are identified through a Gaussian mixture model.

6. A gateway fault detection device, characterized in that: The gateway fault detection device comprises: An outlier identification module, used to obtain historical data of the gateway and identify outliers in the historical data through a Gaussian mixture model; An abnormal pattern recognition module is used to obtain the real-time data of the gateway, and recognize the abnormal pattern in the real-time data through a sliding window algorithm, wherein the abnormal pattern is used to indicate an impending failure, and the sliding window algorithm dynamically adjusts the sliding window size by a machine learning method according to the machine resource situation, accuracy requirements, and real-time requirements, and recognizes the abnormal pattern in the real-time data according to the adjusted sliding window; A detection result generating module, used for generating a fault detection result of the gateway according to the abnormal value and the abnormal mode; The detection result generation module is also used to obtain the key corresponding to the industrial equipment under the gateway, and / or send an authorization request to the management terminal corresponding to the industrial equipment, receive the authorization code fed back by the management terminal according to the authorization request; obtain the business data corresponding to the industrial equipment on the smart contract of the blockchain according to the key and / or the authorization code; generate the fault detection result of the gateway according to the abnormal value, the abnormal mode and the business data.

7. A gateway fault detection device, characterized in that: The gateway fault detection device comprises: a memory, a processor, and a gateway fault detection program stored in the memory and executable on the processor. When the gateway fault detection program is executed by the processor, the gateway fault detection method according to any one of claims 1 to 5 is implemented.

8. A storage medium, characterized in that: The storage medium stores a gateway fault detection program, and when the gateway fault detection program is executed by the processor, the gateway fault detection method according to any one of claims 1 to 5 is implemented.

9. A computer program product, characterized in that The computer program product comprises a gateway fault detection program, and when the gateway fault detection program is executed by a processor, the gateway fault detection method according to any one of claims 1 to 5 is implemented.