Sensor anomaly detection method, model training method, system, device, and medium

CN115659271BActive Publication Date: 2026-09-15SHANGHAI ELECTRICGROUP CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211366158.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2026-09-15
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

[0004]本发明要解决的技术问题是为了克服现有技术中异常判别不准确及无法对异常传感器的异常数据进行修正的缺陷,提供一种传感器异常检测方法、模型训练方法、系统、设备及介质

Benefits of technology

[0043]The positive and progressive effects of this invention are as follows: First, by preprocessing the collected data, a second sample dataset with temporal uniformity is obtained, achieving data synchronization while preserving as much original data information as possible. Then, by using a feature association model to associate all sensors, the input feature data required for feature data calculation in sensor anomaly detection is determined. Finally, through a sensor anomaly detection model, during the machine learning process, time-series association and analysis of industrial sensor data in multiple states are performed simultaneously, which can effectively detect anomalies in target sensors and replace abnormal data in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115659271B_ABST
    Figure CN115659271B_ABST
Patent Text Reader

Abstract

The application discloses a sensor anomaly detection method, a model training method, a system, equipment and a medium. The model training method comprises the following steps: obtaining a first sample data set corresponding to each sensor for a plurality of sensors, wherein the first sample data set comprises collected data collected by the sensor within a preset time period; preprocessing the first sample data set of the plurality of sensors to obtain a corresponding second sample data set, so as to unify the sample data amount of each sensor; determining a target sensor from the plurality of sensors, and determining the feature importance of the remaining sensors and the target sensor according to a pre-trained correlation feature model of the target sensor; sorting the feature importance, and determining the remaining sensors corresponding to the first K feature importance as the correlation sensors of the target sensor; and the target sensor can be effectively detected for anomaly, and the abnormal data can also be replaced in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the industrial field, and in particular to a sensor anomaly detection method, model training method, system, device, and medium. Background Technology

[0002] To meet the production demands of modern manufacturing, modern industrial production systems are becoming increasingly complex and diverse. Monitoring systems for industrial production equipment often rely on various sensors for information collection. Therefore, the accuracy and reliability of sensors are subject to ever-higher requirements in industrial production. Sensors are crucial not only for determining the current operating status of production equipment and the surrounding environment but also for influencing operational management, fault prediction, and scheduling and maintenance decisions. Industrial sensor malfunctions or anomalies can severely impact the performance and safety of the entire operation and maintenance system, potentially leading to significant property damage, equipment failure, and even personal injury or death.

[0003] Currently, the identification of anomalies in industrial sensors mainly relies on the signals collected by the target sensor itself, combined with traditional industrial mechanisms and personal experience. However, traditional identification methods have the following three problems: (1) The information collected by the sensor is coupled with factors such as the measured object, its own state, and the environment. When these factors change, the data collected by the sensor will also change, resulting in inaccurate sensor anomaly identification results; (2) Traditional methods rely too much on personal experience and require classification and analysis of sensor characteristics that may cause the type of sensor anomaly. Human factors have a significant impact on the results; (3) Traditional methods can only roughly determine whether a sensor is abnormal. For abnormal sensors, it is impossible to correct the abnormal data collected in a timely manner. Once a sensor is abnormal, the equipment must be shut down for maintenance immediately, which seriously affects the reliability of the equipment, production efficiency, and production costs. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to overcome the defects of inaccurate anomaly detection and inability to correct abnormal data of abnormal sensors in the prior art, and to provide a sensor anomaly detection method, model training method, system, device and medium.

[0005] The present invention solves the above-mentioned technical problems through the following technical solution:

[0006] A model training method, the model training method comprising:

[0007] For multiple sensors, a first sample dataset corresponding to each sensor is obtained, the first sample dataset including the data collected by the sensor within a preset time period;

[0008] The first sample datasets of multiple sensors are preprocessed to obtain corresponding second sample datasets, so as to unify the sample data volume of each sensor. The second sample dataset includes feature data obtained after preprocessing the collected data.

[0009] A target sensor is identified from among the multiple sensors, and the feature importance of the remaining sensors to the target sensor is determined based on a pre-trained association feature model of the target sensor.

