Refrigerant leakage detection method and device, medium and equipment

By employing a phased feature alignment strategy, the stability and accuracy issues of refrigerant leak detection across systems and operating conditions were resolved, enabling efficient refrigerant leak detection under different refrigeration systems and operating conditions.

CN120926544APending Publication Date: 2025-11-11TCL AIR CONDITIONER ZHONGSHAN CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511040054.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

In cross-system and cross-operating-condition environments, the stability and accuracy of refrigerant leak detection are insufficient, and existing detection methods are difficult to adapt to different types of refrigeration systems and diverse operating conditions.

Method used

A phased feature alignment strategy is adopted. First, the target domain sample features are aligned with the source domain features at the global distribution level. Then, the alignment process is further refined at the boundary distribution level. Through a one-dimensional convolutional neural network and a feature alignment loss function, the transfer stability and detection robustness of the model under cross-system and diverse working conditions are improved.

Benefits of technology

It significantly improves the generalization ability and accuracy of refrigerant leak detection methods in complex application environments, and enhances the model's adaptability to different system types and diverse operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120926544A_ABST
    Figure CN120926544A_ABST
Patent Text Reader

Abstract

The invention discloses a refrigerant leakage detection method and device, a medium and equipment, and the method comprises the steps: firstly carrying out the alignment of target domain sample features and source domain features at a global distribution layer through a staged feature alignment strategy, and then carrying out the further refined alignment processing at a boundary distribution layer, thereby achieving the adaptive optimization of different layers of feature distribution. According to the staged and multi-layer alignment mode, the migration stability and the detection robustness of the model under the cross-system and diversified working conditions are remarkably improved, and the generalization ability and the accuracy of the refrigerant leakage detection method in the complex application environment are effectively enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of refrigeration system technology, and in particular to a method, apparatus, medium, and equipment for detecting refrigerant leaks. Background Technology

[0002] Refrigerant leak detection is crucial in the operation of refrigeration and air conditioning systems. However, in cross-system and cross-operating-condition environments, this detection faces challenges in stability and accuracy. This is because different types of refrigeration systems (such as residential air conditioners and industrial refrigeration units) and diverse operating conditions (different temperatures, pressures, and load conditions) lead to significant differences in the characteristics exhibited by refrigerant leaks. Existing detection methods are mostly designed based on characteristics specific to a particular system or operating condition. When applied to other systems or operating conditions, their insufficient adaptability to the distribution of these characteristics makes it difficult to guarantee the stability and accuracy of the detection. Summary of the Invention

[0003] Therefore, it is necessary to provide refrigerant leak detection methods, devices, media, and equipment to address the issues of insufficient stability and accuracy in refrigerant leak detection across systems and operating conditions.

[0004] In a first aspect, embodiments of this application provide a refrigerant leakage detection method, the method comprising:

[0005] Obtain target domain sample data, and perform a first feature extraction on the target domain sample data to obtain the corresponding first target domain sample feature; wherein, the first feature extraction is used to align the first target domain sample feature with the source domain feature of the source domain data in a global distribution;

[0006] The first target domain sample features are subjected to a second feature extraction to obtain the corresponding second target domain sample features; wherein, the second feature extraction is used to align the second target domain sample features with the source domain features on the boundary distribution;

[0007] Prediction processing is performed based on the sample features of the second target domain to obtain the prediction result of refrigerant leakage.

[0008] In some embodiments of this application, the first target domain sample features are obtained by extracting first features from the target domain sample data using a first target model. The first target model includes a first input layer, a first convolutional layer, a first pooling layer, a first flattening layer, and a first fully connected layer connected in sequence.

[0009] The input layer of the first input layer is configured to receive the target domain sample data and pass it to the first convolutional layer;

[0010] The first convolutional layer is configured to perform convolution processing on the target domain sample data;

[0011] The first pooling layer is configured to pool the feature representation output by the first convolutional layer;

[0012] The first flattening layer is configured to flatten the feature representation output by the first pooling layer;

[0013] The first fully connected layer is configured to perform weighted computation on the feature representation output by the first flattened layer.

[0014] In some embodiments of this application, the first target domain sample features are obtained by extracting first features from the target domain sample data using a first target model. The training process of the first target model includes:

[0015] Obtain training data for the target domain and training data for the source domain;

[0016] The first training model is used to extract first features from the target domain training data and the source domain training data to obtain the first target domain training features corresponding to the target domain training data and the first source domain training features corresponding to the source domain training data.

[0017] Calculate the global distribution loss based on the training features of the first target domain and the training features of the first source domain;

[0018] The first training model is iteratively optimized by minimizing the global distribution loss until the global distribution loss meets the iteration stopping condition, at which point the first training model is taken as the first target model.

[0019] In some embodiments of this application, calculating the global distribution loss based on the first target domain training features and the first source domain training features includes:

[0020] The kernel function is used to calculate the first similarity between the first target domain training features, the second similarity between the first source domain training features, and the third similarity between the first target domain training features and the first source domain training features.

[0021] The global distribution loss is calculated based on the first similarity, the second similarity, and the third similarity.

[0022] In some embodiments of this application, the second target domain sample features are obtained by extracting the second features from the first target domain sample features using a second target model. The second target model includes a second input layer, a second convolutional layer, a second pooling layer, a second flattening layer, and a second fully connected layer connected in sequence.

[0023] The input layer of the second input layer is configured to receive the features of the first target domain samples and pass them to the second convolutional layer;

[0024] The second convolutional layer is configured to perform convolution processing on the features of the first target domain samples;

[0025] The second pooling layer is configured to pool the feature representation output by the second convolutional layer;

[0026] The second flattening layer is configured to flatten the feature representation output by the second pooling layer;

[0027] The second fully connected layer is configured to perform weighted computation on the feature representation output by the second flattened layer.

[0028] In some embodiments of this application, the second target domain sample features are obtained by extracting second features from the first target domain sample features using a second target model. The training process of the second target model includes:

[0029] Obtain the training features of the first target domain and the training features of the first source domain;

[0030] The second training model is used to extract second features from the first target domain training features and the first source domain training features to obtain the second target domain training features corresponding to the first target domain training features and the second source domain training features corresponding to the first source domain training features.

[0031] The discriminator calculates the target domain expected score of the second target domain training features and the source domain expected score between the second source domain training features;

[0032] The boundary distribution loss of the second training model and the score difference loss of the discriminator are calculated based on the expected score of the target domain and the expected score of the source domain.

[0033] The second training model is iteratively optimized by minimizing the boundary distribution loss and by maximizing the rating difference loss until the iteration stopping condition is met, at which point the second training model is used as the second target model.

[0034] In some embodiments of this application, calculating the boundary distribution loss of the second training model and the score difference loss of the discriminator based on the expected score of the target domain and the expected score of the source domain includes:

[0035] Obtain a first loss model, and calculate the boundary distribution loss based on the first loss model; wherein, in the first loss model, the boundary distribution loss is positively correlated with the expected score of the source domain and negatively correlated with the expected score of the target domain;

[0036] Obtain a second loss model and calculate the rating difference loss based on the second loss model; wherein, in the second loss model, the rating difference loss is negatively correlated with the expected score in the source domain, positively correlated with the expected score in the target domain, and positively correlated with the gradient penalty term.

[0037] In some embodiments of this application, the prediction results include different degrees of refrigerant leakage, and the prediction processing based on the features of the second target domain samples to obtain the refrigerant leakage prediction results includes:

[0038] The refrigerant quantity is predicted by using a third target model to predict the sample features of the second target domain.

