Electric heating unit integrated energy consumption evaluation model training method and device
By proposing an integrated energy consumption evaluation model training method of electric heating units in the energy consumption evaluation of electric heating units, using multi-layer logic layers and autoencoder for feature extraction and dimensionality reduction, and improving the generalization capability of the model through dynamic weight correction support vector machine algorithm, solving the problems of overfitting, insufficient feature extraction and poor classifier performance in the existing technology, achieving more efficient and accurate energy consumption evaluation.
Patent Information
- Application Number
- CN202411976904.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The prior art has problems in the energy consumption evaluation of electric heating units, resulting in insufficient training samples, insufficient feature extraction, ineffective data complexity and dynamic variation, and poor classifier performance in dynamic environments.
A method for training an integrated energy consumption evaluation model of electric heating units is proposed. By acquiring multiple training data sets and initial energy consumption evaluation models, the training data is processed using multiple logic layers of the encoder and decoder, the loss value is calculated and the parameters are updated until the training end condition is met. This method also uses a feature adaptive refinement autoencoder for efficient feature dimensionality reduction, and improves the generalization ability of the model through a dynamic weight correction support vector machine algorithm.
By gradually optimizing model parameters, the generalization ability of the model is improved, information loss is reduced, important data characteristics are retained, the efficiency of energy consumption evaluation is improved, energy utilization efficiency is improved, the service life of the equipment is extended, and maintenance costs are reduced.
Smart Images