[0010] The importance of the features is ranked, and the remaining sensors corresponding to the top K most important features are determined as the associated sensors of the target sensor.

[0011] The second sample dataset of the associated sensor is used as input and the second sample dataset of the target sensor is used as output for training to obtain a sensor anomaly detection model.

[0012] Optionally, the preprocessing of the first sample dataset from the plurality of sensors to obtain the corresponding second sample dataset includes:

[0013] Determine the preset sampling frequency;

[0014] A first time window is set according to the preset acquisition frequency, and the first time window slides along the timestamp of each of the first sample datasets;

[0015] Data is acquired through the first time window, and multiple data points within the first time window are merged into one feature data point.

[0016] Optionally, the model training method further includes:

[0017] Target sensors are selected sequentially from the multiple sensors until sensor anomaly detection models for all sensors are determined.

[0018] Optionally, the association feature model is trained using the second sample dataset of the other sensors as input and the second sample dataset of the target sensor as output.

[0019] Optionally, the step of training the sensor anomaly detection model by using the second sample dataset of the associated sensor as input and the second sample dataset of the target sensor as output includes:

[0020] The feature data of the second sample dataset of the associated sensor is divided multiple times according to different preset time steps to obtain multiple divided second sample datasets.

[0021] Each of the partitioned second sample datasets is used as input to train the base model, resulting in multiple pre-trained base models. The pre-trained base model with the lowest accuracy is then determined as the sensor anomaly detection model.

[0022] Optionally, the step of dividing the feature data of the second sample dataset of the associated sensor multiple times according to different preset time steps to obtain multiple divided second sample datasets includes:

[0023] A second time window is set according to a preset time step, and the second time window slides along the timestamp of each second sample dataset;

[0024] Feature data is obtained through the second time window, and multiple feature data within the second time window are merged into an average feature data.

[0025] A sensor anomaly detection method, the sensor anomaly detection method comprising:

[0026] Acquire the current feature data collected by the sensor under test and associated sensors;

[0027] The current feature data of the associated sensor is input into the sensor anomaly detection model to obtain the predicted feature data of the sensor to be detected. The sensor anomaly detection model is trained according to any of the model training methods described above.

[0028] Determine whether the difference between the current feature data and the predicted feature data of the sensor to be detected falls within a first error range, wherein the first error range is determined by the accuracy of the sensor anomaly detection model;

[0029] If not, then it is determined that the sensor to be detected is abnormal, and the predicted feature data is used as the target feature data of the sensor to be detected.

[0030] A model training system, the model training system comprising:

[0031] The first acquisition module is used to acquire a first sample dataset corresponding to each of the multiple sensors, wherein the first sample dataset includes the data collected by the sensor within a preset time period;

[0032] The preprocessing module is used to preprocess the first sample datasets of the multiple sensors to obtain corresponding second sample datasets, so as to unify the sample data volume of each sensor. The second sample dataset includes feature data obtained after preprocessing the collected data.

[0033] A target sensor determination module is used to determine a target sensor from a plurality of said sensors, and to determine the feature importance of the remaining sensors to the target sensor based on a pre-trained association feature model of the target sensor;

[0034] The associated sensor determination module is used to sort the importance of the features and determine the remaining sensors corresponding to the top K feature importance as associated sensors of the target sensor.

[0035] The model training module is used to train the sensor anomaly detection model by taking the second sample dataset of the associated sensor as input and the second sample dataset of the target sensor as output.

[0036] A sensor anomaly detection system, the sensor anomaly detection system comprising:

[0037] The third acquisition module is used to acquire the current feature data collected by the sensor to be detected and the associated sensors;

[0038] The predictive feature data determination module is used to input the current feature data of the associated sensor into the sensor anomaly detection model to obtain the predictive feature data of the sensor to be detected. The sensor anomaly detection model is trained according to the above model training system.

[0039] The judgment module is used to determine whether the difference between the current feature data of the sensor to be detected and the predicted feature data falls within a first error range, the first error range being determined by the accuracy of the sensor anomaly detection model; if not, the target feature data determination module is executed.

[0040] The target feature data determination module is used to determine that the sensor to be detected is abnormal and to use the predicted feature data as the target feature data of the sensor to be detected.