[0039] The degree of refrigerant leakage is determined based on the predicted refrigerant volume and the baseline refrigerant volume.

[0040] In some embodiments of this application, the third target model includes a third input layer, a third fully connected layer, and a first output layer connected in sequence;

[0041] The third input layer is configured to receive the second target domain sample features and pass them to the third fully connected layer;

[0042] The third fully connected layer is configured to perform weighted calculation processing on the feature representation output by the third input layer;

[0043] The first output layer is configured to map the feature representation output by the third fully connected layer to the refrigerant quantity prediction value.

[0044] Secondly, embodiments of this application also provide a refrigerant leakage detection device, the refrigerant leakage detection device comprising:

[0045] The first feature extraction module is used to acquire target domain sample data and perform first feature extraction on the target domain sample data to obtain corresponding first target domain sample features; wherein, the first feature extraction is used to align the first target domain sample features with the source domain features of the source domain data in a global distribution.

[0046] The second feature extraction module is used to perform second feature extraction on the first target domain sample features to obtain the corresponding second target domain sample features; wherein, the second feature extraction is used to align the second target domain sample features with the source domain features on the boundary distribution;

[0047] The prediction module is used to perform prediction processing based on the features of the second target domain samples to obtain the prediction result of refrigerant leakage.

[0048] Thirdly, embodiments of this application also provide a refrigeration device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the above-described refrigerant leakage detection method.

[0049] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the refrigerant leakage detection method described above.

[0050] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application.

[0051] This invention provides a refrigerant leak detection method, apparatus, medium, and device. Through a phased feature alignment strategy, it first aligns the target domain sample features with the source domain features at the global distribution level, and then further refines the alignment process at the boundary distribution level, thereby achieving adaptive optimization for feature distributions at different levels. This phased, multi-level alignment method significantly improves the model's transfer stability and detection robustness across systems and diverse operating conditions, effectively enhancing the generalization ability and accuracy of the refrigerant leak detection method in complex application environments. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] in:

[0054] Figure 1 A schematic flowchart illustrating the refrigerant leak detection method provided in this application embodiment;

[0055] Figure 2 A flowchart illustrating the training process of the first target model;

[0056] Figure 3 A flowchart illustrating the training process for the second target model;

[0057] Figure 4A flowchart illustrating the process for obtaining predictions of refrigerant leakage.

[0058] Figure 5 Performance comparison chart of different models across rated cooling and maximum cooling conditions;

[0059] Figure 6 Performance comparison chart of different models under rated cooling and condensation cooling conditions;

[0060] Figure 7 This is a schematic diagram of the refrigerant leak detection device;

[0061] Figure 8 This is a structural block diagram of a refrigeration device. Detailed Implementation

[0062] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0063] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0064] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0065] Please see Figure 1 , Figure 1This is a flowchart illustrating the refrigerant leak detection method provided in this application. Although the logical sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown in the figures. The refrigerant leak detection method of this application can be widely applied to any refrigeration equipment using refrigerant, including but not limited to household air conditioners, commercial multi-split systems, industrial chillers, and refrigerated transport equipment. The core objective of this method is to improve the stability and accuracy of refrigerant leak detection under different system types and diverse operating conditions. By introducing an alignment strategy for global and boundary distributions during the feature extraction stage, effective coordination of feature differences between the target domain and the source domain is achieved, thereby enhancing the model's adaptability across systems and operating conditions and solving the problem of poor generalization in traditional detection methods.

[0066] Specifically, the detailed process of the refrigerant leakage detection method provided in this application embodiment is as follows:

[0067] S101, Obtain target domain sample data, and perform first feature extraction on the target domain sample data to obtain the corresponding first target domain sample features.

[0068] The target domain sample data refers to actual operational data collected under specific refrigeration system and operating conditions for refrigerant leak detection, including but not limited to compressor frequency, exhaust temperature, evaporation temperature, ambient temperature, indoor temperature, outdoor fan frequency, pressure value, and flow meter readings. The first feature extraction is used to extract feature information (i.e., the first target domain sample features) from the target domain sample data that characterizes refrigerant leak-related properties. This first target domain sample feature is aligned globally with the source domain features of the source domain data. The source domain data refers to reference operational data collected under known refrigeration system and operating conditions that has a clear refrigerant leak label (e.g., refrigerant leak degree or refrigerant leak level). Correspondingly, the source domain features are the feature information extracted from the source domain data that characterizes refrigerant leak properties.

[0069] Optionally, after obtaining the target domain sample data, outlier removal and input format preprocessing can be performed to improve the stability of the data and the robustness of the model.

[0070] The outlier removal process employs a dual screening approach, cleaning abnormal samples from both the source and target domains based on both statistical distribution and dynamic fluctuation. First, significantly deviating data points are identified and removed using the quartile method. Specifically, if a sample in the target domain exceeds the sum of the upper quartile and 1.5 times the interquartile range, or falls below the difference between the lower quartile and 1.5 times the interquartile range, it is considered an outlier and removed. Subsequently, a weighted volatility criterion based on a sliding window is introduced to dynamically assess the local stability of features. Within each window interval, the volatility of the target domain sample data is calculated, and a geometric weighting strategy assigns higher weights to recent data. When a fluctuation within a window is detected to be significantly higher than the overall average volatility level, it is identified as a point of severe volatility and removed to further improve the consistency of the sample set.

[0071] Specifically, the input format preprocessing includes: processing the source domain data and target domain sample data into a tensor format to adapt to the input requirements of the subsequent neural network; and balancing the number of samples of the two types of data through strategies such as downsampling, upsampling, or data duplication to ensure that the model has a good generalization foundation during the training phase.

[0072] Optionally, the first feature extraction can employ a one-dimensional convolutional neural network (1D-CNN) as the basic structure to extract key features from the original sequence data. Based on this, alternative structures with stronger cross-domain feature generalization capabilities can be selected according to specific application requirements, including but not limited to the following: Depthwise Separable Convolution (DS-Conv): By separating inter-channel convolution and spatial convolution, it significantly reduces the number of model parameters while improving feature extraction efficiency, making it suitable for resource-constrained device scenarios; Lightweight Residual Network (LightweightResNet): Introduces a skip connection mechanism to alleviate the gradient vanishing problem, and enhances adaptability to multi-condition input data through network structure simplification; Transformer-based sequence modeling structure: Utilizes a self-attention mechanism to model long-distance feature dependencies, suitable for time-series data scenarios with complex interactions between features, and can maintain high feature representation capabilities across systems and operating conditions. Understandably, regardless of the structure adopted, it should ensure good cross-domain migration capability, so as to stably extract discriminative deep features under different equipment types and operating conditions, and provide a robust input basis for subsequent refrigerant leak detection.

[0073] Optionally, to ensure that the extracted features are aligned and adjusted globally during the application phase of the network structure, a feature alignment loss function is constructed during the training phase to guide the target domain features to gradually align with the source domain features globally, thereby improving the detection robustness and generalization ability in cross-domain environments. Specifically, the Maximum Mean Discrepancy (MMD) loss function can be used to align the feature distributions of the source and target domains. This method minimizes the statistical distance between the feature embeddings of the two domains, enabling the model to learn domain-invariant representations during training. Besides MMD, other alternative methods with cross-domain feature alignment capabilities can be chosen, including but not limited to: Kernel Maximum Mean Discrepancy (KMMD): Introducing the nonlinear mapping capability of the kernel function on top of MMD, enhancing the discriminative power for high-dimensional complex features; Conditional Domain Adversarial Network (CDAN): Combining classification output and feature representation, achieving distribution alignment through conditional adversarial strategies, suitable for scenarios where there is a significant coupling relationship between features and labels; Domain-Adversarial Neural Network (DANN): By introducing an adversarial training mechanism, constructing a feature space that can confuse the domain discriminator, effectively improving the model's generalization ability in the target domain. It is understandable that when replacing the alignment method, the construction method of the transfer loss function needs to be adjusted simultaneously, and corresponding hyperparameter tuning strategies, such as adversarial weight coefficients and kernel function parameters, need to be designed to ensure the overall system's adaptability and performance under various working conditions.

