A fault diagnosis method, system and device for a self-supervising building air conditioning system
Through the self-supervised fault diagnosis method, the triplet network is used to extract features from unlabeled samples and combined with labeled samples for parameter fine-tuning, which solves the problem of dependence on label data in the existing technology and improves the accuracy of fault diagnosis of building air conditioning systems. reliability.
Patent Information
- Application Number
- CN202410102977.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-25
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-01-25
AI Technical Summary
Existing fault diagnosis methods rely on labeled data, have a narrow application range and are difficult to effectively utilize unlabeled data, making it difficult to achieve reliable fault diagnosis of building air conditioning systems in practical applications.
Using a self-supervised fault diagnosis method, features are extracted from unlabeled samples through triplet networks, and labeled samples are used for parameter fine-tuning to build unsupervised comparison models and fault classifiers, reducing reliance on labeled data and improving fault diagnosis. reliability.
In the case of limited labeled training data, the fault diagnosis model can maintain a high degree of reliability, improve the reliability of fault diagnosis of building air conditioning systems, and reduce the dependence on labeled data.
Smart Images

Figure CN117874627B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a fault diagnosis method, system and equipment for a self-supervisory building air conditioning system. Background Art
[0002] Building air conditioning systems are complex and various energy efficiency problems (such as equipment failures) are unavoidable during operation, which not only increases unnecessary energy consumption, but also has a negative impact on users' thermal comfort and indoor air quality. How to effectively improve the fault diagnosis and energy efficiency management of building air conditioning systems has become a hot social and scientific research issue.
[0003] Existing fault diagnosis methods all have some limitations. Knowledge-based diagnosis methods rely too much on expert experience, have low application efficiency and high cost. Data-driven diagnosis methods have the advantages of high theoretical accuracy and strong automation properties, but they rely too much on labeled data, have a narrow scope of application, and are difficult to promote. In practical scenarios, it is difficult for air-conditioning units to have sufficient labeled data, and usually only massive amounts of unlabeled data can be collected. At present, there is still a lack of a new fault diagnosis paradigm with strong engineering properties to reduce dependence on labeled data and use the information of unlabeled data to achieve reliable "digital intelligence" operation and maintenance management. Summary of the invention
[0004] The purpose of the present invention is to provide a method, system and equipment for fault diagnosis of a self-supervisory building air conditioning system, thereby improving the reliability of fault diagnosis of the building air conditioning system.
[0005] To achieve the above object, the present invention provides the following solutions:
[0006] A fault diagnosis method for a self-supervisory building air conditioning system, comprising:
[0007] Acquire target data; the target data is building air conditioning system data of the building air conditioning system to be diagnosed;
[0008] The target data is input into a fault diagnosis model to obtain the diagnostic fault type of the building air conditioning system to be diagnosed; the fault diagnosis model is obtained by training a downstream model using multiple labeled samples, and the downstream model includes a feature extractor and a fault classifier in an unsupervised contrast model, and the unsupervised contrast model is obtained by training a triple network using a triple data set, and the triple data set is obtained based on multiple unlabeled samples, and the triple network includes three feature extractors.
[0009] Optionally, the training process of the fault diagnosis model includes:
[0010] Obtain N unlabeled samples to obtain a data set to be processed; the unlabeled samples are building air conditioning system data including multiple monitoring variables; N>1;
[0011] Determine any unlabeled sample in the processing data set as a current sample, and randomly determine an unlabeled sample as a non-current sample from all unlabeled samples in the to-be-processed data set except the current sample;
[0012] Using a data enhancement method, the current sample and one of the non-current samples are processed respectively to obtain triple data; the triple data includes: an anchor sample, a positive sample and a negative sample;
[0013] Based on the triple data corresponding to all current samples, a triple data set is obtained; the triple data set includes: N triple data;
[0014] constructing the triplet network;
[0015] Using the triplet data set to train the triplet network to obtain an unsupervised comparison model;
[0016] Acquire multiple labeled samples; the labeled samples are building air conditioning system data including multiple monitoring variables and fault labels; the fault label is the actual fault type;
[0017] Building a downstream model based on a feature extractor and a fault classifier in the unsupervised comparison model;
[0018] The downstream model is trained using each of the labeled samples to obtain the fault diagnosis model.
[0019] Optionally, using a data enhancement method, the current sample and one of the non-current samples are processed respectively to obtain triple data, including:
[0020] Performing data enhancement processing twice on the current sample to obtain a first enhanced sample and a second enhanced sample;
[0021] Performing data enhancement processing on the non-current sample to obtain a third enhanced sample;
[0022] Using the first enhanced sample as the anchor sample, using the second enhanced sample as the positive pair sample, and using the third enhanced sample as the negative pair sample;
[0023] The triplet is obtained based on the anchor point sample, the positive pair sample and the negative pair sample.
[0024] Optionally, a data enhancement method is used to perform data enhancement processing on any current unlabeled sample to obtain a corresponding enhanced sample, including:
[0025] Randomly select a preset number of monitoring variables from the current unlabeled samples as target variables;
[0026] Determine any target variable as the current variable;
[0027] Randomly select a value of a monitoring variable corresponding to the current variable from unlabeled samples other than the current unlabeled sample in the to-be-processed data set as the value of the current variable;
[0028] The value of each target variable is inserted into the current unlabeled sample to obtain a corresponding enhanced sample.
[0029] Optionally, the triplet network is trained using the triplet data set to obtain an unsupervised comparison model, including:
[0030] Initializing parameters of the triplet network;
[0031] The triplet network is iteratively optimized using the triplet data set to obtain the unsupervised comparison model; wherein the optimization process of the triplet network under any current number of iterations includes:
[0032] Inputting each triplet in the triplet data set into the triplet network at the current iteration number respectively, obtaining the embedding vector of the anchor sample at the current iteration number, the embedding vector of the positive sample at the current iteration number, and the embedding vector of the negative sample at the current iteration number in each triplet;
[0033] Calculate the contrast loss at the current iteration based on the embedding vector at each current iteration;
[0034] Determine whether a first iteration stop condition is met; the first iteration stop condition is that the maximum number of iterations is reached or the comparison loss at the current number of iterations is less than a preset threshold;
[0035] If yes, the triplet network at the current number of iterations is determined as the unsupervised comparison model;
[0036] If not, update the parameters of the triplet network at the current iteration number to the parameters of the downstream model network at the next iteration number, and return "input each triple in the triplet data set into the triplet network at the current iteration number, and obtain the embedding vector of the anchor sample at the current iteration number, the embedding vector of the positive sample at the current iteration number, and the embedding vector of the negative sample at the current iteration number in each triplet".
[0037] Optionally, using each of the labeled samples to train the downstream model to obtain the fault diagnosis model includes:
[0038] Initializing parameters of the downstream model;
[0039] The downstream model is iteratively optimized using each of the labeled samples to obtain the fault diagnosis model; wherein the optimization process of the downstream model at any current number of iterations includes:
[0040] Inputting the labeled samples in the triplet data set into the downstream model at the current iteration number respectively, and obtaining the probability of the diagnosed fault type corresponding to each labeled sample at the current iteration number;
[0041] Calculate the classification error at the current number of iterations based on the probability of the diagnosed fault type at each current number of iterations;
[0042] Determine whether a second iteration stop condition is met; the second iteration stop condition is that the maximum number of iterations is reached or the classification error at the current number of iterations is less than a preset error;
[0043] If yes, the downstream model at the current iteration number is determined as the fault diagnosis model;
[0044] If not, the parameters of the downstream model at the current number of iterations are updated to the parameters of the downstream model at the next number of iterations, and the method of "inputting the labeled samples in the triplet data set into the downstream model at the current number of iterations respectively to obtain the probability of the diagnosed fault type corresponding to each labeled sample at the current number of iterations" is returned.
[0045] A fault diagnosis system for a self-supervising building air conditioning system, comprising:
[0046] A data acquisition module, used to acquire target data; the target data is building air conditioning system data of the building air conditioning system to be diagnosed;
[0047] A fault diagnosis module is used to input the target data into a fault diagnosis model to obtain the diagnostic fault type of the building air conditioning system to be diagnosed; the fault diagnosis model is obtained by training a downstream model using multiple labeled samples, and the downstream model includes a feature extractor and a fault classifier in an unsupervised comparison model, and the unsupervised comparison model is obtained by training a triple network using a triple data set, and the triple data set is obtained based on multiple unlabeled samples, and the triple network includes three feature extractors.
[0048] A device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program so that the device executes the above-mentioned fault diagnosis method for the self-supervisory building air conditioning system.
[0049] Optionally, the memory is a readable storage medium.
[0050] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0051] The present invention discloses a fault diagnosis method, system and equipment for a self-supervised building air conditioning system. First, target data is obtained; the target data is building air conditioning system data of the building air conditioning system to be diagnosed; then, the target data is input into a fault diagnosis model to obtain the diagnostic fault type of the building air conditioning system to be diagnosed. The fault diagnosis model is obtained by training a downstream model using multiple labeled samples, and the downstream model includes a feature extractor and a fault classifier in an unsupervised comparison model. The unsupervised comparison model is obtained by training a triple network using a triple data set, and the triple data set is obtained based on multiple unlabeled samples, and the triple network includes three feature extractors. The present invention performs comparison tasks through a triple network, cleverly extracts useful information from unlabeled samples, and uses labeled samples to perform parameter fine-tuning strategies, successfully transferring learned knowledge to the downstream task model, so that under the condition of limited labeled training data, the fault diagnosis model can still maintain a high degree of reliability, thereby improving the reliability of building air conditioning system fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A schematic flow chart of a fault diagnosis method for a self-supervising building air conditioning system provided in Example 1 of the present invention;
[0054] Figure 2 A schematic diagram of the training process of a contrastive self-supervised fault diagnosis model based on a triplet network;
[0055] Figure 3 It is a schematic diagram of the structure of a single-layer Transformer network encoder;
[0056] Figure 4 Schematic diagram of the upstream model framework structure based on the triplet network. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] The purpose of the present invention is to provide a fault diagnosis method, system and equipment for a self-supervisory building air conditioning system, aiming to improve the reliability of fault diagnosis of the building air conditioning system.
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0060] Example 1
[0061] Figure 1 This is a flow chart of a method for diagnosing a fault in a self-supervising building air conditioning system provided in Example 1 of the present invention. Figure 1 As shown, the fault diagnosis method of the self-supervisory building air conditioning system in this embodiment includes:
[0062] Step 101: Acquire target data; the target data is building air conditioning system data of the building air conditioning system to be diagnosed.
[0063] Step 102: Input the target data into the fault diagnosis model to obtain the diagnostic fault type of the building air conditioning system to be diagnosed; the fault diagnosis model is obtained by training a downstream model using multiple labeled samples, and the downstream model includes a feature extractor and a fault classifier in an unsupervised comparison model. The unsupervised comparison model is obtained by training a triple network using a triple data set, and the triple data set is obtained based on multiple unlabeled samples, and the triple network includes three feature extractors.
[0064] As an optional implementation, Figure 2-Figure 4 As shown in Figure 1, the training process of the fault diagnosis model includes:
[0065] Step 1: Obtain N unlabeled samples to obtain a data set to be processed; the unlabeled samples are building air conditioning system data including multiple monitoring variables; N>1.
[0066] Specifically, the monitored variables include: supply air temperature, return air temperature, outdoor dry bulb temperature, mixed air temperature, supply fan speed control signal, return air valve opening, fresh air valve opening, chilled water valve control signal and supply air static pressure value.
[0067] In fact, when collecting labeled samples, there are not only unlabeled samples but also labeled samples. If the collected labeled samples are labeled samples, they need to be delabeled first to obtain unlabeled samples.
[0068] Step 2: Determine any unlabeled sample in the processing data set as the current sample, and randomly determine an unlabeled sample as the non-current sample from all unlabeled samples in the data set to be processed except the current sample.
[0069] Step 3: Use the data enhancement method to process the current sample and a non-current sample respectively to obtain triple data; the triple data includes: anchor sample, positive sample and negative sample.
[0070] As an optional implementation, step 3 includes:
[0071] The current sample is subjected to data enhancement processing twice to obtain a first enhanced sample and a second enhanced sample.
[0072] Data enhancement processing is performed on non-current samples to obtain third enhanced samples.
[0073] The first enhanced sample is used as the anchor sample, the second enhanced sample is used as the positive sample, and the third enhanced sample is used as the negative sample.
[0074] Based on the anchor samples, positive samples and negative samples, triplets are obtained.
[0075] As an optional implementation, a data enhancement method is used to perform data enhancement processing on any current unlabeled sample to obtain a corresponding enhanced sample, including:
[0076] A preset number of monitoring variables are randomly selected from the current unlabeled samples as target variables.
[0077] Identify any target variable as the current variable.
[0078] A value of a monitoring variable corresponding to the current variable is randomly selected from the unlabeled samples other than the current unlabeled sample in the data set to be processed as the value of the current variable.
[0079] Insert the value of each target variable into the current unlabeled sample to obtain the corresponding enhanced sample.
[0080] Specifically, using data enhancement methods, the i-th unlabeled sample X i The specific steps for processing include:
[0081] 1) Randomly determine the position of noise insertion: In the data set to be processed, the noise position is determined for each unlabeled sample. The i-th unlabeled sample is represented as X i={X i,1 ,X i,2 …X i,m …X i,n}, where X i,1 represents the monitoring variable at the first position in the i-th unlabeled sample, X i,2 represents the monitoring variable at the second position in the i-th unlabeled sample, X i,m represents the monitoring variable at the mth position in the i-th unlabeled sample, X i,n Represents the monitoring variable at the nth position in the i-th unlabeled sample. Set the unlabeled sample X i The number of variables that need to add noise is k, and the value of k is equal to 10% of the total number of variables n in the sample. K elements are randomly selected without replacement from the monitoring variable position set {1,2,…,m,…,n} of the unlabeled sample to form the noise position set {m1,m2,…,m a ,…,m k}. Among them, m a is the element obtained by the a-th sampling, 1≤a≤k.
[0082] 2) Insert random noise data: unlabeled sample X i After adding the noise position, it is represented as X i ={X i,1 ,X i,2 …X i,m1 ,X i,m2 ,…,X i,mk ,…,X i,n}, the variable to be inserted with noise is defined as the target variable. To ensure the authenticity of the noise data, for the unlabeled sample X i The mth l The noise value of the variable at the position is removed from the processed data set by removing the unlabeled sample X i The samples are randomly selected from the monitored values of the same type of variables of other unlabeled samples.
[0083] Repeat data augmentation for each unlabeled sample in the dataset to be processed until the target variable of each unlabeled sample in the dataset to be processed is covered by noise.
[0084] Step 4: Based on the triple data corresponding to all current samples, a triple data set is obtained; the triple data set includes: N triple data.
[0085] Specifically, the construction of the triplet dataset includes the following steps:
[0086] 1) Select anchor sample: Select the i-th unlabeled sample X from the dataset to be processed i , after the above data enhancement method, we get the anchor point samples
[0087] 2) Generate positive samples: For the i-th unlabeled sample X i Perform data enhancement again to obtain the correct sample Due to the randomness of sampling in the above data enhancement process, the anchor samples and positive samples There are some differences in the noise positions and values.
[0088] 3) Generate negative samples: Randomly extract the jth unlabeled sample X from the dataset to be processed j (j is not equal to i), and the negative pair samples are obtained after the above data enhancement method
[0089] 4) Form a triplet dataset: Each anchor point sample The corresponding positive sample and negative samples Form a triple data This process is repeated until each unlabeled sample in the data set to be processed is included in a triple data, forming a complete triple data set.
[0090] Step 5: Build a triplet network.
[0091] Specifically, the triplet network consists of three feature extractors f(·) with the same structure and shared parameters, which are used to simultaneously extract high-level feature representations of anchor samples, positive samples, and negative samples in the triplet data and generate three embedding vectors f(X A )、f(X P ) and f(X N ). Among them, f(X A ) is the embedding vector of the anchor sample; f(X P ) is the embedding vector of the positive sample; f(X N ) is the embedding vector of the negative pair sample.
[0092] The training optimization goal of the network is to minimize the triple contrast loss. The Adam algorithm is used to update the model parameters, and the learning rate is set to 0.001.
[0093] Among them, Figure 3 As shown, the feature extractor is an encoder consisting of a 3-layer network, including:
[0094] 1) Data reconstruction layer: This layer aims to transform the input data from two-dimensional to three-dimensional format to meet the requirements of the subsequent Transformer encoder layer.
[0095] 2) Lightweight Transformer encoder layer: This layer is developed based on the Transformer model, where the embedding dimension is set to 1, the number of parallel attention heads is set to 2, the number of neurons in the middle layer of the feedforward neural network is set to 10, the activation function is selected as Tanh, and the layer normalization function is disabled.
[0096] 3) Global average pooling layer: This layer is used to perform global average pooling operations on the features encoded by the Transformer layer.
[0097] Step 6: Use the triplet dataset to train the triplet network to obtain an unsupervised comparison model.
[0098] As an optional implementation, step 6 includes:
[0099] Initialize the parameters of the triplet network.
[0100] The triplet network is iteratively optimized using the triplet data set to obtain an unsupervised comparison model; wherein the optimization process of the triplet network at any current number of iterations includes:
[0101] Each triplet in the triplet data set is input into the triplet network at the current iteration number respectively, and the embedding vector of the anchor sample at the current iteration number, the embedding vector of the positive sample at the current iteration number and the embedding vector of the negative sample at the current iteration number in each triplet are obtained.
[0102] The contrast loss at the current iteration is calculated based on the embedding vector at each current iteration.
[0103] Determine whether the first iteration stop condition is met; the first iteration stop condition is that the maximum number of iterations is reached or the contrast loss at the current number of iterations is less than a preset threshold.
[0104] If so, the triplet network at the current iteration number is determined as the unsupervised comparison model.
[0105] If not, update the parameters of the triplet network at the current iteration number to the parameters of the downstream model network at the next iteration number, and return "input each triple in the triplet data set into the triplet network at the current iteration number, and obtain the embedding vector of the anchor sample at the current iteration number, the embedding vector of the positive sample at the current iteration number, and the embedding vector of the negative sample at the current iteration number in each triplet".
[0106] In fact, taking the unsupervised contrast model as the upstream model, the contrast loss of the upstream model is calculated as follows:
[0107] L(A,P,N)=Max(d(f(X A)-f(X P ))-d(f(X A )-f(X N ))+Margin,0).
[0108] Among them, L(A,P,N) represents the contrast loss; d(f(X A )-f(X P )) represents f(X A ) and f(X P ) between the cosine distance; d(f(X A )-f(X N )) represents f(X A ) and f(X N ) between them; Margin is a non-negative custom interval margin used to avoid the model taking shortcuts during the training process. On the basis of standardizing the standard deviation of the input variables, Margin is set to 1.5 in the present invention.
[0109] Step 7: Obtain multiple labeled samples; the labeled samples are building air conditioning system data including multiple monitoring variables and fault labels; the fault label is the actual fault type.
[0110] Step 8: Build a downstream model based on a feature extractor and fault classifier in the unsupervised comparison model.
[0111] Step 9: Use the labeled samples to train the downstream model to obtain the fault diagnosis model.
[0112] As an optional implementation, step 9 includes:
[0113] Initialize the parameters of the downstream model.
[0114] The downstream model is iteratively optimized using each labeled sample to obtain a fault diagnosis model; wherein the optimization process of the downstream model at any current number of iterations includes:
[0115] The labeled samples in the triplet data set are respectively input into the downstream model at the current number of iterations to obtain the probability of the diagnosed fault type corresponding to each labeled sample at the current number of iterations.
[0116] The classification error at the current iteration number is calculated based on the probability of the diagnosed fault type at each current iteration number.
[0117] Determine whether the second iteration stopping condition is met; the second iteration stopping condition is that the maximum number of iterations is reached or the classification error at the current number of iterations is less than a preset error.
[0118] If so, the downstream model at the current iteration number is determined as the fault diagnosis model.
[0119] If not, update the parameters of the downstream model at the current iteration number to the parameters of the downstream model at the next iteration number, and return "input the labeled samples in the triple data set into the downstream model at the current iteration number respectively, and obtain the probability of each labeled sample corresponding to the diagnosed fault type at the current iteration number".
[0120] Specifically, the downstream model consists of a simple fault classifier and a feature extractor in the unsupervised comparison model. The fault classifier contains three fully connected neural network layers. The input layer is used to process the output of the feature extractor. The latent layer contains 30 neurons. The number of neurons in the output layer is the same as the number of fault categories. Except for the output layer, the remaining layers use Tanh as the activation function. The output layer outputs the prediction results of the model through the Softmax function.
[0121] The migration mechanism based on parameter fine-tuning refers to fine-tuning the parameters of the feature extractor that has completed parameter initialization in pre-training through a small number of labeled samples during the training of the downstream model. In this training process, the downstream model uses the multi-classification cross entropy loss function (Categorical Cross Entropy, CCE) to calculate the classification error. The calculation formula is as follows:
[0122]
[0123] Among them, L CCE represents the classification error; N represents the number of labeled samples; C represents the number of fault types contained in all labeled samples; y g,c is a symbolic function. When the true fault type of the g-th labeled sample is c, y g,c =1, otherwise the value is y g,c =0, p g,c represents the predicted probability that the g-th labeled sample belongs to fault type c.
[0124] In addition, the Adam algorithm was used to update the model parameters, and the learning rate was set to 0.001.
[0125] Example 2
[0126] The fault diagnosis system of the self-supervisory building air conditioning system in this embodiment includes:
[0127] The data acquisition module is used to acquire target data; the target data is the building air conditioning system data of the building air conditioning system to be diagnosed.
[0128] The fault diagnosis module is used to input the target data into the fault diagnosis model to obtain the diagnostic fault type of the building air-conditioning system to be diagnosed; the fault diagnosis model is obtained by training the downstream model with multiple labeled samples, and the downstream model includes a feature extractor and a fault classifier in the unsupervised comparison model. The unsupervised comparison model is obtained by training the triple network with the triple data set, and the triple data set is obtained based on multiple unlabeled samples, and the triple network includes three feature extractors.
[0129] Example 3
[0130] A device includes a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the device to execute the fault diagnosis method of the self-supervising building air conditioning system in embodiment 1.
[0131] As an optional implementation, the memory is a readable storage medium.
[0132] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0133] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A fault diagnosis method for a self-supervising building air conditioning system, characterized in that: The method comprises: Acquire target data; the target data is building air conditioning system data of the building air conditioning system to be diagnosed; The target data is input into a fault diagnosis model to obtain the diagnostic fault type of the building air conditioning system to be diagnosed; the fault diagnosis model is obtained by training a downstream model using multiple labeled samples, the downstream model includes a feature extractor and a fault classifier in an unsupervised comparison model, the unsupervised comparison model is obtained by training a triple network using a triple data set, the triple data set is obtained based on multiple unlabeled samples, and the triple network includes three feature extractors; The training process of the fault diagnosis model includes: Obtain N unlabeled samples to obtain a data set to be processed; the unlabeled samples are building air conditioning system data including multiple monitoring variables; N>1; Determine any unlabeled sample in the processing data set as the current sample, and randomly determine an unlabeled sample from all unlabeled samples in the data set to be processed except the current sample as a non-current sample; Using the data enhancement method, the current sample and a non-current sample are processed respectively to obtain triple data; the triple data includes: anchor sample, positive sample and negative sample; Based on the triple data corresponding to all current samples, a triple data set is obtained; the triple data set includes: N triple data; Construct a triplet network; The triplet network is trained using the triplet dataset to obtain an unsupervised comparison model; Obtain multiple labeled samples; the labeled samples are building air conditioning system data including multiple monitoring variables and fault labels; the fault label is the actual fault type; Build a downstream model based on a feature extractor and fault classifier in the unsupervised comparison model; Use the labeled samples to train the downstream model to obtain the fault diagnosis model; The triplet network is trained using the triplet dataset to obtain an unsupervised comparison model, including: Initialize the parameters of the triplet network; The triplet network is iteratively optimized using the triplet data set to obtain an unsupervised comparison model; wherein the optimization process of the triplet network at any current number of iterations includes: Input each triplet in the triplet data set into the triplet network at the current iteration number, and obtain the embedding vector of the anchor sample at the current iteration number, the embedding vector of the positive sample at the current iteration number, and the embedding vector of the negative sample at the current iteration number in each triplet; Calculate the contrast loss at the current iteration based on the embedding vector at each current iteration; Determine whether the first iteration stop condition is met; the first iteration stop condition is that the maximum number of iterations is reached or the contrast loss at the current number of iterations is less than a preset threshold; If so, the triplet network at the current iteration number is determined as an unsupervised comparison model; If not, update the parameters of the triplet network at the current iteration number to the parameters of the downstream model network at the next iteration number, and return "input each triplet in the triplet data set into the triplet network at the current iteration number, and obtain the embedding vector of the anchor sample at the current iteration number, the embedding vector of the positive sample at the current iteration number, and the embedding vector of the negative sample at the current iteration number in each triplet"; Use the labeled samples to train the downstream model to obtain the fault diagnosis model, including: Initialize the parameters of the downstream model; The downstream model is iteratively optimized using each labeled sample to obtain a fault diagnosis model; wherein the optimization process of the downstream model at any current number of iterations includes: Input the labeled samples in the triplet data set into the downstream model at the current iteration number respectively, and obtain the probability of the diagnosed fault type of each labeled sample corresponding to the current iteration number; Calculate the classification error at the current number of iterations based on the probability of the diagnosed fault type at each current number of iterations; Determine whether the second iteration stop condition is met; the second iteration stop condition is that the maximum number of iterations is reached or the classification error at the current number of iterations is less than a preset error; If so, the downstream model at the current iteration number is determined as the fault diagnosis model; If not, update the parameters of the downstream model at the current iteration number to the parameters of the downstream model at the next iteration number, and return "input the labeled samples in the triple data set into the downstream model at the current iteration number respectively, and obtain the probability of each labeled sample corresponding to the diagnosed fault type at the current iteration number".
2. The fault diagnosis method of the self-supervising building air conditioning system according to claim 1, characterized in that: The current sample and the non-current sample are processed respectively by using a data enhancement method to obtain triple data, including: Performing data enhancement processing twice on the current sample to obtain a first enhanced sample and a second enhanced sample; Performing data enhancement processing on the non-current sample to obtain a third enhanced sample; Using the first enhanced sample as the anchor sample, using the second enhanced sample as the positive pair sample, and using the third enhanced sample as the negative pair sample; The triplet is obtained based on the anchor point sample, the positive pair sample and the negative pair sample.
3. The fault diagnosis method of the self-supervising building air conditioning system according to claim 2, characterized in that: Using the data enhancement method, any current unlabeled sample is enhanced to obtain the corresponding enhanced sample, including: Randomly select a preset number of monitoring variables from the current unlabeled samples as target variables; Determine any target variable as the current variable; Randomly select a value of a monitoring variable corresponding to the current variable from unlabeled samples other than the current unlabeled sample in the to-be-processed data set as the value of the current variable; The value of each target variable is inserted into the current unlabeled sample to obtain a corresponding enhanced sample.
4. A fault diagnosis system for a self-supervising building air conditioning system, characterized in that: The system comprises: A data acquisition module, used to acquire target data; the target data is building air conditioning system data of the building air conditioning system to be diagnosed; A fault diagnosis module, used for inputting the target data into a fault diagnosis model to obtain the diagnosis fault type of the building air conditioning system to be diagnosed; the fault diagnosis model is obtained by training a downstream model using a plurality of labeled samples, the downstream model includes a feature extractor and a fault classifier in an unsupervised comparison model, the unsupervised comparison model is obtained by training a triple network using a triple data set, the triple data set is obtained based on a plurality of unlabeled samples, and the triple network includes three feature extractors; The training process of the fault diagnosis model includes: Obtain N unlabeled samples to obtain a data set to be processed; the unlabeled samples are building air conditioning system data including multiple monitoring variables; N>1; Determine any unlabeled sample in the processing data set as the current sample, and randomly determine an unlabeled sample from all unlabeled samples in the data set to be processed except the current sample as a non-current sample; Using the data enhancement method, the current sample and a non-current sample are processed respectively to obtain triple data; the triple data includes: anchor sample, positive sample and negative sample; Based on the triple data corresponding to all current samples, a triple data set is obtained; the triple data set includes: N triple data; Construct a triplet network; The triplet network is trained using the triplet dataset to obtain an unsupervised comparison model; Obtain multiple labeled samples; the labeled samples are building air conditioning system data including multiple monitoring variables and fault labels; the fault label is the actual fault type; Build a downstream model based on a feature extractor and fault classifier in the unsupervised comparison model; Use the labeled samples to train the downstream model to obtain the fault diagnosis model; The triplet network is trained using the triplet dataset to obtain an unsupervised comparison model, including: Initialize the parameters of the triplet network; The triplet network is iteratively optimized using the triplet data set to obtain an unsupervised comparison model; wherein the optimization process of the triplet network at any current number of iterations includes: Input each triplet in the triplet data set into the triplet network at the current iteration number, and obtain the embedding vector of the anchor sample at the current iteration number, the embedding vector of the positive sample at the current iteration number, and the embedding vector of the negative sample at the current iteration number in each triplet; Calculate the contrast loss at the current iteration based on the embedding vector at each current iteration; Determine whether the first iteration stop condition is met; the first iteration stop condition is that the maximum number of iterations is reached or the contrast loss at the current number of iterations is less than a preset threshold; If so, the triplet network at the current iteration number is determined as an unsupervised comparison model; If not, update the parameters of the triplet network at the current iteration number to the parameters of the downstream model network at the next iteration number, and return "input each triplet in the triplet data set into the triplet network at the current iteration number, and obtain the embedding vector of the anchor sample at the current iteration number, the embedding vector of the positive sample at the current iteration number, and the embedding vector of the negative sample at the current iteration number in each triplet"; Use the labeled samples to train the downstream model to obtain the fault diagnosis model, including: Initialize the parameters of the downstream model; The downstream model is iteratively optimized using each labeled sample to obtain a fault diagnosis model; wherein the optimization process of the downstream model at any current number of iterations includes: Input the labeled samples in the triplet data set into the downstream model at the current iteration number respectively, and obtain the probability of the diagnosed fault type of each labeled sample corresponding to the current iteration number; Calculate the classification error at the current number of iterations based on the probability of the diagnosed fault type at each current number of iterations; Determine whether the second iteration stop condition is met; the second iteration stop condition is that the maximum number of iterations is reached or the classification error at the current number of iterations is less than a preset error; If so, the downstream model at the current iteration number is determined as the fault diagnosis model; If not, update the parameters of the downstream model at the current iteration number to the parameters of the downstream model at the next iteration number, and return "input the labeled samples in the triple data set into the downstream model at the current iteration number respectively, and obtain the probability of each labeled sample corresponding to the diagnosed fault type at the current iteration number".
5. A device, characterized in that: The device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the device to execute the fault diagnosis method of the self-supervising building air conditioning system according to any one of claims 1 to 3.
6. A device according to claim 5, characterized in that: The memory is a readable storage medium.