[0041] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the model training method or the sensor anomaly detection method described above.

[0042] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the model training method or the sensor anomaly detection method described above.

[0043] The positive and progressive effects of this invention are as follows: First, by preprocessing the collected data, a second sample dataset with temporal uniformity is obtained, achieving data synchronization while preserving as much original data information as possible. Then, by using a feature association model to associate all sensors, the input feature data required for feature data calculation in sensor anomaly detection is determined. Finally, through a sensor anomaly detection model, during the machine learning process, time-series association and analysis of industrial sensor data in multiple states are performed simultaneously, which can effectively detect anomalies in target sensors and replace abnormal data in a timely manner. Attached Figure Description

[0044] Figure 1 A flowchart of a model training method provided as an exemplary embodiment of the present invention;

[0045] Figure 2 A flowchart of a sensor anomaly detection method provided as an exemplary embodiment of the present invention;

[0046] Figure 3 A schematic diagram of the result of sensor anomaly detection provided as an exemplary embodiment of the present invention;

[0047] Figure 4 A block diagram of a model training system provided as an exemplary embodiment of the present invention;

[0048] Figure 5 A block diagram of a sensor anomaly detection system provided as an exemplary embodiment of the present invention;

[0049] Figure 6 This is a structural diagram of an electronic device provided as an exemplary embodiment of the present invention. Detailed Implementation

[0050] The present invention will be further described below by way of an exemplary embodiment, but the invention is not limited to the scope of the embodiments described herein.

[0051] An exemplary embodiment of the present invention provides a model training method, see below. Figure 1 The methods include:

[0052] S101. For multiple sensors, obtain the first sample dataset corresponding to each sensor. The first sample dataset includes the data collected by the sensor within a preset time period.

[0053] In one embodiment, the system acquires signals collected by various industrial sensors deployed on industrial equipment or in an industrial site within a preset time period. These signals are used to monitor the performance and operating status of the industrial equipment. Necessary signal processing is performed on the acquired signals, including but not limited to analog-to-digital conversion and null value removal, to obtain the data collected by each sensor.

[0054] S102. Preprocess the first sample datasets from multiple sensors to obtain corresponding second sample datasets, so as to unify the sample data volume of each sensor. The second sample dataset includes feature data obtained after preprocessing the collected data.

[0055] In one embodiment, because each sensor in an industrial system has a different sampling frequency, the amount of data collected by each sensor within the same preset time period also varies, making it impossible to unify the collected data from each sensor over time. To unify the collected data from each sensor in terms of both quantity and time, facilitating model training and data analysis, a dynamic time window is used to reduce the dimensionality of the first sample dataset from each sensor.

[0056] In one embodiment, step S102 specifically includes the following steps:

[0057] Determine the preset sampling frequency.

[0058] For multiple sensors, the sampling frequency of each sensor is determined, and the minimum sampling frequency among all the sensor sampling frequencies is set as the preset sampling frequency f. k .

[0059] The first time window is set according to the preset collection frequency, and the first time window slides along the timestamp of each first sample dataset.

[0060] The length of the first time window is 1 / f. k The sliding unit of the first time window is 1 / f. k That is, the first time window moves backward by 1 / f each time it is divided. k The first time window divides the first sample dataset into multiple groups with a time span of 1 / f. k The set of sample data. Additionally, the first time window can be set to a vertical length of 1 / f. k The horizontal length is N, and the first time window slides vertically along the timestamp, where N is the number of sensors, so that data is processed from all sensors simultaneously.

[0061] Data is acquired through the first time window, and multiple data points within the first time window are merged into a single feature data point.

[0062] Specifically, for each group of sample data divided by the first time window in the first sample dataset, the average value is taken to obtain the corresponding feature data, and the earliest timestamp in each group of sample data is overwritten as the timestamp of the feature data. That is, during the sliding of the first time window, the data in each first time window is overwritten and compressed to obtain an independent one-dimensional sample.

[0063] For each sensor's feature data after dimensionality reduction through the first time window segmentation, the data is indexed and merged according to the timestamp order to obtain a second sample dataset for each sensor. The second sample dataset includes T feature data, where T = preset time / f. k .