[0074] Optionally, in this embodiment, the source and target domains are assumed to share a similar feature space. This means that the feature dimensions and physical meanings of the two types of data are essentially the same, with only distribution differences. However, in practical applications, data collected from different devices or under different operating conditions may differ in dimensions, units, and sampling methods, forming heterogeneous feature spaces. In such scenarios, structural enhancement methods can be used to improve model adaptability. For example, a lightweight feature mapping network can be introduced at the input to spatially transform the target domain data, aligning it with the source domain feature space; alternatively, a self-attention module can be embedded to mine key correlations between input features through a dynamic weight allocation mechanism, thereby achieving more accurate heterogeneous feature adaptation.

[0075] S102, perform second feature extraction on the first target domain sample features to obtain the corresponding second target domain sample features.

[0076] The second feature extraction further extracts feature information that can characterize the refrigerant leakage-related properties from the first target domain sample features (i.e., the second target domain sample features), and the second target domain sample features are aligned with the source domain features in terms of boundary distribution.

[0077] Similarly, the second feature extraction can also use 1D-CNN as the basic structure to further extract key features from the features of the first target domain samples. Based on this, alternative structures with stronger cross-domain feature generalization capabilities can be selected according to specific application requirements, including but not limited to: DS-Conv, Lightweight ResNet, and Transformer-based sequence modeling structures. It is understood that regardless of the structure used, it should ensure good cross-domain transfer capabilities, thereby stably extracting discriminative deep features under different equipment types and operating conditions, providing a robust input foundation for subsequent refrigerant leak detection.

[0078] Similarly, to ensure that the extracted features are aligned and adjusted on the boundary distribution during the application phase of the above network structure, a feature alignment loss function is constructed during the training phase of the network structure to guide the target domain features to gradually align with the source domain features on the boundary distribution, thereby improving the detection robustness and generalization ability in cross-domain environments. In specific implementation, a Generative Adversarial Network (WGAN) loss function based on Wasserstein-1 distance can be used. This optimizes the adversarial relationship between the target and source domain boundary feature distributions, driving consistency in their distribution on the discrimination boundary. Besides WGAN, other alternative methods with cross-domain feature alignment capabilities can also be used, including but not limited to: KMMD, CDAN, and DANN. It is understood that when replacing the alignment method, the construction method of the transfer loss function needs to be adjusted simultaneously, and corresponding hyperparameter tuning strategies, such as adversarial weight coefficients and kernel function parameters, need to be designed to ensure the overall system's adaptability and performance under various operating conditions.

[0079] S103, perform prediction processing based on the characteristics of the second target domain samples to obtain the prediction result of refrigerant leakage.

[0080] Predictive processing refers to the process of analyzing characteristic data based on the features of samples in the second target domain, using classification or regression models, to determine the refrigerant leakage status or infer the amount of refrigerant in the system. The prediction result indicates whether a refrigerant leak exists in the refrigeration system or the degree of refrigerant leakage, and can be expressed in the form of classification labels (such as "leak" or "no leak") or numerical form (such as the larger the value, the higher the degree of leakage).

[0081] The predictive processing is achieved through a direct classification method. Specifically, the features of the second target domain samples are input into a pre-trained support vector machine classifier, and binary classification prediction is performed based on the feature vectors, directly outputting the prediction result of refrigerant leakage, i.e., "leakage" or "no leakage".

[0082] Alternatively, predictive processing can be achieved by first predicting the system's refrigerant level and then indirectly determining whether there is a refrigerant leak. Specifically, the features of the second target domain samples are input into a deep neural network regression model to predict the current refrigerant level in the refrigeration system. Then, by setting a normal range threshold for the refrigerant level, the predicted refrigerant level is compared with the normal range. If the predicted refrigerant level is lower than the threshold, it is determined to be a "leak"; otherwise, it is determined to be "no leak".

[0083] The above embodiments employ a phased feature alignment strategy. First, at the global distribution level, the target domain sample features are aligned with the source domain features. Then, the alignment process is further refined at the boundary distribution level, thereby achieving adaptive optimization for feature distributions at different levels. This phased, multi-level alignment significantly improves the model's transfer stability and detection robustness across systems and diverse operating conditions, effectively enhancing the generalization ability and accuracy of the refrigerant leak detection method in complex application environments.

[0084] In some embodiments of this application, the first target domain sample features in S101 are obtained by extracting first features from the target domain sample data using a first target model. The first target model includes a first input layer, a first convolutional layer, a first pooling layer, a first flattening layer, and a first fully connected layer connected in sequence. The input layer of the first input layer is configured to receive target domain sample data and pass it to the first convolutional layer. The first convolutional layer is configured to perform convolution processing on the target domain sample data. The first pooling layer is configured to perform pooling processing on the feature representation output by the first convolutional layer. The first flattening layer is configured to flatten the feature representation output by the first pooling layer. The first fully connected layer is configured to perform weighted calculation processing on the feature representation output by the first flattening layer.

[0085] The first input layer receives target domain sample data in the format (batch_size, feature_dim, seq_len). This layer serves as the model's entry point, feeding the raw data into subsequent network structures for processing. It does not perform parameter calculations; its role is solely data transfer and format standardization. The first convolutional layer performs a one-dimensional convolution operation on the input target domain sample data to extract local temporal features. This layer can use a standard Conv1d structure, with a default kernel size of 3 and padding of 1 to maintain the output sequence length consistent with the input. Optionally, it can also support stacked multi-layer convolutional structures, adding a ReLU activation function after each convolutional layer to enhance nonlinear modeling capabilities. Depending on specific application requirements, this convolutional layer can be replaced with a depthwise separable convolutional structure to reduce the number of parameters, or a lightweight residual structure can be used to improve the depth and stability of feature extraction. The first pooling layer performs dimensionality reduction and compression on the temporal features extracted by the convolutional layer to highlight key information and suppress redundant noise. This layer preferably employs global average pooling (GlobalAvgPool1d), averaging each channel along the sequence dimension to output a vector in (batch_size, out_channels) format, thus obtaining a more stable and compact feature representation. In specific scenarios, max pooling can also be used to preserve the features of the region with the strongest response. The first flattening layer flattens the two-dimensional tensor output by the pooling layer into a one-dimensional vector, that is, converting the (batch_size, channels) format features to the (batch_size, feature_dim) format, providing a standard input form for subsequent fully connected layer processing; this layer does not introduce new parameters, but only serves as a structural connection for dimensional transformation. The first fully connected layer performs weighted combination and high-dimensional mapping on the flattened target domain features to extract deep representations with global discriminative capabilities. This layer can adopt a standard linear mapping structure, supports different numbers of hidden units and stacked layers, and adds a ReLU activation function after each linear transformation to enhance the model's expressive power.

[0086] In some embodiments of this application, such as Figure 2 As shown, the first target domain sample features in S101 are obtained by extracting the first feature from the target domain sample data using the first target model. The training process of the first target model includes:

[0087] S201, Obtain training data for the target domain and training data for the source domain.

