Fault diagnosis method and device, electronic equipment and storage medium
By obtaining the operating characteristic data of HVAC equipment, calculating the difference value sequence and combining feedback from expert terminals, the fault diagnosis model is optimized, and the problem of insufficient accuracy and generalization capabilities of HVAC equipment fault diagnosis is solved, and the rapid identification and accurate diagnosis of new faults are achieved.
Patent Information
- Application Number
- CN202510571088.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-25
AI Technical Summary
The HVAC fault diagnosis results are inaccurate and have poor generalization capabilities, so the machine learning model cannot effectively deal with new fault types.
By obtaining the operating characteristic data of HVAC equipment, calculate the difference sequence of normal periods and fault periods, use the fault diagnosis model to identify the target fault type, and feedback the difference sequence to the expert terminal to obtain diagnostic suggestions, update the fault type set, and combine expert diagnosis and online learning optimization model.
Real-time fault monitoring and accurate identification of HVAC equipment is realized, the accuracy and generalization of fault diagnosis are improved, and the ability to adapt to new or unknown fault modes are improved.
Smart Images

Figure CN120368438A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and particularly relates to a fault diagnosis method, device, electronic device, and storage medium. Background Art
[0002] HVAC equipment may experience various faults during long-term operation. For example, refrigerant leakage, compressor failure, fan damage, etc. The faults of HVAC equipment will directly affect energy utilization efficiency, production efficiency, and the health and safety of personnel.
[0003] In related technologies, machine learning methods are usually relied on to identify the fault modes corresponding to HVAC equipment. However, the machine learning approach usually requires a large amount of training based on historical data. When encountering new fault types, the machine learning model cannot effectively generalize, resulting in inaccurate fault diagnosis results. Summary of the Invention
[0004] In view of the above problems, this application provides a fault diagnosis method, device, electronic device, and storage medium to at least solve the technical problems of inaccurate fault diagnosis results and poor fault diagnosis generalization ability in related technologies for HVAC equipment.
[0005] According to the first aspect of the embodiments of this application, a fault diagnosis method is provided, including: obtaining operation characteristic data of HVAC equipment, where the operation characteristic data includes normal period data and fault period data; determining that the difference sequence between the normal period data and the fault period data does not deviate from the fault feature distribution corresponding to the fault type set, and obtaining the target fault type corresponding to the fault period data from the fault type set based on a fault diagnosis model; determining that the difference sequence deviates from the fault feature distribution, and feeding back the difference sequence to a preset expert terminal; based on the diagnosis suggestion fed back by the preset expert terminal for the difference sequence, determining the diagnosed fault type corresponding to the fault period data, and updating the fault type set based on the diagnosed fault type.
[0006] According to a second aspect of the embodiments of the present application, a fault diagnosis device is provided, including: a first acquisition unit that acquires operation characteristic data of a heating, ventilation, and air conditioning (HVAC) device, where the operation characteristic data includes normal period data and fault period data; a first determination unit that determines that a difference sequence between the normal period data and the fault period data does not deviate from a fault characteristic distribution corresponding to a fault type set, and acquires a target fault type corresponding to the fault period data from the fault type set based on a fault diagnosis model; a second determination unit that determines that the difference sequence deviates from the fault characteristic distribution, and feeds back the difference sequence to a preset expert terminal; based on a diagnosis suggestion fed back by the preset expert terminal for the difference sequence, determines a diagnosed fault type corresponding to the fault period data, and updates the fault type set based on the diagnosed fault type.
[0007] According to a third aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the fault diagnosis method of the first aspect through the computer program.
[0008] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, where the computer program is configured to execute the fault diagnosis method of the first aspect when running.
[0009] In the embodiments of the present application, by acquiring operation characteristic data of a heating, ventilation, and air conditioning (HVAC) device, where the operation characteristic data includes normal period data and fault period data; determining that a difference sequence between the normal period data and the fault period data does not deviate from a fault characteristic distribution corresponding to a fault type set, and acquiring a target fault type corresponding to the fault period data from the fault type set based on a fault diagnosis model; determining that the difference sequence deviates from the fault characteristic distribution, and feeding back the difference sequence to a preset expert terminal; based on a diagnosis suggestion fed back by the preset expert terminal for the difference sequence, determining a diagnosed fault type corresponding to the fault period data, and updating the fault type set based on the diagnosed fault type, the present application can monitor the operation state of the device in real time and quickly identify fault data. When a new or unknown fault type is found, through expert diagnosis and online learning, it can quickly feedback and update the fault diagnosis model. This can not only improve the accuracy and generalization ability of the results of the fault diagnosis of the heating, ventilation, and air conditioning (HVAC) device, but also enhance the system's ability to identify new fault modes, significantly improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present application. Moreover, in all the drawings, the same reference numerals are used to denote the same components. In the drawings:
[0011] Figure 1 is a schematic diagram of an application environment of an optional fault diagnosis method according to an embodiment of the present application;
[0012] Figure 2 is a schematic flowchart of an optional fault diagnosis method according to an embodiment of the present application;
[0013] Figure 3 is a schematic structural diagram of a fault diagnosis system provided by an embodiment of the present application;
[0014] Figure 4 is a schematic flowchart of another optional fault diagnosis method according to an embodiment of the present application;
[0015] Figure 5 is a schematic flowchart of another optional fault diagnosis method according to an embodiment of the present application;
[0016] Figure 6 is a schematic flowchart of another optional fault diagnosis method according to an embodiment of the present application;
[0017] Figure 7 is a schematic flowchart of another optional fault diagnosis method according to an embodiment of the present application;
[0018] Figure 8 is a schematic flowchart of another optional fault diagnosis method according to an embodiment of the present application;
[0019] Figure 9 is a schematic flowchart of another optional fault diagnosis method according to an embodiment of the present application;
[0020] Figure 10 is a schematic structural diagram of a fault diagnosis device provided by an embodiment of the present application;
[0021] Figure 11 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed Embodiments
[0022] To enable those skilled in the art to better understand the solution of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0024] Optionally, according to one aspect of the embodiments of the present application, a fault diagnosis method is provided. As an alternative implementation, the above-mentioned fault diagnosis method can be but is not limited to being applied to, for example, Figure 1In the application environment shown. The application environment may include, but is not limited to: a fault diagnosis device 102 for human-computer interaction with a user, a network 116, and an expert terminal 110. The above-mentioned fault diagnosis device 102 includes a memory 104, a processor 106, and a display 108. The memory 104 is used to store the operation characteristic data of the HVAC equipment. The processor 106 is used to obtain the operation characteristic data of the HVAC equipment, and the operation characteristic data includes normal period data and fault period data; determine that the difference sequence between the normal period data and the fault period data does not deviate from the fault characteristic distribution corresponding to the fault type set, and obtain the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model; determine that the difference sequence deviates from the fault characteristic distribution, and feedback the difference sequence to the expert terminal 110; determine the diagnosed fault type corresponding to the fault period data based on the diagnosis suggestion feedback by the expert terminal 110 for the difference sequence, and update the fault type set based on the diagnosed fault type. The display 108 is used to display the target fault type. In addition, the expert terminal 110 includes a memory 112, a processor 114, and a display 118. The memory 112 is used to store information such as the difference sequence that deviates from the fault characteristic distribution. The processor 114 is used to receive the difference sequence that deviates from the fault characteristic distribution sent by the fault diagnosis device 102, and feedback a diagnosis suggestion for the difference sequence to the fault diagnosis device 102. The display 118 is used to display information such as the difference sequence that deviates from the fault characteristic distribution.
[0025] Optionally, the above-mentioned network 116 may include, but is not limited to: a wired network, a wireless network. Among them, the wired network includes: a local area network, a metropolitan area network, and a wide area network. The wireless network includes: Bluetooth, WIFI, and other networks that implement wireless communication. The above-mentioned fault diagnosis device 102 and expert terminal 110 include, but are not limited to, terminals such as mobile phones, set-top boxes, televisions, tablet computers, laptop computers, PCs, in-vehicle electronic devices, and wearable devices. The above is only an example, and this embodiment does not make any limitation thereto.
[0026] In the related art, machine learning methods are usually relied on to identify the fault modes corresponding to HVAC equipment. However, using the machine learning method usually requires a large amount of training based on historical data. When encountering new fault types, the machine learning model cannot be effectively generalized, resulting in inaccurate fault diagnosis results.
[0027] To solve the above technical problems, as an optional implementation manner, as Figure 2 shown, an embodiment of the present application provides a fault diagnosis method, including:
[0028] S202, obtain the operation characteristic data of the HVAC equipment, where the operation characteristic data includes normal period data and fault period data.
[0029] Specifically, in the embodiments of the present application, the above-mentioned operation characteristic data includes equipment parameter data, operation status, environmental data, energy consumption data, etc. The equipment parameter data includes, for example, temperature data, pressure data, air flow rate, water flow rate, and humidity data, etc. The operation status data includes, for example, the start / stop status of the equipment, operation mode, load rate, etc. The embodiments of the present application can obtain the above-mentioned operation characteristic data in real time or periodically based on sensors. The operation characteristic data includes normal period data corresponding to the normal operation of the HVAC equipment, and fault period data corresponding to the fault occurrence process.
[0030] In an example, for example, data is collected every time interval T based on sensors. According to the current equipment type y, the collected data set x and the current timestamp information are stored in the corresponding local storage unit together, and finally a time-series data sequence D=(t1,x1),(t2,x2),…,(t n ,x n ) is formed; when the data storage reaches the maximum period T_max, the expired data is automatically deleted to release the storage space.
[0031] S204. Determine that the difference sequence between the normal period data and the fault period data does not deviate from the fault feature distribution corresponding to the fault type set, and obtain the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model.
[0032] Specifically, in the embodiments of the present application, it includes but is not limited to using a sliding window and a nearest neighbor search algorithm to identify the normal data closest to the current fault data from the collected operation characteristic data. And calculate the difference sequence between the normal data and the fault data, and perform a preliminary analysis through an anomaly detection algorithm to determine whether the current fault type conforms to the known fault data distribution. If it conforms to the known distribution, enter the classification process, and select the corresponding fault classifier cluster according to the data characteristics corresponding to the difference sequence to obtain the target fault type corresponding to the fault period data from the fault type set.
[0033] S206. Determine that the difference sequence deviates from the fault feature distribution, and feedback the difference sequence to the preset expert terminal; based on the diagnostic advice feedback by the preset expert terminal for the difference sequence, determine the diagnostic fault type corresponding to the fault period data, and update the fault type set based on the diagnostic fault type.
[0034] Specifically, in the embodiments of the present application, if the fault type does not conform to the known fault data distribution, the data is fed back to the expert terminal for further diagnosis, making full use of the expert's professional knowledge to handle unknown or abnormal fault situations, and making up for the limitations that may exist in relying solely on a simple diagnostic model. And data augmentation techniques are used to generate a new training sample set. Data augmentation techniques can generate more diverse data samples by performing reasonable transformations, perturbations, etc. on the original data, such as adding noise, changing operating condition parameters, etc., enriching the diversity and complexity of the data set to better cover various possible fault modes. The expert puts forward diagnostic suggestions based on their actual experience on the fed-back data, and these suggestions will be incorporated as important information into the update process of the fault diagnosis model. This not only enables the model to learn the expert's professional knowledge and experience, but also enhances the model's ability to identify and diagnose new fault modes. Through online learning, the fault diagnosis model can learn new knowledge in real-time or near real-time during the operation of the device, continuously optimizing its own performance, so as to ensure that it can adapt to the changing working environment and newly emerging fault types, and maintain accurate and efficient fault diagnosis capabilities.
[0035] In the embodiments of the present application, by obtaining the operation characteristic data of the HVAC equipment, the operation characteristic data includes normal period data and fault period data; determining that the difference sequence between the normal period data and the fault period data deviates from the fault characteristic distribution corresponding to the fault type set, obtaining the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model; determining that the difference sequence does not deviate from the fault characteristic distribution, feeding back the difference sequence to a preset expert terminal; based on the diagnostic suggestions fed back by the preset expert terminal for the difference sequence, determining the diagnostic fault type corresponding to the fault period data, and updating the fault type set based on the diagnostic fault type, the present application can monitor the device operation state in real-time and quickly identify fault data. When a new or unknown fault type is found, it can quickly feedback and update the fault diagnosis model through expert diagnosis and online learning, which can not only improve the accuracy and generalization ability of the HVAC equipment fault diagnosis result, but also enhance the system's ability to identify new fault modes, significantly improving the user experience.
[0036] In one or more embodiments, the obtaining the operation characteristic data of the HVAC equipment includes: periodically obtaining the operation characteristic data corresponding to the HVAC equipment at a preset time interval.
[0037] Specifically, the sensor is used to collect data every time T (preset time interval), and according to the current device type y, the data set x corresponding to the collected operation characteristic data and the current timestamp information are stored in the corresponding local storage unit together, and finally a time-sequenced data sequence D=(t1,x1),(t2,x2),…,(tn , x n ).
[0038] The fault diagnosis method further includes:
[0039] Determine a fault sliding window corresponding to the fault period data, and obtain a first feature vector corresponding to the time series data within the fault sliding window;
[0040] Determine a second feature vector that is closest to the first feature vector, where the second feature vector is a feature vector corresponding to the time series data within any sliding window when the HVAC equipment is operating normally;
[0041] Determine the difference sequence between the first feature vector and the second feature vector as the difference sequence between the normal period data and the fault period data.
[0042] Specifically, in the embodiments of the present application, for the operation characteristic data of the HVAC equipment, set the sliding window size W, the sliding distance S of the sliding window, and each sliding window contains data within the past time ST; assume that the current sliding window contains fault period data, and process the data D within each sliding window i to convert it into a feature vector (first feature vector); use the Euclidean distance to measure the distance metric between two periods, and evaluate the distance with the data in the normal period to screen out the normal period data D that is closest to the current sliding window ifeature , and save the current sliding window variable D inormal ; calculate the difference between the current sliding window and the normal period data respectively to form a difference sequence D ires = D ifeature - D inormal , and use an anomaly detection algorithm to detect whether D ires deviates from the distribution trained by the data corresponding to the existing fault types.
[0043] In one or more embodiments, the fault prediction method further includes: calculating the mean and standard deviation of the difference sequence, and determining a standard score corresponding to the difference sequence based on the mean and standard deviation;
[0044] When the standard score is greater than a preset threshold, determine that the difference sequence deviates from the fault feature distribution corresponding to the fault type set;
[0045] When the standard score is less than or equal to the preset threshold, determine that the difference sequence does not deviate from the fault feature distribution.
[0046] Specifically, in the implementation of the present application, use a statistics-based method to calculate the difference sequence D iresCalculate the mean μ and standard deviation σ, and obtain the Z-Score value corresponding to the difference sequence by calculating (x - μ) / σ; define the threshold If the Z-Score value exceeds then this value is considered an outlier, and it is determined that the difference sequence deviates from the fault feature distribution corresponding to the fault type set; if the Z-Score value does not exceed then it is determined that the difference sequence deviates from the fault feature distribution corresponding to the fault type set.
[0047] In one or more embodiments, obtaining the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model includes:
[0048] Call the fault diagnosis model to select a fault classifier to perform classification prediction on the difference sequence; each of the fault classifiers is a decision tree obtained by clustering the difference sequence and the fault type set as training samples to obtain fault clusters and training each of the fault clusters.
[0049] According to the confidence levels of the difference sequence belonging to each fault type in the prediction classification result, use the fault types with confidence levels greater than the preset confidence threshold as the target fault types.
[0050] Specifically, in the embodiments of the present application, for the existing set of fault types and fault data Fault, assume that f i represents the feature data of the i-th fault type, and y i represents its corresponding fault label, Falut = {(f1, y1), (f2, y2), (f3, y3), …, (f n , y n )}; then use the K-means clustering algorithm to cluster the feature distribution of the data set Fault, select the number of clusters K, and randomly initialize K cluster centers {μ1, μ2, …, μ K}, for each data point x i , calculate c i = argmin k ||x i - μ k || 2 , update the cluster centers until the condition is satisfied. Finally, form a fault cluster I, I = {p1, p2, …, p k}; for each cluster, which contains m fault categories, P k = (f k1 , y k1 ), (f k2 , y k2 ), …, (f km , ykm ),for each fault category f within each cluster ki , train a decision tree DT ki (fault classifier), where the positive samples are f ki , and the negative samples are other data within the cluster. Finally, according to the confidence of each fault type in the difference sequence belonging to it in the predicted classification result, the fault type with a confidence greater than the preset confidence threshold is used as the target fault type.
[0051] In one or more embodiments, the calling the fault diagnosis model to select a fault classifier to classify and predict the difference sequence includes:
[0052] Input the difference sequence into each decision tree, start traversing all nodes of the decision tree from the root node of each decision tree, and calculate the confidence of the difference sequence belonging to the leaf nodes of each decision tree; each leaf node corresponds to a fault type;
[0053] Take the obtained confidences as the predicted classification result.
[0054] Specifically, in the embodiment of the present application, input the difference sequence D ires into each decision tree, and calculate the confidence P(f ires |D i ) that its fault category belongs to f ki |D ires ). For each decision tree, for the input data D ires , the decision tree starts traversing from the root node, finds the corresponding leaf node L according to the feature splitting rule, and counts the number of samples of f i in each category in this node and the total number of samples N L , then initially obtain the confidence distribution based on the leaf node In another example, in order to adapt to subsequent incremental updates, a Laplace smoothing factor α can be introduced, then for the sample D ires in the path from the root node to the leaf node, each split node t will generate an information gain ΔG t , and the cumulative path information gain TotalGain can be expressed as TotalGain(D ires ) = ∑ t∈路径 ΔG t ;
[0055] Moreover, it is optimized through a regularization factor to finally obtain the confidence of this decision tree. The specific confidence can be expressed as Sort according to the obtained confidences, and obtain the top N categories {f1, f2, f3,..., f N} with the highest confidences as the fault candidate set (target fault type).
[0056] In one or more embodiments, updating the set of fault types based on the diagnosed fault type includes:
[0057] Obtain a fault data set composed of the diagnosed fault type and its corresponding fault data, and calculate the data center point corresponding to the fault data set;
[0058] Calculate the distances between the data center point and the center points of each of the fault clusters, and determine the fault cluster with the closest distance as the target fault cluster;
[0059] When the distance between the data center point and the center point of the target fault cluster is less than a preset distance, determine that the fault data set belongs to the target fault cluster;
[0060] When the distance between the data center point and the center point of the target fault cluster is greater than or equal to the preset distance, create an updated fault cluster based on the fault data set.
[0061] Specifically, in the embodiments of the present application, corresponding fault data and fault knowledge are obtained based on the expert diagnosis results, the fault data is extended using data augmentation techniques, the model is adapted to new fault modes through an online learning mechanism, and the knowledge graph is updated. Specifically, for the newly added fault data set (f new ,y new ) according to the expert diagnosis results, calculate the data center point of this data Calculate μ new to the distance d k of the center μ k =||μ new -μ k || 2 of each existing cluster center, and determine the closest cluster C k ; if d k <θ (preset distance), then it is considered that D new is assigned to the existing fault cluster C k , d k >θ, then it is considered that this newly added data belongs to a new distribution, and a new fault cluster c new is created.
[0062] In one or more embodiments, the fault prediction method further includes: for the target fault type and the diagnosed fault type, query the knowledge graph to obtain relevant fault background knowledge, where the fault background knowledge includes at least one of device structure, working principle, common fault modes and their causal relationships;
[0063] Generate a prompt word template based on the fault background knowledge, and use a preset large language model to generate a fault diagnosis report based on the prompt word template.
[0064] Specifically, in the embodiments of the present application, after determining the target fault type and the diagnosed fault type, it is necessary to query the knowledge graph to obtain relevant fault background knowledge. A knowledge graph is a structured knowledge base that contains information such as device structure, working principle, common fault modes and their causal relationships. By querying the knowledge graph, the following content can be obtained:
[0065] Device structure: Understanding the various components of the device and their interrelationships helps to determine the possible locations of faults.
[0066] Working principle: Mastering the principle of normal operation of the device can help analyze the abnormal performance of the device when a fault occurs.
[0067] Common fault modes: Referring to the common fault types of the device and their manifestation forms provides a reference for diagnosing the current fault.
[0068] Causal relationship: Understanding the causes and consequences of faults helps to deeply analyze the root causes of faults.
[0069] According to the obtained fault background knowledge, a framework for guiding the large language model to generate specific content is generated, including a prompt word template with key information and problem descriptions. Based on the preset large language model and the prompt word template, a detailed and accurate fault diagnosis report is generated.
[0070] Based on the above embodiments, in an application embodiment, as Figure 3 shown, the embodiments of the present application provide a large model fault diagnosis system for HVAC equipment assisted by data-driven and knowledge graph, including: a data acquisition module, a data analysis and anomaly detection module, an expert diagnosis and online learning module, a classifier diagnosis module, a knowledge graph module, and a large model diagnosis module;
[0071] The data acquisition module continuously collects operation characteristic data from the sensors of the running HVAC equipment;
[0072] The data analysis and anomaly detection module analyzes the collected data to detect the fault period data, and performs anomaly detection on this data to determine whether it conforms to the current existing data distribution. If the data is detected to deviate from the normal distribution, it is marked as abnormal data;
[0073] The expert diagnosis and online learning module feeds the abnormal data that does not conform to the current distribution back to human experts, manually identifies the abnormal patterns, and uses data augmentation technology to update the classifier to adapt to the new fault patterns;
[0074] The classifier module inputs the data into the classifier, and performs a more in-depth classification analysis in an integrated learning manner, and outputs the top several fault types with the highest confidence as the candidate set.
[0075] The knowledge graph module queries the background knowledge related to the candidate fault types from the knowledge graph, extracts the potential causes, solutions, and equipment maintenance suggestions of the faults, and combines the queried knowledge information with the fault data to form a prompt template;
[0076] The large model diagnosis module uses a large language model to reason based on the candidate fault types and relevant background knowledge, and finally generates a fault diagnosis report, providing the possible causes, handling suggestions, and subsequent operation steps of the faults.
[0077] Based on the above embodiments, in an application embodiment, the embodiment of the present application provides a fault diagnosis method for a heating, ventilation, and air conditioning (HVAC) device, including the following steps:
[0078] Step A: Periodically collect the operation characteristic data of the HVAC device based on sensors, and locally store the collected data;
[0079] Step B: Use a sliding window and a nearest neighbor search algorithm to identify the normal data closest to the current fault data from the real-time collected data. Calculate the difference between the normal data and the fault data, and conduct a preliminary analysis through an anomaly detection algorithm to determine whether the current fault type conforms to the known data distribution. If it conforms to the known distribution, enter the classification process and select a suitable classifier cluster according to the data characteristics; otherwise, enter the expert diagnosis process;
[0080] Step C: For the fault data that conforms to the current distribution, use ensemble learning for a more in-depth classification analysis, and output the top multiple fault types with the highest probabilities as the candidate set;
[0081] Step D: If the fault data does not conform to the current known distribution, feedback the data to an expert for further diagnosis, and use data augmentation technology to generate a new training sample set. The expert can put forward diagnostic suggestions based on actual experience and use the new data for online learning and updating of the ensemble learning classifier to ensure that the model can continuously adapt to new fault patterns;
[0082] Step E: Based on the obtained fault candidate set above, query the knowledge graph to obtain relevant fault background knowledge, including the equipment structure, working principle, common fault modes, and their causal relationships. Integrate this knowledge into the prompts of the large language model to provide support for subsequent fault cause analysis;
[0083] Step F: Generate a final fault diagnosis report using the prompt template containing the candidate fault types, abnormal data, and possible causes.
[0084] The present application takes an air conditioner as an example of the HVAC device for illustration:
[0085] Combined withFigure 4 and Figure 5 As shown in Figure 4 and Figure 5 , the above step A includes the following steps: Step A1: Use the sensor to collect data from the air conditioning equipment every time T (preset duration). According to the current equipment type y, store the collected data set x and the current timestamp information together in the corresponding local storage unit, and finally form a time-sequenced data sequence D = (t1, x1), (t2, x2), …, (t n , x n ).
[0086] Step A2: When the data storage reaches the maximum period T max , automatically delete the expired data to free up storage space.
[0087] Combined with and
[0087] , the above step B includes the following steps: Figure 4 and Figure 6 As shown in Figure 4 and Figure 6 , the above step B includes the following steps:
[0088] Step B1: For the operation characteristic data of the HVAC equipment, set the sliding window size W, the sliding distance S of the sliding window, and each sliding window contains the data within the past time ST;
[0089] Step B2: Assume that the current sliding window contains fault period data, process the data D within each sliding window i and convert it into a feature vector (the first feature vector);
[0090] Step B3: Use the Euclidean distance to measure the distance metric between two periods, and evaluate the distance with the data in the normal period to filter out the normal period data D ifeature that is closest to the current sliding window, and save the current sliding window variable D inormal ;
[0091] Step B4: Calculate the difference from the normal data to form a difference data sequence D ires = D ifeature - D inormal , use the anomaly detection algorithm to detect whether it deviates from the existing distribution, and make subsequent decisions;
[0092] Step B5: For D ires that conforms to the known distribution, enter the classification process, and for D ires that does not conform to the known distribution, enter the expert diagnosis process.
[0093] Combined with Figure 4 and Figure 7 , the above step C includes the following steps:
[0094] Step C1: Through the artificially constructed difference data sequence - fault type set, according to the distribution characteristics of the data, first use the clustering algorithm to cluster the faults. Each clustering result forms a fault cluster, and a set of classifiers is trained for each fault cluster;
[0095] Step C2: For D that conforms to the known distribution ires Select a suitable classifier for classification, and obtain the possible top N fault types in the order of predicted probability as the fault candidate set F.
[0096] Combine Figure 4 and Figure 8 As shown, the above step D includes the following steps:
[0097] Step D1: If the data does not conform to the current existing distribution, feed these abnormal data back to the domain expert for further analysis and diagnosis;
[0098] Step D2: Receive the diagnostic suggestions provided by the domain expert based on their experience and professional knowledge, and interpret the current abnormal data;
[0099] Step D3: Obtain the corresponding fault data and fault knowledge according to the expert diagnosis result, use the data augmentation technology to expand the fault data, make the model adapt to the new fault mode through the online learning mechanism, and update the knowledge graph.
[0100] Combine Figure 4 and Figure 9 As shown, the above step E includes the following steps:
[0101] Step E1: For the fault candidate set obtained in step C, construct a knowledge graph query statement to obtain the device structure, working principle, common fault modes, and causal relationships;
[0102] Step E2: Integrate this information and embed it as a natural language prompt into the system prompt words of the large model.
[0103] Preferably, the above step F includes the following steps:
[0104] Step F1: According to the designed prompt word template, combine the fault background knowledge obtained from the knowledge graph, the possible fault candidate set obtained in step C, and the difference sequence between the fault data and the normal data calculated in step B to construct a detailed prompt word;
[0105] Step F2: Use the prompt word to guide the large language model to generate the final fault diagnosis report.
[0106] Preferably, step B4 includes the following steps:
[0107] Step B401: Use a statistics-based method to calculate Dirs Calculate the mean value μ and the standard deviation σ, and calculate the Z-Score value by (x - μ) / σ;
[0108] Step B402: Define the threshold If this value exceeds then this value is considered an outlier and enter the expert diagnosis process.
[0109] Preferably, step C1 includes the following steps:
[0110] Step C101: For the existing set of fault types and fault data Fault, assume f i represents the characteristic data of the i-th type of fault, and y i represents its corresponding fault label, Falut = {(f1, y1), (f2, y2), (f3, y3), …, (f n , y n )};
[0111] Step C102: Then use the clustering algorithm K-means to cluster the characteristic distribution of the dataset Fault, select the number of clusters K, randomly initialize K cluster centers {μ1, μ2, …, μ K}, for each data point x i , calculate c i = argmin k ||x i - μ k || 2 , update the cluster center until the condition Finally, form a fault cluster I = {p1, p2, …, p k};
[0112] Step C103: For each cluster, which contains m fault categories, P k = (f k1 , y k1 ), (f k2 , y k2 ), …, (f km , y km ), for each fault category f ki within the cluster, train a decision tree DT ki , where the positive sample is f ki , and the negative samples are other data within the cluster.
[0113] Preferably, step C2 includes the following steps:
[0114] Step C201: Each decision tree calculates its belonging category as f ires according to the input D iConfidence P(f ki |D ires ), where for each tree, for the input data D ires , the decision tree traverses from the root node, finds the corresponding leaf node L according to the feature splitting rule, and counts the number of samples of f i in each category in this node and the total number of samples N L . Then, the confidence distribution based on the leaf node is initially obtained Considering the adaptation to subsequent incremental updates, the Laplace smoothing factor α is introduced. Then
[0115] Step C202: For the sample D ires In the path from the root node to the leaf node, each time the node t is split, an information gain ΔG t is generated. The cumulative information gain TotalGain of the path can be expressed as TotalGain(D ires ) = ∑ t∈路径 ΔG t ;
[0116] Step C203: At the same time, a regularization factor is introduced for optimization, and finally the confidence of the decision tree is obtained. The specific confidence can be expressed as
[0117] Step C204: Sort according to the confidence, and obtain the top N categories {f1, f2, f3,..., f N} with the highest confidence as the fault candidate set
[0118] Preferably, step D3 includes the following steps
[0119] Step D301: For the newly added fault data set (f new , y new ), calculate the data center point of this data
[0120] Step D302: Calculate the distance d new from μ k to each existing cluster center μ k = ||μ new - μ k || 2 , and determine the closest cluster C k ;
[0121] Step D303: If d k < θ (preset distance), it is considered that D new is assigned to the existing fault cluster C k , d kIf >θ, it is considered that the newly added data belongs to a new distribution, and a new fault cluster C is created new 。
[0122] This application includes two main stages: data processing and analysis stage and fault diagnosis stage. In order to make the results of fault diagnosis more accurate and reliable, this application adopts a method that combines data-driven and large models, combining the advantages of both; in order to effectively distinguish easily confused fault types, a clustering algorithm is first used to cluster them and define them as a cluster, and then the large model is used to make further decisions; in order to avoid the decline in inference efficiency caused by excessive input of prompt words in the large model, a method of classifying first and then inputting into the large model is adopted, effectively reducing the input information capacity.
[0123] According to another aspect of the embodiments of the present application, there is also provided a fault diagnosis device for implementing the above-mentioned fault diagnosis method, as Figure 10 shown, the device includes:
[0124] The first acquisition unit 1002 acquires the operation characteristic data of the HVAC equipment, and the operation characteristic data includes normal period data and fault period data;
[0125] The first determination unit 1004 is used to determine that the difference sequence between the normal period data and the fault period data deviates from the fault feature distribution corresponding to the fault type set, and obtain the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model;
[0126] The second determination unit 1006 is used to determine that the difference sequence does not deviate from the fault feature distribution, and feedback the difference sequence to a preset expert terminal; based on the diagnosis advice feedback by the preset expert terminal for the difference sequence, determine the diagnosis fault type corresponding to the fault period data, and update the fault type set based on the diagnosis fault type.
[0127] In the embodiments of the present application, by obtaining the operation characteristic data of the HVAC equipment, the operation characteristic data includes normal period data and fault period data; determining that the difference sequence between the normal period data and the fault period data deviates from the fault characteristic distribution corresponding to the fault type set, and obtaining the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model; determining that the difference sequence does not deviate from the fault characteristic distribution, and feeding back the difference sequence to the preset expert terminal; based on the diagnosis suggestions fed back by the preset expert terminal for the difference sequence, determining the diagnosed fault type corresponding to the fault period data, and updating the fault type set based on the diagnosed fault type. The present application can monitor the equipment operation state in real time and quickly identify the fault data. When a new or unknown fault type is found, it can quickly feedback and update the fault diagnosis model through expert diagnosis and online learning, which can not only improve the accuracy and generalization ability of the HVAC equipment fault diagnosis result, but also enhance the system's ability to identify new fault modes, significantly improving the user experience.
[0128] In one or more embodiments, the first obtaining unit 1002 includes: an obtaining module, configured to periodically obtain the operation characteristic data corresponding to the HVAC equipment at a preset time interval;
[0129] The fault diagnosis device further includes:
[0130] A second obtaining unit, configured to determine a fault sliding window corresponding to the fault period data, and obtain a first feature vector corresponding to the time series data within the fault sliding window;
[0131] A third determining unit, configured to determine a second feature vector that is closest to the first feature vector, where the second feature vector is a feature vector corresponding to the time series data within any sliding window during the normal operation of the HVAC equipment;
[0132] A fourth determining unit, configured to determine the difference sequence between the first feature vector and the second feature vector as the difference sequence between the normal period data and the fault period data.
[0133] In one or more embodiments, the fault diagnosis device further includes:
[0134] A calculation unit, configured to calculate the mean and standard deviation of the difference sequence, and determine a standard score corresponding to the difference sequence based on the mean and standard deviation;
[0135] A fifth determining unit, configured to determine that the difference sequence deviates from the fault characteristic distribution corresponding to the fault type set when the standard score is greater than a preset threshold;
[0136] A sixth determination unit, configured to determine that the difference sequence does not deviate from the fault feature distribution when the standard score is less than or equal to the preset threshold.
[0137] In one or more embodiments, the fault diagnosis device further includes:
[0138] A prediction unit, configured to call the fault diagnosis model to select a fault classifier to classify and predict the difference sequence; each of the fault classifiers is a decision tree obtained by clustering a difference sequence and a set of fault types as training samples to obtain a fault cluster and training each of the fault clusters.
[0139] A seventh determination unit, configured to use, as the target fault type, a fault type with a confidence level greater than a preset confidence threshold according to the confidence levels of the difference sequence belonging to each fault type in the prediction classification result.
[0140] In one or more embodiments, the prediction unit includes:
[0141] A traversal module, configured to input the difference sequence into each decision tree, traverse all nodes of the decision tree starting from the root node of each decision tree, and calculate the confidence level of the difference sequence belonging to the leaf node of each decision tree; each leaf node corresponds to a fault type.
[0142] A first determination module, configured to use the obtained confidence levels as the prediction classification result.
[0143] In one or more embodiments, the fault diagnosis device further includes:
[0144] An acquisition module, configured to acquire a fault data set composed of the diagnosed fault type and its corresponding fault data, and calculate a data center point corresponding to the fault data set.
[0145] A calculation module, configured to calculate the distance between the data center point and the center points of each of the fault clusters, and determine the fault cluster with the closest distance as the target fault cluster.
[0146] A second determination module, configured to determine that the fault data set belongs to the target fault cluster when the distance between the data center point and the center point of the target fault cluster is less than a preset distance.
[0147] An update module, configured to create and update a fault cluster based on the fault data set when the distance between the data center point and the center point of the target fault cluster is greater than or equal to the preset distance.
[0148] In one or more embodiments, the fault diagnosis device further includes:
[0149] A query unit for querying a knowledge graph to obtain relevant fault background knowledge for the target fault type and the diagnosed fault type, where the fault background knowledge includes at least one of equipment structure, working principle, common fault modes and their causal relationships;
[0150] A generation unit for generating a prompt word template based on the fault background knowledge, and using a preset large language model to generate a fault diagnosis report based on the prompt word template.
[0151] According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above-mentioned fault diagnosis method. The electronic device may be a fault diagnosis device as shown in Figure 1 or a terminal device or an expert terminal installed with a fault diagnosis client. In this embodiment, the electronic device is taken as an example of a fault diagnosis device and an expert terminal. Optionally, in this embodiment, the above-mentioned clothing processing device may access a computer network through a wired or wireless network, communicate with the terminal device, receive a control instruction from the terminal device, and execute corresponding operations according to the control instruction.
[0152] Optionally, the above-mentioned terminal device includes, but is not limited to, mobile phones, laptop computers, tablet computers, palm computers, MIDs (Mobile Internet Devices), desktop computers, smart TVs, etc. The fault diagnosis client in the embodiments of the present application includes, but is not limited to, clients that provide fault diagnosis services such as video clients, instant messaging clients, browser clients, and education clients. The above-mentioned network may include, but is not limited to: wired networks, wireless networks, where the wired network includes: local area networks, metropolitan area networks, and wide area networks, and the wireless network includes: Bluetooth, WIFI, and other networks that implement wireless communication.
[0153] As Figure 11 shown, the electronic device includes a memory 1102 and a processor 1104. A computer program is stored in the memory 1102, and the processor 1104 is configured to execute the steps in any one of the above method embodiments through the computer program.
[0154] Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through the computer program:
[0155] S1. Obtain operation characteristic data of the HVAC equipment, where the operation characteristic data includes normal period data and fault period data;
[0156] S2. Determine that the difference sequence between the normal period data and the fault period data does not deviate from the fault feature distribution corresponding to the fault type set, and obtain the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model;
[0157] S3. Determine that the difference sequence deviates from the fault feature distribution, and feedback the difference sequence to a preset expert terminal; based on the diagnostic advice feedback by the preset expert terminal for the difference sequence, determine the diagnostic fault type corresponding to the fault period data, and update the fault type set based on the diagnostic fault type.
[0158] Optionally, those of ordinary skill in the art can understand that Figure 11 the structure shown is only schematic Figure 11 and does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components (such as network interfaces, etc.) than those shown Figure 11 herein, or have a different configuration from that shown Figure 11 herein.
[0159] Among them, the memory 1102 can be used to store software programs and modules, such as the program instructions / modules corresponding to the live object detection method and device of the laundry treatment device in the embodiments of the present application. The processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, to implement the above-mentioned fault diagnosis method. The memory 1102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 1102 may further include a memory remotely disposed relative to the processor 1104, and these remote memories may be connected to the terminal device through a network. Examples of the above-mentioned network include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and their combinations. Among them, the memory 1102 may specifically but not limitedly be used to store the operation characteristic data and fault diagnosis results of the HVAC equipment. As an example, as Figure 11 shown, the above-mentioned memory 1102 may but not limitedly include the first acquisition unit 1002, the first determination unit 1004, and the second determination unit 1006 in the above-mentioned fault diagnosis device. In addition, it may also include but not limited to other module units in the above-mentioned fault diagnosis device, which will not be elaborated in this example.
[0160] Optionally, the above-mentioned transmission device 1106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable, so as to communicate with the Internet or a local area network. In one example, the transmission device 1106 is a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0161] In addition, the above-mentioned laundry treatment device further includes: a display 1108 for displaying the fault diagnosis result of the HVAC device; and a connection bus 1110 for connecting each module component in the above-mentioned electronic devices.
[0162] In one or more embodiments, the present application further provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned live object detection method of the laundry treatment device. Among them, the computer program is set to execute the steps in any one of the above method embodiments when running.
[0163] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may be set to store a computer program for executing the following steps:
[0164] S1, obtain the operation characteristic data of the HVAC device, where the operation characteristic data includes normal period data and fault period data;
[0165] S2, determine that the difference sequence between the normal period data and the fault period data does not deviate from the fault characteristic distribution corresponding to the fault type set, and obtain the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model;
[0166] S3, determine that the difference sequence deviates from the fault characteristic distribution, and feedback the difference sequence to a preset expert terminal; based on the diagnosis advice feedback by the preset expert terminal for the difference sequence, determine the diagnosed fault type corresponding to the fault period data, and update the fault type set based on the diagnosed fault type.
[0167] Optionally, in this embodiment, those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware of the terminal device through a program, and this program can be stored in a computer-readable storage medium, and the storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disc, etc.
[0168] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0169] If the integrated unit in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing one or more computer devices (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention.
[0170] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0171] In addition, in each embodiment of the present invention, the various functional units can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0172] The above is only the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. A fault diagnosis method, characterized in that, The method includes: Obtaining the operation characteristic data of the HVAC equipment, where the operation characteristic data includes normal period data and fault period data; Determining that the difference sequence between the normal period data and the fault period data does not deviate from the fault characteristic distribution corresponding to the fault type set, and obtaining the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model; Determining that the difference sequence deviates from the fault characteristic distribution, and feeding back the difference sequence to the preset expert terminal; based on the diagnostic advice fed back by the preset expert terminal for the difference sequence, determining the diagnostic fault type corresponding to the fault period data, and updating the fault type set based on the diagnostic fault type.
2. The method according to claim 1, characterized in that, The obtaining the operation characteristic data of the HVAC equipment includes: periodically obtaining the operation characteristic data corresponding to the HVAC equipment at a preset time interval; The method further includes: Determining the fault sliding window corresponding to the fault period data, and obtaining the first feature vector corresponding to the time series data within the fault sliding window; Determining the second feature vector that is closest to the first feature vector, where the second feature vector is the feature vector corresponding to the time series data within any sliding window during the normal operation of the HVAC equipment; Determining the difference sequence between the first feature vector and the second feature vector as the difference sequence between the normal period data and the fault period data.
3. The method according to claim 1 or 2, characterized in that, The method further includes: calculating the mean and standard deviation of the difference sequence, and determining the standard score corresponding to the difference sequence based on the mean and standard deviation; In the case where the standard score is greater than a preset threshold, determining that the difference sequence deviates from the fault characteristic distribution corresponding to the fault type set; In the case where the standard score is less than or equal to the preset threshold, determining that the difference sequence does not deviate from the fault characteristic distribution.
4. The method according to claim 1, wherein The obtaining the target fault type corresponding to the fault period data from the fault type set based on the fault diagnosis model includes: Invoking the fault diagnosis model to select a fault classifier to perform classification prediction on the difference sequence; each of the fault classifiers is a decision tree obtained by clustering the difference sequence and the fault type set as training samples to obtain fault clusters and training each of the fault clusters; According to the confidence levels of the difference sequence belonging to each fault type in the prediction classification result, taking the fault types with confidence levels greater than a preset confidence threshold as the target fault types.
5. The method according to claim 4, wherein The invoking the fault diagnosis model to select a fault classifier to perform classification prediction on the difference sequence includes: Inputting the difference sequence into each decision tree, traversing all nodes of the decision tree starting from the root node of each decision tree, and calculating the confidence level of the difference sequence belonging to the leaf node of each decision tree; each leaf node corresponds to a fault type; Taking the obtained confidence levels as the prediction classification result.
6. The method according to claim 4 or 5, characterized in that, The updating the fault type set based on the diagnostic fault type includes: Obtaining the fault data set composed of the diagnostic fault type and its corresponding fault data, and calculating the data center point corresponding to the fault data set; Calculate the distances between the data center point and the center points of each of the failure clusters, and determine the failure cluster with the closest distance as the target failure cluster; When the distance between the data center point and the center point of the target failure cluster is less than a preset distance, determine that the failure data set belongs to the target failure cluster; When the distance between the data center point and the center point of the target failure cluster is greater than or equal to the preset distance, create an updated failure cluster based on the failure data set.
7. The method according to claim 1 or 4, characterized in that, The method further includes: For the target failure type and the diagnosed failure type, query the knowledge graph to obtain relevant failure background knowledge, where the failure background knowledge includes at least one of device structure, working principle, common failure modes and their causal relationships; Generate a prompt word template based on the failure background knowledge, and use a preset large language model to generate a failure diagnosis report based on the prompt word template.
8. A fault diagnosis device, characterized in that, The device includes: A first acquisition unit that acquires the operation characteristic data of the HVAC equipment, where the operation characteristic data includes normal period data and failure period data; A first determination unit that is used to determine that the difference sequence between the normal period data and the failure period data does not deviate from the failure characteristic distribution corresponding to the failure type set, and obtain the target failure type corresponding to the failure period data from the failure type set based on a failure diagnosis model; A second determination unit that is used to determine that the difference sequence deviates from the failure characteristic distribution, and feed back the difference sequence to a preset expert terminal; based on the diagnosis suggestion fed back by the preset expert terminal for the difference sequence, determine the diagnosed failure type corresponding to the failure period data, and update the failure type set based on the diagnosed failure type.
9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor runs the computer program to implement the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method according to any one of claims 1-7.
Citation Information
Cited By
Meter fault detection method and system
CN120804899A
Automatic fault diagnosis method and device, electronic equipment, storage medium and product
CN121235078A
Heating and ventilation system early-stage fault identification method based on compressor operation characteristic mutation
CN121808646A