[0064] In this embodiment, a preset acquisition frequency is determined by the acquisition frequencies of multiple industrial sensors, and a first time window is set according to the preset acquisition frequency. During the sliding of the first time window, the acquisition data of each sensor at multiple time points is reduced to one-dimensional feature data. By dynamically reducing and reshaping the feature data, a second sample dataset with temporal uniformity is obtained. Data synchronization is achieved while preserving as much original data information as possible, thus improving the reliability of correlation analysis and anomaly analysis methods based on multiple industrial signal sensors.

[0065] S103. Identify the target sensor from multiple sensors, and determine the feature importance of the remaining sensors relative to the target sensor based on the pre-trained association feature model of the target sensor.

[0066] In one embodiment, the association feature model is used to extract the feature importance of the other input sensors and the target sensor. The association feature model can be any type of tree model, and the specific model can be selected according to actual needs. The form of the association feature model is not limited here. In this embodiment, the random forest model is preferred.

[0067] In one embodiment, the association feature model is trained using the second sample datasets from the other sensors as input and the second sample dataset from the target sensor as output. Specifically:

[0068] For each defined target sensor S i Constructing a Random Forest (RF) model i and the remaining sensors S1, S2, S3, ..., S n-1 The second sample dataset as RF i Input characteristics, target sensor S i The second sample dataset as RF i The output features are used to train RF. i Model.

[0069] RF obtained from training iThe feature importance of the other sensors and the target sensor can be I(i,1), I(i,2), I(i,3), ..., I(i,N-1), which is used to measure the degree of correlation between the other sensors and the target sensor.

[0070] S104. Sort the importance of features and determine the remaining sensors corresponding to the top K most important features as the associated sensors of the target sensor.

[0071] In one embodiment, the feature importance I(i,1), I(i,2), I(i,3), ..., I(i,N-1) is sorted, and the remaining sensors S1, S2, S3, ..., S4 corresponding to the first K I(i,1), I(i,2), I(i,3), ..., I(i,K) are... k The associated sensors identified as the target sensor are characterized by S(i, K). Here, K is selected based on the correlation between sensors in the actual industrial scenario, and is primarily used to filter associated sensors.

[0072] In one embodiment, steps S103-S104 are repeated to sequentially determine the target sensor from multiple sensors and obtain the associated sensor matrix for each sensor, as shown in the table below:

[0073]

[0074] In this embodiment, the associated sensors for each sensor are calculated through an association feature model. When predicting target feature data, the sensor anomaly detection model can effectively learn from the associated data to calculate the predicted feature data. Simultaneously, detecting the target sensor using associated sensors can eliminate the influence of low-association sensors, thereby reducing detection errors and improving the stability of the industrial monitoring system.

[0075] S105. Train the sensor anomaly detection model by using the second sample dataset of the associated sensor as input and the second sample dataset of the target sensor as output.

[0076] In one embodiment, for each defined target sensor S i A basic model is constructed, preferably an LSTM (Deep Recurrent Neural Network). The first layer of the LSTM network has N memory units, and the second layer has 0.5*N memory units. Finally, the sensor anomaly detection model is obtained by training the basic model.

[0077] In one embodiment, step S105 specifically includes the following steps:

[0078] S105-1: Dividing the feature data of the second sample dataset of the associated sensor multiple times according to different preset time steps to obtain a plurality of divided second sample datasets.

[0079] In one embodiment, the range of the preset time step t may be 1<t≤10, and the range of the preset time step can be determined according to the number of feature data in each second sample dataset. A corresponding second sample dataset is generated for each preset time step, and a plurality of different sensor pre-training base models are trained according to different preset time steps.

[0080] In one embodiment, the division of the second sample dataset in step S105-1 comprises the following steps:

[0081] Setting a second time window according to the preset time step, the second time window slides along the time stamp of each second sample dataset.

[0082] Wherein, the length of the second time window is the preset time step t, and the sliding length of the second time window is one piece of feature data. The second time window moves backward by one piece of feature data after each division, and the second time window divides the second sample dataset into T-t+1 sets of feature data with a time span of t. Since the length of the second time window is t, for the last t-1 pieces of feature data, t pieces of feature data cannot be collected in one second time window, so in this embodiment, the last t-1 pieces of data can be discarded.