[0088] The target domain training data refers to sample data collected under specific refrigeration system and operating conditions for training the first target model, including but not limited to compressor frequency, exhaust temperature, evaporation temperature, ambient temperature, indoor temperature, outdoor fan frequency, pressure value, and flow meter readings. The source domain training data refers to reference operating data collected under known refrigeration system and operating conditions for training the first target model, and which has a clear refrigerant leakage label (e.g., refrigerant leakage degree or refrigerant leakage level).

[0089] S202, the first feature extraction is performed on the target domain training data and the source domain training data through the first training model to obtain the first target domain training feature corresponding to the target domain training data and the first source domain training feature corresponding to the source domain training data.

[0090] Here, the first target domain training feature refers to the feature information extracted from the target domain training data through the first training model, which includes the characteristics of the target domain training data in terms of global distribution. The first source domain training feature refers to the feature information extracted from the source domain training data through the first training model, serving as a reference standard for global distribution alignment.

[0091] Optionally, the structure of the first training model is the same as that of the first target model mentioned above. The difference lies in the different parameters in the model. The specific process of first feature extraction is also basically the same as the working principle of the first target model mentioned above, so it will not be described again.

[0092] S203, calculate the global distribution loss based on the training features of the first target domain and the training features of the first source domain.

[0093] Among them, the global distribution loss refers to the loss function that measures the difference in global statistical distribution between the training features of the first target domain and the training features of the first source domain, and is used to guide the optimization of the first training model.

[0094] In some embodiments of this application, the global distribution loss is calculated based on the training features of the first target domain and the training features of the first source domain, specifically including the following steps: calculating a first similarity between the training features of the first target domain using a kernel function, calculating a second similarity between the training features of the first source domain, and calculating a third similarity between the training features of the first target domain and the training features of the first source domain. The global distribution loss is then calculated based on the first similarity, the second similarity, and the third similarity.

[0095] Optionally, a global distribution loss function can be constructed based on MMD. Specifically, the training features from the first source domain and the training features from the first target domain are first concatenated to form a unified feature set, and the distance between any two feature samples within the set is calculated. The distributional difference between samples is based on the squared Euclidean distance, defined as follows:

[0096]

[0097] In the above formula, L2_distance i,j For sample x i With x j The square of the Euclidean distance, where x i With x j Features can be trained in either the first target domain or the first source domain; feature_dim is the feature dimension; x i,d x is the d-th feature of the i-th sample; j,d Let d be the feature of the j-th sample.

[0098] Furthermore, to enable the kernel function to adapt to different scales of distributional differences, the bandwidth parameter needs to be reasonably estimated. Specifically, the average of all off-diagonal elements in the aforementioned distance matrix is ​​used as the base bandwidth of the Gaussian kernel function.

[0099]

[0100] In the above formula, bandwidth is the base bandwidth of the Gaussian kernel function; n is the total number of samples.

[0101] Furthermore, to enhance the robustness of the kernel function to differences in features at different scales, a multi-scale Gaussian kernel strategy is introduced. Centered on the basic bandwidth, multiple bandwidth values ​​are generated in the exponential space, forming a bandwidth sequence:

[0102]

[0103] In the above formula, bandwidth list [k] represents the bandwidth corresponding to the k-th kernel function. mul For bandwidth scaling factor, kernel nim The number of kernel functions used is denoted by , and i is the offset index relative to the center bandwidth.

[0104] Furthermore, based on each bandwidth obtained in the previous step, a corresponding Gaussian kernel function is constructed. Each kernel function measures the similarity between two samples at a certain scale. By summing all kernel functions, a comprehensive kernel similarity matrix integrating information from multiple scales can be obtained, providing a stable kernel space embedding for the loss.

[0105]

[0106] Furthermore, the global distribution loss maps the training features of the first source domain and the training features of the first target domain to a high-dimensional space through the kernel function described above, and takes the average of these mapped vectors in the high-dimensional space, specifically expressed as:

[0107] L MMD =MMD 2 (X s X t )=E[K(x s , x′ s )]+E[K(x t , x′ t )]-2E[K(x s x t )]

[0108] In the above formula, x s 、x′ s This represents two different first source domain training features; x t 、x′ t Represents two different first target domain training features; E[K(x s , x′ s E[K(x)] represents the expected kernel similarity between the training features of the first source domain, i.e., the first degree of similarity; t , x′ t E[K(x)] represents the expected kernel similarity between training features of the first target domain, i.e., the second similarity level; s x t )] represents the expected cross-kernel similarity between samples from the source domain and the target domain, i.e., the third degree of similarity.

[0109] Understandably, the loss function described above determines similarity by comparing the "mean embedding" vectors of the first source domain training features and the first target domain training features in the high-dimensional kernel space. If the two mean embeddings distributed in the kernel space are very close, the corresponding loss function L... MMD If the values ​​are relatively small, then the two distributions can be considered similar in terms of global statistical characteristics, that is, they have achieved global alignment.

[0110] S204, the first training model is iteratively optimized by minimizing the global distribution loss until the global distribution loss meets the iteration stopping condition, at which point the first training model is taken as the first target model.

[0111] The iteration stopping conditions include, but are not limited to, conditions such as the global distributed loss reaching a preset threshold, the global distributed loss converging, or the number of iterations reaching an upper limit.

[0112] Optionally, the parameters of the first training model are iteratively optimized by minimizing the global distribution loss using gradient descent until the global distribution loss meets the iteration stopping condition, at which point the first training model is used as the first target model.

[0113] The above steps S201-S204, by calculating the global distribution loss and iteratively optimizing the first training model based on the global distribution loss, effectively align the training features of the target domain with the training features of the source domain in the global distribution. The generated first target model can stably extract cross-system features, thus improving the generalization ability of refrigerant leakage detection.

[0114] In some embodiments of this application, the second target domain sample features in S102 are obtained by extracting second features from the first target domain sample features using a second target model. The second target model includes a second input layer, a second convolutional layer, a second pooling layer, a second flattening layer, and a second fully connected layer connected in sequence. The input layer of the second input layer is configured to receive the first target domain sample features and pass them to the second convolutional layer. The second convolutional layer is configured to perform convolution processing on the first target domain sample features. The second pooling layer is configured to perform pooling processing on the feature representation output by the second convolutional layer. The second flattening layer is configured to flatten the feature representation output by the second pooling layer. The second fully connected layer is configured to perform weighted calculation processing on the feature representation output by the second flattening layer.

[0115] The second input layer receives target domain sample data in the format (batch_size, feature_dim, seq_len). This layer serves as the model's entry point, feeding the raw data into subsequent network structures for processing. It does not perform parameter calculations; its role is solely data transfer and format standardization. The second convolutional layer performs one-dimensional convolution on the input target domain sample data to extract local temporal features. This layer can use a standard Conv1d structure with a default kernel size of 3 and padding of 1 to maintain the output sequence length consistent with the input. Optionally, it can also support stacked multi-layer convolutional structures, adding a ReLU activation function after each convolution to enhance nonlinear modeling capabilities. Depending on specific application requirements, this convolutional layer can be replaced with a depthwise separable convolutional structure to reduce the number of parameters, or a lightweight residual structure can be used to improve the depth and stability of feature extraction. The second pooling layer performs dimensionality reduction and compression on the temporal features extracted by the convolutional layer to highlight key information and suppress redundant noise. The first layer preferably uses global average pooling, averaging each channel along the sequence dimension to output a vector in (batch_size, out_channels) format, thus obtaining a more stable and compact feature representation. In specific scenarios, max pooling can also be used to retain the features of the region with the strongest response. The second flattening layer flattens the two-dimensional tensor output by the pooling layer into a one-dimensional vector, that is, converting the (batch_size, channels) format features to (batch_size, feature_dim) format, providing a standard input form for subsequent fully connected layer processing; this layer does not introduce new parameters, but only serves as a structural connection for dimension transformation. The second fully connected layer performs weighted combination and high-dimensional mapping on the flattened target domain features to extract deep representations with global discriminative capabilities. This layer can adopt a standard linear mapping structure, supports different numbers of hidden units and stacked layers, and adds a ReLU activation function after each linear transformation to enhance the model's expressive power.

