Air conditioner load identification method and device, medium and equipment
Through the air conditioner load identification method based on mutual information and Catboost model, the problem of difficulty in screening the load characteristics of air conditioners in the prior art is solved, and the high accuracy and generalization ability of air conditioner load identification are achieved.
Patent Information
- Application Number
- CN202411812351.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to effectively screen the characteristics of air conditioner load identification, resulting in limited identification accuracy.
The air conditioner load identification method based on mutual information and Catboost model is adopted. By selecting the initial load characteristic index set from a variety of data characteristics of the air conditioner load, the load characteristic combination matrix is constructed, and normalized. Then, the lightweight load characteristic index set is determined using the mutual information method, and the Catboost model is trained to generate an air conditioner load identification model.
The scientific selection and effective screening of air conditioner load identification features is realized, and the generalization ability and accuracy of the identification model are improved.
Smart Images

Figure CN119989186A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power load power consumption monitoring and signal processing, and more specifically, to an air conditioning load identification method, device, medium and equipment. Background Art
[0002] At present, the key to achieving effective regulation is to understand the detailed operation of air-conditioning loads. Non-intrusive load identification only requires the installation of a monitoring device at the power entrance, and the type and operation mode of a single load in the user load cluster can be obtained by monitoring the voltage, current and other signal analysis at this location. It is mainly based on the event monitoring method, which means detecting the occurrence of events from the fluctuations of bus data, extracting load characteristics from the events, and completing load identification through matching and classification. The application of non-intrusive load identification technology to air-conditioning loads can not only effectively reduce hardware costs and simplify the deployment process, but also improve energy utilization efficiency, thereby realizing accurate identification and effective regulation of air-conditioning loads, providing important support for achieving energy-saving operation of air conditioners and stability of power systems.
[0003] Compared with the identification of general electrical equipment, air conditioners consume a lot of reactive power during operation, resulting in higher current values, lower power factors, and higher harmonic distortion. In addition, there will be obvious transient processes when the air conditioner is turned on or off, which increases the difficulty of identification. The implementation principle of the non-intrusive load identification algorithm is to identify the unique characteristics of each load, and the algorithm performance depends to a certain extent on the uniqueness of the characteristics. Therefore, feature selection and extraction are a crucial link in non-intrusive load identification. A survey shows that data preparation, cleaning, and feature engineering usually take up 80% of the researchers' time, while model construction takes up less than 20%. Some scholars use frequency domain characteristics of high-order harmonic currents, two-dimensional voltage-current (VI) trajectory characteristics, and multiple feature combinations to achieve identification. However, due to the large number of air conditioner load types and complex and changeable operation modes, existing methods are difficult to effectively screen the features used for air conditioner load identification, which in turn limits the accuracy of identification. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides an air conditioning load identification method, device, medium and equipment.
[0005] According to one aspect of the present invention, there is provided an air conditioning load identification method, comprising:
[0006] Selecting an initial load characteristic index set of the air conditioning load from a variety of data characteristics of the air conditioning load;
[0007] A load characteristic combination matrix is constructed according to the initial load characteristic index set, and the load characteristic combination matrix is normalized to obtain a normalized load characteristic matrix;
[0008] The mutual information method is used to measure the correlation between each load characteristic index and the equipment label in the normalized load characteristic matrix, and the lightweight load characteristic index set is determined;
[0009] The normalized load characteristic matrix is updated according to the lightweight load index characteristic set to obtain the lightweight characteristic matrix;
[0010] The Catboost model is trained based on the lightweight feature matrix and the corresponding equipment labels to generate an air conditioning load identification model;
[0011] The lightweight load index data of the air-conditioning equipment to be identified is collected and input into the air-conditioning load identification model for load prediction to obtain the load identification result of the air-conditioning equipment to be identified.
[0012] Optionally, the initial load characteristic indicator set includes: voltage effective value, current effective value, current steady-state amplitude, current peak-to-peak value, current peak area, DC component, fundamental wave, 3rd harmonic, 5th harmonic, 7th harmonic, active power, reactive power, apparent power, power factor and power factor angle.
[0013] Optionally, the load characteristic combination matrix A is expressed as:
[0014]
[0015] In the formula, n is the number of features, and m is the number of times the load waveform features in the total meter current and voltage data are extracted;
[0016] The expression of the normalized load characteristic matrix is:
[0017]
[0018] in, a ij Represents the value of the i-th row and j-th column in the lightweight load feature combination matrix A (i∈1,…,m, j∈1,…,n).
[0019] Optionally, a mutual information method is used to measure the correlation between each load characteristic index and the equipment label in the normalized load characteristic matrix to determine a lightweight load characteristic index set, including:
[0020] Calculate the mutual information between each load characteristic index and the equipment label in the normalized load characteristic matrix;
[0021] The mutual information is normalized to obtain the normalized mutual information;
[0022] The set of load characteristic indicators whose normalized mutual information is greater than or equal to a preset threshold is taken as a lightweight load characteristic indicator set.
[0023] Optionally, the mutual information I(X j The calculation formula of Y is:
[0024]
[0025] Where, X j represents the jth load characteristic index in the initial load characteristic index set; Y is the target variable of the equipment label; p(x j ,y) represents the joint probability distribution of load characteristic index Xj and target variable Y; p(x j ) and p(y) are load characteristic index X j and the marginal probability distribution of the target variable Y.
[0026] Optionally, the normalized mutual information MI(X j ; The calculation formula of Y) is:
[0027]
[0028] in, H(X j ) and H(Y) are the features X j and the entropy of the target Y.
[0029] Optionally, the leaf node weight update formula of the Catboost model is:
[0030]
[0031] Among them, λ is the regularization parameter, n is the number of leaf nodes, g and h are the gradient and Hessian matrix of the loss function respectively, and the expression is:
[0032]
[0033] In the formula, is the loss function, y is the real air conditioning load type label, It is the predicted value of air conditioning load type output by the model.
[0034] Optionally, the target encoding expression for each category k of the Catboost model is:
[0035]
[0036] In the formula, c j is the category value of load characteristic j; count(c j =k) is the number of samples of category k, Y is the target variable, and X is the classification variable;
[0037] The numerical expression of the target code is:
[0038]
[0039] Where j<i means that only the data before load characteristic i is considered.
[0040] Optionally, it also includes: using a SHAP explanation model to analyze the impact of load characteristics on the air conditioning load identification accuracy of the CatBoost model, wherein each feature in the CatBoost model is assigned a SHAP explanation model prediction value g(x'), which represents the contribution value of feature j to the model output, and the expression is:
[0041]
[0042] In the formula, x j ∈[0,1] M , M is the number of load features after simplified input; φ0 is the predicted output value of the model without any features, φ j is the SHAP explanation model prediction value of feature j, calculated as:
[0043]
[0044] Where f(x) is the actual predicted value of the air conditioning load type; S refers to any subset that does not contain feature j; S represents the size of the set S; f x (S∪{j}),f x (S) represents the model prediction results with and without feature j, where the ultimate goal is to ensure f(x)≈g(x').
[0045] According to another aspect of the present invention, there is provided an air conditioning load identification device, comprising:
[0046] A selection module, used for selecting an initial load characteristic index set of the air conditioning load from a plurality of data characteristics of the air conditioning load;
[0047] A normalization processing module is used to construct a load characteristic combination matrix according to the initial load characteristic indicator set, and to perform normalization processing on the load characteristic combination matrix to obtain a normalized load characteristic matrix;
[0048] A measurement module is used to measure the correlation between each load characteristic index and the equipment label in the normalized load characteristic matrix by using a mutual information method, and determine a set of lightweight load characteristic indexes;
[0049] An updating module, used for updating the normalized load characteristic matrix according to the lightweight load index characteristic set to obtain the lightweight characteristic matrix;
[0050] The training module is used to train the Catboost model according to the lightweight feature matrix and the corresponding equipment labels to generate an air conditioning load identification model;
[0051] The prediction module is used to collect lightweight load index data of the air-conditioning equipment to be identified and input it into the air-conditioning load identification model for load prediction, so as to obtain the load identification result of the air-conditioning equipment to be identified.
[0052] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.
[0053] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of the above aspects of the present invention.
[0054] Therefore, the present invention is aimed at non-intrusive load identification technology, proposes a load feature quantization selection based on the SHAP interpretation model, and further uses an air-conditioning load identification method based on mutual information and Catboost model to achieve scientific selection and effective screening of air-conditioning load identification features and improve the generalization ability of the identification model. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0056] Figure 1 is a flow chart of an air conditioning load identification method provided by an exemplary embodiment of the present invention;
[0057] Figure 2 is a schematic diagram of the correlation between load characteristics and equipment tags provided by an exemplary embodiment of the present invention;
[0058] Figure 3 is a schematic diagram of an air conditioner identification result after feature selection provided by an exemplary embodiment of the present invention;
[0059] Figure 4 is a schematic diagram of SHAP feature importance of air conditioning load on Catboost algorithm provided by an exemplary embodiment of the present invention;
[0060] Figure 5 is a structural schematic diagram of an air conditioning load identification device provided by an exemplary embodiment of the present invention;
[0061] Figure 6 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0062] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.
[0063] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0064] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0065] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0066] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0067] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0068] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0069] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0070] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0071] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0072] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0073] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0074] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0075] Exemplary Methods
[0076] Figure 1 FIG. 1 is a flow chart of an air conditioning load identification method provided by an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the air conditioning load identification method 100 includes the following steps:
[0077] Step 101, selecting an initial load characteristic index set of the air conditioning load from a plurality of data characteristics of the air conditioning load;
[0078] Step 102, constructing a load characteristic combination matrix according to the initial load characteristic indicator set, and normalizing the load characteristic combination matrix to obtain a normalized load characteristic matrix;
[0079] Step 103, using a mutual information method to measure the correlation between each load characteristic index and the equipment label in the normalized load characteristic matrix, and determining a lightweight load characteristic index set;
[0080] Step 104, updating the normalized load characteristic matrix according to the lightweight load index characteristic set to obtain a lightweight characteristic matrix;
[0081] Step 105, training the Catboost model according to the lightweight feature matrix and the corresponding device labels to generate an air conditioning load identification model;
[0082] Step 106 , collecting lightweight load index data of the air-conditioning equipment to be identified and inputting it into the air-conditioning load identification model to perform load prediction, and obtaining the load identification result of the air-conditioning equipment to be identified.
[0083] Specifically, in view of the problem that it is difficult to effectively screen the identification features of air-conditioning loads by existing technical means, and the features selected by existing load identification technologies are highly subjective, and there is no scientific quantitative method to explain them, resulting in the poor generalization ability of identification models, the present invention proposes a load feature quantization selection method based on the SHAP interpretation model, and proposes an air-conditioning load identification method based on mutual information and Catboost models, thereby realizing the scientific selection and effective screening of air-conditioning load identification features and improving the generalization ability of identification models.
[0084] The present invention adopts the following technical solutions:
[0085] (1) First, select T = {voltage effective value, current effective value, current steady-state amplitude, current peak-to-peak value, current wave peak area, DC component, fundamental wave, third harmonic, fifth harmonic, seventh harmonic, active power, reactive power, apparent power, power factor, power factor angle} as the characteristic index of air conditioning load;
[0086] The specific calculation formula is as follows:
[0087] Voltage RMS (V rms ):
[0088] In the formula, N represents the time length of the steady-state process.
[0089] Current effective value (I rms ):
[0090] The steady-state current amplitude (I amp ):
[0091] Peak-to-peak current (I pp ):I pp =maxI ij (t)-minI ij (t);
[0092] Current peak area (WS):
[0093] Direct current component (DC):
[0094] Fundamental wave (1-h1), 3rd harmonic (1-h3), 5th harmonic (1-h5), 7th harmonic (1-h7):
[0095]
[0096] Where k represents the harmonic order.
[0097] Active power (P):
[0098] Where V k is the effective value of the kth harmonic voltage, I k is the effective value of the kth harmonic current, θ k is the kth harmonic phase difference.
[0099] Reactive power (Q):
[0100] Apparent power(S):
[0101] Power Factor (PF):
[0102] Power Factor Angle (PFA):
[0103] Therefore, the present invention first selects a series of electrical characteristic indicators for the characteristics of air-conditioning load, including voltage effective value, current effective value, harmonic component, power factor, etc. Each feature is calculated by a defined formula, and these features can effectively describe the electrical characteristics of the air-conditioning load under different working conditions, providing basic data support for subsequent identification. This multi-dimensional feature extraction process not only enhances the accuracy of load identification, but also ensures the scientificity and comprehensiveness of the data.
[0104] (2) Combine the features into a matrix A as input.
[0105]
[0106] Where n is the number of features, and m is the number of times the load waveform features in the total meter current and voltage data are extracted.
[0107] (3) Normalize each row of the input matrix A to obtain the normalized load characteristic matrix X;
[0108]
[0109]
[0110] Among them, a ij Represents the value of the i-th row and j-th column in matrix A (i∈1,…,m, j∈1,…,n);
[0111] (4) Using mutual information method to measure load characteristic index X j The degree of association with device tag Y, where X j is the load characteristic index represented by the j-th column of the normalized load characteristic matrix X.
[0112]
[0113] In the formula, y i (i∈1,…,m) represents the device type label.
[0114] ①For each feature X j and the target variable Y, their mutual information I(X j ; Y) The specific calculation formula is:
[0115]
[0116] Among them, p(x j ,y) represents feature X j The joint probability distribution of the target variable Y; p(x j ) and p(y) are the marginal probability distributions of features and targets, respectively.
[0117] ② Standardize the mutual information. The standardized mutual information formula is:
[0118]
[0119] Among them, H(X j ) and H(Y) are the features X j And the entropy of the target Y, the specific calculation formula is:
[0120]
[0121] ③ In order to achieve lightweight model, the correlation between each feature and the target label is quantified by the mutual information (MI) value. i The mutual information value MI(X i ; If Y) is less than the set threshold δ, the feature is considered to have low relevance and is removed. Finally, the features with mutual information values higher than the threshold δ are retained to form a lightweight new feature matrix X'. The result is as follows Figure 2 shown.
[0122] If MI(X i ; Y) < δ, then it is considered that the feature Xi Insufficient relevance to the target label, so it is removed. The retained feature set meets the condition:
[0123] {X i |MI(X i ; Y)≥δ}
[0124] According to the above screening conditions, the lightweight feature matrix X' is obtained. Among them, o is the number of remaining features after mutual information screening, o = n - w (o < n), w is the number of removed features, and n is the number of initial features;
[0125]
[0126] The specific implementation results of the present invention are as Figure 2 shown in the correlation between the load characteristics and the equipment label. It can be Figure 2 seen that among the initial load characteristic indicators, those with strong positive correlation with the equipment label are the effective value of current, active power, reactive power, apparent power, peak-to-peak value of current, current amplitude, and current wave crest area, and those with weak positive correlation are fundamental wave, 3rd harmonic, 5th harmonic, and 7th harmonic. While other characteristics such as the effective value of voltage, power factor, power factor angle, and DC component have weak correlations. Therefore, there may be irrelevant features in the original electrical characteristic indicators, and the irrelevant features can be removed.
[0127] At the same time, it is found that there are strong correlations among the effective value of current, active power, and apparent power, among the peak-to-peak value of current, current amplitude, and current wave crest area, between the power factor and the power factor angle, and among the 3rd harmonic, 5th harmonic, and 7th harmonic. Therefore, there may be redundant characteristics among some features, and the redundant characteristics can be removed.
[0128] Thus, the present invention quantifies the correlation between each feature and the target label through the mutual information (MI) method, and removes low-correlation features by setting a threshold. This mutual information-based method provides a scientific feature screening method, which can effectively remove redundant features and improve the lightweight and computational efficiency of the model. The screening process of mutual information is realized by calculating the joint probability distribution and marginal probability distribution between the feature and the target label, so that the finally screened feature set has higher identification efficiency and accuracy.
[0129] (5) Divide the new matrix X' obtained by the mutual information method into a training set C and a test set D, and the division ratio is 80% and 20%. The test set C is input to the Catboost model for testing.
[0130] ① In each update, the CatBoost model calculates the gradient g of the loss function and the Hessian matrix h according to the input features. The calculation formulas for the gradient g and the Hessian matrix h are respectively:
[0131]
[0132] in, is the loss function, y i is the true label, is the model prediction label.
[0133] ② From the calculated gradient and Hessian value, the optimal weight ω of the leaf node can be obtained:
[0134]
[0135] In the formula, λ is a regularization parameter, which is used to prevent the weight of leaf nodes from being too large and ensure the stability of the model. The value range of the regularization parameter λ is 0.1≤λ≤5.0. The specific value is adjusted through the validation set according to the complexity of the data features, and is usually tuned from λ=1.0.
[0136] ③ Target encoding. For the target variable Y, the target encoding value of each category k of the categorical variable X is calculated as follows:
[0137]
[0138] In the formula, c j is the category value of load characteristic j; count(c j =k) is the number of samples of category k.
[0139] ④To prevent data leakage, CatBoost only uses previous samples to calculate the target encoding, not the current sample. The specific formula is as follows:
[0140]
[0141] In the formula, j < i means that only the data before load feature i is considered. This strategy makes CatBoost more robust when dealing with high-cardinality categorical variables and provides additional generalization capabilities. Finally, the categorical variables are converted into numerical representations according to the CatBoostEncode encoder to achieve the classification of load equipment.
[0142] The air conditioning identification result after feature selection in the specific implementation of the present invention is as follows: Figure 3 As shown,
[0143] Therefore, the present invention adopts CatBoost model for load identification. The optimal weight of leaf nodes is calculated by using gradient and Hessian matrix, and regularization parameters are added to prevent overfitting, thereby ensuring the stability and generalization ability of the model. In addition, the classification variables are processed by target encoding method, combined with the feature encoding method of CatBoost, which effectively improves the classification accuracy of the model. This process ensures the efficiency and accuracy of air conditioning load identification.
[0144] (6) Use the test set D to calculate the three evaluation indicators of Precision, Recall, and F1-score to evaluate the trained model.
[0145]
[0146] In the formula, TP represents the number of positive samples identified as positive, FP represents the number of negative samples identified as positive, FN represents the number of positive samples identified as negative, and TN represents the number of negative samples identified as negative.
[0147] (7) SHAP is used to explain the impact of load features on model classification accuracy. Each feature in the CatBoost model is assigned a SHAP model prediction value g(x'), which represents the contribution of feature j to the model output. The specific formula is as follows:
[0148]
[0149] In the formula, x j ∈[0,1] M , M is the number of load features after simplified input; φ0 is the predicted output value of the model without any features, φ j is the SHAP model prediction value of feature j, and the specific calculation formula is:
[0150]
[0151] Where f(x) is the actual predicted value of the air conditioning load type; S refers to any subset that does not contain feature j; |S| represents the size of the set S; f x (S∪{j}),f x (S) represents the model prediction results with and without feature j. The ultimate goal is to ensure that f(x)≈g(x').
[0152] The SHAP feature importance of the air conditioning load in the Catboost algorithm specifically implemented by the present invention is as follows: Figure 4 shown.
[0153] Therefore, in order to further optimize the model and provide interpretability, the present invention uses SHAP (Shapley Additive Explanations) value to quantify the importance of each feature and identify the features that have the greatest impact on the model output. Through SHAP value analysis, the features that contribute most to the load identification results are screened out, the impact of invalid features on the model is further reduced, and the lightweight characteristics and practical application value of the model are improved. SHAP value analysis provides interpretability for model output, which helps to accurately evaluate the contribution of features to classification results in load identification applications.
[0154] (8) According to the contribution characteristic principle, the predicted value g(x') of the SHAP model is gradually removed, and the features that are positively correlated with the model accuracy are selected for re-prediction. The air conditioning load identification result is obtained according to the degree of influence on the decreasing characteristics of the model.
[0155] Among them, the contribution characteristic principle refers to:
[0156] ① SHAP value determination basis. The SHAP value of each feature (i.e., the contribution value of the feature to the model prediction) is used to quantify the importance of the feature. According to the size of the SHAP value, the feature with a smaller contribution is regarded as a feature with a smaller impact on the model prediction. A contribution threshold τ is set. If the SHAP value g(x') of feature x' is lower than τ, it is considered that the feature has a smaller contribution to the model prediction and can be removed first. That is, features that meet the following conditions can be considered for removal:
[0157] g(x')<τ
[0158] ② Determination of model accuracy change: After removing each low SHAP prediction value g(x'), immediately evaluate the accuracy change of the model (Precision, Recall, F1-score indicators). Set an accuracy tolerance threshold ∈ (usually set to 1%-2%) to indicate the allowable decrease in model accuracy:
[0159] ∣Indicators 去除前 -index 去除后 ∣>ò
[0160] ③ Final feature selection: After the above step-by-step removal process, retain the feature set with higher g(x') and significant positive impact on model accuracy. This feature set is used for the re-prediction of the final model.
[0161] In the specific implementation of the present invention: Finally, according to the SHAP interpretation results, for example, the features (features 4, 9, 8, 3, 7, 0, 2) that are positively correlated with the model accuracy are selected for re-prediction, and according to the degree of influence on the decreasing features of the model, the air conditioning load identification results obtained are shown in Table 1. The SHAP value is used to quantify the influence of each feature on the model output. By sorting the SHAP value size, the features that contribute the most to the model prediction are identified, and the features with low contribution are removed, thereby further optimizing the lightweight and prediction performance of the model.
[0162] Table 1 Air conditioning load identification results
[0163]
[0164] Finally, the trained model is evaluated by calculating the Precision, Recall, and F1-score evaluation indicators using the test set D. The air conditioning load is identified and judged based on the mutual information and Catboost air conditioning load identification feature selection and identification method. Table 1 lists the load identification results of the patent algorithm model compared with the XGBoost algorithm and the LightGBM algorithm. The results show that the results of the patent model are better than those of other algorithms.
[0165] Table 2 Summary of comparison between the algorithm model of this patent and the XGBoost algorithm and LightGBM algorithm model results
[0166]
[0167] Therefore, the present invention verifies the performance of the model through multiple evaluation indicators such as Precision, Recall, and F1-score, ensuring the reliability and effectiveness of the model in air conditioning load identification. The experimental results show that the method of the present invention is superior to the existing XGBoost and LightGBM algorithms in terms of precision, recall rate, and F1 value, showing stronger application potential and practical value.
[0168] Therefore, the present invention is aimed at non-intrusive load identification technology, proposes a load feature quantization selection based on the SHAP interpretation model, and further uses an air-conditioning load identification method based on mutual information and Catboost model to achieve scientific selection and effective screening of air-conditioning load identification features and improve the generalization ability of the identification model.
[0169] Exemplary Devices
[0170] Figure 5 FIG. 1 is a schematic diagram of the structure of an air conditioning load identification device provided by an exemplary embodiment of the present invention. Figure 5 As shown, the device 500 includes:
[0171] A selection module 510 is used to select an initial load characteristic index set of the air conditioning load from a plurality of data characteristics of the air conditioning load;
[0172] A normalization processing module 520 is used to construct a load characteristic combination matrix according to the initial load characteristic indicator set, and perform normalization processing on the load characteristic combination matrix to obtain a normalized load characteristic matrix;
[0173] A measurement module 530 is used to measure the correlation between each load characteristic index and the equipment label in the normalized load characteristic matrix by using a mutual information method to determine a lightweight load characteristic index set;
[0174] An updating module 540 is used to update the normalized load characteristic matrix according to the lightweight load index characteristic set to obtain a lightweight characteristic matrix;
[0175] A training module 550 is used to train the Catboost model according to the lightweight feature matrix and the corresponding device labels to generate an air conditioning load identification model;
[0176] The prediction module 560 is used to collect lightweight load index data of the air-conditioning equipment to be identified and input it into the air-conditioning load identification model to perform load prediction, so as to obtain the load identification result of the air-conditioning equipment to be identified.
[0177] Optionally, the initial load characteristic indicator set includes: voltage effective value, current effective value, current steady-state amplitude, current peak-to-peak value, current peak area, DC component, fundamental wave, 3rd harmonic, 5th harmonic, 7th harmonic, active power, reactive power, apparent power, power factor and power factor angle.
[0178] Optionally, the load characteristic combination matrix A is expressed as:
[0179]
[0180] In the formula, n is the number of features, and m is the number of times the load waveform features in the total meter current and voltage data are extracted;
[0181] The expression of the normalized load characteristic matrix is:
[0182]
[0183] in, a ij Represents the value of the i-th row and j-th column in the lightweight load feature combination matrix A (i∈1,…,m, j∈1,…,n).
[0184] Optionally, a measurement module comprising:
[0185] A calculation submodule, used to calculate the mutual information between each load characteristic index and the equipment label in the normalized load characteristic matrix;
[0186] A standardization processing submodule is used to perform standardization processing on the mutual information to obtain standardized mutual information;
[0187] As a submodule, it is used to take a set of load characteristic indicators whose normalized mutual information is greater than or equal to a preset threshold as a lightweight load characteristic indicator set.
[0188] Optionally, the mutual information I(X j ; The calculation formula of Y) is:
[0189]
[0190] Where, X j represents the jth load characteristic index in the initial load characteristic index set; Y is the target variable of the equipment label; p(x j ,y) represents the joint probability distribution of load characteristic index Xj and target variable Y; p(x j ) and p(y) are load characteristic index X j and the marginal probability distribution of the target variable Y.
[0191] Optionally, the normalized mutual information MI(X j ; The calculation formula of Y) is:
[0192]
[0193] in, H(X j ) and H(Y) are the features X j and the entropy of the target Y.
[0194] Optionally, the leaf node weight update formula of the Catboost model is:
[0195]
[0196] Among them, λ is the regularization parameter, n is the number of leaf nodes, g and h are the gradient and Hessian matrix of the loss function respectively, and the expression is:
[0197]
[0198] In the formula, is the loss function, y is the real air conditioning load type label, It is the predicted value of air conditioning load type output by the model.
[0199] Optionally, the target encoding expression for each category k of the Catboost model is:
[0200]
[0201] In the formula, c j is the category value of load characteristic j; count(c j =k) is the number of samples of category k, Y is the target variable, and X is the classification variable;
[0202] The numerical expression of the target code is:
[0203]
[0204] Where j<i means that only the data before load characteristic i is considered.
[0205] Optionally, the device 500 further includes: an analysis module for analyzing the influence of load characteristics on the air conditioning load identification accuracy of the CatBoost model by using a SHAP explanation model, wherein each feature in the CatBoost model is assigned a SHAP explanation model prediction value g(x'), which represents the contribution value of feature j to the model output, and the expression is:
[0206]
[0207] In the formula, x j ∈[0,1] M , M is the number of load features after simplified input; φ0 is the predicted output value of the model without any features, φ j is the SHAP explanation model prediction value of feature j, calculated as:
[0208]
[0209] Where f(x) is the actual predicted value of the air conditioning load type; S refers to any subset that does not contain feature j; S represents the size of the set S; f x (S∪{j}),f x (S) represents the model prediction results with and without feature j, where the ultimate goal is to ensure f(x)≈g(x').
[0210] Exemplary Electronic Devices
[0211] Figure 6 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. Figure 6 As shown, the electronic device 60 includes one or more processors 61 and a memory 62 .
[0212] The processor 61 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0213] The memory 62 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 61 may run the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above and / or other desired functions. In one example, the electronic device may also include: an input device 63 and an output device 64, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0214] In addition, the input device 63 may also include, for example, a keyboard, a mouse, etc.
[0215] The output device 64 can output various information to the outside, and can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto.
[0216] Of course, to simplify, Figure 6 Only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application conditions.
[0217] Exemplary computer program products and computer-readable storage media
[0218] In addition to the above-mentioned methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above-mentioned "Exemplary Method" section of this specification.
[0219] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present invention, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0220] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0221] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, system or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0222] The basic principle of the present invention is described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, rather than limitation, and the above details do not limit the present invention to being implemented by adopting the above specific details.
[0223] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0224] The block diagrams of the devices, systems, equipment, and systems involved in the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, systems, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0225] The method and system of the present invention may be implemented in many ways. For example, the method and system of the present invention may be implemented by software, hardware, firmware or any combination of software, hardware, firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
[0226] It should also be noted that in the system, device and method of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined here can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown here, but in accordance with the widest range consistent with the principles and novel features disclosed here.
[0227] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for identifying air conditioning load, characterized in that: include: Selecting an initial load characteristic index set of the air conditioning load from a plurality of data characteristics of the air conditioning load; Constructing a load characteristic combination matrix according to the initial load characteristic indicator set, and normalizing the load characteristic combination matrix to obtain a normalized load characteristic matrix; The mutual information method is used to measure the correlation between each load characteristic index and the equipment label in the normalized load characteristic matrix, and a lightweight load characteristic index set is determined; The normalized load characteristic matrix is updated according to the lightweight load index characteristic set to obtain a lightweight characteristic matrix; The Catboost model is trained according to the lightweight feature matrix and the corresponding device labels to generate an air conditioning load identification model; The lightweight load index data of the air-conditioning equipment to be identified is collected and input into the air-conditioning load identification model for load prediction, so as to obtain the load identification result of the air-conditioning equipment to be identified.
2. The method according to claim 1, characterized in that The initial load characteristic index set includes: voltage effective value, current effective value, current steady-state amplitude, current peak-to-peak value, current wave peak area, DC component, fundamental wave, 3rd harmonic, 5th harmonic, 7th harmonic, active power, reactive power, apparent power, power factor and power factor angle.
3. The method according to claim 1, characterized in that: The load characteristic combination matrix A is expressed as: In the formula, n is the number of features, and m is the number of times the load waveform features in the total meter current and voltage data are extracted; The expression of the normalized load characteristic matrix is: in, a ij Represents the value of the i-th row and j-th column in the lightweight load feature combination matrix A (i∈1,…,m, j∈1,…,n).
4. The method according to claim 1, characterized in that: The mutual information method is used to measure the correlation between each load characteristic index and the equipment label in the normalized load characteristic matrix, and a lightweight load characteristic index set is determined, including: Calculating the mutual information between each load characteristic index and the equipment label in the normalized load characteristic matrix; Performing normalization processing on the mutual information to obtain normalized mutual information; A set of load characteristic indicators whose normalized mutual information is greater than or equal to a preset threshold is used as the lightweight load characteristic indicator set.
5. The method according to claim 4, characterized in that The mutual information I(X j ; The calculation formula of Y) is: In the formula, X j represents the jth load characteristic index in the initial load characteristic index set; Y is the target variable of the equipment label; p(x j ,y) represents the joint probability distribution of load characteristic index Xj and target variable Y; p(x j ) and p(y) are load characteristic index X j and the marginal probability distribution of the target variable Y.
6. The method according to claim 5, characterized in that The normalized mutual information MI(X j ; The calculation formula of Y) is: in, H(X j ) and H(Y) are the features X j and the entropy of the target Y.
7. The method according to claim 1, characterized in that The leaf node weight update formula of the Catboost model is: Among them, λ is the regularization parameter, n is the number of leaf nodes, g and h are the gradient and Hessian matrix of the loss function respectively, and the expression is: In the formula, is the loss function, y is the real air conditioning load type label, It is the predicted value of air conditioning load type output by the model.
8. The method according to claim 1, characterized in that The target encoding expression for each category k of the Catboost model is: In the formula, c j is the category value of load characteristic j; count(c j =k) is the number of samples of category k, Y is the target variable, and X is the classification variable; The numerical expression of the target code is: Where j<i means that only the data before load characteristic i is considered.
9. The method according to claim 1, characterized in that: Also includes: The SHAP explanation model is used to analyze the impact of load characteristics on the air conditioning load identification accuracy of the CatBoost model, where each feature in the CatBoost model is assigned a SHAP explanation model prediction value g(x'), which represents the contribution value of feature j to the model output, expressed as: In the formula, x j ∈[0,1] M , M is the number of load characteristics after simplified input; φ0 is the predicted output value of the model without any features, φ j is the SHAP explanation model prediction value of feature j, calculated as: Where f(x) is the actual predicted value of the air conditioning load type; S refers to any subset that does not contain feature j; |S| represents the size of the set S; f x (S∪{j}),f x (S) represents the model prediction results with and without feature j, where the ultimate goal is to ensure f(x)≈g(x').
10. An air conditioning load identification device, characterized in that: include: A selection module, used for selecting an initial load characteristic index set of the air conditioning load from a plurality of data characteristics of the air conditioning load; A normalization processing module, used for constructing a load characteristic combination matrix according to the initial load characteristic indicator set, and performing normalization processing on the load characteristic combination matrix to obtain a normalized load characteristic matrix; A measurement module, used to measure the correlation between each load characteristic index and the equipment label in the normalized load characteristic matrix by using a mutual information method, and determine a set of lightweight load characteristic indexes; An updating module, used for updating the normalized load characteristic matrix according to the lightweight load index characteristic set to obtain a lightweight characteristic matrix; A training module, used to train the Catboost model according to the lightweight feature matrix and the corresponding device labels to generate an air conditioning load identification model; The prediction module is used to collect lightweight load index data of the air-conditioning equipment to be identified and input it into the air-conditioning load identification model to perform load prediction, so as to obtain the load identification result of the air-conditioning equipment to be identified.
11. The device according to claim 10, characterized in that The initial load characteristic index set includes: voltage effective value, current effective value, current steady-state amplitude, current peak-to-peak value, current wave peak area, DC component, fundamental wave, 3rd harmonic, 5th harmonic, 7th harmonic, active power, reactive power, apparent power, power factor and power factor angle.
12. The device according to claim 10, characterized in that Measurement modules include: A calculation submodule, used to calculate the mutual information between each load characteristic index and the equipment label in the normalized load characteristic matrix; A standardization processing submodule, used for performing standardization processing on the mutual information to obtain standardized mutual information; As a submodule, it is used to take the set of load characteristic indicators whose normalized mutual information is greater than or equal to a preset threshold as the lightweight load characteristic indicator set.
13. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 9.
14. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 9.