[0083] Acquiring feature data through the second time window, and merging a plurality of pieces of feature data in the second time window into an average feature data.

[0084] Wherein, averaging the feature data divided by the second time window for each group in the second sample dataset to obtain a corresponding average feature data, and overwriting the earliest time stamp in each group of feature data as the time stamp of the average feature data, that is, in the sliding process of the second time window, the second sample dataset is divided into a set comprising T-t+1 average feature data.

[0085] S105-2: sequentially taking each divided second sample dataset as an input to train the base model to obtain a plurality of pre-trained base models, and determining the pre-trained base model with the minimum accuracy as the sensor anomaly detection model.

[0086] In one embodiment, for the pre-trained base models obtained by training with each different preset time step, the corresponding accuracy, that is, the standard deviation A(i,t), is calculated, and the pre-trained base model corresponding to the minimum standard deviation is selected as the sensor anomaly detection model, and the corresponding preset time step is taken as the target time step.

[0087] In one embodiment, the output feature data of the base model is the feature data of the target sensor at the ts-th timestamp, and the input feature data of the base model is the feature data of all associated sensors at the ts-th timestamp. Based on the number of timestamps in the second sample dataset, the partitioned second sample dataset is divided into a test subset and a training subset to train the base model, resulting in a pre-trained base model corresponding to each preset time step.

[0088] In one embodiment, step S105 is repeated until sensor anomaly detection models for all sensors are determined.

[0089] In this embodiment, by training a sensor anomaly detection model, the machine learning process simultaneously performs time-series correlation and analysis on industrial sensor data under multiple states, thereby effectively solving the problem that the signals between sensors in the industrial field are affected by slowly changing signals and change asynchronously.

[0090] The following specific implementation method further illustrates the partitioning process of the second sample dataset and the model training process in step S105:

[0091] The second sample dataset before partitioning is shown in the table below. The second sample datasets of all associated sensors can be merged to obtain a T*K dimensional association data matrix, where S(i,K,ts) represents the association with the target sensor S. i The associated Kth sensor S K Feature data of the first ts timestamps:

[0092] S(i,1,0) S(i,2,0) … S(i,K,0) S(i,1,1) S(i,2,1) … S(i,K,1) … … … … S(i,1,ts) S(i,2,ts) … S(i,K,ts) … … … … S(i,1,T) S(i,2,T) … S(i,K,T)

[0093] The second sample dataset of each associated sensor after partitioning is shown below, where t represents the preset time step of partitioning. Since the length of the second time window is t, there may be t-1 feature data in a second sample dataset that cannot meet the partitioning requirements of a second time window. Therefore, the last t-1 feature data can be discarded, or the first t-1 feature data can be discarded. For each associated sensor, a total of T-t+1 average feature data after being merged by the second time window are obtained.

[0094]

[0095] The second sample dataset after splitting was extended into a (Tt)*(t*K) dimension association data matrix. The average feature data of the target sensor at the ts-th time stamp was used as the output of the basic model, and the average feature data of all associated sensors at the ts-th time stamp was used as the input of the basic model. The second sample dataset was divided into a test subset and a training subset according to the time stamp order to perform cross-validation on the basic model, resulting in a pre-trained basic model. The accuracy of the pre-trained basic model, i.e., the standard deviation A(i,t), was calculated, and the pre-trained basic model with the minimum standard deviation was selected as the sensor anomaly detection model, with the corresponding preset time step as the target time step.

[0096] An exemplary embodiment of the present invention provides a sensor anomaly detection method, see below. Figure 2 The methods include:

[0097] S201. Obtain the current feature data collected by the sensor to be detected and the associated sensors.

[0098] In one embodiment, for the sensor to be detected and the associated sensor, t operational data points are collected at the sampling frequency of each sensor, and these t operational data points are merged into one current feature data point. The merging of the feature data point also uses a time window, and the process is similar to that described above, so it will not be repeated here. Here, t is the preset time step corresponding to the sensor anomaly detection model.

[0099] S202. Input the current feature data of the associated sensor into the sensor anomaly detection model to obtain the predicted feature data of the sensor to be detected. The sensor anomaly detection model is trained according to any of the above model training methods.