[0116] In some embodiments of this application, such as Figure 3 As shown, the second target domain sample features in S102 are obtained by extracting second features from the first target domain sample features using the second target model. The training process of the second target model includes:

[0117] S301, Obtain the training features of the first target domain and the training features of the first source domain.

[0118] Optionally, the first target domain training features and the first source domain training features can be obtained through the steps of S201-S202 described above, and the specific process will not be repeated here.

[0119] S302, the second training model is used to extract the second features from the first target domain training features and the first source domain training features to obtain the second target domain training features corresponding to the first target domain training features and the second source domain training features corresponding to the first source domain training features.

[0120] The second target domain training features refer to the feature information extracted from the target domain training data through the second training model, which includes the characteristics of the target domain training data in terms of boundary distribution. The second source domain training features refer to the feature information extracted from the source domain training data through the second training model, serving as a reference standard for boundary distribution alignment.

[0121] Optionally, the structure of the second training model is the same as that of the second target model mentioned above. The difference lies in the different parameters in the model. The specific process of extracting the second feature is also basically the same as the working principle of the second target model mentioned above, so it will not be described again.

[0122] S303, calculate the target domain expected score of the second target domain training features through the discriminator, and calculate the source domain expected score between the second source domain training features.

[0123] The source domain expected score refers to the discriminator's evaluation of the distribution characteristics of the second source domain training features. It serves as a benchmark for comparing the target domain scores and is expressed numerically (e.g., a probability value between 0 and 1), representing the probability that a feature is correctly identified as a source domain feature. The target domain expected score refers to the discriminator's evaluation of the distribution characteristics of the second target domain training features, also expressed numerically, representing the likelihood that the feature is classified as belonging to the source domain.

[0124] Optionally, the discriminator structure includes an input layer, one or more fully connected layers, and an output layer. The input layer receives the feature representation output by the second-stage feature extractor, i.e., the second target domain training features or the second source domain training features. The intermediate fully connected layers can be flexibly configured with the number of layers and hidden units per layer, and each layer can be followed by a ReLU activation function to enhance the model's non-linear expressive power. The output layer is a one-dimensional linear layer used to generate a score value for the corresponding feature. Its output is a real number, without passing through an activation function, representing the probability that the feature is identified as a source domain feature.

[0125] S304, calculate the boundary distribution loss of the second training model and the score difference loss of the discriminator based on the expected score of the target domain and the expected score of the source domain.

[0126] Among them, boundary distribution loss refers to the loss that measures the difference in distribution between the training features of the second target domain and the training features of the second source domain near the boundary. Rating difference loss refers to the difference between the expected score of the target domain and the expected score of the source domain, used to optimize the discriminator to improve its ability to distinguish between features of the target and source domains.

[0127] In some embodiments of this application, calculating the boundary distribution loss of the second training model and the score difference loss of the discriminator based on the expected score in the target domain and the expected score in the source domain includes: obtaining a first loss model and calculating the boundary distribution loss based on the first loss model. In the first loss model, the boundary distribution loss is positively correlated with the expected score in the source domain and negatively correlated with the expected score in the target domain. Then, obtaining a second loss model and calculating the score difference loss based on the second loss model. In the second loss model, the score difference loss is negatively correlated with the expected score in the source domain, positively correlated with the expected score in the target domain, and positively correlated with the gradient penalty term.

[0128] Optionally, a boundary distribution loss function (first loss model and second loss model) can be constructed based on the Wasserstein-1 distance. The Wasserstein-1 distance measures the minimum transport cost between two probability distributions. Its original form is as follows:

[0129]

[0130] In the above formula, P s P represents the distribution of the second source domain training features; t The distribution of the second target domain training features represents the target domain; γ represents the distribution of all P... s Transport into P t The joint distribution scheme; the Euclidean distance between the ‖xy‖ feature samples, used to measure the cost of "transporting" a single point.

[0131] However, since this form is not differentiable in actual neural network training and is inconvenient to optimize directly, its optimizable dual form is used as a substitute. This dual form is implemented as the target of the discriminator, and its role is to learn a function f that satisfies the 1-Lipschitz condition to approximate the distribution difference between the source and target domains. The dual form is defined as follows:

[0132]

[0133] In the above formula, f represents a function that satisfies the 1-Lipschitz constraint; Sup represents finding a function f that satisfies the constraint and maximizes its expected difference. This represents the average score (i.e., the expected score of the source domain) given by the discriminator to the training features of the second source domain. This represents the average score of the discriminator on the training features of the second target domain (i.e., the expected score of the target domain).

[0134] To ensure that the 1-Lipschitz constraint in the duality condition holds, a gradient penalty term is introduced into the discriminator loss, and the second loss model is defined as follows:

[0135]

[0136] In the above formula, L D The term represents the score difference loss; the first term is the negative expected score from the source domain; the second term is the positive expected score from the target domain; and the third term is the gradient penalty term. The intermediate sample is obtained by interpolation between samples in the source and target domains; λ is a hyperparameter used to adjust the weight of the gradient penalty term. Therefore, this second loss model (rating difference loss) satisfies the following characteristics: it is negatively correlated with the source domain rating; and positively correlated with both the target domain rating and the gradient penalty term.

[0137] Accordingly, the first loss model can be expressed as:

[0138]

[0139] In the above formula, L WGAN The loss function represents the boundary distribution loss. The larger this loss is, the greater the difference in distribution between the source and target domains at the boundary level. Therefore, the trend of this loss function is that it is positively correlated with the expected score of the source domain and negatively correlated with the expected score of the target domain, thus having a guiding role in adjusting the feature boundary distribution.

[0140] S305, the second training model is iteratively optimized by minimizing the boundary distribution loss and the discriminator is iteratively optimized by maximizing the score difference loss until the iteration stopping condition is met, at which point the second training model is used as the second target model.

[0141] Optionally, a phased adversarial training strategy is employed to iteratively optimize the second training model and the discriminator. The entire training process optimizes the second training model by minimizing the boundary distribution loss and optimizes the discriminator by maximizing the score difference loss.

[0142] Specifically, in each training cycle, the discriminator is first updated. In this phase, the parameters of the second trained model are fixed, and the second source domain training features and the second target domain training features are input into the discriminator. The difference between the output scores is calculated, and the discriminator parameters are iteratively updated multiple times (e.g., five updates by default) by maximizing the score difference loss. This operation helps improve the discriminator's ability to distinguish between the feature distributions of the source and target domains, and enhances its sensitivity to differences in boundary distributions.

[0143] Next, the second training model is updated. The discriminator parameters are frozen, and only the parameters of the second training model are optimized. At this point, by minimizing the boundary distribution loss, the target domain features are made as close as possible to the source domain features in the discriminator output. This prompts the second training model to learn a boundary feature representation that is indistinguishable between the two domains, thereby achieving effective alignment between the target domain and the source domain at the boundary distribution level.

