Method and device for training integrated energy consumption evaluation model of electric heating unit
By using an integrated energy consumption assessment model training method for electric heating units and optimizing parameters through the multi-layer structure of encoders and decoders, the problems of insufficient training samples and inadequate feature extraction are solved, resulting in more accurate energy consumption assessment and higher energy utilization efficiency.
Patent Information
- Application Number
- CN202411976904.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing technologies for assessing the energy consumption of electric heating units suffer from problems such as insufficient training samples, inadequate feature extraction, and poor performance of classifier algorithms in dynamic environments, resulting in poor model generalization ability and inaccurate assessment results.
The training method of integrated energy consumption assessment model of electric heating unit is adopted. By acquiring multiple training datasets and initial energy consumption assessment model, data processing is performed using multiple logical layers of encoder and decoder, loss value is calculated and parameters are updated, and feature adaptive refinement autoencoder is combined to perform efficient feature dimensionality reduction and dynamic routing, and weights and sparsity measures are dynamically adjusted to optimize the model.
It improves the model's generalization ability and evaluation efficiency, reduces information loss, enhances energy utilization efficiency, extends equipment lifespan, and reduces maintenance costs.
Smart Images

Figure CN119918592B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of industrial automation technology, and in particular to a training method and apparatus for an integrated energy consumption assessment model of an electric heating unit. Background Technology
[0002] Current energy consumption assessment technologies largely rely on traditional data processing and analysis methods, typically including basic data acquisition, preliminary feature extraction, and simple classification. Existing technologies often fail to effectively address the problem of insufficient training samples in data augmentation, leading to overfitting in practical applications and affecting the model's generalization ability. Regarding feature extraction, existing methods often lack effective optimization algorithms, resulting in insufficient extraction of key information and impacting the accuracy of the assessment results. Furthermore, feature reduction techniques often ignore the complexity and dynamic changes of data, potentially leading to the loss of important information and reducing assessment accuracy. Finally, existing classifier algorithms perform poorly in dynamic environments, typically unable to adapt to real-time changes in data features, limiting the optimization of assessment results. These technical problems restrict the practicality and effectiveness of energy consumption assessment methods for electric heating units, urgently requiring solutions through more refined data processing and machine learning techniques. Summary of the Invention
[0003] This disclosure aims to at least partially address one of the technical problems in the related art.
[0004] Therefore, one objective of this disclosure is to propose a training method for an integrated energy consumption assessment model of electric heating units.
[0005] The second objective of this disclosure is to propose a training device for an integrated energy consumption assessment model of an electric heating unit.
[0006] The third objective of this disclosure is to propose an electronic device.
[0007] The fourth objective of this disclosure is to provide a non-transitory computer-readable storage medium.
[0008] The fifth objective of this disclosure is to provide a computer program product.
[0009] To achieve the above objectives, the first aspect of this disclosure proposes a training method for an integrated energy consumption assessment model of an electric heating unit, comprising: acquiring multiple training datasets 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 logic layers; inputting a training dataset into the initial energy consumption assessment model, processing the training dataset through each logic layer of the initial energy consumption assessment model to obtain output samples output by each logic layer; calculating the loss value of the initial energy consumption assessment model based on the output samples through the decoder, and updating the parameters of the multiple logic layers based on the loss value; determining whether the updated initial energy consumption assessment model meets the training termination condition; in response to the updated initial energy consumption assessment model not meeting the training termination condition, selecting a training dataset that has not participated in training and inputting it into the updated initial energy consumption assessment model for training, repeating the above steps of inputting a training dataset into the initial energy consumption assessment model and subsequent steps until training ends.
[0010] According to one embodiment of this disclosure, the step of processing the training dataset through each logical layer of the initial energy consumption assessment model includes: for any candidate logical layer of the initial energy consumption assessment model other than the first logical layer, obtaining the preceding output sample of the previous layer of 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 this disclosure, 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 this 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 one embodiment of this disclosure, the method further includes: in response to a logic layer being the first logic layer, processing the training dataset through the first logic layer to generate output samples of the first logic layer.
[0014] According to one embodiment of this disclosure, the step of calculating the loss value of the initial energy consumption assessment model based on the output samples by the decoder includes: for any candidate logic layer of the initial energy consumption assessment model other than the first logic layer, obtaining the preceding output sample of the layer above 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 this disclosure, updating the parameters of multiple logic layers based on the loss value includes: for any logic layer, calculating the weight update increment and bias increment of the logic layer based on the loss value, and obtaining the sparsity measure of the logic layer; and 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 measure.
[0016] According to one embodiment of this disclosure, 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 includes: 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 logic layer to twice the weight update increment to generate the updated target weight value, and adding the bias value of the logic layer to twice the bias update increment to generate the 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 to the weight update increment to generate the updated target weight value, and adding the bias value of the logic layer to the bias update increment to generate the updated target bias value.
[0017] According to one embodiment of this disclosure, obtaining the sparsity measure of the logic layer includes: obtaining the activation value of each training sample in the training dataset in the logic layer; determining a sub-sparse measure of each docile sample based on the activation value and a sparsity threshold; calculating the average value based on all sub-sparse measures, and using the calculation result as the sparsity measure of the logic layer.
[0018] To achieve the above objectives, a second aspect of this disclosure provides a training device for an integrated energy consumption assessment model of an electric heating unit, comprising: an acquisition module for acquiring multiple training datasets 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 logic layers; an input module for inputting a training dataset into the initial energy consumption assessment model, processing the training dataset through each logic layer of the initial energy consumption assessment model to obtain output samples from each logic layer; a calculation module for calculating the loss value of the initial energy consumption assessment model based on the output samples through the decoder, and updating the parameters of the multiple logic layers based on the loss value; a judgment module for judging whether the updated initial energy consumption assessment model meets the training termination condition; and an output module, in response to the updated initial energy consumption assessment model not meeting the training termination condition, selecting a training dataset that has not participated in training and inputting it into the updated initial energy consumption assessment model for training, repeating the above steps of inputting a training dataset into the initial energy consumption assessment model and subsequent steps until training ends, and outputting the trained target energy consumption assessment model.
[0019] To achieve the above objectives, a third aspect of this disclosure provides 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, the instructions being executed by the at least one processor to implement the integrated energy consumption assessment model training method for electric heating units as described in the first aspect of this disclosure.
[0020] To achieve the above objectives, a fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to implement the training method for the integrated energy consumption assessment model of the electric heating unit as described in the first aspect of this disclosure.
[0021] To achieve the above objectives, a fifth aspect of this disclosure provides a computer program product, including a computer program that, when executed by a processor, is used to implement the training method for an integrated energy consumption assessment model of an electric heating unit as described in the first aspect of this disclosure.
[0022] The model training method in this disclosure can gradually optimize model parameters, improve the model's generalization ability, and use an autoencoder with adaptive feature refinement to perform efficient feature dimensionality reduction, thereby reducing information loss and retaining important data features. By training and generating a target energy consumption assessment model, the efficiency of energy consumption assessment is improved, energy utilization efficiency is increased, the service life of equipment is extended, and maintenance costs are reduced. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of a training method for an integrated energy consumption assessment model of an electric heating unit according to one embodiment of the present disclosure;
[0024] Figure 2 This is a schematic diagram of another method for training an integrated energy consumption assessment model for electric heating units according to one embodiment of this disclosure;
[0025] Figure 3 This is a schematic diagram of another method for training an integrated energy consumption assessment model for electric heating units according to one embodiment of this disclosure;
[0026] Figure 4 This is a schematic diagram of another method for training an integrated energy consumption assessment model for electric heating units according to one embodiment of this disclosure;
[0027] Figure 5 This is a schematic diagram of an integrated energy consumption assessment model training device for electric heating units according to one embodiment of the present disclosure;
[0028] Figure 6 This is a schematic diagram of an electronic device according to one embodiment of the present disclosure. Detailed Implementation
[0029] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0030] The acquisition, storage, use, and processing of data in this disclosed technical solution all comply with the relevant provisions of relevant laws and regulations.
[0031] It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, it does not mean that the applicant has used or necessarily used the solution.
[0032] Figure 1 This is a schematic diagram of a training method for an integrated energy consumption assessment model of an electric heating unit according to one embodiment of this disclosure, as shown below. Figure 1 As shown, the training method for the integrated energy consumption assessment model of the electric heating unit includes the following steps:
[0033] S101, obtain multiple training datasets and an initial energy consumption assessment model. The initial energy consumption assessment model includes an encoder and a decoder. The encoder includes multiple logical layers.
[0034] The training method for the integrated energy consumption assessment model of the electric heating unit in this application embodiment can be applied to the scenario of energy consumption assessment of the electric heating unit. The execution subject of the training of the integrated energy consumption assessment model of the electric heating unit in this application embodiment can be the training device for the integrated energy consumption assessment model of the electric heating unit in this application embodiment. The training device for the integrated energy consumption assessment model of the electric heating unit can be installed on an electronic device.
[0035] In the embodiments of this disclosure, there are various methods for obtaining the training dataset, and no limitation is made here.
[0036] One possible implementation method is that it can be artificially created.
[0037] Alternatively, the data can be obtained by analyzing previous energy consumption assessment data or operating data of electric heating units.
[0038] In this embodiment of the disclosure, the training dataset may include various data that affect the integrated energy consumption assessment of electric heating units. For example, it may include one or more of the following data:
[0039] Temperature refers to the temperature values of various parts of the unit, expressed in degrees Celsius (°C).
[0040] Pressure, reflecting the internal pressure of the unit, is measured in Pascals (Pa).
[0041] Flow rate refers to the fluid flow rate through the unit, measured in cubic meters per hour (m^3 / h).
[0042] Electric current, the current value of an electric heating element, measured in amperes (A).
[0043] Voltage, the voltage value of an electric heating element, is measured in volts (V).
[0044] Energy consumption, the total energy consumption calculated, is expressed in kilowatt-hours (kWh).
[0045] Switch status: The switch status of the unit. 0 indicates off, and 1 indicates on.
[0046] Maintenance records, including unit maintenance and repair records, are stored in text format.
[0047] Fault codes are error codes that appear when a unit malfunctions.
[0048] Runtime refers to the operating time of the unit since the last maintenance, expressed in hours (h).
[0049] S102, a training dataset is input into the initial energy consumption assessment model, and the training dataset is processed by each logical layer of the initial energy consumption assessment model to obtain the output samples of each logical layer.
[0050] It should be noted that the relationship between the multiple logical layers of an encoder is usually represented by a hierarchical structure or a serialization process. Each logical layer is responsible for performing a specific type of transformation or feature extraction on the input data. These layers are connected together in some way to form a step-by-step transformation process from the raw input to an abstract representation.
[0051] It should be noted that there are logical connections between multiple logical layers, which are not limited here. For example, multiple logical layers can be connected sequentially, skipped, or residually.
[0052] S103 calculates the loss value of the initial energy consumption assessment model based on the output samples through the decoder, and updates the parameters of multiple logic layers based on the loss value.
[0053] In this embodiment, the decoder can calculate the loss value of each output of the initial energy consumption assessment model based on a loss function. This loss function can be of various types, and no limitation is made here; it can be specifically defined according to actual design needs.
[0054] S104, determine whether the updated initial energy consumption evaluation model meets the training termination condition.
[0055] It should be noted that the training termination conditions are pre-designed and can be changed according to actual design needs. There are various possible termination conditions, and no limitations are set here. For example, the termination condition could be that the training duration reaches a preset value, or the number of training sessions reaches a preset value.
[0056] S105, in response to the updated initial energy consumption assessment model not meeting the training termination condition, select a training dataset that has not participated in training and input it into the updated initial energy consumption assessment model for training. Repeat the above steps of inputting a training dataset into the initial energy consumption assessment model and subsequent steps until training ends, and output the trained target energy consumption assessment model.
[0057] In this embodiment, multiple training datasets and an initial energy consumption assessment model are first obtained. The initial energy consumption assessment model includes an encoder and a decoder. The encoder includes multiple logical layers. Then, a training dataset is input into the initial energy consumption assessment model. The training dataset is processed by each logical layer of the initial energy consumption assessment model to obtain the output samples of each logical layer. Then, the decoder calculates the loss value of the initial energy consumption assessment model based on the output samples and updates the parameters of multiple logical layers based on the loss value. Then, it is determined whether the updated initial energy consumption assessment model meets the training termination condition. Finally, in response to the updated initial energy consumption assessment model not meeting the training termination condition, a training dataset that has not participated in training is selected and input into the updated initial energy consumption assessment model for training. The above steps of inputting a training dataset into the initial energy consumption assessment model and subsequent steps are repeated until the training ends. The model training method in this disclosure can gradually optimize model parameters, improve the model's generalization ability, and use an autoencoder with adaptive feature refinement to perform efficient feature dimensionality reduction, thereby reducing information loss and retaining important data features. By training and generating a target energy consumption assessment model, the efficiency of energy consumption assessment is improved, energy utilization efficiency is increased, the service life of equipment is extended, and maintenance costs are reduced.
[0058] In the above embodiments, the training dataset is processed through each logical layer of the initial energy consumption assessment model, and can also be processed through... Figure 2 To further explain, the method includes:
[0059] S201: For any candidate logic layer in the initial energy consumption assessment model other than the first logic layer, 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 this embodiment of the disclosure, before processing the training dataset through the logic layer, the weights and biases of the autoencoder can be initialized first. In one embodiment, the initialization method is expressed as follows:
[0061]
[0062]
[0063] in, For the first autoencoder Initial weights of the layer; For the first autoencoder Initial bias of the layer; For the first autoencoder Number of neurons in a layer; For the first autoencoder Number of neurons in a layer; The generated shape is Standard normally distributed random numbers; Generate length is The zero vector.
[0064] It should be noted that the response logic layer is the first logic layer. The training dataset is processed through the first logic layer to generate the output sample of the first logic layer.
[0065] S202, calculates the output samples of the candidate logic layer based on the preceding output samples, weight values, and bias values.
[0066] In this embodiment of the disclosure, the linear transformation output of the candidate logic layer can be calculated first based on the preceding output samples, weight values, and bias values. Then, the activation function output of the candidate logic layer can be calculated based on the linear transformation output. Finally, the output samples of the candidate logic layer can be calculated based on the activation function output.
[0067] In this embodiment, the input data is passed through each layer of the encoder. 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 formula is as follows:
[0068]
[0069]
[0070]
[0071] In the formula, For the first autoencoder The linear transformation output of the layer; The output features of the activation function of the autoencoder; For the first autoencoder Layer weights; For the first autoencoder Layer bias; It is the ReLU activation function; For the first autoencoder The input features of the layer; This represents a dynamic routing function based on feature importance. Calculate the importance score function of the activation function output feature of the autoencoder.
[0072] In this embodiment, firstly, for any candidate logic layer of the initial energy consumption assessment model (excluding the first logic layer), the preceding output sample of the layer above the candidate logic layer, as well as the weight and bias values of the candidate logic layer, are obtained. Then, based on the preceding output sample, weight values, and bias values, the output sample of the candidate logic layer is calculated. Therefore, this dynamic routing method based on feature importance scoring can achieve more intelligent information transmission in each encoder layer, helping to build a more efficient and powerful target energy consumption assessment model.
[0073] In the above embodiments, the output samples of the candidate logic layer are calculated based on the activation function output, and can also be obtained through... Figure 3 To further explain, the method includes:
[0074] S301, Calculate the importance score of the activation function output.
[0075] S302, calculate the output samples of candidate logic layers based on importance scores and activation function outputs.
[0076] In one embodiment of this disclosure, the dynamic routing function integrates the activation outputs of various features using a weighted average, where the weights are determined by the importance scores of the features, and the calculation method is expressed as follows:
[0077]
[0078] Furthermore, the importance score of the activation function output feature of the autoencoder is calculated as follows:
[0079]
[0080] In the formula, It is the first Layer The activation output of each neuron It is the first Layer The activation output of each neuron; These are the weights corresponding to the importance of the features, obtained through training, representing the weights of the th feature. The importance of each feature; These are the weights corresponding to the importance of the features, obtained through training, representing the weights of the th feature. The importance of each feature; It is the first The total number of neurons in the layer.
[0081] In this 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. Thus, by introducing a dynamic routing function and a feature importance scoring mechanism, the activation outputs of various features can be integrated more effectively, and a weighted average can be performed according to their importance. This not only improves the model's performance but also enhances its understanding and interpretation of the input data.
[0082] In the above embodiments, the loss value of the initial energy consumption assessment model is calculated by the decoder based on the output samples. First, for any candidate logic layer other than the first logic layer of the initial energy consumption assessment model, the previous output sample of the previous layer of the candidate logic layer is obtained. Then, the sample difference of the candidate logic layer is calculated based on the previous output sample and the output sample of the candidate logic layer. Finally, the loss value of the initial energy consumption assessment model is calculated based on the sample difference of all candidate logic layers.
[0083] In this embodiment of the disclosure, the formula for calculating the loss function of the autoencoder is:
[0084]
[0085] In the formula, The loss function of the autoencoder; Enter the number of samples for the current batch; For the input to the autoencoder One sample; For the reconstructed first One sample.
[0086] In the above embodiments, the parameters of multiple logic layers are updated based on the loss value, and can also be updated through... Figure 4 To further explain, the method includes:
[0087] S401: For any logic layer, calculate the weight update increment and bias increment of the logic layer based on the loss value, and obtain the sparsity measure of the logic layer.
[0088] In this embodiment of the disclosure, obtaining the sparsity measure of the logic layer can first involve obtaining the activation value of each training sample in the training dataset in the logic layer, then determining the sub-sparse measure of each docile sample based on the activation value and the sparsity threshold, and finally calculating the average value based on all sub-sparse measures, and using the calculation result as the sparsity measure of the logic layer.
[0089] S402 calculates the updated target weight value and target bias value of the logic layer based on the weight update increment, bias increment, and sparsity measure.
[0090] In this embodiment of the disclosure, a sparsity metric and a sparsity pruning threshold can be compared. Then, in response to the sparsity metric being greater than the sparsity pruning threshold, the weight value of the logic layer is added to twice the weight update increment to generate an updated target weight value, and the bias value of the logic layer is added to twice the bias update increment to generate an updated target bias value. Alternatively, 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.
[0091] The gradient of the loss function with respect to each parameter of the autoencoder is calculated using the backpropagation algorithm, and the weights and biases of the autoencoder are updated as follows:
[0092]
[0093]
[0094]
[0095]
[0096] In the formula, For the first autoencoder The incremental update of layer weights; For the first autoencoder The incremental update of the layer's bias; is the learning rate of the autoencoder; For the updated autoencoder's first Layer weights; For the updated autoencoder's first Layer bias; For the first autoencoder A measure of sparsity of layer neurons; This is the sparse pruning threshold; This is an indicator function that takes the value 1 when the condition within the parentheses is true, and 0 otherwise. Preferably, Setting it to 0.8 means that the weights will be pruned when the sparsity metric is higher than 80%.
[0097] The above formula shows that if the sparsity measure of a neuron... If the value is above a set threshold (e.g., less than 0.8), the indicator function returns 1, thus doubling the update increment and accelerating the learning speed of these important neurons. If the sparsity metric (S_{(r,i)}) is less than or equal to the threshold, the indicator function returns 0, the update increment remains unchanged, which is equivalent to "punishing" less active neurons, slowing down their learning speed, and can even be seen as a kind of soft pruning.
[0098] In this embodiment, the computational efficiency and generalization ability of the model can be improved by dynamically pruning redundant weights. Specifically, the weights corresponding to neurons with small activation values in most cases will be dynamically pruned, thereby simplifying the model structure. Specifically, the importance of neurons is determined by statistically analyzing the sparsity of activation values. The sparsity metric of layer neurons is calculated as follows:
[0099]
[0100] In the formula, For the first A measure of sparsity of layer neurons; For the first The sample at the th The activation value of the layer; This is the sparsity threshold. Preferably, Set it to 0.1.
[0101] Therefore, the method of dynamically pruning redundant weights to improve the computational efficiency and generalization ability of the model, especially the application of sparsity measures in neural networks to determine the importance of neurons, can effectively reduce model complexity and improve model performance.
[0102] In this 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 measure of the logic layer is obtained. Then, based on the weight update increment, bias increment, and sparsity measure, the updated target weight value and target bias value of the logic layer are calculated. Thus, by combining the loss value and the sparsity measure for parameter updating, this method not only improves the performance and efficiency of the model but also enhances its generalization ability and interpretability.
[0103] In another possible implementation of this disclosure, a support vector machine algorithm based on dynamic weight adjustment is used as a classification algorithm. An adaptive regularization mechanism is used to dynamically adjust the penalty parameters according to the importance of each feature and the classification error rate, so that the classifier pays more attention to the samples that are difficult to classify during the training process, thereby improving the overall generalization ability and accuracy of the model.
[0104] Specifically, the training process of the support vector machine algorithm based on dynamic weight adjustment is as follows:
[0105] First, initialize the model parameters. Based on the dimension of the input features, initialize the SVM weight vector and bias term. The initialized model parameters are expressed as follows:
[0106]
[0107]
[0108] In the formula, The initial weight vector for the support vector machine. For the initial bias term, Scaling factor for generating small random numbers To generate a random number function that follows a standard normal distribution, The dimension of the input feature.
[0109] Then, in each training batch, the classification boundary and error rate of the current model on the training data are first calculated. Based on the feature regions with high error rates, the weight values of these regions are dynamically increased; that is, for misclassified points, the weight influence of their corresponding features is increased. The dynamic weight adjustment is expressed as:
[0110]
[0111]
[0112] In the formula, This is the weight adjustment amount. For learning rate, For the first Adaptive weights for each data point For the first Labels for each data point For the first Feature vectors of data points For indicator functions, express The transpose of .
[0113] Furthermore, adaptive weights Represented as:
[0114]
[0115] In the formula, It is an adjustment parameter that controls the sensitivity of the error to the weight. This indicates the error between the predicted value and the actual label.
[0116] Then, based on the contribution of each feature to the classification error, the regularization parameter is automatically adjusted. The regularization parameter for high-contribution features is decreased, and the regularization parameter for low-contribution features is increased, thus ensuring that the model does not overfit to a small amount of noisy data. The adaptive regularization update is expressed as:
[0117]
[0118] In the formula, For the first The regularization parameters for each feature. Based on the regularization parameters, This is an adjustment factor used to adjust the regularization strength based on classification errors.
[0119] Furthermore, the adjustment of the regularization parameter is expressed as:
[0120]
[0121] In the formula, The loss function φ represents the loss function for the th Features The partial derivatives are used to assess the importance of the feature.
[0122] Finally, gradient descent is used to optimize the SVM's decision boundary for the dynamically adjusted weights and regularization parameters. The optimized decision boundary is expressed as:
[0123]
[0124]
[0125] In the formula, Represents the function to be minimized. The penalty parameter represents the average regularization strength.
[0126] Furthermore, the loss function is expressed as:
[0127]
[0128] In the formula, The dynamic regularization coefficient represents each sample, which strengthens the penalty for hard-to-classify samples.
[0129] Check whether the model's training error reaches a preset threshold or whether the number of training iterations meets the user's settings. If either condition is met, stop the training process. The termination condition is expressed as follows:
[0130]
[0131] In the formula, This is the preset classification accuracy threshold.
[0132] After training, the model undergoes final parameter calibration to ensure optimal performance in real-world applications. Model calibration is represented as follows:
[0133]
[0134] In the formula, The calibration is to make the decision boundary of the support vector machine more centrally symmetric, thereby improving the classification performance in practical applications.
[0135] Furthermore, in model calibration The accuracy of the updated formula can be improved in the following ways:
[0136]
[0137]
[0138] In the formula, This represents the average bias across all samples. Reducing this bias is used to adjust the bias term, making the model more accurately aligned with the data center.
[0139] Corresponding to the training methods for integrated energy consumption assessment models of electric heating units provided in the above embodiments, an embodiment of this disclosure also provides a training device for integrated energy consumption assessment models of electric heating units. Since the training device for integrated energy consumption assessment models of electric heating units provided in this disclosure corresponds to the training methods for integrated energy consumption assessment models of electric heating units provided in the above embodiments, the implementation methods of the above-mentioned training methods for integrated energy consumption assessment models of electric heating units are also applicable to the training device for integrated energy consumption assessment models of electric heating units provided in this disclosure, and will not be described in detail in the following embodiments.
[0140] Figure 5 Figure 5 is a schematic diagram of an integrated energy consumption assessment model training device for electric heating units according to one embodiment of the present disclosure. As shown in Figure 5, the integrated energy consumption assessment model training device 500 for electric heating units includes: an acquisition module 510, an input module 520, a calculation module 530, a judgment module 540, and an output module 550.
[0141] The acquisition module 510 is used to acquire multiple training datasets and an initial energy consumption evaluation model. The initial energy consumption evaluation model includes an encoder and a decoder, and the encoder includes multiple logical layers.
[0142] The input module 520 is used to input a training dataset into the initial energy consumption assessment model, and process the training dataset through each logical layer of the initial energy consumption assessment model to obtain the output samples of each logical layer.
[0143] The calculation module 530 is used to calculate the loss value of the initial energy consumption assessment model based on the output samples through the decoder, and update the parameters of multiple logic layers based on the loss value.
[0144] The judgment module 540 is used to determine whether the updated initial energy consumption evaluation model meets the training termination condition.
[0145] Output module 550 is used to respond to the updated initial energy consumption assessment model not meeting the training termination condition by selecting a training dataset that has not participated in training and inputting it into the updated initial energy consumption assessment model for training. The above steps of inputting a training dataset into the initial energy consumption assessment model and subsequent steps are repeated until the training ends, and the trained target energy consumption assessment model is output.
[0146] According to one embodiment of this disclosure, the training dataset is processed through each logical layer of the initial energy consumption assessment model, including: for any candidate logical layer of the initial energy consumption assessment model other than the first logical layer, obtaining the previous output sample of the previous layer of 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 previous output sample, the weight value and the bias value.
[0147] According to one embodiment of this disclosure, calculating the output samples of a candidate logic layer based on preceding output samples, weight values, and bias values includes: calculating the linear transformation output of the candidate logic layer based on preceding 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.
[0148] According to one embodiment of this disclosure, calculating the output samples of a 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.
[0149] According to one embodiment of this disclosure, the method further includes: in response to the logic layer being the first logic layer, processing the training dataset through the first logic layer to generate the output sample of the first logic layer.
[0150] According to one embodiment of this disclosure, the loss value of the initial energy consumption assessment model is calculated by the decoder based on the output samples, including: for any candidate logic layer of the initial energy consumption assessment model other than the first logic layer, obtaining the previous output sample of the previous layer of the candidate logic layer; calculating the sample difference of the candidate logic layer based on the previous 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 difference of all candidate logic layers.
[0151] According to one embodiment of this disclosure, updating the parameters of multiple logic layers based on loss values includes: for any logic layer, calculating the weight update increment and bias increment of the logic layer based on the loss value, and obtaining the sparsity measure of the logic layer; and calculating the updated target weight value and target bias value of the logic layer based on the weight update increment, bias increment and sparsity measure.
[0152] According to one embodiment of this disclosure, calculating the updated target weight value and target bias value of the logic layer based on the weight update increment, bias increment, and sparsity metric includes: comparing the sparsity metric and a sparsity pruning threshold; in response to the sparsity metric being greater than the sparsity pruning threshold, adding the logic layer weight value to twice the weight update increment to generate the updated target weight value, and adding the logic layer bias value to twice the bias update increment to generate the updated target bias value; in response to the sparsity metric being less than or equal to the sparsity pruning threshold, adding the logic layer weight value to the weight update increment to generate the updated target weight value, and adding the logic layer bias value to the bias update increment to generate the updated target bias value.
[0153] According to one embodiment of this disclosure, obtaining a sparsity measure of the logic layer includes: obtaining the activation value of each training sample in the training dataset in the logic layer; determining a sub-sparse measure of each docile sample based on the activation value and a sparsity threshold; calculating the average value based on all sub-sparse measures, and using the calculation result as the sparsity measure of the logic layer.
[0154] The model training method in this disclosure can gradually optimize model parameters, improve the model's generalization ability, and use an autoencoder with adaptive feature refinement to perform efficient feature dimensionality reduction, thereby reducing information loss and retaining important data features. By training and generating a target energy consumption assessment model, the efficiency of energy consumption assessment is improved, energy utilization efficiency is increased, the service life of equipment is extended, and maintenance costs are reduced.
[0155] To implement the above embodiments, this disclosure also proposes an electronic device 600. Figure 6 This is a schematic diagram of an electronic device according to one embodiment of the present disclosure, such as... Figure 6 As shown, the electronic device 600 includes: a processor 601 and a memory 602 communicatively connected to the processor. The memory 602 stores instructions executable by at least one processor. The instructions are executed by at least one processor 601 to implement the functions described in this disclosure. Figures 1-4 Training method for integrated energy consumption assessment model of electric heating unit in the embodiment.
[0156] To implement the above embodiments, this disclosure also proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to implement the present disclosure. Figures 1-4 Training method for integrated energy consumption assessment model of electric heating unit in the embodiment.
[0157] To implement the above embodiments, this disclosure also proposes a computer program product, including a computer program, which, when executed by a processor, implements the features of this disclosure. Figures 1-4 Training method for integrated energy consumption assessment model of electric heating unit in the embodiment.
[0158] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.
[0159] This application is intended to provide an implementation scheme for users to selectively prevent the use or access to their personal information data. Specifically, this disclosure is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information is de-identified to protect user privacy.
[0160] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0161] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0162] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0163] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that contains, stores, communicates, propagates, or transmits programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0164] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0165] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0166] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0167] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A training method for an integrated energy consumption assessment model of an electric heating unit, characterized in that, include: Obtain multiple training datasets 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, wherein the training dataset includes one or more of the following data: temperature, pressure, and flow rate; A training dataset is input into the initial energy consumption assessment model, and the training dataset is processed through each logical layer of the initial energy consumption assessment model to obtain the output samples of each logical layer. The decoder calculates the loss value of the initial energy consumption assessment model based on the output samples, and updates the parameters of multiple logic layers based on the loss value; Determine whether the updated initial energy consumption assessment model meets the training termination condition; In response to the updated initial energy consumption assessment model not meeting the training termination condition, a training dataset that has not participated in training is selected and input into the updated initial energy consumption assessment model for training. The above steps of inputting a training dataset into the initial energy consumption assessment model and subsequent steps are repeated until the training ends, and the trained target energy consumption assessment model is output. The step of updating the 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 measure, calculate the updated target weight value and target bias value of the logic layer; 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 includes: The sparsity metric and the sparsity pruning threshold are compared; In response to the sparsity metric being greater than the sparsity pruning threshold, the weight value of the logic layer is added to twice the weight update increment to generate an updated target weight value, and the bias value of the logic layer is added to twice the bias 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 increment to generate an updated target bias value.
2. The method according to claim 1, characterized in that, The process of processing the training dataset through each logical layer of the initial energy consumption assessment model includes: For any candidate logic layer in the initial energy consumption assessment model, excluding the first logic layer, 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 preceding output samples, the weight values, and the bias values, the output samples of the candidate logic layer are calculated.
3. The method according to claim 2, characterized in that, The step of calculating the output samples of the candidate logic layer based on the preceding output samples, the weight values, and the bias values includes: The linear transformation output of the candidate logic layer is calculated based on the preceding output samples, the weight values, and the bias values. The activation function output of the candidate logic layer is calculated based on the linear transformation output. The output samples of the candidate logic layer are calculated based on the output of the activation function.
4. The method according to claim 3, characterized in that, The step of calculating the output samples of the candidate logic layer based on the activation function output includes: Calculate the importance score output by the activation function; The output samples of the candidate logic layer are calculated based on the importance score and the activation function output.
5. The method according to claim 2, characterized in that, The method further includes: In response to the first logical layer being the first logical layer, the training dataset is processed through the first logical layer to generate the output sample of the first logical layer.
6. The method according to claim 1, characterized in that, The step of calculating the loss value of the initial energy consumption assessment model based on the output samples using a decoder includes: For any candidate logic layer in the initial energy consumption assessment model, excluding the first logic layer, obtain the preceding output sample of the layer above the candidate logic layer. The sample difference of the candidate logic layer is calculated based on the preceding output sample and the output sample of the candidate logic layer. The loss value of the initial energy consumption assessment model is calculated based on the sample difference of all candidate logic layers.
7. The method according to claim 1, characterized in that, The step of obtaining the sparsity metric of the logic layer includes: Obtain the activation value of each training sample in the training dataset in the logical layer; The sub-sparseness metric for each docile sample is determined based on the activation value and the sparsity threshold. The average value is calculated based on all sub-sparseness measures, and the result is used as the sparsity measure of the logic layer.
8. A training device for an integrated energy consumption assessment model of an electric heating unit, characterized in that, include: An acquisition module is used to acquire multiple training datasets and an initial energy consumption assessment model. The initial energy consumption assessment model includes an encoder and a decoder. The encoder includes multiple logical layers. The training datasets include one or more of the following data: temperature, pressure, and flow rate. The input module is used to input a training dataset into the initial energy consumption assessment model, and process the training dataset through each logical layer of the initial energy consumption assessment model to obtain the output samples of each logical layer. The calculation module is 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 logic layers based on the loss value; The judgment module is used to determine whether the updated initial energy consumption evaluation model meets the training termination condition. The output module is used to respond to the updated initial energy consumption assessment model not meeting the training termination condition by selecting a training dataset that has not participated in training and inputting it into the updated initial energy consumption assessment model for training. The above steps of inputting a training dataset into the initial energy consumption assessment model and subsequent steps are repeated until training ends, and the trained target energy consumption assessment model is output. The step of updating the 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 measure, calculate the updated target weight value and target bias value of the logic layer; 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 includes: The sparsity metric and the sparsity pruning threshold are compared; In response to the sparsity metric being greater than the sparsity pruning threshold, the weight value of the logic layer is added to twice the weight update increment to generate an updated target weight value, and the bias value of the logic layer is added to twice the bias 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 increment to generate an updated target bias value.
Citation Information
Patent Citations
Data processing method and device based on neural network
CN116776937A