[0100] S203. Determine whether the difference between the current feature data and the predicted feature data of the sensor to be detected falls within the first error range. The first error range is determined by the accuracy of the sensor anomaly detection model. If not, proceed to step S204. If yes, proceed to step S205.

[0101] S204. Determine that the sensor to be tested is abnormal, and use the predicted feature data as the target feature data of the sensor to be tested.

[0102] S205. Determine that the sensor under test is not abnormal, and use the current feature data of the target sensor as the target feature data of the sensor under test.

[0103] In one embodiment, the first error range is |T i -P i |>x*A i , among which, T i For the current feature data of the target sensor, P iThe predicted feature data of the target sensor can be selected according to the actual application scenario.

[0104] The following uses a steam turbine as an example to further illustrate the embodiments of the invention through a specific implementation method:

[0105] Historical data from 107 sensors in a steam turbine were acquired. The acquired data mainly included sensor signals such as pressure and temperature. The minimum acquisition frequency was 1 / 30 Hz, meaning that the acquisition period for one data point was 30 seconds.

[0106] The first sample dataset was preprocessed with a maximum acquisition period of 30 seconds as the first time window, resulting in 700,000 sample data.

[0107] Construct a random forest model, set the training evaluation to mean squared error, set the maximum number of decision trees to 100, and the maximum depth to 10. Use the random forest to obtain the top 10 most relevant sensors of the sensor under test, and obtain the second sample dataset corresponding to the relevant sensors.

[0108] The time preset time steps are set to 2, 3, ..., 10 respectively to obtain the second sample dataset after the corresponding step extension, as shown in the table below. S(k,ts) represents the average feature data of the k-th associated sensor at time ts:

[0109]

[0110] The second sample dataset was randomly divided into a training subset and a test subset at a ratio of 9:1 under different preset time steps, including 630,000 training samples and 70,000 test samples respectively, and the model was trained by cross-validation.

[0111] An LSTM model was constructed. Based on the training set at each time step, the LSTM model was trained using the partitioned second sample dataset. The number of neurons in the model memory cells was set to 32, and the learning rate was 0.001. The LSTM model with the lowest standard deviation was selected as the final sensor anomaly detection model. The training standard deviation of the final model was 0.628, and the standard deviation was 0.358.

[0112] The sensor anomaly detection model predicts the feature data of the sensor under test. If the difference between the predicted feature data and the current feature data exceeds three times the standard deviation (i.e., the first error range is less than three times the standard deviation), the sensor under test is considered to be in an abnormal state, and correction is performed using the predicted feature data. The final comparison result is as follows: Figure 3As shown in the figure, the horizontal axis of the coordinate system is the timestamp index (time step), and the vertical axis is the sensor values ​​(sensor feature data). A total of twelve anomalies are marked. Among them, points 1, 2, and 11 are marked as equipment failures, and points 3, 4, 5, 6, 7, 8, 9, 10, and 12 are marked as sensor failures (the actual measured value of the sensor exceeds three times the model prediction value, that is, it exceeds the first error range), which is consistent with the actual historical failure records of the equipment.

[0113] An exemplary embodiment of the present invention provides a model training system, which is used to implement the model training method corresponding to the above embodiments. See below. Figure 4 The model training system includes:

[0114] The first acquisition module 41 is used to acquire a first sample dataset corresponding to each of the multiple sensors. The first sample dataset includes the data collected by the sensor within a preset time period.

[0115] The preprocessing module 42 is used to preprocess the first sample datasets of multiple sensors to obtain the corresponding second sample datasets, so as to unify the sample data volume of each sensor. The second sample dataset includes feature data obtained after preprocessing the collected data.

[0116] The target sensor determination module 43 is used to determine the target sensor from multiple sensors and determine the feature importance of the remaining sensors to the target sensor based on the pre-trained association feature model of the target sensor.

[0117] The associated sensor determination module 44 is used to sort the importance of features and determine the remaining sensors corresponding to the top K feature importance as associated sensors of the target sensor.

[0118] The model training module 45 is used to train the sensor anomaly detection model by taking the second sample dataset of the associated sensor as input and the second sample dataset of the target sensor as output.