Figure CN119918592A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial automation technology, and in particular to a training method and device for an integrated energy consumption assessment model for an electric heating unit. Background Art
[0002] Energy consumption assessment technologies in current technologies mostly rely on traditional data processing and analysis methods, which usually include basic data collection, preliminary feature extraction and simple classification processing. Existing technologies usually fail to effectively solve the problem of insufficient training samples in terms of data expansion, which leads to overfitting of the assessment model in practical applications and affects the generalization ability of the model. In terms of feature extraction, existing methods often do not adopt effective optimization algorithms, resulting in insufficient extraction of key information, affecting the accuracy of the assessment results. In addition, feature dimensionality reduction technology often ignores the complexity and dynamic variability of data, which may lead to the loss of important information, thereby reducing the accuracy of the assessment. Finally, existing classifier algorithms perform poorly in dynamic environments and usually cannot adapt to real-time changes in data features, limiting the optimization of the assessment effect. These technical problems limit the practicality and effectiveness of the energy consumption assessment method of electric thermal units, and urgently need to be solved by adopting more refined data processing and machine learning technologies. Summary of the invention
[0003] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.
[0004] To this end, an object of the present disclosure is to propose a training method for an integrated energy consumption assessment model for an electric thermal unit.
[0005] The second objective of the present disclosure is to provide an integrated energy consumption assessment model training device for an electric thermal unit.
[0006] A third objective of the present disclosure is to provide an electronic device.
[0007] A fourth object of the present disclosure is to provide a non-transitory computer-readable storage medium.
[0008] A fifth object of the present disclosure is to provide a computer program product.
[0009] To achieve the above-mentioned purpose, the first aspect of the present disclosure proposes a training method for an integrated energy consumption assessment model for an electric thermal unit, comprising: obtaining multiple training data sets and an initial energy consumption assessment model, wherein the initial energy consumption assessment model comprises an encoder and a decoder, and the encoder comprises multiple logical layers; inputting a training data set into the initial energy consumption assessment model, processing the training data set through each logical layer of the initial energy consumption assessment model to obtain an output sample output by each logical layer; calculating a loss value of the initial energy consumption assessment model based on the output sample through the decoder, and updating the parameters of multiple logical layers based on the loss value; judging whether the updated initial energy consumption assessment model meets the training end condition; in response to the updated initial energy consumption assessment model not meeting the training end condition, selecting a training data set that has not participated in the training and inputting it into the updated initial energy consumption assessment model for training, and repeating the above-mentioned step of inputting a training data set into the initial energy consumption assessment model and subsequent steps until the training ends.
[0010] According to one embodiment of the present disclosure, the processing of the training data set through each logical layer of the initial energy consumption assessment model includes: for any candidate logical layer of the initial energy consumption assessment model except the first logical layer, obtaining the preceding output sample of the layer above the candidate logical layer, as well as the weight value and bias value of the candidate logical layer; and calculating the output sample of the candidate logical layer based on the preceding output sample, the weight value and the bias value.
[0011] According to one embodiment of the present disclosure, the calculating the output samples of the candidate logic layer based on the preceding output samples, the weight values and the bias values includes: calculating the linear transformation output of the candidate logic layer based on the preceding output samples, the weight values and the bias values; calculating the activation function output of the candidate logic layer based on the linear transformation output; and calculating the output samples of the candidate logic layer based on the activation function output.
[0012] According to one embodiment of the present disclosure, calculating the output samples of the candidate logic layer based on the activation function output includes: calculating the importance score of the activation function output; and calculating the output samples of the candidate logic layer based on the importance score and the activation function output.
[0013] According to an embodiment of the present disclosure, the method further includes: in response to the logic layer being the first logic layer, processing the training data set through the first logic layer to generate output samples of the first logic layer.
[0014] According to one embodiment of the present disclosure, the loss value of the initial energy consumption assessment model is calculated based on the output sample by the decoder, including: for any candidate logic layer except the first logic layer of the initial energy consumption assessment model, obtaining the preceding output sample of the previous layer of the candidate logic layer; calculating the sample difference of the candidate logic layer based on the preceding output sample and the output sample of the candidate logic layer; and calculating the loss value of the initial energy consumption assessment model based on the sample differences of all candidate logic layers.
[0015] According to one embodiment of the present disclosure, the updating of parameters of multiple logical layers based on the loss value includes: for any logical layer, calculating the weight update increment and bias increment of the logical layer based on the loss value, and obtaining the sparsity measure of the logical layer; based on the weight update increment, the bias increment and the sparsity measure, calculating the updated target weight value and target bias value of the logical layer.
[0016] According to one embodiment of the present disclosure, the updated target weight value and target bias value of the logical layer are calculated based on the weight update increment, the bias increment and the sparsity metric, including: comparing the sparsity metric with a sparsity pruning threshold; in response to the sparsity metric being greater than the sparsity pruning threshold, adding the weight value of the logical layer with twice the weight update increment to generate an updated target weight value, and adding the bias value of the logical layer with twice the bias update increment to generate an updated target bias value; in response to the sparsity metric being less than or equal to the sparsity pruning threshold, adding the weight value of the logical layer with the weight update increment to generate an updated target weight value, and adding the bias value of the logical layer with the bias update increment to generate an updated target bias value.
[0017] According to one embodiment of the present disclosure, obtaining the sparsity measure of the logical layer includes: obtaining the activation value of each training sample in the training data set in the logical layer; determining the sub-sparseness measure of each good sample based on the activation value and the sparsity threshold; calculating the average value based on all the sub-sparseness measures, and using the calculation result as the sparsity measure of the logical layer.
[0018] To achieve the above-mentioned purpose, the second aspect of the present disclosure proposes an integrated energy consumption assessment model training device for an electric thermal unit, comprising: an acquisition module, used to acquire multiple training data sets and an initial energy consumption assessment model, wherein the initial energy consumption assessment model comprises an encoder and a decoder, and the encoder comprises multiple logical layers; an input module, used to input a training data set into the initial energy consumption assessment model, and process the training data set through each logical layer of the initial energy consumption assessment model to obtain an output sample output by each logical layer; a calculation module, used to calculate the loss value of the initial energy consumption assessment model based on the output sample through the decoder, and update the parameters of multiple logical layers based on the loss value; a judgment module, used to judge whether the updated initial energy consumption assessment model meets the training end condition; an output module, in response to the updated initial energy consumption assessment model not meeting the training end condition, selects a training data set that has not participated in the training and inputs it into the updated initial energy consumption assessment model for training, repeats the above-mentioned step of inputting a training data set into the initial energy consumption assessment model and its subsequent steps until the training is completed, and outputs the trained target energy consumption assessment model.
[0019] To achieve the above-mentioned purpose, the third aspect embodiment of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the integrated energy consumption assessment model training method for electric thermal units as described in the first aspect embodiment of the present disclosure.
[0020] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to implement the integrated energy consumption assessment model training method for electric thermal units as described in the first aspect embodiment of the present disclosure.
[0021] To achieve the above-mentioned purpose, the fifth aspect of the present disclosure proposes a computer program product, including a computer program, which, when executed by a processor, is used to implement the integrated energy consumption assessment model training method for electric thermal units as described in the first aspect of the present disclosure.
[0022] Through the model training method in the disclosed scheme, the model parameters can be gradually optimized, the generalization ability of the model can be improved, and the feature adaptive refinement autoencoder can be used for efficient feature dimensionality reduction to reduce information loss and retain important data features. The target energy consumption assessment model is generated through training, which improves the efficiency of energy consumption assessment, improves energy utilization efficiency, extends the service life of the equipment, and reduces maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a schematic diagram of a method for training an integrated energy consumption assessment model for an electric thermal unit according to an embodiment of the present disclosure;
[0024] Figure 2 is a schematic diagram of another method for training an integrated energy consumption assessment model for an electric thermal unit according to an embodiment of the present disclosure;
[0025] Figure 3 is a schematic diagram of another method for training an integrated energy consumption assessment model for an electric thermal unit according to an embodiment of the present disclosure;
[0026] Figure 4 is a schematic diagram of another method for training an integrated energy consumption assessment model for an electric thermal unit according to an embodiment of the present disclosure;
[0027] Figure 5 is a schematic diagram of an integrated energy consumption assessment model training device for an electric thermal unit according to an embodiment of the present disclosure;
[0028] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0030] The acquisition, storage, use, and processing of data in the technical solution disclosed in this disclosure are in compliance with the relevant provisions of relevant laws and regulations.
[0031] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0032] Figure 1 is a schematic diagram of a method for training an integrated energy consumption assessment model for an electric heating unit according to an embodiment of the present disclosure, such as Figure 1 As shown, the training method of the integrated energy consumption assessment model of the electric heating unit includes the following steps:
[0033] S101, obtaining multiple training data sets and an initial energy consumption evaluation model, where the initial energy consumption evaluation model includes an encoder and a decoder, and the encoder includes multiple logical layers.
[0034] The integrated energy consumption assessment model training method of the electric thermal unit according to the embodiment of the present application can be applied to the scenario of energy consumption assessment of the electric thermal unit. The executor of the integrated energy consumption assessment model training of the electric thermal unit according to the embodiment of the present application can be the integrated energy consumption assessment model training device of the electric thermal unit according to the embodiment of the present application, and the integrated energy consumption assessment model training device of the electric thermal unit can be set on an electronic device.
[0035] In the embodiments of the present disclosure, there are many methods for obtaining the training data set, which are not limited here.
[0036] In one possible implementation, it can be established manually.
[0037] Optionally, it can also be obtained by analyzing previous energy consumption evaluation data or operation data of the electric heating unit.
[0038] In the embodiment of the present disclosure, the training data set may include a variety of data that affect the integrated energy consumption assessment of the electric thermal unit. For example, it may include one or more of the following data:
[0039] Temperature refers to the temperature value of each part of the unit, in degrees Celsius (℃).
[0040] Pressure reflects the internal pressure of the unit, and its unit is Pascal (Pa).
[0041] Flow rate refers to the fluid flow rate through the unit, measured in cubic meters per hour (m^3 / h).
[0042] Current, the current value of the heating element, the unit is ampere (A).
[0043] Voltage, the voltage value of the heating element, the unit is volt (V).
[0044] Energy consumption, the calculated total energy consumption in kilowatt-hours (kWh).
[0045] Switch status, the switch status of the unit, 0 means off, 1 means on.
[0046] Maintenance records, maintenance and repair records of the unit, stored in text form.
[0047] Fault code: error code when a fault occurs in the unit.
[0048] Running time, the running time of the unit since the last maintenance, in hours (h).
[0049] S102, input a training data set into the initial energy consumption assessment model, and process the training data set through each logic layer of the initial energy consumption assessment model to obtain output samples of each logic layer output.
[0050] It should be noted that the relationship between multiple logical layers of the encoder is usually expressed as a hierarchical structure or a serialized processing flow. Each logical layer is responsible for performing a specific type of transformation or feature extraction on the input data, and these layers are connected together in some way to form a step-by-step transformation process from raw input to abstract representation.
[0051] It should be noted that there are some logical connection relationships between multiple logical layers, which are not limited here. For example, multiple logical layers can be connected in sequence, skipped, or residually.
[0052] S103, calculating the loss value of the initial energy consumption evaluation model based on the output samples through the decoder, and updating the parameters of multiple logical layers based on the loss value.
[0053] In the embodiment of the present disclosure, the decoder can calculate the loss value outputted by the initial energy consumption evaluation model each time based on the loss function. The loss function can be various, and no limitation is made here, and can be limited according to actual design needs.
[0054] S104, determining whether the updated initial energy consumption assessment model meets the training end condition.
[0055] It should be noted that the training end condition is designed in advance and can be changed according to actual design needs. The training end condition can include multiple conditions, which are not limited here. For example, the training end condition can be that the training duration reaches a preset duration, or the number of trainings reaches a preset number of trainings, etc.
[0056] S105, in response to the updated initial energy consumption assessment model not satisfying the training end condition, select a training data set that has not participated in the training and input it into the updated initial energy consumption assessment model for training, repeat the above steps of inputting a training data set into the initial energy consumption assessment model and subsequent steps until the training is completed, and output the trained target energy consumption assessment model.
[0057] In an embodiment of the present disclosure, firstly, a plurality of training data sets and an initial energy consumption assessment model are obtained, the initial energy consumption assessment model includes an encoder and a decoder, the encoder includes a plurality of logical layers, then a training data set is input into the initial energy consumption assessment model, the training data set is processed by each logical layer of the initial energy consumption assessment model to obtain output samples output by each logical layer, then a loss value of the initial energy consumption assessment model is calculated based on the output samples by the decoder, and the parameters of the plurality of logical layers are updated based on the loss value, then it is determined whether the updated initial energy consumption assessment model satisfies the training end condition, finally, in response to the updated initial energy consumption assessment model not satisfying the training end condition, a training data set that has not participated in the training is selected and input into the updated initial energy consumption assessment model for training, and the above-mentioned steps of inputting a training data set into the initial energy consumption assessment model and subsequent steps are repeated until the training ends. Through the model training method in the disclosed scheme, the model parameters can be gradually optimized, the generalization ability of the model can be improved, and the feature adaptive refinement autoencoder can be used for efficient feature dimensionality reduction to reduce information loss and retain important data features. The target energy consumption assessment model is generated through training, which improves the efficiency of energy consumption assessment, improves energy utilization efficiency, extends the service life of the equipment, and reduces maintenance costs.
[0058] In the above embodiment, the training data set is processed by each logical layer of the initial energy consumption evaluation model, and Figure 2 Explaining further, the method includes:
[0059] S201, for any candidate logic layer except the first logic layer of the initial energy consumption evaluation model, obtain the preceding output sample of the previous layer of the candidate logic layer, as well as the weight value and bias value of the candidate logic layer.
[0060] In an embodiment of the present disclosure, before processing the training data set through the logic layer, the weights and biases of the autoencoder may be initialized. In one embodiment, the initialization method is expressed as:
[0061]
[0062] in, is the initial weight of the i-th layer of the autoencoder; is the initial bias of the i-th layer of the autoencoder; n r,i is the number of neurons in the i-th layer of the autoencoder; n r,i-1 is the number of neurons in the i-1th layer of the autoencoder; randn(n r,i ,n r,i-1 ) generates a shape of n r,i ×n r,i-1 A standard normally distributed random number; zeros(n r,i ) generates a length of nr,i The zero vector of .
[0063] It should be noted that, in response to the logic layer being the first logic layer, the training data set is processed by the first logic layer to generate output samples of the first logic layer.
[0064] S202, calculating the output samples of the candidate logical layer based on the previous output samples, weight values and bias values.
[0065] In an embodiment of the present disclosure, the linear transformation output of the candidate logical layer can be first calculated based on the previous output samples, weight values and bias values, and then the activation function output of the candidate logical layer can be calculated based on the linear transformation output, and finally the output sample of the candidate logical layer can be calculated based on the activation function output.
[0066] In the disclosed embodiment, the input data is passed through each layer of the encoder, and each layer makes a dynamic routing decision based on the output of the previous layer and the feature importance score of the current layer, selectively passing the most informative features. The specific expression formula is:
[0067] z r,i =W r,i ·x r,i-1 +b r,i
[0068] a r,i =Re(z r,i )
[0069] x r,i =route(a r,i ,imp(a r,i ))
[0070] In the formula, z r,i is the linear transformation output of the i-th layer of the autoencoder; a r,i is the output feature of the activation function of the autoencoder; W r,i is the weight of the i-th layer of the autoencoder; b r,i is the bias of the i-th layer of the autoencoder; Re() is the ReLU activation function; x r,i-1 is the input feature of the i-th layer of the autoencoder; route() represents a dynamic routing function based on feature importance; imp(a r,i ) Calculate the importance scoring function of the output features of the autoencoder's activation function.
[0071] In the disclosed embodiment, firstly, for any candidate logic layer except the first logic layer of the initial energy consumption evaluation model, the previous output sample of the previous layer of the candidate logic layer, as well as the weight value and bias value of the candidate logic layer are obtained, and then the output sample of the candidate logic layer is calculated based on the previous output sample, the weight value and the bias value. Therefore, this dynamic routing method based on feature importance scoring can realize more intelligent information transmission in each layer of encoder, and help build a more efficient and powerful target energy consumption evaluation model.
[0072] In the above embodiment, the output samples of the candidate logic layer are calculated based on the activation function output, and the output samples of the candidate logic layer can also be calculated by Figure 3 Explaining further, the method includes:
[0073] S301, calculating the importance score of the activation function output.
[0074] S302, calculating output samples of the candidate logic layer based on the importance score and the activation function output.
[0075] In one embodiment of the present disclosure, the dynamic routing function integrates the activation outputs of each feature by weighted average, where the weight is determined by the importance score of the feature, and the calculation method is expressed as:
[0076]
[0077] Furthermore, the calculation method of the importance score of the output feature of the activation function of the autoencoder is expressed as:
[0078]
[0079] In the formula, a r,i,j is the activation output of the jth neuron in the i-th layer, a r,i,k is the activation output of the kth neuron in the i-th layer; w r,imp,j is the weight of the corresponding feature importance, obtained through training, indicating the importance of the jth feature; w r,imp,k is the weight of the corresponding feature importance, obtained through training, indicating the importance of the kth feature; n r,i is the total number of neurons in the i-th layer.
[0080] In the disclosed embodiment, the importance score of the activation function output is first calculated, and then the output samples of the candidate logic layer are calculated based on the importance score and the activation function output. Therefore, by introducing a dynamic routing function and a feature importance scoring mechanism, the activation outputs of each feature can be more effectively integrated and weighted averaged according to their importance, which can not only improve the expressiveness of the model, but also enhance the ability to understand and interpret the input data.
[0081] In the above embodiment, the loss value of the initial energy consumption assessment model is calculated based on the output samples by the decoder. First, for any candidate logical layer except the first logical layer of the initial energy consumption assessment model, the preceding output sample of the previous layer of the candidate logical layer is obtained, and then the sample difference of the candidate logical layer is calculated based on the preceding output sample and the output sample of the candidate logical layer. Finally, the loss value of the initial energy consumption assessment model is calculated based on the sample differences of all candidate logical layers.
[0082] In the disclosed embodiment, the loss function of the autoencoder is calculated as follows:
[0083]
[0084] Where, L r is the loss function of the autoencoder; m r The number of samples entered for the current batch; is the jth sample input to the autoencoder; is the jth sample after reconstruction.
[0085] In the above embodiment, the parameters of multiple logical layers are updated based on the loss value, and Figure 4 Explaining further, the method includes:
[0086] S401, for any logical layer, calculate the weight update increment and bias increment of the logical layer based on the loss value, and obtain the sparsity measurement of the logical layer.
[0087] In the embodiment of the present disclosure, the sparsity measure of the logical layer can be obtained by first obtaining the activation value of each training sample in the training data set in the logical layer, then determining the sub-sparseness measure of each good sample based on the activation value and the sparsity threshold, and finally calculating the average value based on all the sub-sparseness measures, and using the calculation result as the sparsity measure of the logical layer.
[0088] S402, based on the weight update increment, the bias increment and the sparsity metric, calculate the updated target weight value and target bias value of the logic layer.
[0089] In an embodiment of the present disclosure, the sparsity metric and the sparsity pruning threshold may be compared, and then in response to the sparsity metric being greater than the sparsity pruning threshold, the weight value of the logic layer may be added with twice the weight update increment to generate an updated target weight value, and the bias value of the logic layer may be added with twice the bias update increment to generate an updated target bias value, or in response to the sparsity metric being less than or equal to the sparsity pruning threshold, the weight value of the logic layer may be added with the weight update increment to generate an updated target weight value, and the bias value of the logic layer may be added with the bias update increment to generate an updated target bias value.
[0090] The gradient of the loss function for each parameter of the autoencoder is calculated through the back-propagation algorithm, and the weights and biases of the autoencoder are updated. The update formula is as follows:
[0091]
[0092]
[0093] In the formula, ΔW r,i is the update increment of the weight of the i-th layer of the autoencoder; Δb r,i is the update increment of the bias of the i-th layer of the autoencoder; η r is the learning rate of the autoencoder; is the weight of the i-th layer of the updated autoencoder; is the bias of the i-th layer of the updated autoencoder; S r,i is the sparsity measure of the neurons in the i-th layer of the autoencoder; r,s is the sparsity pruning threshold; is an indicator function, which takes 1 when the condition in the brackets is met, otherwise it takes 0. Preferably, λ r,s It is set to 0.8, indicating that weights will be pruned when the sparsity measure is above 80%.
[0094] From the above formula, we can see that if the sparsity measure S of a neuron is r,i If it is higher than the set threshold (for example, less than 0.8), the indicator function returns 1, so the update increment will double, thereby accelerating the learning speed of these important neurons. If the sparsity measure (S_{(r,i)}) is less than or equal to the threshold, the indicator function returns 0 and the update increment remains unchanged, which is equivalent to "punishing" those less active neurons, slowing down their learning speed, and can even be regarded as a soft pruning.
[0095] In the disclosed embodiment, the computational efficiency and generalization ability of the model can be improved by dynamically pruning redundant weights, that is, the weights corresponding to neurons with smaller activation values in most cases will be dynamically pruned, thereby simplifying the model structure. Specifically, the importance of neurons is judged by statistically analyzing the sparsity of activation values. The calculation method of the sparsity measure of the i-th layer of neurons of the autoencoder is expressed as:
[0096]
[0097] In the formula, S r,i is the sparsity measure of the neurons in the i-th layer; a r,i,j is the activation value of the jth sample in the i-th layer; τ r is the sparsity threshold. Preferably, τ r Set to 0.1.
[0098] Therefore, the method of dynamically pruning redundant weights to improve the computational efficiency and generalization ability of the model, especially the application of sparsity metrics in neural networks to judge the importance of neurons, can effectively reduce the complexity of the model and improve the model performance.
[0099] In the disclosed embodiment, for any logic layer, the weight update increment and bias increment of the logic layer are calculated based on the loss value, and the sparsity metric of the logic layer is obtained, and then the updated target weight value and target bias value of the logic layer are calculated based on the weight update increment, bias increment and sparsity metric. Thus, by combining the loss value and sparsity metric to update the parameters, this method not only improves the performance and efficiency of the model, but also enhances its generalization ability and interpretability.
[0100] In another possible implementation of the present disclosure, a support vector machine algorithm based on dynamic weight correction is used as a classification algorithm, and an adaptive regularization mechanism is used to dynamically adjust the penalty parameter according to the importance of each feature and the classification error rate, so that the classifier pays more attention to difficult-to-classify samples during training, thereby improving the overall generalization ability and accuracy of the model.
[0101] Specifically, the training process of the support vector machine algorithm based on dynamic weight correction is as follows:
[0102] First, initialize the model parameters. According to the dimension of the input features, initialize the weight vector and bias term of the SVM. The initialization model parameters are expressed as:
[0103]
[0104] In the formula, is the initial weight vector of the support vector machine, is the initial bias term, ∈ is the scaling factor for small random number generation, randn() is the random number function for generating standard normal distribution, d u is the dimension of the input features.
[0105] Then, in each training batch, the classification boundary and error rate of the current model for the training data are first calculated. According to the feature areas with high error rates, the weight values of these areas are dynamically increased, that is, for misclassified points, the weight influence of their corresponding features is increased. The dynamic weight adjustment is expressed as:
[0106]
[0107] W u ←W u +ΔW u
[0108] In the formula, ΔW u is the weight adjustment amount, η is the learning rate, α u,iis the adaptive weight of the ith data point, y i is the label of the i-th data point, X u,i is the feature vector of the ith data point, is the indicative function, W u The transpose of .
[0109] Furthermore, the adaptive weight α u,i It is expressed as:
[0110]
[0111] In the formula, β u is a tuning parameter that controls the sensitivity of the error to the weights. Represents the error between the predicted value and the actual label.
[0112] Then, the regularization parameters are automatically adjusted according to the contribution of each feature to the classification error. The regularization parameters of high-contribution features are reduced, and the regularization parameters of low-contribution features are increased, thereby ensuring that the model will not overfit to a small number of noisy data. The adaptive regularization update is expressed as:
[0113]
[0114] In the formula, λ u,i is the regularization parameter of the i-th feature, λ u is the basic regularization parameter, γ u is an adjustment factor used to adjust the regularization strength according to the classification error.
[0115] Furthermore, the adjustment of the regularization parameter is expressed as:
[0116]
[0117] In the formula, Denotes the loss function □ for the jth feature x u,j The partial derivative of is used to evaluate the importance of the feature.
[0118] Finally, the gradient descent method is used to optimize the decision boundary of SVM based on the dynamically adjusted weights and regularization parameters. The optimized decision boundary is expressed as:
[0119]
[0120]
[0121] Where min[] represents the minimization function, C is the penalty parameter, and represents the average regularization strength.
[0122] Furthermore, the loss function is expressed as:
[0123]
[0124] In the formula, λ u,i Represents the dynamic regularization coefficient of each sample, which strengthens the penalty for difficult-to-classify samples.
[0125] Check whether the model's training error reaches the preset threshold or whether the number of training iterations meets the user's setting. If any of these conditions are met, the training process is stopped. The termination condition judgment is expressed as:
[0126]
[0127] Where θ is the preset classification accuracy threshold.
[0128] After the training is completed, the model is finally calibrated to ensure the best performance in practical applications. The model calibration is expressed as:
[0129]
[0130] Where b u The purpose of calibration is to make the decision boundary of the support vector machine more centrally symmetric, thereby improving the classification performance in practical applications.
[0131] Furthermore, b in model calibration u The update formula can be improved in the following ways:
[0132]
[0133] b u ←b u -δ u
[0134] In the formula, δ u Represents the average deviation of all samples, and its reduced deviation is used to adjust the bias term to make the model more accurately align to the data center.
[0135] Corresponding to the training method for the integrated energy consumption assessment model of the electric thermal unit provided in the above-mentioned embodiments, an embodiment of the present disclosure further provides a training device for the integrated energy consumption assessment model of the electric thermal unit. Since the training device for the integrated energy consumption assessment model of the electric thermal unit provided in the embodiment of the present disclosure corresponds to the training method for the integrated energy consumption assessment model of the electric thermal unit provided in the above-mentioned embodiments, the implementation method of the above-mentioned training method for the integrated energy consumption assessment model of the electric thermal unit is also applicable to the training device for the integrated energy consumption assessment model of the electric thermal unit provided in the embodiment of the present disclosure, and will not be described in detail in the following embodiments.
[0136] Figure 5is a schematic diagram of an integrated energy consumption assessment model training device for an electric heating unit according to an embodiment of the present disclosure, such as Figure 5 As shown, the integrated energy consumption assessment model training device 500 for an electric heating unit includes: an acquisition module 510, an input module 520, a calculation module 530, a judgment module 540 and an output module 550.
[0137] The acquisition module 510 is used to acquire multiple training data sets and an initial energy consumption evaluation model. The initial energy consumption evaluation model includes an encoder and a decoder. The encoder includes multiple logical layers.
[0138] The input module 520 is used to input a training data set into the initial energy consumption assessment model, and process the training data set through each logical layer of the initial energy consumption assessment model to obtain output samples of each logical layer output.
[0139] The calculation module 530 is used to calculate the loss value of the initial energy consumption evaluation model based on the output samples through the decoder, and update the parameters of multiple logical layers based on the loss value.
[0140] The judgment module 540 is used to judge whether the updated initial energy consumption evaluation model meets the training end condition.
[0141] The output module 550 is used to select a training data set that has not participated in the training and input it into the updated initial energy consumption assessment model for training in response to the updated initial energy consumption assessment model not satisfying the training end conditions, repeat the above steps of inputting a training data set into the initial energy consumption assessment model and subsequent steps until the training is completed, and output the trained target energy consumption assessment model.
[0142] According to one embodiment of the present disclosure, a training data set is processed through each logical layer of an initial energy consumption assessment model, including: for any candidate logical layer except the first logical layer of the initial energy consumption assessment model, obtaining a preceding output sample of a layer above the candidate logical layer, as well as a weight value and a bias value of the candidate logical layer; and calculating an output sample of the candidate logical layer based on the preceding output sample, the weight value and the bias value.
[0143] According to one embodiment of the present disclosure, the output samples of the candidate logic layer are calculated based on the previous output samples, weight values and bias values, including: calculating the linear transformation output of the candidate logic layer based on the previous output samples, weight values and bias values; calculating the activation function output of the candidate logic layer based on the linear transformation output; and calculating the output samples of the candidate logic layer based on the activation function output.
[0144] According to one embodiment of the present disclosure, calculating output samples of candidate logic layers based on activation function output includes: calculating importance scores of activation function outputs; and calculating output samples of candidate logic layers based on the importance scores and activation function outputs.
[0145] According to an embodiment of the present disclosure, the method further includes: in response to the logic layer being the first logic layer, processing the training data set through the first logic layer to generate output samples of the first logic layer.
[0146] According to one embodiment of the present disclosure, a loss value of an initial energy consumption assessment model is calculated based on output samples by a decoder, including: for any candidate logic layer except the first logic layer of the initial energy consumption assessment model, obtaining a preceding output sample of a layer above the candidate logic layer; calculating a sample difference of the candidate logic layer based on the preceding output sample and the output sample of the candidate logic layer; and calculating the loss value of the initial energy consumption assessment model based on the sample differences of all candidate logic layers.
[0147] According to one embodiment of the present disclosure, the parameters of multiple logical layers are updated based on the loss value, including: for any logical layer, calculating the weight update increment and bias increment of the logical layer based on the loss value, and obtaining the sparsity measurement of the logical layer; based on the weight update increment, bias increment and sparsity measurement, calculating the updated target weight value and target bias value of the logical layer.
[0148] According to one embodiment of the present disclosure, based on the weight update increment, the bias increment and the sparsity metric, the updated target weight value and the target bias value of the logic layer are calculated, including: comparing the sparsity metric with the sparsity pruning threshold; in response to the sparsity metric being greater than the sparsity pruning threshold, adding the weight value of the logic layer with twice the weight update increment to generate an updated target weight value, and adding the bias value of the logic layer with twice the bias update increment to generate an updated target bias value; in response to the sparsity metric being less than or equal to the sparsity pruning threshold, adding the weight value of the logic layer with the weight update increment to generate an updated target weight value, and adding the bias value of the logic layer with the bias update increment to generate an updated target bias value.
[0149] According to one embodiment of the present disclosure, obtaining a sparsity measure of a logical layer includes: obtaining an activation value of each training sample in a training data set in the logical layer; determining a sub-sparsity measure of each good sample based on the activation value and a sparsity threshold; calculating an average value based on all sub-sparsity measures, and using the calculation result as the sparsity measure of the logical layer.
[0150] Through the model training method in the disclosed scheme, the model parameters can be gradually optimized, the generalization ability of the model can be improved, and the feature adaptive refinement autoencoder can be used for efficient feature dimensionality reduction to reduce information loss and retain important data features. The target energy consumption assessment model is generated through training, which improves the efficiency of energy consumption assessment, improves energy utilization efficiency, extends the service life of the equipment, and reduces maintenance costs.
[0151] In order to implement the above embodiment, the present disclosure further provides an electronic device 600, Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present disclosure, such as Figure 6 As shown, the electronic device 600 includes: a processor 601 and a memory 602 that is communicatively connected to the processor, the memory 602 stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor 601 to implement the present disclosure. Figure 1-Figure 4 The invention provides a method for training an integrated energy consumption assessment model for an electric heating unit.
[0152] In order to implement the above embodiments, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to implement the above embodiments. Figure 1-Figure 4 The invention provides a method for training an integrated energy consumption assessment model for an electric heating unit.
[0153] In order to implement the above embodiments, the present disclosure also provides a computer program product, including a computer program. When the computer program is executed by a processor, the computer program implements the above embodiments. Figure 1-Figure 4 The invention provides a method for training an integrated energy consumption assessment model for an electric heating unit.
[0154] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0155] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0156] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0157] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0158] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0159] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that contains, stores, communicates, propagates or transmits a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0160] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0161] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0162] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0163] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A training method for an integrated energy consumption assessment model for an electric heating unit, characterized in that: include: Acquire multiple training data sets and an initial energy consumption assessment model, wherein the initial energy consumption assessment model includes an encoder and a decoder, and the encoder includes multiple logical layers; Inputting a training data set into the initial energy consumption assessment model, processing the training data set through each logic layer of the initial energy consumption assessment model to obtain output samples output by each logic layer; Calculating a loss value of the initial energy consumption evaluation model based on the output sample through a decoder, and updating parameters of multiple logical layers based on the loss value; Determine whether the updated initial energy consumption evaluation model meets the training end condition; In response to the updated initial energy consumption assessment model not satisfying the training end conditions, a training data set that has not participated in the training is selected and input into the updated initial energy consumption assessment model for training, and the above-mentioned step of inputting a training data set into the initial energy consumption assessment model and subsequent steps are repeated until the training is completed, and the trained target energy consumption assessment model is output.
2. The method according to claim 1, characterized in that: The processing of the training data set through each logical layer of the initial energy consumption assessment model includes: For any candidate logic layer except the first logic layer of the initial energy consumption assessment model, obtain the preceding output sample of the previous layer of the candidate logic layer, as well as the weight value and bias value of the candidate logic layer; Based on the previous output sample, the weight value and the bias value, the output sample of the candidate logic layer is calculated.
3. The method according to claim 2, characterized in that The calculating the output sample of the candidate logic layer based on the previous output sample, the weight value and the bias value includes: Calculating a linear transformation output of the candidate logical layer based on the preceding output sample, the weight value and the bias value; Calculate the activation function output of the candidate logical layer based on the linear transformation output; The output samples of the candidate logical layer are calculated based on the activation function output.
4. The method according to claim 3, characterized in that The calculating the output sample of the candidate logical layer based on the activation function output comprises: Calculating an importance score of the activation function output; An output sample of the candidate logical layer is calculated based on the importance score and the activation function output.
5. The method according to claim 2, characterized in that: The method further comprises: In response to the logic layer being a first logic layer, the training data set is processed by the first logic layer to generate output samples of the first logic layer.
6. The method according to claim 1, characterized in that The calculating, by a decoder, a loss value of the initial energy consumption evaluation model based on the output sample comprises: For any candidate logic layer except the first logic layer of the initial energy consumption assessment model, obtain a preceding output sample of a layer above the candidate logic layer; Calculate the sample difference of the candidate logic layer based on the previous output sample and the output sample of the candidate logic layer; The loss value of the initial energy consumption evaluation model is calculated based on the sample differences of all candidate logic layers.
7. The method according to claim 6, characterized in that The updating of parameters of multiple logical layers based on the loss value includes: For any logical layer, calculate the weight update increment and bias increment of the logical layer based on the loss value, and obtain the sparsity measure of the logical layer; Based on the weight update increment, the bias increment and the sparsity metric, an updated target weight value and a target bias value of the logic layer are calculated.
8. The method according to claim 7, characterized in that The step of calculating the updated target weight value and target bias value of the logic layer based on the weight update increment, the bias increment and the sparsity metric comprises: comparing the sparsity metric to a sparsity pruning threshold; In response to the sparsity metric being greater than the sparsity pruning threshold, adding a weight value of the logic layer to twice the weight update increment to generate an updated target weight value, and adding a bias value of the logic layer to twice the bias update increment to generate an updated target bias value; In response to the sparsity metric being less than or equal to the sparsity pruning threshold, the weight value of the logic layer is added to the weight update increment to generate an updated target weight value, and the bias value of the logic layer is added to the bias update increment to generate an updated target bias value.
9. The method according to claim 7 or 8, characterized in that: The obtaining of the sparsity measure of the logic layer includes: Obtaining an activation value of each training sample in the training data set in the logic layer; Determine a sub-sparsity measure for each good sample based on the activation value and the sparsity threshold; An average value is calculated based on all the sub-sparseness metrics, and the calculation result is used as the sparsity metric of the logical layer.
10. An integrated energy consumption assessment model training device for electric heating units, characterized in that: include: An acquisition module, used to acquire multiple training data sets and an initial energy consumption evaluation model, wherein the initial energy consumption evaluation model includes an encoder and a decoder, and the encoder includes multiple logic layers; An input module, used for inputting a training data set into the initial energy consumption assessment model, processing the training data set through each logical layer of the initial energy consumption assessment model to obtain output samples output by each logical layer; A calculation module, configured to calculate a loss value of the initial energy consumption evaluation model based on the output sample through a decoder, and update parameters of multiple logical layers based on the loss value; A judgment module, used to judge whether the updated initial energy consumption evaluation model meets the training end condition; The output module is used to select a training data set that has not participated in the training and input it into the updated initial energy consumption assessment model for training in response to the updated initial energy consumption assessment model not satisfying the training end conditions, repeat the above steps of inputting a training data set into the initial energy consumption assessment model and subsequent steps until the training is completed, and output the trained target energy consumption assessment model.
Citation Information
Patent Citations
Method and system for predicting failure rate of power distribution terminal equipment
CN115859803A
Health portrait construction method based on data mining
CN116739402A
Data processing method and device based on neural network
CN116776937A
Mechanical equipment dynamic maintenance decision-making method based on evaluation and prediction information
CN117454771A
Drilling fluid performance evaluation method based on multi-source measurement data fusion
CN118690155A