[0144] The alternating training of the discriminator and the second training model will continue until a preset iteration termination condition is met, such as the simultaneous convergence of the boundary distribution loss and the scoring difference loss, the loss value falling below a preset threshold, or the number of training rounds reaching the upper limit. After training is completed, the iteratively optimized second training model will be determined as the second target model, which will be used to extract and adapt the refrigerant leakage features in the target domain during actual detection.

[0145] The above steps S301-S305, by calculating the boundary distribution loss and the scoring difference loss and iteratively optimizing the second training model based on the boundary distribution loss and the scoring difference loss, effectively align the training features of the target domain with the training features of the source domain on the boundary distribution. The generated second target model can stably extract cross-system features and improve the generalization ability of refrigerant leakage detection.

[0146] In some embodiments of this application, the prediction results include different degrees of refrigerant leakage (e.g., no leakage, slight leakage, moderate leakage, or severe leakage, etc.), such as Figure 4 As shown, S103 performs prediction processing based on the features of the second target domain samples to obtain the prediction result of refrigerant leakage, including:

[0147] S1031, the third target model is used to predict the sample characteristics of the second target domain to obtain the predicted value of refrigerant quantity.

[0148] In some embodiments of this application, the third target model in S1031 includes a third input layer, a third fully connected layer, and a first output layer connected in sequence. The third input layer is configured to receive sample features from the second target domain and pass them to the third fully connected layer. The third fully connected layer is configured to perform weighted calculation processing on the feature representation output by the third input layer. The first output layer is configured to map the feature representation output by the third fully connected layer to a predicted refrigerant quantity.

[0149] The third input layer primarily serves for data access and format standardization, without performing parameter calculations, ensuring that input features can be losslessly transmitted to subsequent computation modules. The third fully connected layer performs nonlinear mapping and combination processing on the input feature representations to extract deep semantic information highly correlated with the degree of refrigerant leakage. This layer supports configuration as a single-layer or multi-layer stacked structure, with ReLU activation functions applied after each layer to enhance the model's ability to fit complex nonlinear relationships. The number of hidden units and layers can be flexibly adjusted according to specific application scenarios to control model complexity while ensuring modeling capability. The first output layer maps the feature vector output by the third fully connected layer to the target physical quantity, i.e., the predicted refrigerant quantity. This layer can adopt a linear output structure, directly providing the regression result. Optionally, the first output layer can also be extended to a multi-output structure to simultaneously predict other key physical quantities (such as system pressure, temperature deviation, etc.), thereby constructing a multi-objective regression model. This extension method helps improve the overall predictive stability of the model and provides more physical evidence that can be used to assist in judging refrigerant leakage.

[0150] S1032, determine the corresponding degree of refrigerant leakage based on the predicted refrigerant quantity and the baseline refrigerant quantity.

[0151] The baseline refrigerant quantity can be the rated charge amount of the equipment under leak-free conditions or an empirical threshold. Based on the ratio of the predicted refrigerant quantity to the baseline refrigerant quantity, the corresponding degree of refrigerant leakage can be determined, such as no leakage, minor leakage, moderate leakage, or severe leakage. This method not only improves the accuracy of leak detection but also provides a clear quantitative basis for subsequent maintenance recommendations and strategy adjustments.

[0152] Optionally, in addition to independent training, a unified total loss function can be constructed to jointly train the various training models to obtain the corresponding target model, as shown below:

[0153] L total =λ reg L reg +λ phy L phy +λ MMD L MMD +λ WGAN L WGAN

[0154] In the above formula, L total The total loss is λ. reg , λ phy , λ MMD , λ WGAN L represents the weighting coefficients of each loss function. reg The prediction accuracy loss, used to measure the deviation between the model's predicted values ​​and the true labels, is expressed by the formula:

[0155]

[0156] In the above formula, y is the model's predicted value. i This is a real label.

[0157] Physical consistency loss L phy This is an auxiliary constraint term designed based on the thermodynamic laws of refrigeration systems. It is used to limit the model output to avoid violating physical principles (such as the coupling relationship between pressure, temperature, and refrigerant quantity). This loss term can guide the model to generate more interpretable and reasonable prediction results while maintaining prediction accuracy. MMD and L WGAN I won't go into details.

[0158] Optionally, to improve the model's generalization ability under complex or rapidly changing working conditions, the weight coefficients of each loss function can be dynamically adjusted according to the progress information of the training cycle and the phased strategy to gradually enhance the adaptation to the distribution characteristics of the target domain; or the degree of distribution deviation between the source domain and the target domain can be evaluated in real time according to the discriminator output results, and the contribution weights of the relevant loss terms can be adjusted accordingly to achieve feedback adjustment of the transfer intensity.

[0159] To verify the performance stability and generalization ability of the refrigerant leakage detection method proposed in this invention under different operating conditions of a specific system, the following experiment was conducted in advance, and an example of the experiment is as follows:

[0160] This experiment used a 1.5HP household split-type air conditioning unit with R32 refrigerant. The test conditions were set according to the national standard GB / T18837 "Room Air Conditioners" for evaluating refrigeration performance. The specific operating parameters are shown in Table 1, covering typical operating states such as rated cooling, condensation cooling, and maximum cooling.

[0161]

[0162] Table 1

[0163] In addition, this experiment set up four prediction models for performance comparison and analysis, specifically including: 1. Adaptive Transfer Neural Network (DDSA) proposed in this invention; 2. Adaptive Transfer Neural Network based on single-layer feature extraction (MMD-1DCNN); 3. One-dimensional Convolutional Neural Network (1DCNN); 4. Multilayer Perceptron (MLP).

[0164] The input features of the above model are all derived from the sensor measurements built into the air conditioning equipment and indirect indicators calculated from the system operating parameters, covering multiple dimensions such as temperature, current, frequency, valve opening, and power. A total of 40 features were used, including 4 computational features derived through algorithm derivation. Some key features are listed in Table 2.

[0165] Serial Number symbol variable unit 1 <![CDATA[T p,in ]]> Internal tube temperature ℃ 2 <![CDATA[T p,out ]]> external tube temperature ℃ 3 <![CDATA[T dis ]]> Exhaust temperature ℃ 4 <![CDATA[f comp ]]> compressor operating frequency Hz 5 EXV Expansion valve opening 1 6 <![CDATA[I comp ]]> compressor current A 7 <![CDATA[EXV tar ]]> expansion valve target opening 1 8 <![CDATA[P in ]]> Input power W 9 <![CDATA[V fan,out ]]> External fan wind speed rpm

[0166] Table 2

[0167] Regarding the setting of refrigerant leakage levels, the experiment used the predicted refrigerant quantity as a reference, dividing refrigerant losses from 0% to 30% into multiple progressive fault levels to simulate different degrees of refrigerant insufficiency. The specific grading standards are shown in Table 3, where each 5% decrease in refrigerant quantity is defined as a progressive fault level, covering various actual leakage scenarios that a typical household air conditioning system may face.

[0168] Fault level number grade Experimental conditions Simulated leakage level 0 Normal operation 100% filling volume 0% 1 Level 1 95% of the fill volume 5% 2 Level 2 90% of the fill volume 10% 3 Level 3 80% of the filling volume 20% 4 Level 4 70% of the fill volume 30%

[0169] Table 3

[0170] A comparative experiment was then conducted, and the results were as follows: Figure 5 and Figure 6 As shown. Figure 5 and Figure 6 The horizontal axis in the simulation corresponds to different levels of leakage. Figure 5 and Figure 6 The vertical axis corresponds to the mean absolute error of the refrigerant quantity prediction under different leakage levels. Experimental results show that the proposed DDSA model exhibits superior cross-domain transfer capability and higher prediction accuracy under various operating conditions. Compared with traditional MMD-1DCNN, 1DCNN, and MLP models, it has stronger robustness and generalization ability (smaller mean absolute error), especially when the leakage level is high or the operating conditions differ significantly.