[0119] An exemplary embodiment of the present invention provides a sensor anomaly detection system, which is used to implement the sensor anomaly detection method corresponding to the above embodiments. See [link to embodiment]. Figure 5 The sensor anomaly detection system includes:

[0120] The third acquisition module 51 is used to acquire the current feature data collected by the sensor to be detected and the associated sensor;

[0121] The predictive feature data determination module 52 is used to input the current feature data of the associated sensor into the sensor anomaly detection model to obtain the predictive feature data of the sensor to be detected. The sensor anomaly detection model is trained according to any of the above model training methods.

[0122] The judgment module 53 is used to determine whether the difference between the current feature data and the predicted feature data of the sensor to be detected falls within the first error range, which is determined by the accuracy of the sensor anomaly detection model; if not, the target feature data determination module is executed.

[0123] The target feature data determination module 54 is used to determine that the sensor to be detected is abnormal and to use the predicted feature data as the target feature data of the sensor to be detected.

[0124] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0125] An example embodiment of the present invention provides an electronic device, see [link to example embodiment]. Figure 6 The electronic device can be a vehicle-mounted terminal or a server-side terminal. An exemplary electronic device 60 suitable for implementing the embodiments of the present invention is shown in the diagram. Figure 6 The electronic device 60 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0126] like Figure 6 As shown, the electronic device 60 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 60 may include, but are not limited to: at least one processor 61, at least one memory 62, and a bus 63 connecting different system components (including memory 62 and processor 61).

[0127] Bus 63 includes a data bus, an address bus, and a control bus.

[0128] The memory 62 may include volatile memory, such as random access memory (RAM) 621 and / or cache memory 622, and may further include read-only memory (ROM) 623.

[0129] The memory 62 may also include a program tool 625 (or utility) having a set (at least one) program module 624, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0130] The processor 61 performs various functional applications and data processing, such as the methods provided in any of the above embodiments, by running computer programs stored in the memory 62.

[0131] Electronic device 60 can also communicate with one or more external devices 64. This communication can be performed via input / output (I / O) interface 65. Furthermore, the model-generated electronic device 60 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 67. As shown, network adapter 67 communicates with other modules of the model-generated electronic device 60 via bus 63. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the model-generated electronic device 60, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.

[0132] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0133] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method provided in any of the above embodiments.

[0134] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.

[0135] In a possible implementation, the present invention can also be implemented as a program product, which includes program code that, when the program product is run on a terminal device, causes the terminal device to execute the method implementing any of the above embodiments.

[0136] The program code for executing the present invention can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on a remote device.

[0137] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of the present invention is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but all such changes and modifications fall within the scope of protection of the present invention.

Claims

1. A model training method, characterized in that, The model training method includes: For multiple sensors, a first sample dataset corresponding to each sensor is obtained, the first sample dataset including the data collected by the sensor within a preset time period; The first sample datasets of multiple sensors are preprocessed to obtain corresponding second sample datasets, so as to unify the sample data volume of each sensor. The second sample dataset includes feature data obtained after preprocessing the collected data. A target sensor is identified from among the multiple sensors, and the feature importance of the remaining sensors to the target sensor is determined based on a pre-trained association feature model of the target sensor. The importance of the features is ranked, and the remaining sensors corresponding to the top K most important features are determined as the associated sensors of the target sensor. The second sample dataset of the associated sensor is used as input and the second sample dataset of the target sensor is used as output for training to obtain a sensor anomaly detection model; The step of preprocessing the first sample dataset from the multiple sensors to obtain the corresponding second sample dataset includes: Determine the preset sampling frequency; A first time window is set according to the preset acquisition frequency, and the first time window slides along the timestamp of each of the first sample datasets; Data is acquired through the first time window, and multiple data points within the first time window are merged into one feature data. The step of training a sensor anomaly detection model by taking the second sample dataset of the associated sensor as input and the second sample dataset of the target sensor as output includes: The feature data of the second sample dataset of the associated sensor is divided multiple times according to different preset time steps to obtain multiple divided second sample datasets. Each of the partitioned second sample datasets is used as input to train the base model, resulting in multiple pre-trained base models. The pre-trained base model with the lowest accuracy is then determined as the sensor anomaly detection model.

