Device fault diagnosis method and apparatus, and storage medium
Through the combination of sliding window technology and fault classification model and the revised DTW algorithm, the problem of low efficiency and insufficient accuracy of equipment fault diagnosis methods in the Internet of Things platform is solved, and fast and accurate fault identification and analysis is achieved, which improves fault diagnosis. Efficiency and accuracy.
Patent Information
- Application Number
- PCT/CN2024/094200
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-29
- Filing Date
- 2024-05-20
- Publication Date
- 2025-01-02
AI Technical Summary
Existing equipment fault diagnosis methods are inefficient and insufficient in identifying and classifying abnormal sequences, especially in the processing of real-time monitoring data in IoT platforms, making it difficult to quickly and accurately identify the fault type and cause of failure.
The target subsequence is constructed using sliding window technology, and the abnormal sequence is judged through the mean, standard deviation and preset threshold value, and the similarity is calculated based on the fault classification model and the corrected DTW algorithm to determine the fault type and cause of the fault.
It improves the computing efficiency and classification accuracy of equipment fault diagnosis, can quickly identify fault time and monitor data sequences in the Internet of Things platform, provide more scientific and reasonable similarity calculation results, and enhances the accuracy and reliability of fault analysis.
Smart Images

Figure CN2024094200_02012025_PF_FP_ABST
Abstract
Description
Equipment fault diagnosis method, device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 29, 2023, with application number 202310786437.1 and invention name “Equipment Fault Diagnosis Method, Device and Storage Medium”, the contents of which should be understood as incorporated into this application by reference. Technical Field
[0002] This article relates to but is not limited to the field of Internet of Things technology, and in particular to a device fault diagnosis method, device and storage medium. Background Art
[0003] Equipment failure identification methods include fault tree analysis, event tree analysis, and failure mode and effects analysis. Fault tree analysis analyzes the system's logical relationships, breaking down equipment failures into a series of root causes. Event tree analysis analyzes system events, tracing the possible causes of each event and identifying preventive measures. Failure mode and effects analysis analyzes each component in the system, predicting failure modes and effects and proposing corresponding risk control measures.
[0004] Summary of the Invention
[0005] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0006] The present disclosure provides a method for diagnosing a device fault, including:
[0007] Obtain the diagnostic data of the target device;
[0008] Determining whether there are one or more abnormal sequences in the data to be diagnosed;
[0009] When it is determined that one or more abnormal sequences exist, a feature vector of the abnormal sequence is constructed according to the statistical characteristics of each abnormal sequence; and the fault type corresponding to the abnormal sequence is determined according to the feature vector and a preset fault classification model.
[0010] In an exemplary embodiment, determining whether one or more abnormal sequences exist in the data to be diagnosed includes:
[0011] Constructing a plurality of target subsequences according to the data to be diagnosed and a preset sliding window;
[0012] Whether there is an abnormal sequence in the data to be diagnosed is determined based on the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence.
[0013] In an exemplary embodiment, determining whether there is an abnormal sequence in the data to be diagnosed based on the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence includes:
[0014] For each chronologically ordered target subsequence, perform the following operations:
[0015] When it is determined that the mean of a target subsequence is less than the preset sliding mean upper limit threshold, the target subsequence is taken as the starting abnormal sequence, and whether the mean of the subordinate target subsequences of the starting abnormal sequence is less than the preset sliding mean upper limit threshold is determined in sequence, until a target subsequence whose mean is greater than or equal to the preset sliding mean upper limit threshold is determined, and the last target subsequence whose mean is less than the preset sliding mean upper limit threshold is taken as the ending abnormal sequence; the data corresponding to the starting abnormal sequence, the data corresponding to the ending abnormal sequence, and the data corresponding to all target subsequences between the starting abnormal sequence and the ending abnormal sequence constitute an abnormal sequence.
[0016] In an exemplary embodiment, determining whether there is an abnormal sequence in the data to be diagnosed based on the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence includes:
[0017] For each chronologically ordered target subsequence, perform the following operations:
[0018] When it is determined that the mean of a target subsequence is greater than the preset sliding mean lower limit threshold, the target subsequence is used as the starting abnormal sequence, and whether the mean of the subordinate target subsequences of the starting abnormal sequence is greater than the preset sliding mean lower limit threshold is determined in sequence, until a target subsequence whose mean is less than or equal to the preset sliding mean lower limit threshold is determined, and the last target subsequence whose mean is less than the preset sliding mean lower limit threshold is used as the ending abnormal sequence; the data corresponding to the starting abnormal sequence, the data corresponding to the ending abnormal sequence, and the data corresponding to all target subsequences between the starting abnormal sequence and the ending abnormal sequence constitute an abnormal sequence.
[0019] In an exemplary embodiment, determining whether there is an abnormal sequence in the data to be diagnosed based on the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence includes:
[0020] For each chronologically ordered target subsequence, perform the following operations:
[0021] When it is determined that the standard deviation of a target subsequence is greater than the preset standard deviation threshold, the target subsequence is used as a starting abnormal sequence, and whether the standard deviation of the subordinate target subsequences of the starting abnormal sequence is greater than the preset standard deviation threshold is determined in sequence, until a target subsequence whose standard deviation is less than or equal to the preset standard deviation threshold is determined. The last target subsequence whose standard deviation is greater than the preset standard deviation threshold is used as an ending abnormal sequence, and the data corresponding to the starting abnormal sequence, the data corresponding to the ending abnormal sequence, and the data corresponding to all target subsequences between the starting abnormal sequence and the ending abnormal sequence constitute an abnormal sequence.
[0022] In an exemplary embodiment, abnormal sequences with time intervals within a preset range are merged; or abnormal sequences with overlapping time periods are merged.
[0023] In an exemplary embodiment, the preset fault classification model includes a plurality of classification models;
[0024] Determining the fault type corresponding to the abnormal sequence according to the feature vector and a preset fault classification model includes:
[0025] According to the classification results of each classification model, the fault type is determined through a voting mechanism.
[0026] In an exemplary embodiment, the similarity between each abnormal sequence and a preset template sequence is calculated based on a modified DTW algorithm, and the cause of the fault corresponding to the abnormal sequence is determined based on the similarity; wherein the preset template sequence is a sequence constructed based on abnormal data and a preset sliding window and annotated with the cause of the fault.
[0027] In an exemplary embodiment, calculating the similarity between each abnormal sequence and a preset template sequence according to a modified DTW algorithm includes:
[0028] For each abnormal sequence, when the length of the abnormal sequence is equal to the length of the preset template sequence, determining the similarity between the abnormal sequence and the preset template sequence according to a first cumulative sum; wherein the first cumulative sum is the sum of the absolute values of the differences between the elements with the same sequence number in the abnormal sequence and the preset template sequence;
[0029] When the length of the abnormal sequence is greater than the length of the preset template sequence, the similarity between the abnormal sequence and the preset template sequence is determined based on the cumulative sum of all Aa-1; wherein the cumulative sum of Aa-1 refers to the sum of the absolute values of the differences between the elements in the abnormal sequence and the preset template sequence whose sequence numbers differ by a-1; 1≤a≤N, N is the difference between the length of the abnormal sequence and the length of the preset template sequence, and a and N are both positive integers;
[0030] When the length of the abnormal sequence is less than the length of the preset template sequence, the similarity between the abnormal sequence and the preset template sequence is determined based on all Bb-1 cumulative sums; where the Bb-1 cumulative sum refers to the sum of the absolute values of the differences between the elements in the abnormal sequence and the preset template sequence whose sequence numbers differ by -b+1; 1≤b≤M, M is the difference between the length of the abnormal sequence and the length of the preset template sequence, and b and M are both positive integers.
[0031] In an exemplary embodiment, constructing multiple target subsequences based on the data to be diagnosed and a preset sliding window includes:
[0032] For each data in the data to be diagnosed, the data in the preset sliding window headed by the data is taken as a target subsequence.
[0033] In an exemplary embodiment, the preset sliding mean upper threshold, the preset sliding mean lower threshold, and the preset standard deviation threshold are obtained as follows:
[0034] Acquire first normal data and first abnormal data of a target device;
[0035] Calculating a first sequence mean and a first sequence standard deviation of each first subsequence; wherein the first subsequence is a sequence constructed based on the first normal data and a preset sliding window;
[0036] Calculating a second sequence mean and a second sequence standard deviation of each second subsequence; wherein the second subsequence is a sequence constructed based on the first abnormal data and a preset sliding window;
[0037] Determine a preset sliding mean lower limit threshold according to the largest first sequence mean and the smallest second sequence mean;
[0038] Determine a preset sliding mean upper limit threshold based on the minimum first sequence mean and the maximum second sequence mean;
[0039] The preset standard deviation threshold is determined according to the largest first sequence standard deviation and the smallest second sequence standard deviation.
[0040] In an exemplary embodiment, the preset fault classification model is obtained as follows:
[0041] Marking the fault type according to the first abnormal data;
[0042] Training and verifying the preset original classification model based on the labeled first abnormal data;
[0043] The trained and verified classification model is used as the preset fault classification model.
[0044] In an exemplary embodiment, labeling a fault type according to the first abnormal data includes:
[0045] Constructing multiple subsequences based on the first abnormal data and a preset sliding window; determining the statistical characteristics of each subsequence; constructing a feature vector of each subsequence based on the statistical characteristics of each subsequence; and marking the fault type on the feature vector of each subsequence.
[0046] In an exemplary embodiment, the statistical features include the mean, standard deviation, range, coefficient of variation, autocorrelation system, kurtosis and skewness of the abnormal sequence.
[0047] The present disclosure provides a device for diagnosing equipment faults, including a memory and a processor.
[0048] The memory is used to store a program for equipment fault diagnosis;
[0049] The processor is used to read and execute the program for equipment fault diagnosis and perform the above-mentioned equipment fault diagnosis method.
[0050] The present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to enable the computer to execute the above-mentioned device fault diagnosis method.
[0051] Still other aspects will become apparent upon reading and understanding the accompanying drawings and detailed description.
[0052] Summary of the Figures
[0053] The accompanying drawings are intended to provide a further understanding of the technical solutions of the present disclosure and constitute part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solutions of the present disclosure and do not constitute a limitation of the technical solutions of the present disclosure. The shapes and sizes of one or more components in the accompanying drawings do not reflect the actual scale and are intended only to illustrate the contents of the present disclosure.
[0054] FIG1 is a schematic diagram of a device fault diagnosis method according to at least one embodiment of the present disclosure;
[0055] FIG2 is a schematic flow chart of steps of a method for generating a service environment according to at least one embodiment of the present disclosure;
[0056] FIG3 is a flow chart of a device fault diagnosis method according to at least one embodiment of the present disclosure;
[0057] FIG4A is a schematic diagram of an abnormal sequence according to at least one embodiment;
[0058] FIG4B is a schematic diagram of an abnormal sequence according to at least one embodiment;
[0059] FIG. 4C is a schematic diagram of an abnormal sequence according to at least one embodiment.
[0060] Details
[0061] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. The embodiments can be implemented in a variety of different forms. A person of ordinary skill in the art can easily understand the fact that the method and content can be transformed into one or more forms without departing from the purpose and scope of the present disclosure. Therefore, the present disclosure should not be interpreted as being limited to the contents described in the following embodiments. In the absence of conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other in any way.
[0062] In the present disclosure, ordinal numbers such as "first," "second," and "third" are provided to avoid confusion among constituent elements, and are not intended to limit the number. In the present disclosure, "plurality" refers to a number of two or more.
[0063] FIG1 is a device fault diagnosis method provided by an embodiment of the present disclosure. As shown in FIG1 , the device fault diagnosis method of this embodiment includes steps S11 to S13:
[0064] S11, obtaining the diagnostic data of the target device;
[0065] S12, determining whether there are one or more abnormal sequences in the data to be diagnosed;
[0066] S13. When it is determined that one or more abnormal sequences exist, construct a feature vector of the abnormal sequence according to the statistical characteristics of each abnormal sequence; and determine the fault type corresponding to the abnormal sequence according to the feature vector and a preset fault classification model.
[0067] In an exemplary embodiment, a method for obtaining data to be diagnosed from a target device includes:
[0068] The information to be processed is obtained from a variety of information collection devices integrated in the information processing platform, and the target devices are a variety of information collection devices; the various information collection devices include devices, tablets and computers, and the information processing platform communicates with the various information collection devices. The communication connection can be TCP (Transmission Control Protocol), HTTP (Hyper Text Transfer Protocol), MQTT (Message Queuing Telemetry Transport) and other connections. The information collection device is used to collect status information of different facilities in the building, wherein the information processing platform can be an Internet of Things platform, and the information processing platform can be located in the cloud or in a server within a local area network.
[0069] Among them, the various information collection devices may be different depending on the type of information to be collected. Specifically, each type of business information may correspond to an information collection device, which may be a sensor, computer, camera, tablet, mobile phone, etc.
[0070] The various information collection devices can be partially or entirely located within the physical area, or partially located within the physical area and partially located outside the physical area as mobile information collection devices. For example, if the information collection device is a sensor or camera, it is located within the physical area to collect information about the status of the facilities within the physical area. If the information collection device is a tablet, computer, mobile phone, etc., it can be located outside the physical area to collect information about the implementation status of measures to execute the target business.
[0071] Taking fire safety assessment as an example, if the business information to be collected includes the fire hydrant system, the information collection equipment may include a camera for collecting images of the fire hydrants and processing the images of the fire hydrants to obtain the status of the fire hydrants; if the business information to be collected is the fire water supply facilities, it is necessary to detect the integrity of the fire water supply facilities, and the information collection equipment may be a water pressure sensor for collecting the water pressure status of the fire water supply facilities.
[0072] Of course, in some other embodiments, the information collection device can be integrated into fire protection facilities, such as smoke alarms, which can detect the smoke alarms in real time to determine whether the smoke alarms are faulty and send business information based on the detection results.
[0073] Taking medical safety assessment as an example, if the business information to be collected includes the ventilation system, the information collection equipment may include an air flow sensor for collecting the air flow at various locations in the ventilation system; if the business information to be collected is the working status of each disinfection equipment in the disinfection room, the information collection equipment may be a sensor integrated into each disinfection equipment for collecting status information of the disinfection equipment.
[0074] The following describes the process of establishing a communication connection between the information processing platform (i.e., the IoT platform) and the target device:
[0075] This embodiment describes how to generate a service environment on the platform to facilitate communication between terminals and the IoT platform. This service environment can run on the server or cloud where the IoT platform resides, helping terminals access the IoT platform and providing the communication services required between the IoT platform and the terminals. In creating the service environment, the present disclosure utilizes low-code device access. Developers only need to create a first integration instance of a first type and compile a data conversion script corresponding to the first integration instance to complete the construction of a service environment for a communication protocol.
[0076] 2 , a flow chart of the steps of the method for generating a service environment of the present disclosure is shown. As shown in FIG2 , the method can be executed by an electronic device to generate the service environment in the cloud, and specifically may include the following steps:
[0077] Step S201: in response to the creation of the integration instance, generate multiple integration instances;
[0078] The multiple integration instances include a first integration instance of the first type.
[0079] In this embodiment, the first integration instance of the first type may refer to an integration instance of a general communication protocol type, such as some general protocols including TCP, MQTT, UDP, HTTP, CoAP, etc., wherein different general communication protocols correspond to different first integration instances, such as the TCP protocol corresponds to the first integration instance of the TCP type, and the MQTT protocol corresponds to the first integration instance of the MQTT type. That is to say, each general communication protocol corresponds to an independent first integration instance to provide communication services to terminals using the general communication protocol.
[0080] Among them, the creation operation of the integration instance can refer to the instance creation operation performed by the developer on the platform. Specifically, after the developer configures the setting parameters of the instance in the compilation interface, when clicking on the instance creation, the integration instance can be generated based on the setting parameters compiled by the developer in response to the instance creation, and after the integration instance is generated, the integration instance can be run in response to the run operation performed by the developer.
[0081] The setting parameters may include the instance name of the integration instance, the communication protocol type, and other configuration parameters related to the operation of the integration instance.
[0082] Step S202: Receive a data conversion script uploaded for the first integration instance.
[0083] Among them, since the first integration instance is aimed at the general communication protocol, in practice, in order to achieve low-code device access, developers can be allowed to compile simple data conversion scripts, that is, the data conversion script can only compile programs related to data format conversion, and communication services not related to data conversion can be implemented by running the integration instance. In this way, the developer's program development can be reduced, time can be saved, and the service environment can be quickly deployed for devices with general communication protocols.
[0084] The data conversion script may be associated with the integration instance, and the data conversion script may be run together with the integration instance when the integration instance is run.
[0085] Step S203: configuring the data conversion script into at least two converters bound to the first integration instance to obtain a service environment supporting the terminal.
[0086] The first integration instance is used to support communication between a first type of terminal and an Internet of Things platform, and the converter is used to perform conversion processing on interaction data related to the first type of terminal during communication.
[0087] In this embodiment, starting the data conversion script may refer to mapping the data conversion script to a method that can be called by the first integration instance, for example, mapping it to a golong method, and then directly calling the golang method to convert the data that needs to be converted (such as interactive data).
[0088] Among them, the data conversion script can include at least an uplink data conversion script and a downlink data conversion script. The uplink data conversion script is used to perform conversion processing on data that needs to be uplinked to the Internet of Things platform, and the downlink data conversion script is used to perform conversion processing on data that the Internet of Things platform needs to send down to the terminal.
[0089] In practice, the data conversion script can be started to configure it as a converter bound to the first instance. When starting the data conversion script, the upstream data conversion script and the downstream data conversion script can be started at the same time. After being started, the upstream data conversion script and the downstream data conversion script can be called converters of the first integration instance. In this way, a first integration instance includes at least two converters, corresponding to the conversion of upstream data and the conversion of downstream data respectively.
[0090] Of course, in some embodiments, a first integration instance may also include more than two converters, for example, multiple groups of converters, one group of converters including corresponding upstream converters and downstream converters, and different groups of converters corresponding to different data format conversion requirements. This is because, among multiple terminals using the same general communication protocol, the data formats required by different terminals may be different. For example, among multiple terminals using the TCP protocol, the data format of some terminals is text, the data format of some terminals is JSON format, and the data format of some terminals is Binary format. In this way, for the same first integration instance, it needs to deal with data conversion of multiple data formats. Therefore, a group of converters can be configured for each data format to perform conversion processing on terminals that use this data format for communication.
[0091] In this way, the generated service environment can provide more complete communication services for the communication between a variety of different terminals and the IoT platform, so that terminals with different protocols and different data formats can be compatible with the IoT platform, thereby increasing the versatility of the IoT platform. For example, the terminal is connected to the port opened by the first integration instance, and the first integration instance sends the data sent by the terminal to the IoT platform to the upstream converter. After the upstream converter performs the conversion processing, the first integration instance sends the converted data (i.e., the target data) to the IoT platform; the data fed back by the IoT platform to the terminal can also be received by the first integration instance and sent to the downstream converter. After conversion, it is sent to the terminal by the first integration instance.
[0092] In an exemplary embodiment, the data to be diagnosed may be real-time monitoring data collected and stored via an IoT platform. This real-time monitoring data may be data from the past three months or one year. The real-time monitoring data is represented in a sequence, where each element in the sequence represents a data point. Each data point includes at least the data value and the sampling time. The elements in the sequence are arranged in chronological order, from most recent to most recent.
[0093] In an exemplary embodiment, determining whether one or more abnormal sequences exist in the data to be diagnosed includes:
[0094] Constructing a plurality of target subsequences according to the data to be diagnosed and a preset sliding window;
[0095] Whether there is an abnormal sequence in the data to be diagnosed is determined based on the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence.
[0096] The preset sliding mean lower limit threshold is smaller than the preset sliding mean upper limit threshold.
[0097] In an exemplary embodiment, constructing multiple target subsequences based on the data to be diagnosed and a preset sliding window includes:
[0098] For each data in the data to be diagnosed, the data in the preset sliding window headed by the data is taken as a target subsequence.
[0099] In an exemplary embodiment, the preset sliding window is represented by a time length W, which may be equal to 10T, where T is a sampling period of the device monitoring data. W may also be equal to 2T, 3T, etc., which is not limited here.
[0100] In an exemplary embodiment, the data to be diagnosed is, for example, X = [x1 x2 x3 x4…xn]. If the preset sliding window is 3T, the constructed target subsequence can be X1 = [x1 x2 x3], X2 = [x2 x3 x4], X3 = [x3 x4 x5], and so on.
[0101] The mean of the target subsequence X1:
[0102] Standard deviation of target subsequence X1:
[0103] In an exemplary embodiment, the preset fault classification model is obtained as follows:
[0104] Acquire first abnormal data of the target device;
[0105] Marking the fault type according to the first abnormal data;
[0106] Training and verifying the preset original classification model based on the labeled first abnormal data;
[0107] The trained and verified classification model is used as the preset fault classification model.
[0108] In an exemplary embodiment, the first abnormal data is monitoring data within a time period of abnormal operation of the equipment.
[0109] In an exemplary embodiment, the original classification model may include random forest, decision tree, logistic regression, support vector machine (SVM) neighbor algorithm (K-Nearest Neighbor: KNN), etc.
[0110] In an exemplary embodiment, labeling a fault type according to the first abnormal data includes:
[0111] Constructing multiple subsequences based on the first abnormal data and a preset sliding window; determining the statistical characteristics of each subsequence; constructing a feature vector of each subsequence based on the statistical characteristics of each subsequence; and marking the fault type on the feature vector of each subsequence.
[0112] In an exemplary embodiment, the preset fault classification model includes a plurality of classification models;
[0113] Determining the fault type corresponding to the abnormal sequence according to the feature vector and a preset fault classification model includes:
[0114] According to the classification results of each classification model, the fault type is determined through a voting mechanism.
[0115] In an exemplary embodiment, the preset fault classification model includes a classification model;
[0116] The fault type corresponding to the abnormal sequence is determined according to the feature vector and a preset fault classification model.
[0117] In an exemplary embodiment, the statistical features include the mean, standard deviation, range, coefficient of variation, autocorrelation system, kurtosis and skewness of the abnormal sequence.
[0118] In an exemplary embodiment, determining whether there is an abnormal sequence in the data to be diagnosed based on the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence includes:
[0119] For each target subsequence arranged in chronological order, perform the following operations:
[0120] When it is determined that the mean of a target subsequence is less than the preset sliding mean upper limit threshold, the target subsequence is taken as the starting abnormal sequence, and whether the mean of the subordinate target subsequences of the starting abnormal sequence is less than the preset sliding mean upper limit threshold is determined in sequence, until a target subsequence whose mean is greater than or equal to the preset sliding mean upper limit threshold is determined, and the last target subsequence whose mean is less than the preset sliding mean upper limit threshold is taken as the ending abnormal sequence; the data corresponding to the starting abnormal sequence, the data corresponding to the ending abnormal sequence, and the data corresponding to all target subsequences between the starting abnormal sequence and the ending abnormal sequence constitute an abnormal sequence.
[0121] That is, it is determined whether the mean of the target subsequence is less than the preset sliding mean upper threshold; if so, it is determined whether the mean of the next target subsequence adjacent to the target subsequence is less than the preset sliding mean upper threshold; if so, it is continued to determine whether the mean of the next target subsequence adjacent to the next target subsequence is less than the preset sliding mean upper threshold, and so on, until a target subsequence whose mean is greater than or equal to the preset sliding mean upper threshold is determined; the data corresponding to the target subsequence, the data corresponding to the target subsequence after the target subsequence whose mean is less than the preset sliding mean upper threshold, and the data between the data corresponding to the target subsequence and the data corresponding to the target subsequence after the target subsequence whose mean is less than the preset sliding mean upper threshold constitute an abnormal sequence.
[0122] In an exemplary embodiment, determining whether there is an abnormal sequence in the data to be diagnosed based on the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence includes:
[0123] For each target subsequence arranged in chronological order, perform the following operations:
[0124] When it is determined that the mean of a target subsequence is greater than the preset sliding mean lower limit threshold, the target subsequence is used as the starting abnormal sequence, and whether the mean of the subordinate target subsequences of the starting abnormal sequence is greater than the preset sliding mean lower limit threshold is determined in sequence, until a target subsequence whose mean is less than or equal to the preset sliding mean lower limit threshold is determined, and the last target subsequence whose mean is less than the preset sliding mean lower limit threshold is used as the ending abnormal sequence; the data corresponding to the starting abnormal sequence, the data corresponding to the ending abnormal sequence, and the data corresponding to all target subsequences between the starting abnormal sequence and the ending abnormal sequence constitute an abnormal sequence.
[0125] That is, it is determined whether the mean of the target subsequence is greater than the preset sliding mean lower threshold; if so, it is determined whether the mean of the next target subsequence adjacent to the target subsequence is greater than the preset sliding mean lower threshold; if so, it is determined whether the mean of the next target subsequence adjacent to the next target subsequence is greater than the preset sliding mean lower threshold, and so on, until a subsequence whose mean is less than or equal to the preset sliding mean lower threshold is determined; the data corresponding to the target subsequence, the data corresponding to the subsequence after the target subsequence whose mean is greater than the preset sliding mean lower threshold, and the data between the data corresponding to the target subsequence and the data corresponding to the target subsequence after the target subsequence whose mean is greater than the preset sliding mean lower threshold constitute an abnormal sequence.
[0126] In an exemplary embodiment, determining whether there is an abnormal sequence in the data to be diagnosed based on the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence includes:
[0127] For each target subsequence arranged in chronological order, perform the following operations:
[0128] When it is determined that the standard deviation of a target subsequence is greater than the preset standard deviation threshold, the target subsequence is used as a starting abnormal sequence, and whether the standard deviation of the subordinate target subsequences of the starting abnormal sequence is greater than the preset standard deviation threshold is determined in sequence, until a target subsequence whose standard deviation is less than or equal to the preset standard deviation threshold is determined. The last target subsequence whose standard deviation is greater than the preset standard deviation threshold is used as an ending abnormal sequence, and the data corresponding to the starting abnormal sequence, the data corresponding to the ending abnormal sequence, and the data corresponding to all target subsequences between the starting abnormal sequence and the ending abnormal sequence constitute an abnormal sequence.
[0129] That is, whether the standard deviation of the target subsequence is greater than the preset standard deviation threshold is determined; if so, whether the standard deviation of the next target subsequence adjacent to the target subsequence is greater than the preset standard deviation threshold is determined; if so, whether the standard deviation of the next target subsequence adjacent to the next target subsequence is greater than the preset standard deviation threshold is determined, and so on, until a subsequence of the target subsequence whose standard deviation is less than or equal to the preset standard deviation threshold is determined; the data corresponding to the target subsequence, the data corresponding to the target subsequence after the target subsequence whose standard deviation is greater than the preset standard deviation threshold, and the data between the data corresponding to the target subsequence and the data corresponding to the target subsequence after the target subsequence whose standard deviation is greater than the preset standard deviation threshold constitute an abnormal sequence.
[0130] In an exemplary embodiment, abnormal sequences with time intervals within a preset range are merged; or abnormal sequences with overlapping time periods are merged.
[0131] In an exemplary embodiment, the preset sliding mean upper threshold, the preset sliding mean lower threshold, and the preset standard deviation threshold are obtained as follows:
[0132] Acquire first normal data and first abnormal data of a target device;
[0133] Calculating a first sequence mean and a first sequence standard deviation of each first subsequence; wherein the first subsequence is a sequence constructed based on the first normal data and a preset sliding window;
[0134] Calculating a second sequence mean and a second sequence standard deviation of each second subsequence; wherein the second subsequence is a sequence constructed based on the first abnormal data and a preset sliding window;
[0135] Determine a preset sliding mean lower limit threshold according to the largest first sequence mean and the smallest second sequence mean;
[0136] Determine a preset sliding mean upper limit threshold based on the minimum first sequence mean and the maximum second sequence mean;
[0137] The preset standard deviation threshold is determined according to the largest first sequence standard deviation and the smallest second sequence standard deviation.
[0138] In an exemplary embodiment, the first normal data may be monitoring data during a normal operation period of the device.
[0139] In an exemplary embodiment, the method further includes:
[0140] The modified DTW algorithm is used to calculate the similarity between each abnormal sequence and a preset template sequence, and the fault cause corresponding to the abnormal sequence is determined based on the similarity; wherein the preset template sequence is a sequence constructed based on abnormal data and a preset sliding window and annotated with the fault cause.
[0141] In an exemplary embodiment, a sequence with relatively obvious features may be manually selected as a preset template sequence.
[0142] In an exemplary embodiment, calculating the similarity between each abnormal sequence and a preset template sequence according to a modified DTW algorithm includes:
[0143] For each abnormal sequence, when the length of the abnormal sequence is equal to the length of the preset template sequence, determining the similarity between the abnormal sequence and the preset template sequence according to a first cumulative sum; wherein the first cumulative sum is the sum of the absolute values of the differences between the elements with the same sequence number in the abnormal sequence and the preset template sequence;
[0144] When the length of the abnormal sequence is greater than the length of the preset template sequence, the similarity between the abnormal sequence and the preset template sequence is determined based on the A0th cumulative sum to the AN-1th cumulative sum; wherein the A0th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with the same sequence number in the preset template sequence; the A1th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of 1 in the preset template sequence; the A2th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of 2 in the preset template sequence; the AN-1th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of N-1 in the preset template sequence; N is the difference between the length of the abnormal sequence and the length of the preset template sequence, and N>0;
[0145] When the length of the abnormal sequence is less than the length of the preset template sequence, the similarity between the abnormal sequence and the preset template sequence is determined according to the B0th cumulative sum to the BM-1th cumulative sum; wherein the B0th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with the same sequence number in the preset template sequence; the B1th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of -1 in the preset template sequence; the B2th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of -2 in the preset template sequence; the BM-1th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of -M+1 in the preset template sequence; M is the difference between the length of the abnormal sequence and the length of the preset template sequence, and M>0.
[0146] In an exemplary embodiment, the method further includes:
[0147] Send the fault types corresponding to all abnormal sequences of the target device to the customer.
[0148] The device fault diagnosis method provided by the embodiment of the present disclosure forms a feature vector of the abnormal sequence based on the statistical characteristics of each abnormal sequence; and determines the fault type corresponding to the abnormal sequence based on the feature vector and a preset fault classification model. Compared with the traditional classification method based on time series (time series is also called dynamic series, which refers to a numerical sequence in which the indicator values of a certain phenomenon are arranged in chronological order. The time series is composed of two components: the first component is the time component; the second component is the numerical component. The time series can be divided into period time series and point time series according to the different properties of time and value.), the computational efficiency is greatly improved, and at the same time, a good accuracy and recall rate are achieved in the classification effect.
[0149] In some other embodiments of the present disclosure, an abnormal sequence interception scheme combining a sliding mean and a sliding standard deviation can efficiently identify abnormal sequences and prevent individual abnormal detection points from affecting the analysis results.
[0150] In some other embodiments of the present disclosure, time windows are merged by merging abnormal sequences to obtain more accurate fault times and corresponding monitoring data sequences.
[0151] In some other embodiments of the present disclosure, the DTW algorithm is modified, and the time series similarity is calculated based on the modified DTW algorithm. While retaining the time attribute, only the minimum distance of the sequence is calculated to obtain a more scientific and reasonable similarity calculation result.
[0152] FIG3 is a flow chart of a device fault diagnosis method according to at least one embodiment of the present disclosure. As shown in FIG3 , the device fault diagnosis method according to this embodiment includes steps S31 to S39:
[0153] S31, obtaining first normal data and first abnormal data of a target device;
[0154] S32. Determine a sliding mean upper threshold, a sliding mean lower threshold, and a standard deviation threshold based on the first normal data and the first abnormal data;
[0155] S33. Training a classification model based on the first abnormal data to obtain a fault classification model;
[0156] S34, determining the template sequence and marking the template sequence;
[0157] S35, obtaining the diagnostic data of the target device;
[0158] S36. Determine whether there are one or more abnormal sequences in the data to be diagnosed based on the sliding mean upper threshold, the sliding mean lower threshold, and the standard deviation threshold;
[0159] S37. When it is determined that one or more abnormal sequences exist, determining the fault type corresponding to each abnormal sequence according to the fault classification model;
[0160] S38. Determine the fault cause of each abnormal sequence based on the marked template sequence;
[0161] S39. Send the fault type and fault cause of the abnormal sequence to the user.
[0162] In step S31, monitoring data of the target device is collected in real time via the IoT platform. The monitoring data may include first normal data and first abnormal data. The first normal data may be monitoring data during a period of normal device operation. The first abnormal data may be monitoring data during a period of abnormal device operation. The first normal data and the first abnormal data may be data within three months or one year. The format of the first normal data and the first abnormal data may be a time series format.
[0163] Step S32 includes the following steps S321-S326:
[0164] S321, setting a sliding window;
[0165] S322. Construct multiple first subsequences based on the first normal data and the sliding window; calculate the first sequence mean and the first sequence standard deviation of each first subsequence;
[0166] S323. Construct multiple second subsequences based on the first abnormal data and the sliding window; calculate the second sequence mean and second sequence standard deviation of each second subsequence;
[0167] S324. Determine a sliding mean lower threshold according to the largest first sequence mean and the smallest second sequence mean;
[0168] S325. Determine an upper threshold of a sliding mean according to the minimum first sequence mean and the maximum second sequence mean;
[0169] S326. Determine a standard deviation threshold according to the largest first sequence standard deviation and the smallest second sequence standard deviation.
[0170] In S321, the sliding window is represented by a time length W, which can be equal to 10T, where T is the sampling period of the device monitoring data. W can also be equal to 2T, 3T, etc., which is not limited here.
[0171] In S322, the first subsequence in,
[0172] The first series mean is
[0173] The standard deviation of the first series is:
[0174] The maximum value of is:
[0175] Minimum value of for:
[0176] σ i The maximum value σ max for:
[0177] σ max =Max(σ i ),i∈(1,2,3...nv);
[0178] Among them, x i is the monitoring data point, and n is the sequence length.
[0179] In S223, the second subsequence in,
[0180] The mean of the second series is
[0181] The standard deviation of the second series is
[0182] The maximum value for:
[0183] Minimum value of for:
[0184] σ' i The maximum value σ' max for:
[0185] σ' max =Max(σ' i ), i∈(1,2,3...nv).
[0186] In S324, the sliding mean lower threshold for:
[0187] In S325, the sliding mean lower threshold for:
[0188] In S326, the standard deviation threshold is:
[0189] In S33, training the classification model according to the first abnormal data to obtain the fault classification model may include: labeling the fault type according to the first abnormal data; training and verifying the preset original classification model according to the labeled first abnormal data; and using the trained and verified classification model as the preset fault classification model.
[0190] Labeling the fault type according to the first abnormal data may include: determining statistical features of each second subsequence; forming a feature vector of each second subsequence according to the statistical features of each second subsequence; and labeling the fault type of the feature vector of each second subsequence.
[0191] The statistical characteristics of the second subsequence may include the mean, standard deviation, range, coefficient of variation, autocorrelation coefficient, kurtosis, and skewness of the second subsequence.
[0192] In step S34, determining and labeling the template sequence may include: selecting a sequence with relatively obvious features from the second subsequence as the template sequence, and labeling the corresponding fault cause for each template sequence, for example, selecting a sequence with relatively obvious rising waveform or falling waveform features.
[0193] In step S36 , the abnormal sequence may be, for example, a descending waveform (as shown in FIG. 4A ), an ascending waveform (as shown in FIG. 4B ), or an oscillating waveform (as shown in FIG. 4C ).
[0194] Judging whether there are one or more abnormal sequences in the data to be diagnosed based on the sliding mean upper threshold, the sliding mean lower threshold, and the standard deviation threshold may include:
[0195] Construct multiple target subsequences based on the data to be diagnosed and the sliding window;
[0196] For each target subsequence, perform the following operations:
[0197] Determine whether the mean of the target subsequence is less than the upper sliding mean threshold; if so, determine whether the mean of the next target subsequence adjacent to the target subsequence is less than the upper sliding mean threshold; if so, continue to determine whether the mean of the next target subsequence adjacent to the next target subsequence is less than the upper sliding mean threshold, and so on, until a target subsequence whose mean is greater than or equal to the upper sliding mean threshold is determined; the data corresponding to the target subsequence, the data corresponding to the target subsequence after the target subsequence whose mean is less than the upper sliding mean threshold, and the data between the data corresponding to the target subsequence and the data corresponding to the target subsequence after the target subsequence whose mean is less than the upper sliding mean threshold constitute an abnormal sequence.
[0198] For each target subsequence, you can also perform the following operations:
[0199] Determine whether the mean of the target subsequence is greater than the lower sliding mean threshold; if so, determine whether the mean of the next target subsequence adjacent to the target subsequence is greater than the lower sliding mean threshold; if so, continue to determine whether the mean of the next target subsequence adjacent to the next target subsequence is greater than the lower sliding mean threshold, and so on, until a subsequence whose mean is less than or equal to the lower sliding mean threshold is determined; the data corresponding to the target subsequence, the data corresponding to the subsequence after the target subsequence whose mean is greater than the lower sliding mean threshold, and the data between the data corresponding to the target subsequence and the data corresponding to the target subsequence after the target subsequence whose mean is greater than the lower sliding mean threshold constitute an abnormal sequence.
[0200] For each target subsequence, you can also perform the following operations:
[0201] Determine whether the standard deviation of the target subsequence is greater than the standard deviation threshold; if so, determine whether the standard deviation of the next target subsequence adjacent to the target subsequence is greater than the standard deviation threshold; if so, continue to determine whether the standard deviation of the next target subsequence adjacent to the next target subsequence is greater than the standard deviation threshold, and so on, until a subsequence whose standard deviation is less than or equal to the standard deviation threshold is determined; the data corresponding to the target subsequence, the data corresponding to the target subsequence after the target subsequence whose standard deviation is greater than the standard deviation threshold, and the data between the data corresponding to the target subsequence and the data corresponding to the target subsequence after the target subsequence whose standard deviation is greater than the standard deviation threshold constitute an abnormal sequence.
[0202] The embodiment of the present application uses an abnormal sequence interception scheme that integrates the sliding mean and the sliding standard deviation to more efficiently determine whether a fault has occurred.
[0203] In step S36, since multiple abnormal sequences may belong to the same fault occurrence time period, it is necessary to merge multiple sub-intervals with similar time (i.e., time intervals within a preset range) or overlapping time periods into a large time interval. The merging method is as follows:
[0204] Sort all subintervals of the abnormal sequence in ascending order according to their start time.
[0205] For two adjacent subintervals (t1, t2), (t3, t4), if t3-t2 <t ω (where t ω The minimum time interval for merging intervals is the preset value, and the training result in the subject is 60 seconds), then the two intervals are merged into a new interval (t1, max(t2, t4)).
[0206] Compare the merged new interval with the next interval until all sub-intervals are traversed.
[0207] The merged time interval is considered to be the time period when the fault occurred.
[0208] The embodiment of the present disclosure combines time windows by merging subsequences to obtain a more accurate fault occurrence time.
[0209] In step S37, when it is determined that one or more abnormal sequences exist, a feature vector of the abnormal sequence may be constructed based on the statistical characteristics of each abnormal sequence; and the fault type corresponding to the abnormal sequence may be determined based on the feature vector and a preset fault classification model.
[0210] In one example, the preset fault classification model includes multiple classification models;
[0211] Determining the fault type corresponding to the abnormal sequence according to the feature vector and a preset fault classification model includes:
[0212] According to the classification results of each classification model, the fault type is determined through a voting mechanism.
[0213] The disclosed embodiment, based on the eigenvectors of statistical indicators, solves the high-dimensionality and computational complexity of traditional time series classification methods, significantly improving computational efficiency. Furthermore, a method based on multiple base classifiers for initial classification and then voting for the final classification result achieves even better classification results.
[0214] In step S38, the fault cause of each abnormal sequence is determined according to the marked template sequence as follows: Steps S381-S382:
[0215] S381, calculating the similarity between each abnormal sequence and the template sequence according to the modified DTW algorithm;
[0216] S382: Determine the cause of the fault corresponding to the abnormal sequence according to the similarity.
[0217] In time series, the lengths of two time series that need to be compared for similarity may not be equal, such as the different speaking speeds of different people in the field of speech recognition. Dynamic Time Warping (DTW) is a method to measure the similarity of two time series of different lengths. DTW can calculate the similarity of two time series, and is particularly suitable for time series of different lengths and rhythms. DTW will automatically warp the time series (i.e., perform local scaling on the time axis) so that the morphology of the two sequences is as consistent as possible, obtaining the maximum possible similarity. The pseudo code of the DTW algorithm is described as follows:
[0218] Input: Sequence S1 and sequence S2, length m and n respectively
[0219] Output: The distance between S1 and S2 (the smaller the distance, the more similar)
[0220] Initialize the matrix D[m+1][n+1], where D[i][j] represents the distance between the first i characters of S1 and the first j characters of S2.
[0221] Returns D[m][n] as the distance between the two sequences.
[0222] dist(i,j) is the distance function between S1[i] and S2[j]. For numerical sequences, dist(i,j) can be defined as the absolute value of the difference between S1[i] and S2[j].
[0223] The characteristic of DTW that distorts (scales) the time series will cause the perception data monitoring sequence to be scaled, thereby violating the actual physical meaning of the sequence and changing the information in the time dimension, affecting the rationality of the analysis results. In this application, the DTW scheme is adjusted. When performing similarity calculations, the sequence to be analyzed can be translated back and forth so that the sequence to be analyzed is aligned with the template sequence as much as possible, but the sequence is not distorted, that is, the points of the sequence to be analyzed must correspond one to one with the points of the template sequence, and there is no one-to-many situation. Based on the adjusted DTW scheme, sequence similarity calculation is performed.
[0224] The pseudo code of the DTW algorithm after adjustment in this application is described as follows:
[0225] Input: sequence S1 and sequence S2, lengths m and n respectively;
[0226] Output: The distance between S1 and S2 (the smaller the distance, the more similar) D;
[0227] In step S381, calculating the similarity between each abnormal sequence and the preset template sequence according to the modified DTW algorithm may include:
[0228] For each abnormal sequence, when the length of the abnormal sequence is equal to the length of the template sequence, determining the similarity between the abnormal sequence and the template sequence based on a first cumulative sum; wherein the first cumulative sum is the sum of the absolute values of the differences between the elements with the same sequence number in the abnormal sequence and the template sequence;
[0229] When the length of the abnormal sequence is greater than the length of the template sequence, the sum of the A0 and A1 sequences is accumulated. N-1 The cumulative sum is used to determine the similarity between the abnormal sequence and the template sequence; wherein the A0 cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with the same sequence number in the template sequence; the A1 cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of 1 in the template sequence; the A2 cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of 2 in the template sequence; and the A N-1 The cumulative sum is the sum of the absolute values of the differences between the elements in the abnormal sequence and the template sequence whose sequence numbers differ by N-1; N is the difference between the length of the abnormal sequence and the length of the template sequence, N>0;
[0230] When the length of the abnormal sequence is less than the length of the template sequence, the sum of the B0th and Bth sequences is accumulated. M-1The similarity between the abnormal sequence and the template sequence is determined by cumulative sum; wherein, the B0th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with the same sequence number in the template sequence; the B1th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of -1 in the template sequence; the B2th cumulative sum is the sum of the absolute values of the differences between the abnormal sequence and the elements with a sequence number difference of -2 in the template sequence; the B M-1 The cumulative sum is the sum of the absolute values of the differences between the elements in the abnormal sequence and the template sequence whose sequence numbers differ by -M+1; M is the difference between the length of the abnormal sequence and the length of the template sequence, and M>0.
[0231] The sum of A0 is added to A N-1 The cumulative sum refers to the cumulative sum of A0, A1, A2, ... A N-1 Cumulative sum.
[0232] The sum of B0 is added to B M-1 The cumulative sum refers to the cumulative sum of B0, B1, B2, and so on. M-1 Cumulative sum.
[0233] According to the accumulation of A0 to A N-1 The similarity between the abnormal sequence and the template sequence is determined by accumulating and summing, including:
[0234] Add the sum of A0 to A N-1 The minimum cumulative sum in the cumulative sums is used as the distance between the abnormal sequence and the template sequence. The smaller the distance, the higher the similarity.
[0235] According to the accumulation of B0 to B M-1 The similarity between the abnormal sequence and the template sequence is determined by accumulating and summing, including:
[0236] Add the sum of B0 to B M-1 The minimum cumulative sum in the cumulative sums is used as the distance between the abnormal sequence and the template sequence. The smaller the distance, the higher the similarity.
[0237] In step S382, the fault cause corresponding to the template sequence with the highest similarity is selected as the cause of the abnormal sequence fault.
[0238] The embodiment of the present disclosure modifies the DTW algorithm, retains the time attribute while calculating the sequence similarity, and has a better similarity matching effect.
[0239] In step S39, the type and cause of the fault analyzed in steps S37 and S38 can be pushed to the corresponding user with the help of the message alarm function of the Internet of Things platform.
[0240] According to the method of the embodiment of the present disclosure, regardless of whether the IoT device is high-power or low-power, and whether the communication function is strong or weak, it is possible to detect device faults and analyze the type of device faults. Moreover, these faults can be centrally displayed and managed on the management interface of the IoT platform, greatly increasing the adaptability and usability of the IoT platform.
[0241] For example, based on the waveform oscillation detection method of the embodiment of the present disclosure, it is possible to detect image quality anomalies of screen devices such as LED, OLED, and LCD; or it can be used for communication sensors, medical devices that occasionally dial, smart homes, and some miniaturized devices.
[0242] According to the method of the embodiment of the present disclosure, fault diagnosis and analysis can be performed on equipment in scenarios such as smart homes, smart cities, smart transportation, smart grids, smart buildings, smart agriculture, smart healthcare, environmental monitoring, smart manufacturing, and smart security.
[0243] The present disclosure provides a device for diagnosing equipment faults, including a memory and a processor.
[0244] The memory is used to store a program for equipment fault diagnosis;
[0245] The processor is used to read and execute the program for equipment fault diagnosis and perform the above-mentioned equipment fault diagnosis method.
[0246] The present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to enable the computer to execute the above-mentioned device fault diagnosis method.
[0247] The drawings in this disclosure only relate to the structures involved in this disclosure, and other structures may refer to general designs. In the absence of conflict, the embodiments of this disclosure and the features in the embodiments may be combined with each other to obtain new embodiments.
[0248] It should be understood by those skilled in the art that the technical solutions of the present disclosure may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present disclosure, and all should be included in the scope of the claims of the present disclosure.
Claims
1. A device fault diagnosis method, comprising: Obtain the diagnostic data of the target device; Determining whether there are one or more abnormal sequences in the data to be diagnosed; When it is determined that there are one or more abnormal sequences, a feature vector of the abnormal sequence is constructed according to the statistical characteristics of each abnormal sequence; and the fault type corresponding to the abnormal sequence is determined according to the feature vector and a preset fault classification model.
2. The device fault diagnosis method according to claim 1, wherein: Determining whether there are one or more abnormal sequences in the data to be diagnosed includes: Constructing a plurality of target subsequences according to the to-be-diagnosed data and a preset sliding window; Whether there is an abnormal sequence in the data to be diagnosed is determined according to the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence.
3. The device fault diagnosis method according to claim 2, wherein: Judging whether there is an abnormal sequence in the data to be diagnosed according to the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence includes: For each chronologically ordered target subsequence, perform the following operations: When it is determined that the mean of a target subsequence is less than the preset sliding mean upper limit threshold, the target subsequence is taken as a starting abnormal sequence, and whether the means of subordinate target subsequences of the starting abnormal sequence are less than the preset sliding mean upper limit threshold is determined in sequence, until it is determined that the mean of the target subsequence is greater than or equal to the preset sliding mean upper limit threshold, and the last target subsequence whose mean is less than the preset sliding mean upper limit threshold is taken as an ending abnormal sequence; the data corresponding to the starting abnormal sequence, the data corresponding to the ending abnormal sequence, and the data corresponding to all target subsequences between the starting abnormal sequence and the ending abnormal sequence constitute an abnormal sequence.
4. The device fault diagnosis method according to claim 2, wherein: Judging whether there is an abnormal sequence in the data to be diagnosed according to the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence includes: For each chronologically ordered target subsequence, perform the following operations: When it is determined that the mean of a target subsequence is greater than the preset sliding mean lower limit threshold, the target subsequence is taken as a starting abnormal sequence, and whether the means of subordinate target subsequences of the starting abnormal sequence are greater than the preset sliding mean lower limit threshold is determined in sequence, until a target subsequence whose mean is less than or equal to the preset sliding mean lower limit threshold is determined, and the last target subsequence whose mean is less than the preset sliding mean lower limit threshold is taken as an ending abnormal sequence; the data corresponding to the starting abnormal sequence, the data corresponding to the ending abnormal sequence, and the data corresponding to all target subsequences between the starting abnormal sequence and the ending abnormal sequence constitute an abnormal sequence.
5. The device fault diagnosis method according to claim 2, wherein: Judging whether there is an abnormal sequence in the data to be diagnosed according to the mean, standard deviation, preset sliding mean lower limit threshold, preset sliding mean upper limit threshold, and preset standard deviation threshold of each target subsequence includes: For each chronologically ordered target subsequence, perform the following operations: When it is determined that the standard deviation of a target subsequence is greater than the preset standard deviation threshold, the target subsequence is taken as a starting abnormal sequence, and it is determined in sequence whether the standard deviation of subordinate target subsequences of the starting abnormal sequence is greater than the preset standard deviation threshold, until it is determined that a target subsequence whose standard deviation is less than or equal to the preset standard deviation threshold is found, and the last target subsequence whose standard deviation is greater than the preset standard deviation threshold is taken as an ending abnormal sequence, and the data corresponding to the starting abnormal sequence, the data corresponding to the ending abnormal sequence, and the data corresponding to all target subsequences between the starting abnormal sequence and the ending abnormal sequence constitute an abnormal sequence.
6. The device fault diagnosis method according to any one of claims 3 to 5, further comprising: Merge the abnormal sequences whose time intervals are within a preset range; Alternatively, merge the anomaly sequences whose time periods overlap.
7. The device fault diagnosis method according to claim 1, wherein: The preset fault classification model includes multiple classification models; Determining the fault type corresponding to the abnormal sequence according to the feature vector and a preset fault classification model includes: According to the classification results of each classification model, the fault type is determined through a voting mechanism.
8. The device fault diagnosis method according to claim 1, further comprising: The similarity between each abnormal sequence and the preset template sequence is calculated according to the modified DTW algorithm, and the fault cause corresponding to the abnormal sequence is determined according to the similarity; wherein the preset template sequence is a sequence constructed according to the abnormal data and the preset sliding window and annotated with the fault cause.
9. The device fault diagnosis method according to claim 8, wherein: The similarity between each abnormal sequence and the preset template sequence is calculated according to the modified DTW algorithm, including: For each abnormal sequence, when the length of the abnormal sequence is equal to the length of the preset template sequence, the similarity between the abnormal sequence and the preset template sequence is determined according to a first cumulative sum; wherein the first cumulative sum is the sum of the absolute values of the differences between the elements with the same sequence number in the abnormal sequence and the preset template sequence; When the length of the abnormal sequence is greater than the length of the preset template sequence, according to all A a-1 The similarity between the abnormal sequence and the preset template sequence is determined by accumulating and summing; wherein A a-1 The cumulative sum refers to the sum of the absolute values of the differences between the abnormal sequence and the elements in the preset template sequence whose sequence numbers differ by a-1; 1≤a≤N, N is the difference between the length of the abnormal sequence and the length of the preset template sequence, and a and N are both positive integers; When the length of the abnormal sequence is less than the length of the preset template sequence, according to all B b-1 The similarity between the abnormal sequence and the preset template sequence is determined by accumulating and summing; wherein, B b-1 The cumulative sum refers to the sum of the absolute values of the differences between the elements in the abnormal sequence and the preset template sequence whose sequence numbers differ by -b+1; 1≤b≤M, M is the difference between the length of the abnormal sequence and the length of the preset template sequence, and b and M are both positive integers.
10. The device fault diagnosis method according to claim 1, wherein: Constructing multiple target subsequences according to the data to be diagnosed and a preset sliding window, including: For each data in the to-be-diagnosed data, the data in the preset sliding window headed by the data is taken as a target subsequence.
11. The device fault diagnosis method according to claim 2, comprising: The preset sliding mean upper limit threshold, the preset sliding mean lower limit threshold, and the preset standard deviation threshold are obtained as follows: Acquire first normal data and first abnormal data of a target device; Calculate the first sequence mean and first sequence standard deviation of each first subsequence; The sequence is a sequence constructed according to the first normal data and a preset sliding window; Calculating a second sequence mean and a second sequence standard deviation of each second subsequence; wherein the second subsequence is a sequence constructed according to the first abnormal data and a preset sliding window; Determine a preset sliding mean lower limit threshold according to the largest first sequence mean and the smallest second sequence mean; Determine a preset sliding mean upper limit threshold value according to the smallest first sequence mean and the largest second sequence mean; The preset standard deviation threshold is determined according to the largest first sequence standard deviation and the smallest second sequence standard deviation.
12. The device fault diagnosis method according to claim 11, wherein: The preset fault classification model is obtained as follows: Marking the fault type according to the first abnormal data; Training and verifying a preset original classification model according to the annotated first abnormal data; The trained and verified classification model is used as the preset fault classification model.
13. The device fault diagnosis method according to claim 12, wherein: Marking the fault type according to the first abnormal data includes: Constructing multiple subsequences according to the first abnormal data and a preset sliding window; determining the statistical characteristics of each subsequence; constructing a feature vector of each subsequence according to the statistical characteristics of each subsequence; and marking the fault type on the feature vector of each subsequence.
14. The device fault diagnosis method according to claim 1 or 13, wherein: The statistical characteristics include the mean, standard deviation, range, coefficient of variation, autocorrelation system, kurtosis and skewness of the abnormal sequence.
15. A device for diagnosing equipment faults, comprising a memory and a processor, wherein: The memory is used to store a program for equipment fault diagnosis; The processor is used to read and execute the program for equipment fault diagnosis, and execute the method according to any one of claims 1 to 14.
16. A computer-readable storage medium storing computer-executable instructions, wherein: The computer executable instructions are used to cause the computer to execute the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
A fault classification and diagnosis method based on feature variable weighting
CN109376778A
Industrial production process fault diagnosis method based on data driving
CN109657945A
Intelligent diagnosis method and device for abnormal working state of spindle system of machining center
CN109857079A
Electric power communication fault analysis method and device, terminal equipment and medium
CN114692758A
System for diagnosing machine failure on basis of advanced deep temporal clustering model
WO2022186461A1
Cited By
Crane fault diagnosis method, system and equipment based on data mining and medium
CN119720050A
Crane fault diagnosis method, system, equipment and medium based on data mining
CN119720050B
Fault online diagnosis method, device and system for electrical equipment
CN119916117A
High-speed data transmission test method and system in satellite remote sensing
CN120074645A
Power transmission line fault fusion distance measurement method and device
CN120085114A