[0171] To facilitate better implementation of the refrigerant leak detection method of this application, this application also provides a refrigerant leak detection device based on the above-described refrigerant leak detection method. The meanings of the terms used are the same as in the above-described refrigerant leak detection method, and specific implementation details can be found in the description of the method embodiments.

[0172] Please see Figure 7 , Figure 7 This is a schematic diagram of the refrigerant leak detection device provided in the embodiments of this application, which may specifically include:

[0173] The first feature extraction module 701 is used to acquire target domain sample data and perform first feature extraction on the target domain sample data to obtain the corresponding first target domain sample features; wherein, the first feature extraction is used to align the first target domain sample features with the source domain features of the source domain data in the global distribution.

[0174] The second feature extraction module 702 is used to perform second feature extraction on the first target domain sample features to obtain the corresponding second target domain sample features; wherein, the second feature extraction is used to align the second target domain sample features with the source domain features on the boundary distribution;

[0175] The prediction module 703 is used to perform prediction processing based on the features of the second target domain samples to obtain the prediction result of refrigerant leakage.

[0176] The above embodiments employ a phased feature alignment strategy. First, at the global distribution level, the target domain sample features are aligned with the source domain features. Then, the alignment process is further refined at the boundary distribution level, thereby achieving adaptive optimization for feature distributions at different levels. This phased, multi-level alignment significantly improves the model's transfer stability and detection robustness across systems and diverse operating conditions, effectively enhancing the generalization ability and accuracy of the refrigerant leak detection method in complex application environments.

[0177] In some embodiments of this application, the first target domain sample features are obtained by extracting first features from the target domain sample data using a first target model. The first target model includes a first input layer, a first convolutional layer, a first pooling layer, a first flattening layer, and a first fully connected layer connected in sequence.

[0178] The input layer of the first input layer is configured to receive target domain sample data and pass it to the first convolutional layer;

[0179] The first convolutional layer is configured to perform convolution processing on the target domain sample data;

[0180] The first pooling layer is configured to pool the feature representation output by the first convolutional layer.

[0181] The first flattening layer is configured to flatten the feature representation output by the first pooling layer;

[0182] The first fully connected layer is configured to perform weighted computation on the feature representation output by the first flattened layer.

[0183] In some embodiments of this application, the first target domain sample features are obtained by extracting first features from the target domain sample data using a first target model. The training process of the first target model includes:

[0184] Obtain training data for the target domain and training data for the source domain;

[0185] The first training model is used to extract the first feature from the target domain training data and the source domain training data to obtain the first target domain training feature corresponding to the target domain training data and the first source domain training feature corresponding to the source domain training data.

[0186] Calculate the global distribution loss based on the training features of the first target domain and the training features of the first source domain;

[0187] The first training model is iteratively optimized by minimizing the global distribution loss until the global distribution loss meets the iteration stopping condition, at which point the first training model is used as the first target model.

[0188] In some embodiments of this application, calculating the global distribution loss based on the training features of the first target domain and the training features of the first source domain includes:

[0189] The kernel function is used to calculate the first similarity between the training features of the first target domain, the second similarity between the training features of the first source domain, and the third similarity between the training features of the first target domain and the training features of the first source domain.

[0190] The global distribution loss is calculated based on the first, second, and third similarity levels.

[0191] In some embodiments of this application, the second target domain sample features are obtained by extracting the second features of the first target domain sample features through a second target model. The second target model includes a second input layer, a second convolutional layer, a second pooling layer, a second flattening layer, and a second fully connected layer connected in sequence.

[0192] The input layer of the second input layer is configured to receive the features of the first target domain sample and pass them to the second convolutional layer;

[0193] The second convolutional layer is configured to perform convolution processing on the features of the first target domain samples;

[0194] The second pooling layer is configured to pool the feature representation output by the second convolutional layer.

[0195] The second flattening layer is configured to flatten the feature representation output by the second pooling layer;

[0196] The second fully connected layer is configured to perform weighted computation on the feature representation output by the second flattened layer.

[0197] In some embodiments of this application, the second target domain sample features are obtained by extracting second features from the first target domain sample features using a second target model. The training process of the second target model includes:

[0198] Obtain the training features of the first target domain and the training features of the first source domain;

[0199] The second training model is used to extract the second feature from the first target domain training feature and the first source domain training feature to obtain the second target domain training feature corresponding to the first target domain training feature and the second source domain training feature corresponding to the first source domain training feature.

[0200] The discriminator calculates the target domain expected score of the second target domain training features and the source domain expected score between the second source domain training features.

[0201] The boundary distribution loss of the second training model and the score difference loss of the discriminator are calculated based on the expected scores of the target domain and the expected scores of the source domain.

[0202] The second training model is iteratively optimized by minimizing the boundary distribution loss and by maximizing the score difference loss, until the iteration stopping condition is met, at which point the second training model is used as the second target model.

[0203] In some embodiments of this application, the boundary distribution loss of the second training model and the score difference loss of the discriminator are calculated based on the expected score of the target domain and the expected score of the source domain, including:

[0204] Obtain the first loss model and calculate the boundary distribution loss based on the first loss model; wherein, in the first loss model, the boundary distribution loss is positively correlated with the expected score of the source domain and negatively correlated with the expected score of the target domain;

[0205] Obtain the second loss model and calculate the score difference loss based on the second loss model; wherein, in the second loss model, the score difference loss is negatively correlated with the expected score of the source domain, positively correlated with the expected score of the target domain, and positively correlated with the gradient penalty term.

[0206] In some embodiments of this application, the prediction results include different degrees of refrigerant leakage. Prediction processing is performed based on the characteristics of the second target domain samples to obtain the refrigerant leakage prediction results, including:

[0207] The third objective model is used to predict the sample features of the second objective domain to obtain the predicted value of the refrigerant quantity;

[0208] The degree of refrigerant leakage is determined based on the predicted refrigerant volume and the baseline refrigerant volume.

[0209] In some embodiments of this application, the third target model includes a third input layer, a third fully connected layer, and a first output layer connected in sequence;

[0210] The third input layer is configured to receive the features of the second target domain samples and pass them to the third fully connected layer;

[0211] The third fully connected layer is configured to perform weighted computation on the feature representation output by the third input layer;

[0212] The first output layer is configured to map the feature representation output by the third fully connected layer to the refrigerant quantity prediction.

[0213] In addition, this application also provides a refrigeration device, such as Figure 8 As shown, it illustrates the structural diagram of the refrigeration equipment involved in this application, specifically:

[0214] The cooling device may include components such as a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, a power supply 803, and an input unit 804. Those skilled in the art will understand that... Figure 8 The refrigeration equipment structure shown does not constitute a limitation on the refrigeration equipment and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0215] in:

[0216] The processor 801 is the control center of the refrigeration equipment. It connects to various parts of the refrigeration equipment via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 802, and by calling data stored in the memory 802, it performs various functions and processes data, thereby providing overall monitoring of the refrigeration equipment. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 801.

[0217] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the cooling device, etc. In addition, the memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.