2. The model training method as described in claim 1, characterized in that, The model training method also includes: Target sensors are selected sequentially from the multiple sensors until sensor anomaly detection models for all sensors are determined.

3. The model training method as described in claim 1, characterized in that, The correlation feature model is trained by using the second sample dataset of the other sensors as input and the second sample dataset of the target sensor as output.

4. The model training method as described in claim 1, characterized in that, The feature data of the second sample dataset of the associated sensor is divided multiple times according to different preset time steps to obtain multiple divided second sample datasets, including: A second time window is set according to a preset time step, and the second time window slides along the timestamp of each second sample dataset; Feature data is obtained through the second time window, and multiple feature data within the second time window are merged into an average feature data.

5. A sensor anomaly detection method, characterized in that, The sensor anomaly detection method includes: Acquire the current feature data collected by the sensor under test and associated sensors; The current feature data of the associated sensor is input into the sensor anomaly detection model to obtain the predicted feature data of the sensor to be detected. The sensor anomaly detection model is trained according to the model training method described in any one of claims 1-4. Determine whether the difference between the current feature data and the predicted feature data of the sensor to be detected falls within a first error range, wherein the first error range is determined by the accuracy of the sensor anomaly detection model; If not, then it is determined that the sensor to be detected is abnormal, and the predicted feature data is used as the target feature data of the sensor to be detected.

6. A model training system, characterized in that, The model training system includes: The first acquisition module is used to acquire a first sample dataset corresponding to each of the multiple sensors, wherein the first sample dataset includes the data collected by the sensor within a preset time period; The preprocessing module is used to preprocess the first sample datasets of the multiple sensors to obtain corresponding second sample datasets, so as to unify the sample data volume of each sensor. The second sample dataset includes feature data obtained after preprocessing the collected data. A target sensor determination module is used to determine a target sensor from a plurality of said sensors, and to determine the feature importance of the remaining sensors to the target sensor based on a pre-trained association feature model of the target sensor; The associated sensor determination module is used to sort the importance of the features and determine the remaining sensors corresponding to the top K feature importance as associated sensors of the target sensor. The model training module is used to train the sensor anomaly detection model by taking the second sample dataset of the associated sensor as input and the second sample dataset of the target sensor as output. The step of preprocessing the first sample dataset from the multiple sensors to obtain the corresponding second sample dataset includes: Determine the preset sampling frequency; A first time window is set according to the preset acquisition frequency, and the first time window slides along the timestamp of each of the first sample datasets; Data is acquired through the first time window, and multiple data points within the first time window are merged into one feature data. The step of training a sensor anomaly detection model by taking the second sample dataset of the associated sensor as input and the second sample dataset of the target sensor as output includes: The feature data of the second sample dataset of the associated sensor is divided multiple times according to different preset time steps to obtain multiple divided second sample datasets. Each of the partitioned second sample datasets is used as input to train the base model, resulting in multiple pre-trained base models. The pre-trained base model with the lowest accuracy is then determined as the sensor anomaly detection model.

7. A sensor anomaly detection system, characterized in that, The sensor anomaly detection system includes: The third acquisition module is used to acquire the current feature data collected by the sensor to be detected and the associated sensors; The predictive feature data determination module is used to input the current feature data of the associated sensor into the sensor anomaly detection model to obtain the predictive feature data of the sensor to be detected. The sensor anomaly detection model is trained according to the model training system as described in claim 6. The judgment module is used to determine whether the difference between the current feature data of the sensor to be detected and the predicted feature data falls within a first error range, the first error range being determined by the accuracy of the sensor anomaly detection model; if not, the target feature data determination module is executed. The target feature data determination module is used to determine that the sensor to be detected is abnormal and to use the predicted feature data as the target feature data of the sensor to be detected.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the model training method of any one of claims 1-4 or the sensor anomaly detection method of claim 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the model training method of any one of claims 1-4 or the sensor anomaly detection method of claim 5.

Citation Information

Patent Citations

  • Health state prediction method for industrial equipment in noise environment

    CN111241673A

  • Method and device for processing and detecting data acquired by industrial equipment

    CN111967509A

  • Rail transit equipment fault prediction method based on deep learning

    CN114897262A