Power equipment energy consumption prediction method, computer equipment and readable storage medium
By updating the energy consumption prediction model to adapt to new equipment or environmental changes, the problem of traditional methods predicting failure after changes is solved, and higher energy consumption prediction accuracy is achieved.
Patent Information
- Application Number
- CN202510337794.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional energy consumption prediction methods are difficult to accurately predict after new equipment or environmental changes, resulting in failure of energy consumption prediction of power equipment.
By obtaining the current operating data of the power equipment and the target sample data, the current energy consumption prediction model is updated to form the next energy consumption prediction model, and the model is updated when the accuracy of the prediction results of the new model reaches or exceeds the old model.
The accuracy of power equipment energy consumption prediction has been improved, making the energy consumption prediction model increasingly adapt to power equipment operation data in different scenarios, and continuously improving the prediction accuracy.
Smart Images

Figure CN119849716A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power electronics technology, and in particular to an energy consumption prediction method for power equipment, a computer device, and a readable storage medium. Background Art
[0002] With the popularization of power equipment and the increase in energy demand, accurate energy consumption forecasting is of great significance to the optimization of power system operation and energy efficiency improvement. However, in practical applications, the variety of power equipment, complex operating environment and dynamic data characteristics make energy consumption forecasting face many challenges.
[0003] In traditional energy consumption prediction methods, the initial model is often trained offline through the collected and labeled initial sample data to obtain an energy consumption prediction model, and the energy consumption prediction model is used to predict the energy consumption of power equipment.
[0004] However, when new equipment is introduced or the environment changes, traditional energy consumption prediction models often cannot make accurate predictions on the energy consumption of power equipment after the new equipment or environmental changes. Summary of the invention
[0005] Based on this, the present application provides an energy consumption prediction method for electric power equipment, a computer device and a readable storage medium, which can improve the accuracy of energy consumption prediction for electric power equipment.
[0006] In a first aspect, the present application provides a method for predicting energy consumption of an electric device, the method comprising:
[0007] Acquire the collected current operation data of the electric power equipment, and use the current energy consumption prediction model to perform energy consumption prediction on the current operation data to obtain the current energy consumption prediction result of the electric power equipment;
[0008] Obtain target sample data, and update the current energy consumption prediction model according to the current operation data, the current energy consumption prediction result, and the target sample data to obtain the next energy consumption prediction model;
[0009] Using the current energy consumption prediction model and the next energy consumption prediction model respectively, the operation data in the target sample data is predicted to have energy consumption, and a first prediction result and a second prediction result are obtained;
[0010] When the accuracy of the second prediction result is greater than or equal to the first prediction result, the next energy consumption prediction model is used to perform energy consumption prediction on another collected operation data of the electric power equipment.
[0011] In some embodiments, obtaining target sample data includes:
[0012] Obtaining initial sample data of power equipment;
[0013] The dual discriminator generative adversarial network is used to expand the initial sample data to obtain expanded sample data;
[0014] The initial sample data and the expanded sample data are merged to obtain the target sample data.
[0015] In some embodiments, a dual discriminator generative adversarial network training method includes:
[0016] Obtain the current round noise vector, and input the current round noise vector to the current round generator, so that the current round generator outputs the current round pseudo data; the current round noise vector is determined according to the network parameters of the previous round true and false discriminator, the network parameters of the previous round category discriminator and the previous round noise vector;
[0017] The initial sample data and the current round pseudo data are mixed using a preset mixing ratio to obtain the current round mixed data, and the discrimination result of the current round mixed data and the current round feedback data are determined by the current round authenticity discriminator and the current round category discriminator;
[0018] According to the discrimination results and labels of the current round of mixed data, the network parameters in the current round of authenticity discriminator and the current round of category discriminator are updated, and according to the current round of feedback data, the network parameters of the generator are updated;
[0019] The above steps are repeated until the iteration termination condition is met, and the training of the dual discriminator-generated adversarial network is completed.
[0020] In some embodiments, the network parameters of the generator are updated according to the current round feedback data, including:
[0021] Obtain the Wasserstein distance between the probability distribution of the true data and the probability distribution of the pseudo data in the current round of feedback data; the true data is the initial sample data mixed in the current round of mixed data;
[0022] The Euclidean norm between real data and fake data is determined as the authenticity loss of the generator;
[0023] The network parameters of the generator are updated according to the Wasserstein distance and authenticity loss.
[0024] In some embodiments, according to the discrimination result and label of the current round of mixed data, the network parameters in the current round of authenticity discriminator and the current round of category discriminator are updated, including:
[0025] According to the discrimination result and label of the current round of mixed data, determine the authenticity loss value of the current round of authenticity discriminator and the category loss value of the current round of category discriminator;
[0026] According to the authenticity loss value of the current round authenticity discriminator, the network parameters in the current round authenticity discriminator are updated, and according to the category loss value of the current round category discriminator, the network parameters in the current round category discriminator are updated.
[0027] In some embodiments, the current energy consumption prediction model is updated according to the current operation data, the current energy consumption prediction result, and the target sample data to obtain the next energy consumption prediction model, including:
[0028] Clustering the current running data in each category to obtain each first cluster center, and clustering the running data in the target sample data in each category to obtain each second cluster center;
[0029] Determine the operation data in the area with each first cluster center and each second cluster center as the sphere center and the distance between each first cluster center and each second cluster center as the radius as the operation data to be trained;
[0030] The energy consumption prediction results corresponding to the running data to be trained are determined from the current energy consumption prediction results and the target sample data, and the current energy consumption prediction model is updated using the running data to be trained and the corresponding energy consumption prediction results to obtain the next energy consumption prediction model.
[0031] In some embodiments, the current energy consumption prediction model is used to perform energy consumption prediction on the current operation data to obtain the current energy consumption prediction result of the power equipment, including:
[0032] The current feature extraction layer in the multi-layer feature extraction layer in the current energy consumption prediction model is used to extract the input features to obtain output features; wherein the input features of the first feature extraction layer are the current operation data;
[0033] Determine the correlation weight between the current feature extraction layer and the next feature extraction layer according to the output features and the next feature extraction layer, and determine the input features of the next feature extraction layer according to the output features and the correlation weight;
[0034] The above steps are repeated until the output features of the last feature extraction layer are obtained, and the prediction model in the current energy consumption prediction model is used to classify the output features of the last feature extraction layer to obtain the current energy consumption prediction result of the power equipment.
[0035] In some embodiments, a method for training multiple feature extraction layers includes:
[0036] Get the weights and biases of the current iteration in the multi-layer feature extraction layer;
[0037] According to the weight and bias of the current round of iteration, the specified output feature of the running data in the feature sample data is determined, and according to the specified output feature and the label in the feature sample data, the network parameter adjustment value is determined, and according to the network parameter adjustment value, the weight and bias of the current round of iteration are updated to obtain the intermediate weight and intermediate bias;
[0038] According to the intermediate weights and intermediate biases, the target output features of the running data in the feature sample data are determined, and the cross entropy loss value is determined according to the target output features and the labels in the feature sample data. According to the cross entropy loss value, the intermediate weights and intermediate biases are updated to obtain the weights and biases for the next round of iterations.
[0039] The above steps are repeated until the iteration termination condition is met, and the training of the multi-layer feature extraction layer is completed.
[0040] In a second aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0041] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when the computer program is executed by a processor.
[0042] In the technical solution of the embodiment of the present application, the energy consumption prediction model is continuously updated according to the newly acquired operating data of the power equipment, so that the continuously updated energy consumption prediction model is increasingly adapted to the operating data of the power equipment in different scenarios, making the prediction of the operating data of the power equipment more accurate, thereby improving the accuracy of the energy consumption prediction of the power equipment; in addition, only when the accuracy of the second prediction result of the next energy consumption prediction model is greater than or equal to the first prediction result of the current energy consumption prediction model, the next energy consumption prediction model is used to predict the next operating data, so that each model update is developing in a more accurate direction, continuously improving the accuracy of the energy consumption prediction model of the updated energy consumption prediction model for the energy consumption of the power equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A schematic flow chart of a method for predicting energy consumption of electric power equipment provided in the first embodiment;
[0045] Figure 2 A schematic flow chart of a method for predicting energy consumption of electric power equipment provided in the second embodiment;
[0046] Figure 3 A schematic flow chart of a method for predicting energy consumption of electric power equipment provided in the third embodiment;
[0047] Figure 4 A flowchart of a method for using a current energy consumption prediction model to predict energy consumption of current operating data provided in some embodiments;
[0048] Figure 5 A schematic diagram of an energy consumption prediction model training framework based on incremental learning provided by some embodiments;
[0049] Figure 6 A schematic diagram of a flow chart of an energy consumption prediction model training method based on incremental learning provided in some embodiments;
[0050] Figure 7 A schematic diagram of the structure of an energy consumption prediction device for electric power equipment provided in some embodiments;
[0051] Figure 8 A schematic diagram of the structure of a computer device is provided for some embodiments. DETAILED DESCRIPTION
[0052] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0054] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined. In the description of the embodiments of the present application, "each" means each or each of the multiple, unless otherwise clearly and specifically defined.
[0055] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0056] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0057] The computer device in the embodiment of the present application may include one of the following or a combination of at least two: a server, a mobile phone (MobilePhone), a tablet computer (Pad), a computer with a sending and receiving function, a PDA, a desktop computer, a personal digital assistant, a portable media player, a smart speaker, a navigation device, a smart watch, a smart glasses, a smart necklace and other wearable devices, a pedometer, a digital TV, a virtual reality (VirtualReality, VR) device, an augmented reality (AugmentedReality, AR) device, a device in industrial control (Industrial Control), a device in self-driving (Self Driving), a device in remote medical surgery (Remote Medical Surgery), a device in smart grid (Smart Grid), a device in transportation safety (Transportation Safety), a device in a smart city (Smart City), a device in a smart home (SmartHome), a vehicle, a vehicle-mounted device, a vehicle-mounted module, and the like.
[0058] Figure 1 A schematic diagram of a flow chart of a method for predicting energy consumption of an electric power device provided in the first embodiment, such as Figure 1 As shown, the method is applied to a computer device, and the method includes:
[0059] S101. Acquire the collected current operation data of the electric power equipment, and use the current energy consumption prediction model to perform energy consumption prediction on the current operation data to obtain the current energy consumption prediction result of the electric power equipment.
[0060] Exemplarily, the collected operation data of the power equipment may be the real-time operation data of the power equipment. Exemplarily, the power equipment includes but is not limited to at least one of a transformer, a motor, a switchgear, etc. In some embodiments, the power equipment may include one device, or may include at least two devices. Exemplarily, the operation data of the power equipment may be collected by a collection device of at least one of a sensor, an intelligent metering device, and a power monitoring system. Exemplarily, the operation data may include at least one parameter of the load (or power) of the power equipment, the load rate (the ratio of the current power to the rated power), the current, the voltage, the temperature, the wind speed, etc. Exemplarily, when collecting the operation data, the timestamp of each collected data and the device identification of the power equipment may also be obtained.
[0061] Exemplarily, the operation data of power equipment can be collected based on the Internet of Things technology, by connecting the collection device through a wireless sensor network and a programmable automation controller (PLC), so that the collection device can transmit the collected operation data to a computer device in real time.
[0062] Exemplarily, the time granularity corresponding to the operating data of the power equipment (e.g., the current operating data of the power equipment or another operating data of the power equipment) for each energy consumption analysis can be adjusted according to the usage scenario of the power equipment, usually at the minute level or hour level. For example, the operating data of the power equipment (e.g., the current operating data of the power equipment or another operating data of the power equipment) for each energy consumption analysis can be the operating data collected within a preset time period, and the preset time period can be greater than or equal to 1 minute. For example, the preset time period can be 1 minute, 2 minutes, 5 minutes, 10 minutes, 30 minutes, 1 hour, 6 hours, 12 hours or 24 hours, etc.
[0063] In some embodiments, the energy consumption prediction model can predict the energy consumption of power equipment in multiple geographical locations or multiple different types of power equipment. Exemplarily, the power equipment whose energy consumption is predicted by the current energy consumption prediction model and the power equipment whose energy consumption is predicted by the next energy consumption prediction model are different types of power equipment or power equipment in different geographical locations. Another exemplary embodiment is that the power equipment whose energy consumption is predicted by the current energy consumption prediction model and the power equipment whose energy consumption is predicted by the next energy consumption prediction model are the same power equipment.
[0064] Exemplarily, the input of the energy consumption prediction model may be the operation data of the power equipment, and the output may be the energy consumption prediction result of the power equipment. In some embodiments, the energy consumption prediction model may include a feature extraction model and a prediction model (e.g., a classification model), wherein the feature extraction model is used to extract features from the input operation data of the power equipment and output a feature vector of the operation data, and the prediction model is used to predict the feature vector of the input operation data to obtain the energy consumption prediction result of the power equipment.
[0065] In some embodiments, the energy consumption prediction result may include the target energy consumption level corresponding to the current operating data. Exemplarily, there may be five energy consumption levels, and the higher the level, the higher the energy consumption, and the energy consumption prediction result may be the target energy consumption level among the five energy consumption levels. In some embodiments, the energy consumption prediction result may include the energy consumption value corresponding to the current operating data. In some embodiments, the energy consumption prediction result may include the energy consumption level and energy consumption value corresponding to the current operating data. In some embodiments, the energy consumption prediction result may include the energy consumption level and / or energy consumption value corresponding to the data collected at each timestamp in the current operating data.
[0066] S102, obtaining target sample data, and updating the current energy consumption prediction model according to the current operation data, the current energy consumption prediction result, and the target sample data to obtain the next energy consumption prediction model.
[0067] In some embodiments, the target sample data may be initial sample data. In other embodiments, the target sample data may be the union of initial sample data and extended sample data. The initial sample data is obtained by annotating the pre-collected operation data of the power equipment. Exemplarily, the annotated content includes the energy consumption level. The extended sample data is obtained by expanding the initial sample data using a dual discriminator generative adversarial network.
[0068] S103 , respectively using the current energy consumption prediction model and the next energy consumption prediction model to perform energy consumption prediction on the operation data in the target sample data, and obtaining a first prediction result and a second prediction result.
[0069] Among them, the current energy consumption prediction model is used to predict the energy consumption of the operating data in the target sample data to obtain a first prediction result, and the next energy consumption prediction model is used to predict the energy consumption of the operating data in the target sample data to obtain a second prediction result.
[0070] S104: When the accuracy of the second prediction result is greater than or equal to the first prediction result, use the next energy consumption prediction model to perform energy consumption prediction on another collected operation data of the electric power equipment.
[0071] Exemplarily, the accuracy of the prediction result can be obtained by: determining the ratio between the number of correctly predicted collected data and the number of all collected data as the accuracy of the prediction result. Wherein, one collected data can be data collected at a timestamp, or can be data collected within a predetermined time period.
[0072] Among them, the current energy consumption prediction model and the next energy consumption prediction model have the same model structure but different model parameters.
[0073] In some embodiments, when the accuracy of the second prediction result is less than that of the first prediction result, the current energy consumption prediction model is used to perform energy consumption prediction on the next collected operation data of the power equipment.
[0074] In the technical solution of the embodiment of the present application, the energy consumption prediction model is continuously updated according to the newly acquired operating data of the power equipment, so that the continuously updated energy consumption prediction model is increasingly adapted to the operating data of the power equipment in different scenarios, making the prediction of the operating data of the power equipment more accurate, thereby improving the accuracy of the energy consumption prediction of the power equipment; in addition, only when the accuracy of the second prediction result of the next energy consumption prediction model is greater than or equal to the first prediction result of the current energy consumption prediction model, the next energy consumption prediction model is used to predict the next operating data, so that each model update is developing in a more accurate direction, continuously improving the accuracy of the energy consumption prediction model of the updated energy consumption prediction model for the energy consumption of the power equipment.
[0075] Figure 2 A flow chart of a method for predicting energy consumption of electric power equipment provided in the second embodiment is as follows: Figure 2 As shown, the method is applied to a computer device, Figure 2 Example compared to Figure 1 The difference between the embodiments is that S102 includes the following steps:
[0076] S1021. Obtain initial sample data of the power equipment, and use a dual discriminator generative adversarial network to expand the initial sample data to obtain expanded sample data.
[0077] The dual discriminator generative adversarial network can be a trained network. The dual discriminator generative adversarial network includes a generator and two discriminators, the two discriminators are a true-false discriminator and a category discriminator. The true-false discriminator is used to judge the authenticity of the input operation data of the power equipment, and the category discriminator is used to judge the category of the input operation data of the power equipment.
[0078] In some embodiments, a dual discriminator generative adversarial network is used to expand the initial sample data to obtain expanded sample data, which can be achieved in the following way: an initial dual discriminator generative adversarial network is trained with the initial sample data to obtain a trained dual discriminator generative adversarial network, and the trained dual discriminator generative adversarial network is used to output the expanded sample data.
[0079] The generator in the trained dual discriminator generative adversarial network can be used to generate the augmented sample data. Exemplarily, the generator can generate the augmented sample data according to the input target noise vector. The input target noise vector is determined according to the network parameters of the true and false discriminator and the category discriminator in the dual discriminator generative adversarial network, and the noise vector input to the generator for the last time during the training process.
[0080] In some embodiments, the sample size A of the initial sample data is greater than or equal to the sample size B of the expanded sample data. For example, A=0.2B, or A=0.3B, or A=0.5B, etc., which are not limited here.
[0081] S1022: Merge the initial sample data and the expanded sample data to obtain target sample data.
[0082] Exemplarily, the union of the initial sample data and the expanded sample data may be determined as the target sample data.
[0083] S1023. Update the current energy consumption prediction model according to the current operation data, the current energy consumption prediction result, and the target sample data to obtain the next energy consumption prediction model.
[0084] In the technical solution of the embodiment of the present application, a dual discriminator generative adversarial network is used to expand the initial sample data to obtain expanded sample data, and the initial sample data and the expanded sample data are merged to obtain target sample data, thereby effectively expanding the scale of the sample data and improving the efficiency of acquiring the target sample data.
[0085] In some embodiments, the training method of the dual discriminator generative adversarial network includes: obtaining the current round noise vector, and inputting the current round noise vector into the current round generator, so that the current round generator outputs the current round pseudo data; the current round noise vector is determined according to the network parameters of the previous round true and false discriminator, the network parameters of the previous round category discriminator and the previous round noise vector; the initial sample data and the current round pseudo data are mixed with a preset mixing ratio to obtain the current round mixed data, and the discrimination result of the current round mixed data and the current round feedback data are determined by the current round true and false discriminator and the current round category discriminator; according to the discrimination result and label of the current round mixed data, the network parameters in the current round true and false discriminator and the current round category discriminator are updated, and according to the current round feedback data, the network parameters of the generator are updated; the above steps are repeated until the iteration termination condition is met, and the training of the dual discriminator generative adversarial network is completed. Among them, the current round can be the round of training for the dual discriminator generative adversarial network. For example, in the first round of dual discriminator generative adversarial network training, the current round may be the first round, in the second round of dual discriminator generative adversarial network training, the current round may be the second round, and so on.
[0086] Among them, the discrimination result and label of the current round of mixed data include the discrimination result of the current round of mixed data and the label of the current round of mixed data.
[0087] In some embodiments, the network parameters of the generator are updated according to the current round feedback data, including: obtaining the Wasserstein distance between the probability distribution of the true data and the probability distribution of the pseudo data in the current round feedback data; the true data is the initial sample data mixed in the current round mixed data; the Euclidean norm (or mean square error) between the true data and the pseudo data is determined as the authenticity loss of the generator; according to the Wasserstein distance and the authenticity loss, the network parameters of the generator are updated. In other embodiments, the Euclidean norm can be replaced by the absolute value of the square difference or the absolute value of the difference. In some embodiments, the true data is the intersection of the current round mixed data and the initial sample data.
[0088] In some embodiments, the network parameters in the current round authenticity discriminator and the current round category discriminator are updated according to the discrimination results and labels of the current round mixed data, including: determining the authenticity loss value of the current round authenticity discriminator and the category loss value of the current round category discriminator according to the discrimination results and labels of the current round mixed data; updating the network parameters in the current round authenticity discriminator according to the authenticity loss value of the current round authenticity discriminator, and updating the network parameters in the current round category discriminator according to the category loss value of the current round category discriminator.
[0089] Figure 3A schematic flow chart of a method for predicting energy consumption of electric power equipment provided in the third embodiment, such as Figure 3 As shown, the method is applied to a computer device, Figure 3 Example compared to Figure 1 The difference between the embodiments is that S102 includes the following steps:
[0090] S1024, obtaining target sample data, clustering the current operating data under each category to obtain each first cluster center, and clustering the operating data in the target sample data under each category to obtain each second cluster center.
[0091] Exemplarily, the K-means clustering algorithm may be used to cluster the current operating data in each category to obtain each first cluster center, and the operating data in the target sample data may be clustered in each category to obtain each second cluster center. Exemplarily, the number of clusters K of clustering may be preset. For example, the number of clusters K is the number of categories of the operating data in the target sample data.
[0092] In some embodiments, the multiple categories of the current operating data are the same as the multiple categories of the operating data in the target sample data, or the multiple categories of the current operating data belong to the multiple categories of the operating data in the target sample data.
[0093] S1025. Determine the operation data in an area with each first cluster center and each second cluster center as the sphere center and the distance between each first cluster center and each second cluster center as the radius as the operation data to be trained.
[0094] Among them, the operating data in the area with each first cluster center as the center and the distance between each first cluster center and each second cluster center as the radius is determined as the first part of the operating data, the operating data in the area with each second cluster center as the center and the distance between each first cluster center and each second cluster center as the radius is determined as the second part of the operating data, and the union of the first part of the operating data and the second part of the operating data is determined as the operating data to be trained.
[0095] S1026. Determine the energy consumption prediction result corresponding to the running data to be trained from the current energy consumption prediction result and the target sample data, and use the running data to be trained and the corresponding energy consumption prediction result to update the current energy consumption prediction model to obtain the next energy consumption prediction model.
[0096] In some embodiments, Figure 3 The embodiment may be a further description of step S1023.
[0097] In the technical solution of the embodiment of the present application, the area with the cluster center as the center of the sphere and the distance between the cluster centers as the radius is used to screen the operating data to be trained. This method can capture data points that are both representative of the category and have certain differences, which helps the model learn more comprehensive features. In addition, by limiting the selection of data to be trained in a limited area, the interference of irrelevant or low-quality data can be further reduced, thereby improving the accuracy of the acquired operating data to be trained, and thus being able to more accurately update the current energy consumption prediction model, which is beneficial to improving the accuracy of energy consumption prediction of power equipment.
[0098] Figure 4 A flow chart of a method for using a current energy consumption prediction model to predict energy consumption of current operation data provided in some embodiments, such as Figure 4 As shown, the method is applied to a computer device, and the method includes:
[0099] S1011. Use the current feature extraction layer in the multi-layer feature extraction layer in the acquired current energy consumption prediction model to extract input features to obtain output features; wherein the input features of the first feature extraction layer are the current operating data of the collected power equipment.
[0100] In the embodiment of the present application, feature extraction is performed sequentially through each feature extraction layer in the multi-layer feature extraction layer.
[0101] The current feature extraction layer may be the feature extraction layer for the current feature extraction. For example, when the first feature extraction layer is used for the first feature extraction, the current feature extraction layer is the first feature extraction layer, and when the second feature extraction layer is used for the second feature extraction, the current feature extraction layer is the second feature extraction layer, and so on, until the current feature extraction layer is the last feature extraction layer.
[0102] S1012. Determine whether the current feature extraction layer is the last feature extraction layer.
[0103] If the judgment result of S1012 is yes, execute S1014, if not, go to execute S1013.
[0104] S1013. Determine the correlation weight between the current feature extraction layer and the next feature extraction layer according to the output features and the next feature extraction layer, and determine the input features of the next feature extraction layer according to the output features and the correlation weight.
[0105] In some embodiments, the product of the output feature and the relevance weight may be determined as the input feature of the next feature extraction layer.
[0106] In this way, the loop from S1011 to S1013 is performed until the output features of the last feature extraction layer are obtained. After S1013, the process goes to S1011.
[0107] S1014. Use the prediction model in the current energy consumption prediction model to classify the output features of the last feature extraction layer to obtain the current energy consumption prediction result of the power equipment.
[0108] In the technical solution of the embodiment of the present application, higher-level and more complex features can be gradually abstracted from the current running data, thereby improving the depth and accuracy of feature extraction, and by determining the correlation weight between the current feature extraction layer and the next feature extraction layer, adaptive transmission and fusion of features are achieved, and its internal representation can be dynamically adjusted to better adapt to changes in input data, thereby further improving the accuracy of feature extraction.
[0109] In some embodiments, the training method of the multi-layer feature extraction layer includes: obtaining the weight and bias of the current round iteration in the multi-layer feature extraction layer; determining the specified output feature of the running data in the feature sample data according to the weight and bias of the current round iteration, determining the network parameter adjustment value according to the specified output feature and the label in the feature sample data, and updating the weight and bias of the current round iteration according to the network parameter adjustment value to obtain the intermediate weight and intermediate bias; determining the target output feature of the running data in the feature sample data according to the intermediate weight and intermediate bias, determining the cross entropy loss value according to the target output feature and the label in the feature sample data, and updating the intermediate weight and intermediate bias according to the cross entropy loss value to obtain the weight and bias of the next round iteration; the above steps are repeated until the iteration termination condition is met, and the training of the multi-layer feature extraction layer is completed. Among them, the current round can be the round of training of the multi-layer feature extraction layer. For example, when training the first round of the multi-layer feature extraction layer, the current round can be the first round, and when training the second round of the multi-layer feature extraction layer, the current round can be the second round, and so on.
[0110] In some embodiments, a structural evaluation index can be determined based on the specified output features and labels in the feature sample data, and a network parameter adjustment value can be determined based on the structural evaluation index. The weights and biases of the current round of iterations are updated based on the structural evaluation index and the network parameter adjustment values to obtain intermediate weights and intermediate biases.
[0111] The energy consumption prediction method for power equipment in the embodiment of the present application adopts an energy consumption prediction model based on incremental learning to predict the energy consumption of power equipment. By inputting the power equipment data collected in real time (that is, the operation data of the power equipment, and the latest operation data collected for the power equipment is the current operation data of the above-mentioned power equipment) into the energy consumption prediction model, the energy consumption prediction model can learn the characteristics of the power equipment data collected in real time, and learn new knowledge and capabilities from the real-time power equipment data on the basis of maintaining the original energy consumption prediction model capabilities.
[0112] Figure 5 Some embodiments provide a schematic diagram of an energy consumption prediction model training framework based on incremental learning, such as Figure 5 As shown, the target sample data D 1 Update the initial prediction model to obtain the original prediction model M 1 ; Use the new training data R 1 And the target sample data D 1 For the original prediction model M 1 Iterate and get the iterative model M 2 , where the new training data R 1 The first newly acquired operation data of the electric power equipment and the prediction result of using the original prediction model to predict the first newly acquired operation data of the electric power equipment; using the acquired new training data R 2 And the target sample data D 1 For the iterative model M 2 Iterate and get the iterative model M 3 , where the new training data R 2 Including the newly acquired operating data of the power equipment and the iterative model M 2 The prediction result of the operation data of the power equipment newly obtained for the second time is predicted, and so on, using the newly obtained training data R i And the target sample data D 1 For the iterative model M i Iterate and get the iterative model M i+1 , where the new training data R i Including the newly acquired operation data of the power equipment for the i-th time, and the iterative model M i The prediction result of the operation data of the electric power equipment newly obtained for the i-th time is predicted.
[0113] Figure 6 A flowchart of an energy consumption prediction model training method based on incremental learning provided in some embodiments, such as Figure 6 As shown, the method is applied to a computer device, and the method comprises the following steps:
[0114] S601, obtaining the operation data of the i-th electric power equipment, and using the i-th energy consumption prediction model to perform energy consumption prediction on the operation data of the i-th electric power equipment, to obtain the i-th energy consumption prediction result.
[0115] Wherein, i is an integer greater than or equal to 1, and the first energy consumption prediction model is the original prediction model.
[0116] S602: Update the i-th energy consumption prediction model according to the i-th power equipment operation data, the i-th energy consumption prediction result, and the target sample data to obtain the i+1-th energy consumption prediction model.
[0117] The target sample data is the sample data used to train the original prediction model.
[0118] S603: Determine whether the (i+1)th energy consumption prediction model is available.
[0119] Exemplarily, whether the i+1th energy consumption prediction model is available is determined in the following manner: the i-th energy consumption prediction model and the i+1th energy consumption prediction model are respectively used to perform energy consumption prediction on the operating data in the target sample data to obtain a first prediction result and a second prediction result; when the accuracy of the second prediction result is greater than or equal to the first prediction result, it is determined that the i+1th energy consumption prediction model is available; otherwise, when the accuracy of the second prediction result is less than the first prediction result, it is determined that the i+1th energy consumption prediction model is unavailable.
[0120] If the (i+1)th energy consumption prediction model is available, S604 is executed. If the (i+1)th energy consumption prediction model is not available, S605 is executed.
[0121] S604. Let i=i+1.
[0122] After S604, the process goes to S601.
[0123] S605: Terminate the iteration of the energy consumption prediction model.
[0124] In the case of S605, the energy consumption prediction model is used to perform energy consumption prediction on the operation data of each power device subsequently obtained, and the energy consumption prediction result of each operation data of the power device is obtained.
[0125] In other embodiments, S605 can be replaced by using the i-th energy consumption prediction model to predict the energy consumption of each operating data of the electric power equipment obtained for the i+1th time, to obtain the energy consumption prediction result of the i+1th operating data, setting i=i+1, and then updating the i-th energy consumption prediction model according to the i+1th operating data of the electric power equipment, the i+1th energy consumption prediction result, and the target sample data to obtain the i+1th energy consumption prediction model, and then executing the step S603.
[0126] In some embodiments, a dual discriminator-based generative adversarial network (i.e., the dual discriminator generative adversarial network described above) is provided for sample generation, thereby achieving sample data expansion of power equipment, and improving the diversity, quality, and topological consistency of generated power equipment sample data in high-dimensional space.
[0127] In some embodiments, the training process of the dual discriminator-based generative adversarial network is as follows:
[0128] Initialize the network parameters of the generator and discriminator of the generative adversarial network (wherein, in the embodiment of the present application, the discriminator includes a true-false discriminator and a category discriminator unless otherwise specified) to solve the initial weight and bias setting problem of the model and ensure the effectiveness and stability of subsequent training. is the initial parameter of the generator, is the initial parameter of the discriminator, which is initialized randomly and obeys a normal distribution with a mean of 0 and a variance of the unit matrix.
[0129] The noise vector input to the generator is adaptively adjusted. Starting from the second iteration, the noise vector of this iteration is dynamically corrected by the noise vector of the previous iteration to solve the problem that the generator is prone to fall into the local optimum and the power equipment data is insufficiently diverse, and the quality of the generated power equipment data is continuously improved during the training process. Exemplarily, the noise vector input to the first iteration is a random noise vector.
[0130] The update of the noise vector is determined by the following formula: ; .
[0131] in, is the gradient calculation function of the discriminator loss with respect to the noise vector, For the The noise vector at the iteration, are the network parameters of the discriminator, For the The noise vector at the iteration, is the learning rate for the noise vector update, is the discriminator function, is the generator function, The loss function for the discriminator to distinguish true data from generated power equipment data (pseudo data), is a binary classification label (the real data label is 1, and the fake data label is 0). For example, Can be set to 0.3.
[0132] Among them, in any embodiment of the present application, Represents the logarithmic function with the natural constant e as the base.
[0133] The generated power equipment data (pseudo data) is mixed with the real power equipment data (real data). By setting the mixing ratio, the problem of category imbalance during model training and the problem of model overfitting caused by a single power equipment data source can be solved, so as to achieve more comprehensive and balanced training of the discriminator and improve the accuracy of the discriminator. The mixing ratio of the generated power equipment data and the real power equipment data can be determined by the following formula: .in, is the power equipment data obtained after mixing (i.e. the mixed data mentioned above), Power equipment data generated for the generator, For real power equipment data, is a preset mixing ratio. Can be set to 0.3.
[0134] The network parameters of the generator are updated through topological loss, so as to solve the consistency problem of high-dimensional power equipment data in the real topological structure, making the internal structure of the power equipment data more similar to the real power equipment data. The topological loss is determined by the Wasserstein distance. The optimal mapping between the power equipment data generated by the generator and the real power equipment data distribution is found by calculating the minimum cost required to convert the probability distribution of the power equipment data generated by the generator into the probability distribution of the real power equipment data.
[0135] The expression of topological loss is: ; Update the generator's network parameters using the following formula: .in, is the function for calculating the Wasserstein distance, is the probability distribution function of the data, is the topological loss, To balance the hyperparameters of the conventional quality and topological quality of the generated power equipment data, For the The network parameters of the generator at the iteration, For the The network parameters of the generator at the iteration, is the learning rate updated by the generator, for about The gradient of is the authenticity loss function of the generator. For example, Set to 0.3, Set to 0.01.
[0136] in, ; The middle layer of the generator is used to extract the intermediate features of the power equipment data; is the L2 norm, which is used to measure the degree of feature difference; is a generator function.
[0137] Before updating the network parameters of the two discriminators (the first discriminator determines the authenticity of the power equipment data, and the second discriminator determines the category of the power equipment data), the following parameters are obtained first. and .in, , .
[0138] in, is the loss function of the discriminator regarding the authenticity of power equipment data, is the discriminator balance coefficient, exemplarily, Set to 0.3, is the discriminator function, is the loss function of the discriminator for category discrimination, is the total number of categories, is the true category distribution in The probability of the categories, Predict the category distribution for the discriminator The probability of the categories, is the authenticity loss function of the generator, The middle layer of the generator is used to extract the intermediate features of the power equipment data; is the L2 norm, which is used to measure the degree of feature difference.
[0139] pass The difference between the true category distribution and the generated category distribution of power equipment data can be measured to solve the problem that the generator is difficult to strike a balance between the authenticity and category accuracy of the generated power equipment data.
[0140] The network parameters of the two discriminators are updated. The following formula is used to update the network parameters of the two discriminators: ; is the network parameter of one of the two discriminators, is the number of iterations, is the learning rate updated by the discriminator, is the gradient of the generator loss with respect to the generator network parameters, is the gradient of the loss function to the network parameters of the discriminator, For the The network parameters of the discriminator at the iteration, For the The network parameters of the discriminator at the iteration. For example, Set to 0.3.
[0141] Repeat the above steps until the preset stop iteration condition is met, indicating that the model training is completed. Exemplarily, in one embodiment, the preset stop iteration condition is reaching a preset maximum number of iterations, and exemplary, the preset maximum number of iterations is set to 1000 times.
[0142] After the power equipment data expansion model (i.e., the above-mentioned generative adversarial network based on dual discriminators) is trained, the trained power equipment data expansion model is used to increase the number of samples. In one embodiment, assuming that the original collected samples are 800, and the power equipment data expansion model expands and generates 200 samples, the expanded power equipment data set contains 1000 samples.
[0143] In some embodiments, by inputting 800 operating data (corresponding to the operating data in the above-mentioned initial sample data) into the power equipment data expansion model, the power equipment data expansion model is trained through the 800 operating data, and the trained model outputs the expanded 200 operating data, and a manual labeling method is used to obtain 200 energy consumption prediction results corresponding to the 200 operating data (the 200 energy consumption prediction results corresponding to the 200 operating data correspond to the above-mentioned expanded sample data).
[0144] In other embodiments, by inputting 800 sample data (corresponding to the initial sample data mentioned above) into the power equipment data expansion model, the power equipment data expansion model is trained through the 800 sample data, and the trained model outputs expanded 200 sample data (corresponding to the expanded sample data mentioned above).
[0145] In some embodiments, a method for training a feature extraction model (i.e., including the above-mentioned multi-layer feature extraction layer) is also provided, and the method includes the following steps:
[0146] Initialize according to the predefined feature extraction model structure and define the weights and biases of each feature extraction layer in the feature extraction model. For example, initialize the weights and biases of the first feature extraction layer as: ; ;in, represents the weight of the first layer, initialized to a standard deviation of Normal distribution of is the identity matrix; represents a normal distribution with a mean of 0 and a variance of the identity matrix; is the bias of the first layer, initialized to a zero vector; Indicates that it obeys a specific distribution. For example, Set to 0.01.
[0147] After pre-processing, the power equipment data is input into the model, and then processed by weighted summation and activation function of each layer, and passed layer by layer to finally obtain the output of feature extraction. Passing through the network layers, the output calculation of each layer (layer l) is expressed as: ; ;in, For the The linear transformation result of the layer (i.e., output feature); As input features, the input features of the first feature extraction layer are power equipment data (i.e., operating data in feature sample data); Indicates The weight of the layer, Indicates Bias of the layer; is the result after applying the activation function; It can be a rectified linear unit (ReLU) or other nonlinear functions. For example, a suitable activation function can be selected according to different layers.
[0148] The output of each layer is By activation function After processing, we get Determined by the following formula:
[0149] ;
[0150] ;
[0151] in, It is a high-order activation function, which is used to achieve high-order activation through accumulated high-order statistics; is the scaling parameter of the activation function, is the weight of the adjustment item, , and yes Parameters used in the function to adjust the influence of higher-order statistics on activation; and Respectively represent the mean and standard deviation of the Gaussian distribution, which are used to adjust the response sensitivity of the network layer; For the The j-th feature quantity in the linear transformation result of the layer.
[0152] After each training cycle, the model evaluates the current learning status and output effect, for example, through ; Get evaluation results and tune network parameters in the feature extraction model.
[0153] in, Represents the output of the last feature extraction layer and the true label Calculated structural evaluation indicators; is the evaluation function; is the adjustment function. In this way, the network parameters are adjusted according to the evaluation results, including the weights in the feature extraction model and bias .
[0154] For example, the network parameters in the feature extraction model are adjusted by the following formula: ; ; ; .
[0155] in, Indicates parameter update operation; Represents the adjustment function The updated value of Represents the adjustment function The updated value of is the parameter that determines the sensitivity of structural adjustment. Represents the variance of the output layer activation value, which is used to evaluate the diversity of network output; is the target threshold of variance; and is the learning rate parameter that adjusts the network weights and biases, represents the gradient of the regularization term of the weight, which is used to prevent overfitting and maintain the generalization ability of the network. For example, Set to 0.3, Set to 0.01, and Both are set to 0.05.
[0156] Next, the loss is calculated based on the output results and the actual labels, and the weights of each layer in the network are adjusted through the back propagation algorithm to optimize the network performance. Continue to update the above weights in the feature extraction model and bias Update again, so that in one round of iteration, the weight and bias Two updates were performed.
[0157] Among them, the loss function The expression is: ;
[0158] The update method is as follows:
[0159] First determine or ;in, .
[0160] Then, the following formula is used to continue to extract the weights in the feature extraction model and bias To update:
[0161] ; .
[0162] in, represents the cross entropy loss function; is the gradient of the loss function with respect to the weight, which is used for weight update; is the gradient of the loss function with respect to the bias, used for bias update; For the The actual label class probability of each sample is determined by manual labeling. For example, if the labeled category is 5 levels of energy consumption, The sample is labeled as level 3, then the corresponding class probability is [0,0,1,0,0]; The actual label of the i-th sample is the feature output by the last feature extraction layer.
[0163] in, is the gradient adjustment function, which depends on the activation output of the previous layer and the weight of the current layer , by adopting To adjust the gradient flow to adapt to the dynamic structural adjustment needs of the network; It is a coefficient that is automatically adjusted according to the performance of the network layer to enhance or weaken the influence of the gradient, thereby achieving adaptive optimization of the structure.
[0164] in, is the learning rate, which controls the step size of parameter update; Indicates a parameter update operation. For example, Set to 0.01.
[0165] In some embodiments, a dynamic correlation recursive adjustment strategy can be adopted to recursively adjust the dynamic correlation between network layers so that the network can adaptively reshape its internal structure to more effectively extract complex and implicit equipment energy consumption related features in power equipment data. Therefore, the dynamic correlation recursive adjustment module is used to adjust the connection strength between the current layer and the next layer according to the activation output of the current layer and the expected input of the next layer. The implementation of the dynamic correlation recursive adjustment module is expressed as:
[0166] ;
[0167] .
[0168] In the formula, Indicates Layer and The correlation adjustment factor between layers is output by the activation of the current layer and the weights of the next layer Calculated; is the first Layer and The gradient of the correlation adjustment factor between layers; Indicates Layer and The weights between layers (i.e. the association weights mentioned above); is the threshold of correlation adjustment, which is used to balance the sensitivity of correlation. Set to 0.3.
[0169] Repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. For example, the preset stop iteration condition is reaching a preset maximum number of iterations, and illustratively, the preset maximum number of iterations is set to 1000 times.
[0170] After the neural network training is completed, the trained neural network is used to extract features from the power equipment data. Furthermore, the feature-extracted data is input into a preset classification model (such as a Softmax model) to calculate the class probability, and the class with the largest class probability is taken as the category for equipment energy consumption assessment. For example, the category includes energy consumption levels, which are divided into 5 levels. The higher the level, the higher the energy consumption.
[0171] In some embodiments, the energy consumption prediction method for power equipment realizes the continuous learning ability of the energy consumption prediction model in the real-time data update scenario, avoids the computational overhead caused by retraining of the full data in the traditional method, and improves the training efficiency.
[0172] In some embodiments, the energy consumption prediction method of the power equipment utilizes a pseudo-label strategy to effectively expand the size of training samples.
[0173] In some embodiments, the energy consumption prediction method of power equipment expands the diversity and topological consistency of power equipment data based on the generative adversarial network, significantly improving the adaptability and accuracy of the model in diversified power equipment scenarios.
[0174] In some embodiments, the energy consumption prediction method of the power equipment adopts a dynamic correlation recursive adjustment strategy, and the model can adaptively adjust the internal structure according to different operating states of the power equipment to more effectively extract energy consumption related features.
[0175] In some embodiments, the energy consumption prediction method of power equipment adopts an incremental learning method, using the knowledge in the learned energy consumption prediction model reasoning task to support the learning of new power equipment data while retaining the knowledge in the old task. By updating the model parameters with real-time data, the efficiency problem of retraining the energy consumption prediction model when new data arrives is solved.
[0176] In some embodiments, the energy consumption prediction method of power equipment generates pseudo labels for newly collected unlabeled power equipment data and combines it with the original labeled data for training, thereby solving the problem of high labeling costs for real-time data collection.
[0177] In some embodiments, a dual discriminator design is used in the energy consumption prediction method of power equipment to judge the authenticity and category distribution of generated power equipment data respectively. The quality of generated power equipment data is improved through topological feature analysis, feature matching constraints and other technologies, solving the problem of poor model generalization ability caused by insufficient training samples of power equipment.
[0178] In some embodiments, during the neural network training process, the energy consumption prediction method for power equipment adjusts the correlation between layers based on the activation output of the current layer and the expected input of the next layer, and solves the problem that the model is difficult to extract complex energy consumption characteristics in different scenarios through a structural adaptive mechanism.
[0179] Based on the same inventive concept, the embodiment of the present application also provides an energy consumption prediction device for electric equipment for implementing the energy consumption prediction method for electric equipment involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the energy consumption prediction device for one or more electric equipment provided below can refer to the limitations of the energy consumption prediction method for electric equipment above, and will not be repeated here.
[0180] In an exemplary embodiment, Figure 7 A schematic diagram of the structure of an energy consumption prediction device for power equipment provided in some embodiments, such as Figure 7 As shown, the energy consumption prediction device 700 of the electric power equipment includes:
[0181] The prediction module 701 is used to obtain the collected current operation data of the power equipment, and use the current energy consumption prediction model to perform energy consumption prediction on the current operation data to obtain the current energy consumption prediction result of the power equipment;
[0182] The model updating module 702 is used to obtain target sample data, and update the current energy consumption prediction model according to the current operation data, the current energy consumption prediction result, and the target sample data to obtain the next energy consumption prediction model;
[0183] The prediction result determination module 703 is used to respectively use the current energy consumption prediction model and the next energy consumption prediction model to perform energy consumption prediction on the operation data in the target sample data to obtain a first prediction result and a second prediction result;
[0184] The prediction module 701 is further configured to use the next energy consumption prediction model to perform energy consumption prediction on another collected operation data of the electric power equipment when the accuracy of the second prediction result is greater than or equal to the first prediction result.
[0185] In some embodiments, the model update module 702 includes an acquisition unit and a model update unit, the acquisition unit is used to acquire the initial sample data of the power equipment; the initial sample data is expanded and processed by using a dual discriminator generative adversarial network to obtain expanded sample data; the initial sample data and the expanded sample data are merged to obtain target sample data; the model update unit is used to update the current energy consumption prediction model according to the current operating data, the current energy consumption prediction results, and the target sample data to obtain the next energy consumption prediction model.
[0186] In some embodiments, the energy consumption prediction device 700 of the power equipment also includes a training module, which is used to obtain the current round noise vector and input the current round noise vector to the current round generator, so that the current round generator outputs the current round pseudo data; the current round noise vector is determined according to the network parameters of the previous round authenticity discriminator, the network parameters of the previous round category discriminator and the previous round noise vector; the initial sample data and the current round pseudo data are mixed with a preset mixing ratio to obtain the current round mixed data, and the discrimination result of the current round mixed data and the current round feedback data are determined by the current round authenticity discriminator and the current round category discriminator; according to the discrimination result and label of the current round mixed data, the network parameters in the current round authenticity discriminator and the current round category discriminator are updated, and according to the current round feedback data, the network parameters of the generator are updated; the above steps are repeated until the iteration termination condition is met, and the training of the dual discriminator generation adversarial network is completed.
[0187] In some embodiments, the training module is also used to obtain the Wasserstein distance between the probability distribution of true data and the probability distribution of pseudo data in the current round of feedback data; the true data is the initial sample data mixed in the current round of mixed data; the Euclidean norm between the true data and the pseudo data is determined as the authenticity loss of the generator; and the network parameters of the generator are updated according to the Wasserstein distance and the authenticity loss.
[0188] In some embodiments, the training module is also used to update the network parameters in the current round authenticity discriminator and the current round category discriminator according to the discrimination results and labels of the current round mixed data, including: determining the authenticity loss value of the current round authenticity discriminator and the category loss value of the current round category discriminator according to the discrimination results and labels of the current round mixed data; updating the network parameters in the current round authenticity discriminator according to the authenticity loss value of the current round authenticity discriminator, and updating the network parameters in the current round category discriminator according to the category loss value of the current round category discriminator.
[0189] In some embodiments, the model update module 702 includes an acquisition unit and a model update unit, the acquisition unit is used to acquire target sample data, and the model update unit is used to cluster the current operating data under each category to obtain each first cluster center, and cluster the operating data in the target sample data under each category to obtain each second cluster center; the operating data in the area with each first cluster center and each second cluster center as the center of the sphere and the distance between each first cluster center and each second cluster center as the radius is determined as the operating data to be trained; from the current energy consumption prediction result and the target sample data, the energy consumption prediction result corresponding to the operating data to be trained is determined, and the current energy consumption prediction model is updated using the operating data to be trained and the corresponding energy consumption prediction result to obtain the next energy consumption prediction model.
[0190] In some embodiments, the prediction module 701 includes an acquisition unit and a prediction unit, the acquisition unit is used to acquire the current operating data of the collected power equipment; the prediction unit is used to use the current feature extraction layer in the multi-layer feature extraction layer in the acquired current energy consumption prediction model to extract features from the input features to obtain output features; wherein the input features of the first feature extraction layer are the current operating data; according to the output features and the next feature extraction layer, the correlation weight between the current feature extraction layer and the next feature extraction layer is determined, and according to the output features and the correlation weight, the input features of the next feature extraction layer are determined; the above steps are repeated until the output features of the last feature extraction layer are obtained, and the prediction model in the current energy consumption prediction model is used to classify the output features of the last feature extraction layer to obtain the current energy consumption prediction result of the power equipment.
[0191] In some embodiments, the training module is also used to obtain the weights and biases of the current round of iteration in the multi-layer feature extraction layer; determine the specified output features of the running data in the feature sample data according to the weights and biases of the current round of iteration, determine the network parameter adjustment value according to the specified output features and the labels in the feature sample data, and update the weights and biases of the current round of iteration according to the network parameter adjustment value to obtain intermediate weights and intermediate biases; determine the target output features of the running data in the feature sample data according to the intermediate weights and intermediate biases, determine the cross-entropy loss value according to the target output features and the labels in the feature sample data, and update the intermediate weights and intermediate biases according to the cross-entropy loss value to obtain the weights and biases of the next round of iteration; the above steps are repeated until the iteration termination condition is met, and the training of the multi-layer feature extraction layer is completed.
[0192] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0193] Each module in the energy consumption prediction device of the above-mentioned power equipment can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0194] In an exemplary embodiment, Figure 8A schematic diagram of the structure of a computer device provided for some embodiments, the computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through wireless fidelity (Wireless Fidelity, WIFI), a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a method for predicting energy consumption of an electric power device is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0195] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements. For example, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method of any of the above embodiments when executing the computer program.
[0196] For example, in an exemplary embodiment, the processor is used to execute a computer program to implement: obtaining the collected current operating data of the power equipment, and using the current energy consumption prediction model to predict the energy consumption of the current operating data to obtain the current energy consumption prediction result of the power equipment; obtaining the target sample data, and updating the current energy consumption prediction model according to the current operating data, the current energy consumption prediction result, and the target sample data to obtain the next energy consumption prediction model; using the current energy consumption prediction model and the next energy consumption prediction model respectively to predict the energy consumption of the operating data in the target sample data to obtain a first prediction result and a second prediction result; when the accuracy of the second prediction result is greater than or equal to the first prediction result, using the next energy consumption prediction model to predict the energy consumption of another operating data of the collected power equipment.
[0197] In one embodiment, a computer-readable storage medium is provided, and when a computer program is executed by a processor, the steps of the method provided in any of the above embodiments are implemented.
[0198] For example, in an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: acquiring the current operating data of the collected power equipment, and using the current energy consumption prediction model to perform energy consumption prediction on the current operating data, to obtain the current energy consumption prediction result of the power equipment; acquiring target sample data, and updating the current energy consumption prediction model according to the current operating data, the current energy consumption prediction result, and the target sample data, to obtain the next energy consumption prediction model; using the current energy consumption prediction model and the next energy consumption prediction model respectively, to perform energy consumption prediction on the operating data in the target sample data, to obtain a first prediction result and a second prediction result; when the accuracy of the second prediction result is greater than or equal to the first prediction result, using the next energy consumption prediction model to perform energy consumption prediction on another operating data of the collected power equipment.
[0199] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method provided in any of the above embodiments are implemented. For example, in an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented: obtaining the current operating data of the collected power equipment, and using the current energy consumption prediction model to perform energy consumption prediction on the current operating data, and obtain the current energy consumption prediction result of the power equipment; obtaining the target sample data, and updating the current energy consumption prediction model according to the current operating data, the current energy consumption prediction result, and the target sample data, and obtaining the next energy consumption prediction model; using the current energy consumption prediction model and the next energy consumption prediction model respectively, perform energy consumption prediction on the operating data in the target sample data, and obtain a first prediction result and a second prediction result; when the accuracy of the second prediction result is greater than or equal to the first prediction result, use the next energy consumption prediction model to perform energy consumption prediction on another operating data of the collected power equipment.
[0200] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0201] The processor, each functional module or each functional unit in any embodiment of the present application may include any one or more of the following integrations: general-purpose processor, application-specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), central processing unit (CPU), graphics processing unit (GPU), embedded neural network processor (neural-network processing units, NPU), controller, microcontroller, microprocessor, programmable logic device, discrete gate or transistor logic device, discrete hardware component, data processing logic based on quantum computing, artificial intelligence (AI) processor, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0202] The memory or computer-readable storage medium in any embodiment of the present application may include at least one of a non-volatile memory and a volatile memory. Non-volatile memory includes the integration of one or more of the following: Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Ferromagnetic Random Access Memory (FRAM), Flash Memory, Magnetic Surface Storage, Optical Disc, Compact Disc Read-Only Memory (CD-ROM), Tape, Floppy Disk, Flash Memory, Optical Storage, High-density Embedded Non-volatile Memory, Resistive Random Access Memory (ReRAM), Magnetoresistive Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), Graphene Memory, Volatile Memory, etc. Volatile memory includes one or more of the following: Random Access Memory (RAM) or external cache memory, etc.
[0203] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0204] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for predicting energy consumption of electric power equipment, characterized in that: The method comprises: Acquire the collected current operation data of the electric power equipment, and use the current energy consumption prediction model to perform energy consumption prediction on the current operation data to obtain the current energy consumption prediction result of the electric power equipment; Acquire target sample data, and update the current energy consumption prediction model according to the current operation data, the current energy consumption prediction result, and the target sample data to obtain a next energy consumption prediction model; Using the current energy consumption prediction model and the next energy consumption prediction model respectively, perform energy consumption prediction on the operation data in the target sample data to obtain a first prediction result and a second prediction result; When the accuracy of the second prediction result is greater than or equal to the first prediction result, the next energy consumption prediction model is used to perform energy consumption prediction on another collected operating data of the electric power equipment.
2. The method according to claim 1, characterized in that The obtaining of target sample data includes: Acquiring initial sample data of the electric power equipment; Using a dual discriminator generative adversarial network to expand the initial sample data to obtain expanded sample data; The initial sample data and the expanded sample data are merged to obtain the target sample data.
3. The method according to claim 2, characterized in that The training method of the dual discriminator generation adversarial network includes: Obtaining a current round noise vector, and inputting the current round noise vector into a current round generator, so that the current round generator outputs current round pseudo data; the current round noise vector is determined according to the network parameters of the previous round authenticity discriminator, the network parameters of the previous round category discriminator, and the previous round noise vector; The initial sample data and the current round pseudo data are mixed with a preset mixing ratio to obtain current round mixed data, and a discrimination result of the current round mixed data and current round feedback data are determined by a current round authenticity discriminator and a current round category discriminator; According to the discrimination result and label of the current round mixed data, the network parameters in the current round authenticity discriminator and the current round category discriminator are updated, and according to the current round feedback data, the network parameters of the generator are updated; The above steps are repeated until the iteration termination condition is met, and the training of the dual discriminator-generated adversarial network is completed.
4. The method according to claim 3, characterized in that The updating of the network parameters of the generator according to the current round feedback data includes: Obtaining the Wasserstein distance between the probability distribution of true data and the probability distribution of pseudo data in the current round of feedback data; the true data is the initial sample data mixed in the current round of mixed data; Determining the Euclidean norm between the true data and the fake data as the authenticity loss of the generator; The network parameters of the generator are updated according to the Wasserstein distance and the authenticity loss.
5. The method according to claim 3, characterized in that: The updating of network parameters in the current round authenticity discriminator and the current round category discriminator according to the discrimination result and label of the current round mixed data includes: Determine the authenticity loss value of the authenticity discriminator of the current round and the category loss value of the category discriminator of the current round according to the discrimination result and label of the current round mixed data; According to the authenticity loss value of the current round authenticity discriminator, the network parameters in the current round authenticity discriminator are updated, and according to the category loss value of the current round category discriminator, the network parameters in the current round category discriminator are updated.
6. The method according to any one of claims 1 to 5, characterized in that: The updating of the current energy consumption prediction model according to the current operation data, the current energy consumption prediction result, and the target sample data to obtain a next energy consumption prediction model includes: Clustering the current operation data in each category to obtain each first cluster center, and clustering the operation data in the target sample data in each category to obtain each second cluster center; Determine the operation data in an area with each of the first cluster centers and each of the second cluster centers as the sphere center and the distance between each of the first cluster centers and each of the second cluster centers as the radius as the operation data to be trained; The energy consumption prediction result corresponding to the running data to be trained is determined from the current energy consumption prediction result and the target sample data, and the current energy consumption prediction model is updated using the running data to be trained and the corresponding energy consumption prediction result to obtain the next energy consumption prediction model.
7. The method according to any one of claims 1 to 5, characterized in that: The adopting the current energy consumption prediction model to perform energy consumption prediction on the current operation data to obtain the current energy consumption prediction result of the electric power equipment includes: Using the current feature extraction layer in the multi-layer feature extraction layer in the current energy consumption prediction model to extract the input features, and obtain the output features; wherein the input features of the first feature extraction layer are the current operation data; Determine a correlation weight between the current feature extraction layer and the next feature extraction layer according to the output feature and the next feature extraction layer, and determine an input feature of the next feature extraction layer according to the output feature and the correlation weight; The above steps are repeated until the output features of the last feature extraction layer are obtained, and the prediction model in the current energy consumption prediction model is used to classify the output features of the last feature extraction layer to obtain the current energy consumption prediction result of the power equipment.
8. The method according to claim 7, characterized in that The training method of the multi-layer feature extraction layer includes: Obtaining weights and biases for a current round of iterations in the multi-layer feature extraction layer; Determine the specified output feature of the running data in the feature sample data according to the weight and bias of the current round of iteration, determine the network parameter adjustment value according to the specified output feature and the label in the feature sample data, and update the weight and bias of the current round of iteration according to the network parameter adjustment value to obtain an intermediate weight and an intermediate bias; Determine the target output feature of the running data in the feature sample data according to the intermediate weight and the intermediate bias, determine the cross entropy loss value according to the target output feature and the label in the feature sample data, and update the intermediate weight and the intermediate bias according to the cross entropy loss value to obtain the weight and bias of the next round of iteration; The above steps are repeated until the iteration termination condition is met, and the training of the multi-layer feature extraction layer is completed.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Energy consumption prediction method based on elastodynamic neural network
CN117010576A
Remote sensing image semantic segmentation method and system based on diffusion model and knowledge distillation
CN117152427A
Equipment energy consumption prediction method and device, storage medium and computer equipment
CN118468121A