[0218] The refrigeration equipment also includes a power supply 803 that supplies power to the various components. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 803 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0219] The cooling device may also include an input unit 804, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0220] Although not shown, the refrigeration device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 801 in the refrigeration device loads the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 runs the application programs stored in the memory 802, thereby implementing the steps in any of the refrigerant leakage detection methods provided in this application embodiment: acquiring target domain sample data, performing a first feature extraction on the target domain sample data to obtain corresponding first target domain sample features; wherein, the first feature extraction is used to align the first target domain sample features with the source domain features of the source domain data in a global distribution; performing a second feature extraction on the first target domain sample features to obtain corresponding second target domain sample features; wherein, the second feature extraction is used to align the second target domain sample features with the source domain features in a boundary distribution; performing prediction processing based on the second target domain sample features to obtain the prediction result of refrigerant leakage.

[0221] The above embodiments employ a phased feature alignment strategy. First, at the global distribution level, the target domain sample features are aligned with the source domain features. Then, the alignment process is further refined at the boundary distribution level, thereby achieving adaptive optimization for feature distributions at different levels. This phased, multi-level alignment significantly improves the model's transfer stability and detection robustness across systems and diverse operating conditions, effectively enhancing the generalization ability and accuracy of the refrigerant leak detection method in complex application environments.

[0222] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0223] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0224] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the refrigerant leak detection methods provided in this application.

[0225] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0226] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0227] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the refrigerant leak detection methods provided in this application, the beneficial effects that any of the refrigerant leak detection methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0228] The above provides a detailed description of a refrigerant leakage detection method, apparatus, refrigeration equipment, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for detecting refrigerant leakage, characterized in that, The method includes: Obtain target domain sample data, and perform a first feature extraction on the target domain sample data to obtain the corresponding first target domain sample feature; wherein, the first feature extraction is used to align the first target domain sample feature with the source domain feature of the source domain data in a global distribution; The first target domain sample features are subjected to a second feature extraction to obtain the corresponding second target domain sample features; wherein, the second feature extraction is used to align the second target domain sample features with the source domain features on the boundary distribution; Prediction processing is performed based on the sample features of the second target domain to obtain the prediction result of refrigerant leakage.

2. The refrigerant leakage detection method according to claim 1, characterized in that, The first target domain sample feature is obtained by extracting the first feature from the target domain sample data using a first target model. The first target model includes a first input layer, a first convolutional layer, a first pooling layer, a first flattening layer, and a first fully connected layer connected in sequence. The input layer of the first input layer is configured to receive the target domain sample data and pass it to the first convolutional layer; The first convolutional layer is configured to perform convolution processing on the target domain sample data; The first pooling layer is configured to pool the feature representation output by the first convolutional layer; The first flattening layer is configured to flatten the feature representation output by the first pooling layer; The first fully connected layer is configured to perform weighted computation on the feature representation output by the first flattened layer.

3. The refrigerant leakage detection method according to claim 1, characterized in that, The first target domain sample feature is obtained by extracting the first feature from the target domain sample data using a first target model. The training process of the first target model includes: Obtain training data for the target domain and training data for the source domain; The first training model is used to extract first features from the target domain training data and the source domain training data to obtain the first target domain training features corresponding to the target domain training data and the first source domain training features corresponding to the source domain training data. Calculate the global distribution loss based on the training features of the first target domain and the training features of the first source domain; The first training model is iteratively optimized by minimizing the global distribution loss until the global distribution loss meets the iteration stopping condition, at which point the first training model is taken as the first target model.

4. The refrigerant leakage detection method according to claim 3, characterized in that, The step of calculating the global distribution loss based on the training features of the first target domain and the training features of the first source domain includes: The kernel function is used to calculate the first similarity between the first target domain training features, the second similarity between the first source domain training features, and the third similarity between the first target domain training features and the first source domain training features. The global distribution loss is calculated based on the first similarity, the second similarity, and the third similarity.

5. The refrigerant leakage detection method according to claim 1, characterized in that, The second target domain sample features are obtained by extracting the second features from the first target domain sample features using a second target model. The second target model includes a second input layer, a second convolutional layer, a second pooling layer, a second flattening layer, and a second fully connected layer connected in sequence. The input layer of the second input layer is configured to receive the features of the first target domain samples and pass them to the second convolutional layer; The second convolutional layer is configured to perform convolution processing on the features of the first target domain samples; The second pooling layer is configured to pool the feature representation output by the second convolutional layer; The second flattening layer is configured to flatten the feature representation output by the second pooling layer; The second fully connected layer is configured to perform weighted computation on the feature representation output by the second flattened layer.

6. The refrigerant leakage detection method according to claim 1, characterized in that, The second target domain sample features are obtained by extracting second features from the first target domain sample features using a second target model. The training process of the second target model includes: Obtain the training features of the first target domain and the training features of the first source domain; The second training model is used to extract second features from the first target domain training features and the first source domain training features to obtain the second target domain training features corresponding to the first target domain training features and the second source domain training features corresponding to the first source domain training features. The discriminator calculates the target domain expected score of the second target domain training features and the source domain expected score between the second source domain training features; The boundary distribution loss of the second training model and the score difference loss of the discriminator are calculated based on the expected score of the target domain and the expected score of the source domain. The second training model is iteratively optimized by minimizing the boundary distribution loss and by maximizing the rating difference loss until the iteration stopping condition is met, at which point the second training model is used as the second target model.

7. The refrigerant leakage detection method according to claim 6, characterized in that, The step of calculating the boundary distribution loss of the second training model and the score difference loss of the discriminator based on the expected score of the target domain and the expected score of the source domain includes: Obtain a first loss model, and calculate the boundary distribution loss based on the first loss model; wherein, in the first loss model, the boundary distribution loss is positively correlated with the expected score of the source domain and negatively correlated with the expected score of the target domain; Obtain a second loss model and calculate the rating difference loss based on the second loss model; wherein, in the second loss model, the rating difference loss is negatively correlated with the expected score in the source domain, positively correlated with the expected score in the target domain, and positively correlated with the gradient penalty term.

8. The refrigerant leakage detection method according to claim 1, characterized in that, The prediction results include different degrees of refrigerant leakage. The prediction processing based on the features of the second target domain samples to obtain the refrigerant leakage prediction results includes: The refrigerant quantity is predicted by using a third target model to predict the sample features of the second target domain. The degree of refrigerant leakage is determined based on the predicted refrigerant volume and the baseline refrigerant volume.

9. The refrigerant leakage detection method according to claim 8, characterized in that, The third target model includes a third input layer, a third fully connected layer, and a first output layer connected in sequence. The third input layer is configured to receive the second target domain sample features and pass them to the third fully connected layer; The third fully connected layer is configured to perform weighted calculation processing on the feature representation output by the third input layer; The first output layer is configured to map the feature representation output by the third fully connected layer to the refrigerant quantity prediction value.

10. A refrigerant leak detection device, characterized in that, The refrigerant leakage detection device includes: The first feature extraction module is used to acquire target domain sample data and perform first feature extraction on the target domain sample data to obtain corresponding first target domain sample features; wherein, the first feature extraction is used to align the first target domain sample features with the source domain features of the source domain data in a global distribution. The second feature extraction module is used to perform second feature extraction on the first target domain sample features to obtain the corresponding second target domain sample features; wherein, the second feature extraction is used to align the second target domain sample features with the source domain features on the boundary distribution; The prediction module is used to perform prediction processing based on the features of the second target domain samples to obtain the prediction result of refrigerant leakage.

11. A computer-readable storage medium, characterized in that, The device stores a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 9.

12. A refrigeration device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Monitoring method and monitoring system of refrigerant leakage as well as air conditioning unit

    CN109764476A

  • Fault diagnosis method and device for refrigerating machine and storage medium

    CN116257794A

  • Rolling bearing cross-domain fault diagnosis method based on sub-domain adaptive adversarial network

    CN118624217A

  • Model generating program, model generating device and model generating method

    JP2018194178A