Equipment anomaly detection method and device, electronic equipment and storage medium
By using sliding windows and statistical analysis technology in equipment anomaly detection, we can distinguish between occasional anomalies and continuous failures, and trigger alarms only when the equipment anomaly conditions are met. This solves the problems of false alarms and downtime in existing technologies and improves detection accuracy and production efficiency.
Patent Information
- Application Number
- CN202510590318.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-09-23
AI Technical Summary
Existing equipment anomaly detection methods are deficient in accuracy and real-time performance, leading to false alarms and shutdowns, affecting production efficiency.
By acquiring equipment status data and arranging it in a data queue in chronological order, sliding window technology and statistical analysis (such as mean and standard deviation) are used to determine the data standard range, distinguishing occasional abnormal data from true equipment failures, and triggering alarms only when equipment abnormal conditions are met.
The accuracy of anomaly detection is improved, false alarms are reduced, and alarms are triggered only when there is a real equipment failure, avoiding unnecessary intervention and downtime, and improving production efficiency and equipment reliability.
Smart Images

Figure CN120687965A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a device anomaly detection method, apparatus, electronic device, and storage medium. Background Art
[0002] Equipment anomaly detection is a crucial step in ensuring stable equipment operation and production efficiency in industrial production. However, existing equipment anomaly detection methods lack accuracy and real-time performance. Accuracy is affected by factors such as sensor accuracy and data transmission, which can lead to data distortion. Using distorted data for anomaly detection is prone to false alarms, resulting in frequent equipment alarms or downtime, impacting production efficiency. Summary of the Invention
[0003] In view of this, the purpose of this application is to propose a device anomaly detection method, device, electronic device and storage medium to improve the accuracy of device anomaly detection and avoid misjudgment.
[0004] Based on the above objectives, this application provides a device anomaly detection method, including:
[0005] Obtain device status data and arrange the device status data into a data queue in chronological order;
[0006] Determining a data standard range based on the device status data in the sliding window of the data queue, and determining whether target data is abnormal data based on the data standard range, wherein the target data is the device status data at the next position of the sliding window;
[0007] In response to determining that the target data is abnormal data, placing the abnormal data into an abnormal data queue, and determining whether all abnormal data in the abnormal data queue meets a device abnormality condition;
[0008] In response to determining that all abnormal data in the abnormal data queue meet the device abnormality condition, it is determined that the device is abnormal.
[0009] Based on the same inventive concept, the present application also provides a device for detecting anomalies of an equipment, comprising:
[0010] an acquisition module configured to acquire device status data and arrange the device status data into a data queue in chronological order;
[0011] A judgment module is configured to determine a data standard range based on the device status data in the sliding window of the data queue, and determine whether the target data is abnormal data based on the data standard range, wherein the target data is the device status data at the next position of the sliding window; in response to determining that the target data is abnormal data, the abnormal data is placed in the abnormal data queue, and it is determined whether all the abnormal data in the abnormal data queue meets the device abnormality condition; in response to determining that all the abnormal data in the abnormal data queue meets the device abnormality condition, it is determined that the device is abnormal.
[0012] Based on the same inventive concept, the present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method described above when executing the computer program.
[0013] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method as described above.
[0014] As can be seen from the above, the device anomaly detection method, apparatus, electronic device and storage medium provided by the present application include: obtaining device status data, arranging the device status data in chronological order into a data queue; determining a data standard range based on the device status data in a sliding window of the data queue, and determining whether the target data is abnormal data based on the data standard range, wherein the target data is the device status data at the next position of the sliding window; in response to determining that the target data is abnormal data, placing the abnormal data into an abnormal data queue, and determining whether all abnormal data in the abnormal data queue meet the device abnormality condition; in response to determining that all abnormal data in the abnormal data queue meet the device abnormality condition, determining that the device is abnormal. To distinguish between occasional abnormal data (which may be caused by sensor noise or instantaneous fluctuations) and real device failures (usually manifested as continuous abnormal data); thereby effectively filtering out occasional abnormal data and reducing false positives. Only when the characteristics of the abnormal data meet the device abnormality condition will it be further confirmed that the device is abnormal. The accuracy of anomaly detection is improved, ensuring that the alarm is triggered only when there is a real possibility of device failure, avoiding unnecessary intervention and downtime. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in this application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are merely embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0016] Figure 1 This is a flow chart of the device anomaly detection method according to an embodiment of the present application;
[0017] Figure 2 This is a flow chart of a device abnormality detection method according to another embodiment of the present application;
[0018] Figure 3 This is a schematic diagram of a device abnormality detection apparatus according to an embodiment of the present application;
[0019] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to make the objectives, technical solutions and advantages of this application more clear, this application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0021] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the usual meanings understood by people with ordinary skills in the field to which this application belongs. The "first", "second" and similar words used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0022] In related technologies, equipment anomaly detection is a crucial step in ensuring stable equipment operation and production efficiency in industrial production. However, existing equipment anomaly detection methods have certain deficiencies in terms of accuracy and real-time performance. Regarding accuracy, the collection of equipment status data is affected by factors such as sensor accuracy and data transmission, which can lead to data distortion. Using distorted data for anomaly detection is prone to false alarms, causing frequent equipment alarms or shutdowns, impacting production efficiency. Regarding real-time performance, while machine learning and artificial intelligence technologies can improve the accuracy of anomaly detection, their high computational complexity and low detection rate make it difficult to meet the requirements of real-time detection.
[0023] Based on the above problems, the applicant found that: the device status data is obtained and the device status data is arranged in a data queue in chronological order; the data standard range is determined based on the device status data in the sliding window of the data queue, and based on the data standard range, whether the target data is abnormal data is determined, and the target data is the device status data at the next position of the sliding window; in response to determining that the target data is abnormal data, the abnormal data is placed in the abnormal data queue, and it is determined whether all abnormal data in the abnormal data queue meet the device abnormality condition; in response to determining that all abnormal data in the abnormal data queue meet the device abnormality condition, it is determined that the device is abnormal. In order to distinguish between occasional abnormal data (which may be caused by sensor noise or instantaneous fluctuations) and real device failures (usually manifested as continuous abnormal data); in order to effectively filter out occasional abnormal data and reduce false alarms. Only when the characteristics of the abnormal data meet the device abnormality condition will it be further confirmed that the device is abnormal. The accuracy of abnormality detection is improved, ensuring that the alarm is triggered only when there is a real possibility of equipment failure, avoiding unnecessary intervention and downtime.
[0024] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0025] In some embodiments, as Figure 1 As shown, a device anomaly detection method is performed by a data processor. The subsequent embodiments are illustrated using the data processor as an example. The method includes:
[0026] S101, obtaining device status data, and arranging the device status data into a data queue in chronological order;
[0027] In specific implementations, device status data is typically collected in real time by sensors or controllers on the device, reflecting the current operating status of the device. For example, device status data may include parameters such as temperature, pressure, speed, and vibration. Once the device status data is acquired, it is arranged in chronological order into a data queue. A data queue is an ordered list, arranged in chronological order of data collection, with the latest data at the end of the queue and the oldest data at the beginning of the queue. This helps to better analyze the changing trends and patterns of device status data. By arranging data into a data queue in chronological order, sliding window technology can be used to analyze the data in real time. Sliding window is a commonly used data processing technology that selects a fixed-length subset of the queue for analysis. As new data is added, the window moves forward, enabling real-time analysis while data is being collected. This helps to quickly identify abnormal conditions in device operation and take timely measures to avoid the impact of equipment failures on production.
[0028] S102: determining a data standard range based on the device status data in the sliding window of the data queue, and determining whether target data is abnormal data based on the data standard range, wherein the target data is the device status data at the next position in the sliding window;
[0029] In specific implementation, a sliding window slides across the data queue, analyzing the device status data within the window to determine a standard data range. This standard data range is typically determined by statistical features such as the mean and standard deviation. The mean provides the central tendency of the data within the window, while the standard deviation reflects the degree of data fluctuation. These statistical features define a normal data range. Next, the target data is determined to be anomalous based on the standard data range. The target data refers to the device status data at the next position in the sliding window. By comparing the target data with the standard data range, it is determined whether the data point falls within the normal range. If the target data is within the standard data range, it is considered normal. If the target data is not within the standard data range, it is considered anomalous. This method effectively detects anomalous data points because it considers the dynamic changes in the data rather than relying on fixed thresholds. By moving the sliding window, device status can be continuously monitored and the standard data range can be updated in real time, thereby improving the sensitivity and accuracy of anomaly detection.
[0030] S103: In response to determining that the target data is abnormal data, placing the abnormal data into an abnormal data queue, and determining whether all abnormal data in the abnormal data queue meets a device abnormality condition;
[0031] In specific implementations, the anomaly data queue is a list specifically used to store detected anomaly data points. Whenever an anomaly is detected during sliding window analysis, it is added to the anomaly data queue. This allows for tracking and recording all target data marked as anomaly for further analysis and processing. All anomaly data in the anomaly data queue is evaluated to determine whether it meets specific device anomaly conditions. Device anomaly conditions can be defined based on the number of anomaly data points. For example, if the number of anomaly data points in the anomaly data queue is greater than or equal to a preset number, the anomaly data in the anomaly data queue is considered to meet the device anomaly condition. This allows for distinguishing between occasional anomaly data (which may be caused by sensor noise or transient fluctuations) and true device failures (typically manifested as persistent anomaly data). This effectively filters out occasional anomaly data and reduces false positives. Only when the characteristics of the anomaly data meet the device anomaly condition is the device anomaly confirmed. This improves the accuracy of anomaly detection, ensuring that alerts are triggered only when there is a real possibility of device failure, avoiding unnecessary intervention and downtime.
[0032] S104: In response to determining that all abnormal data in the abnormal data queue meet the device abnormality condition, determine that the device is abnormal.
[0033] In practice, if all abnormal data in the abnormal data queue meets the device abnormality criteria, the device is deemed abnormal. This indicates a possible problem with the device's operating status, requiring further inspection or maintenance. This includes, but is not limited to, issuing an alarm to notify operators, recording the abnormal event for subsequent analysis, or automatically executing certain preventive measures (such as slowing down or shutting down the device to prevent damage). This helps reduce production interruptions and losses caused by equipment failures, improves overall production efficiency and equipment reliability, and avoids false alarms and unnecessary operational interventions caused by occasional abnormal data.
[0034] In this embodiment, by using sliding window technology and statistical analysis (such as mean and standard deviation), it is possible to dynamically adapt to the changing trend of the data instead of relying on fixed thresholds. It is possible to more accurately identify abnormal data and reduce the false alarm rate. By placing abnormal data into the abnormal data queue and evaluating its quantity, it is possible to distinguish between occasional abnormalities (for example, short-term fluctuations caused by sensor noise) and continuous equipment failures. The alarm is only triggered when it is determined that the abnormal data meets the equipment abnormality conditions, thereby reducing false alarms. The alarm is only triggered when there is a real possibility of equipment failure, avoiding false alarms and unnecessary operational interventions caused by occasional abnormal data. This helps to maintain production continuity and improve production efficiency.
[0035] In some embodiments, as Figure 2 As shown, the data standard range is determined based on the device status data in the sliding window of the data queue, including:
[0036] S201, determining the mean and standard deviation of all device status data within the sliding window;
[0037] In specific implementations, the mean is the average value of all device status data within the sliding window, which provides the central trend or typical value of all device status data within the sliding window. The method for calculating the mean is to add up all device status data within the sliding window and then divide it by the number of device status data. The mean can be used to understand the overall level of the device status data and serve as a benchmark for judging whether the data deviates from the normal state. The standard deviation is a measure of the degree of fluctuation of the data within the sliding window, reflecting the average degree of deviation between the data point and the mean. First, the square of the difference between each device status data and the mean is calculated, and then these squared differences are added and divided by the number of device status data to obtain the variance. Finally, the square root of the variance is taken to obtain the standard deviation; the larger the standard deviation, the greater the fluctuation of the data; the smaller the standard deviation, the relatively stable the data.
[0038] S202: Determine a data standard range based on the mean and standard deviation of all device status data.
[0039] In specific implementations, the mean and standard deviation are calculated to determine the standard range of data within the sliding window. The standard range can be defined as the mean plus or minus a certain multiple of the standard deviation (for example, the standard range can be set to within the range of mean - 3 standard deviations to mean + 3 standard deviations). This standard range is used to determine whether the target data is normal. If the target data falls outside this range, it is marked as an anomaly, thereby improving the accuracy and effectiveness of anomaly detection.
[0040] In this embodiment, the mean and standard deviation provide the central tendency and degree of fluctuation of the device status data, dynamically reflecting the normal range of data fluctuation. By using these statistical features to define the standard range of data, anomalous data points can be more accurately identified. Sliding window technology allows the mean and standard deviation to be continuously updated as new device status data is introduced. Dynamic adjustment can adapt to changes in device status and avoid the false positives or negatives that may result from fixed threshold methods. This effectively filters out occasional anomalies caused by sensor noise or short-term fluctuations, reducing unnecessary false positives and ensuring reliable equipment operation and production efficiency.
[0041] In some embodiments, after determining the standard deviation of all device status data within the sliding window, the method further includes:
[0042] In response to determining that the standard deviation is less than or equal to a first preset standard deviation, reducing the length of the sliding window;
[0043] In specific implementations, the standard deviation is an indicator that measures the degree of data fluctuation. A smaller standard deviation indicates relatively stable data with less fluctuation. When the standard deviation is less than or equal to a first preset standard deviation (for example, the first preset standard deviation can be set to 5), it indicates that the data fluctuation of all device status data within the sliding window is small. The detection sensitivity can be improved by reducing the length of the sliding window. This is because in a stable data environment, a smaller sliding window can more quickly capture subtle changes or anomalies, enabling a faster response to data changes.
[0044] In response to determining that the standard deviation is greater than or equal to a second preset standard deviation, the length of the sliding window is increased, and the second preset standard deviation is greater than the first preset standard deviation.
[0045] In specific implementations, a larger standard deviation means greater data volatility and greater differences between data points. When the standard deviation is greater than or equal to the second preset standard deviation (for example, the second preset standard deviation can be set to 10), it indicates that the data fluctuations of all device status data within the sliding window are large, and a wider range of data features can be captured by increasing the length of the sliding window. This is because in an environment with large fluctuations, a larger sliding window can smooth out short-term fluctuations and provide more stable device status data to identify anomalies, thereby enabling more accurate judgment of the overall trend and pattern of the data; by adjusting the size of the sliding window, the sensitivity and accuracy of anomaly detection can be optimized under different data characteristics, ensuring effective monitoring and detection in various industrial environments.
[0046] In this embodiment, when the standard deviation is small (i.e., the device status data is relatively stable), reducing the length of the sliding window can improve the sensitivity of detection. A smaller window can capture subtle changes or anomalies more quickly, ensuring a rapid response when the data environment is stable. When the standard deviation is large (i.e., the device status data is highly volatile), increasing the length of the sliding window helps smooth out short-term fluctuations. A larger window can capture a wider range of trends and patterns, reducing false positives caused by short-term fluctuations, thereby more accurately judging the overall trend of the data. While improving the sensitivity and accuracy of anomaly detection, it ensures efficient monitoring and detection in various data environments, improving equipment reliability and production efficiency.
[0047] In some embodiments, determining whether the target data is abnormal data based on the data standard range includes:
[0048] In response to determining that the target data is not within a data standard range, determining that the target data is abnormal data;
[0049] In practice, if the target data falls outside the data standard range, it indicates a significant deviation from the normal fluctuation range. This indicates a possible abnormality in the device status, and the target data is therefore marked as abnormal. Once the target data is identified as abnormal, it is recorded in the abnormal data queue for subsequent analysis and processing. This allows for rapid identification of possible device failures or abnormal behavior, facilitating timely corrective action.
[0050] In response to determining that the target data is within a data standard range, the target data is determined to be normal data.
[0051] In practice, if the target data falls within the standard range, it indicates that the target data has not significantly deviated from the normal fluctuation range and is therefore considered normal. This ensures that the system only takes action when it detects a true anomaly, reducing false alarms and unnecessary interventions. This effectively confirms that the equipment is operating normally and avoids false alarms caused by occasional fluctuations.
[0052] In this embodiment, the data standard range (determined by the mean and standard deviation) is used to determine whether the target data is abnormal, which can more accurately identify true abnormal data. The dynamic change trend of the data is taken into account instead of relying on a fixed threshold, reducing the possibility of false alarms. The target data is only marked as abnormal when it deviates significantly from the normal fluctuation range, ensuring that action is only taken when a true anomaly is detected. False alarms caused by occasional fluctuations or sensor noise are reduced, avoiding unnecessary operational intervention and downtime. When the target data is determined to be abnormal, it is immediately recorded in the abnormal data queue for subsequent analysis and processing. This rapid identification mechanism helps to take corrective measures in a timely manner to prevent potential equipment failures from having a greater impact on production. By confirming that the target data is within the data standard range, it can be effectively confirmed that the equipment is operating in a normal state and reduce unnecessary inspections.
[0053] In some embodiments, after determining that the target data is normal data, the method further includes:
[0054] Deleting all abnormal data in the abnormal data queue;
[0055] In specific implementation, the abnormal data queue is used to store detected abnormal data. Abnormal data is considered to be possibly related to equipment failure or abnormal status. When new target data is determined to be normal data, this indicates that the current equipment status has returned to normal and there are no ongoing abnormal conditions. In this case, the previously stored abnormal data may be sporadic or short-term fluctuations and no longer require further attention. Clear all abnormal data in the abnormal data queue, reset the baseline for abnormal detection, and be ready to monitor future equipment status to avoid outdated abnormal data from interfering with subsequent detection and judgment. Maintain the sensitivity and accuracy of anomaly detection, ensure that alarms are triggered only when they are really needed, help reduce false alarms, and avoid misjudgment of the current equipment status due to historical abnormal data, thereby helping to improve the reliability and production efficiency of equipment operation and reduce unnecessary maintenance and downtime.
[0056] After determining that the target data is abnormal data and placing the abnormal data into an abnormal data queue, the method further includes:
[0057] Abnormal data in the data queue is removed, and the mean of the device status data in the sliding window is determined, and the mean is added to the corresponding position in the data queue where the removed abnormal data is located.
[0058] In practice, outlier data can adversely affect statistical analysis. Therefore, removing outlier data from the data queue helps maintain accurate data analysis and ensures that the calculated results are more representative of normal device status. After removing outlier data, the mean of the device status data within the sliding window is recalculated. This calculated mean replaces the position of the removed outlier data in the data queue, filling the data gaps created by removing the outlier data and ensuring the integrity of the data queue. This helps improve the overall accuracy of device status assessment and ensures the stability of anomaly detection.
[0059] In this embodiment, clearing outdated data from the abnormal data queue prevents historical abnormal data from misjudging the current state. By resetting the anomaly detection baseline, new anomalies can be more accurately identified without being affected by previous, sporadic anomalies. After removing abnormal data, gaps in the data are filled with the mean, ensuring the integrity of the data queue and maintaining the accuracy of data analysis, ensuring that the calculated results are more representative of normal device status.
[0060] In some embodiments, determining whether all abnormal data in the abnormal data queue meets the device abnormality condition includes:
[0061] Determine the number of all abnormal data in the abnormal data queue;
[0062] In practice, counting the number of data points in the abnormal data queue is used to assess the severity and persistence of the anomaly. A high number of abnormal data points may indicate a persistent device issue, rather than just a sporadic fluctuation. By counting the number of abnormal data points, we can quantitatively assess device status and reduce the influence of subjective judgment.
[0063] In response to determining that the number is greater than or equal to a preset number, it is determined that all abnormal data in the abnormal data queue meets a device abnormality condition.
[0064] In specific implementation, if the number is greater than or equal to a preset number (for example, the preset number can be set to 3), it indicates that it is not sporadic abnormal data (which may be caused by sensor noise or instantaneous fluctuations), but a real equipment failure (usually manifested as continuous abnormal data), and it is determined that all abnormal data in the abnormal data queue meet the equipment abnormality conditions and the equipment is abnormal. By effectively filtering out sporadic abnormal data, false alarms are reduced. Only when the characteristics of the abnormal data meet the equipment abnormality conditions will it be further confirmed that the equipment is abnormal. The accuracy of abnormality detection is improved, ensuring that the alarm is triggered only when there is a real possibility of equipment failure, avoiding unnecessary intervention and downtime.
[0065] In this embodiment, by quantifying the number of abnormal data, the device status can be evaluated more objectively. Only when the number of abnormal data is greater than or equal to the preset number is it determined that the device is abnormal, which reduces the possibility of false alarms. Counting the number of abnormal data helps to distinguish between occasional abnormalities (such as sensor noise or instantaneous fluctuations) and persistent equipment failures. Only persistent abnormalities will trigger an alarm, ensuring that a response is made to the real problem. By filtering out occasional abnormal data, false alarms are reduced, and unnecessary operational interventions and downtimes caused by false alarms are avoided. This makes it more stable in the face of data fluctuations and does not cause frequent alarms due to short-term fluctuations.
[0066] In some embodiments, reducing the length of the sliding window includes:
[0067] determining a first difference between the standard deviation and a first preset standard deviation, and determining a reduction coefficient for reducing the length of the sliding window based on the first difference, and multiplying the length by the reduction coefficient as the length of the reduced sliding window, wherein the first difference is inversely proportional to the reduction coefficient;
[0068] In specific implementation, first, calculate the difference between the standard deviation of the data in the current sliding window and the first preset standard deviation, that is, the first difference = the first preset standard deviation - the standard deviation. When the standard deviation is much smaller than the first preset standard deviation, it means that the data is very stable and the length of the sliding window can be greatly reduced, so the reduction coefficient should be small. On the contrary, if the standard deviation is close to the first preset standard deviation, the window length should be reduced with caution, so the reduction coefficient should be large. Specifically, Where G1 represents the reduction coefficient, △X1 represents the first difference, and e represents the natural constant. Multiplying the current sliding window length by the reduction coefficient yields the reduced sliding window length. This allows the system to more quickly detect anomalies when data is stable, improving detection sensitivity and ensuring effective monitoring and detection in a variety of industrial environments.
[0069] The increasing the length of the sliding window includes:
[0070] Determine a second difference between the standard deviation and a second preset standard deviation, and determine an increase coefficient for increasing the length of the sliding window based on the second difference, and use the product of the length and the increase coefficient as the length of the increased sliding window, wherein the second difference is proportional to the increase coefficient.
[0071] In specific implementation, first, calculate the difference between the standard deviation of the data in the current sliding window and the second preset standard deviation, that is, the second difference = standard deviation - second preset standard deviation. When the standard deviation is much larger than the second preset standard deviation, it means that the data fluctuation is large, and the length of the sliding window can be greatly increased, so the increase coefficient should be large. Conversely, if the standard deviation is close to the second preset standard deviation, the window length should be increased with caution, so the increase coefficient should be small. Specifically, Where G2 represents the amplification factor, △X2 represents the second difference, and e represents the natural constant. Multiplying the current sliding window length by the amplification factor yields the increased sliding window length. Increasing the sliding window smooths short-term fluctuations, providing more stable device status data for anomaly identification. This allows for more accurate anomaly detection in the face of high data volatility, reduces false positives, and helps filter out short-term random fluctuations, resulting in more reliable detection results.
[0072] In this embodiment, when the device status data is stable, by reducing the length of the sliding window, subtle changes or anomalies can be detected more quickly. A smaller window can respond to data changes more quickly, improving the sensitivity of detection. When the device status data is highly volatile, by increasing the length of the sliding window, short-term fluctuations can be smoothed and the impact of random fluctuations can be filtered out. A larger window helps capture a wider range of data features, provides a more stable background for identifying anomalies, and reduces false alarms. The formula calculation can more accurately determine the reduction coefficient and the increase coefficient based on the standard deviation of all device status data within the sliding window to avoid adjusting the sliding window length too large or too small, which affects the judgment of abnormal data. The sensitivity and accuracy of anomaly detection are ensured, and the monitoring and detection capabilities of the system in various industrial environments are improved.
[0073] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario and performed by multiple devices working together. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the method.
[0074] It should be noted that the above description is limited to some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0075] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a device abnormality detection device.
[0076] refer to Figure 3 , the device abnormality detection device comprises:
[0077] An acquisition module 701 is configured to acquire device status data and arrange the device status data into a data queue in chronological order;
[0078] The judgment module 702 is configured to determine a data standard range based on the device status data in the sliding window of the data queue, and determine whether the target data is abnormal data based on the data standard range, wherein the target data is the device status data at the next position of the sliding window; in response to determining that the target data is abnormal data, the abnormal data is placed in the abnormal data queue, and it is determined whether all the abnormal data in the abnormal data queue meets the device abnormality condition; in response to determining that all the abnormal data in the abnormal data queue meets the device abnormality condition, it is determined that the device is abnormal.
[0079] Furthermore, the judgment module 702 is specifically configured to:
[0080] Determine the mean and standard deviation of all device status data within the sliding window;
[0081] The data standard range is determined based on the mean and standard deviation of all equipment status data.
[0082] Furthermore, the judgment module 702 is further configured to:
[0083] In response to determining that the standard deviation is less than or equal to a first preset standard deviation, reducing the length of the sliding window;
[0084] In response to determining that the standard deviation is greater than or equal to a second preset standard deviation, the length of the sliding window is increased, and the second preset standard deviation is greater than the first preset standard deviation.
[0085] Furthermore, the judgment module 702 is further configured to:
[0086] In response to determining that the target data is not within a data standard range, determining that the target data is abnormal data;
[0087] In response to determining that the target data is within a data standard range, the target data is determined to be normal data.
[0088] Furthermore, the judgment module 702 is further configured to:
[0089] Deleting all abnormal data in the abnormal data queue;
[0090] Abnormal data in the data queue is removed, and the mean of the device status data in the sliding window is determined, and the mean is added to the corresponding position in the data queue where the removed abnormal data is located.
[0091] Furthermore, the judgment module 702 is further configured to:
[0092] Determine the number of all abnormal data in the abnormal data queue;
[0093] In response to determining that the number is greater than or equal to a preset number, it is determined that all abnormal data in the abnormal data queue meets a device abnormality condition.
[0094] Furthermore, the judgment module 702 is further configured to:
[0095] determining a first difference between the standard deviation and a first preset standard deviation, and determining a reduction coefficient for reducing the length of the sliding window based on the first difference, and multiplying the length by the reduction coefficient as the length of the reduced sliding window, wherein the first difference is inversely proportional to the reduction coefficient;
[0096] Determine a second difference between the standard deviation and a second preset standard deviation, and determine an increase coefficient for increasing the length of the sliding window based on the second difference, and use the product of the length and the increase coefficient as the length of the increased sliding window, wherein the second difference is proportional to the increase coefficient.
[0097] For the convenience of description, the above device is described as being divided into various modules according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0098] The apparatus of the above embodiment is used to implement the corresponding device abnormality detection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0099] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, the device abnormality detection method described in any of the above embodiments is implemented.
[0100] Figure 4 10 is a schematic diagram showing a more specific hardware structure of an electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other within the device via the bus 1050.
[0101] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0102] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1020 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0103] The input / output interface 1030 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components within the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0104] The communication interface 1040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).
[0105] The bus 1050 comprises a path for transmitting information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).
[0106] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0107] The electronic device of the above embodiment is used to implement the corresponding device abnormality detection method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0108] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the device anomaly detection method described in any of the above embodiments.
[0109] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0110] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the device abnormality detection method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0111] Based on the same concept, corresponding to any of the above-mentioned embodiments, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the method described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.
[0112] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0113] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operation of the disclosed technical solution based on the prompt message.
[0114] As an optional but non-limiting implementation, in response to a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0115] It is understandable that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0116] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application is limited to these examples. In line with the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0117] In addition, for simplicity of description and discussion, and in order not to make the embodiment of the application difficult to understand, the known power supply / ground connection with integrated circuit (IC) chip and other components may or may not be shown in the accompanying drawings provided. In addition, the device can be shown in the form of a block diagram to avoid making the embodiment of the application difficult to understand, and this also takes into account the following fact, that is, the details of the embodiment of these block diagram devices are highly dependent on the platform to be implemented in the embodiment of the application (that is, these details should be fully within the scope of understanding of those skilled in the art). When specific details (for example, circuit) are set forth to describe exemplary embodiments of the application, it will be apparent to those skilled in the art that the embodiment of the application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0118] Although the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may utilize the embodiments discussed.
[0119] The embodiments of the present application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A device anomaly detection method, characterized in that: include: Obtain device status data and arrange the device status data into a data queue in chronological order; Determining a data standard range based on the device status data in the sliding window of the data queue, and determining whether target data is abnormal data based on the data standard range, wherein the target data is the device status data at the next position of the sliding window; In response to determining that the target data is abnormal data, placing the abnormal data into an abnormal data queue, and determining whether all abnormal data in the abnormal data queue meets a device abnormality condition; In response to determining that all abnormal data in the abnormal data queue meet the device abnormality condition, it is determined that the device is abnormal.
2. The device anomaly detection method according to claim 1, characterized in that: Determining the data standard range based on the device status data in the sliding window of the data queue includes: Determine the mean and standard deviation of all device status data within the sliding window; The data standard range is determined based on the mean and standard deviation of all equipment status data.
3. The device abnormality detection method according to claim 2, characterized in that: After determining the standard deviation of all device status data within the sliding window, it also includes: In response to determining that the standard deviation is less than or equal to a first preset standard deviation, reducing the length of the sliding window; In response to determining that the standard deviation is greater than or equal to a second preset standard deviation, the length of the sliding window is increased, and the second preset standard deviation is greater than the first preset standard deviation.
4. The device anomaly detection method according to claim 1, wherein: The determining whether the target data is abnormal data based on the data standard range includes: In response to determining that the target data is not within a data standard range, determining that the target data is abnormal data; In response to determining that the target data is within a data standard range, the target data is determined to be normal data.
5. The device anomaly detection method according to claim 4, characterized in that: After determining that the target data is normal data, it also includes: Deleting all abnormal data in the abnormal data queue; After determining that the target data is abnormal data and placing the abnormal data into an abnormal data queue, the method further includes: Abnormal data in the data queue is removed, and the mean of the device status data in the sliding window is determined, and the mean is added to the corresponding position in the data queue where the removed abnormal data is located.
6. The device anomaly detection method according to claim 1, characterized in that: Determining whether all abnormal data in the abnormal data queue meets the device abnormality condition includes: Determine the number of all abnormal data in the abnormal data queue; In response to determining that the number is greater than or equal to a preset number, it is determined that all abnormal data in the abnormal data queue meets a device abnormality condition.
7. The device anomaly detection method according to claim 3, characterized in that: The reducing the length of the sliding window comprises: determining a first difference between the standard deviation and a first preset standard deviation, and determining a reduction coefficient for reducing the length of the sliding window based on the first difference, and multiplying the length by the reduction coefficient as the length of the reduced sliding window, wherein the first difference is inversely proportional to the reduction coefficient; The increasing the length of the sliding window includes: Determine a second difference between the standard deviation and a second preset standard deviation, and determine an increase coefficient for increasing the length of the sliding window based on the second difference, and use the product of the length and the increase coefficient as the length of the increased sliding window, wherein the second difference is proportional to the increase coefficient.
8. A device for detecting abnormality of equipment, characterized in that: include: an acquisition module configured to acquire device status data and arrange the device status data into a data queue in chronological order; A judgment module is configured to determine a data standard range based on the device status data in the sliding window of the data queue, and determine whether the target data is abnormal data based on the data standard range, wherein the target data is the device status data at the next position of the sliding window; in response to determining that the target data is abnormal data, the abnormal data is placed in the abnormal data queue, and it is determined whether all the abnormal data in the abnormal data queue meets the device abnormality condition; in response to determining that all the abnormal data in the abnormal data queue meets the device abnormality condition, it is determined that the device is abnormal.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Abnormality monitoring method of Internet of Things equipment, storage medium and computer program product
CN119420628A
Device fault diagnosis method and apparatus, and storage medium
WO2025001627A1