Method and device for establishing power load forecasting model based on joint learning
By obtaining the power load data sets of the initiator and the participant, determining the similarity and conducting horizontal joint learning, the problem of insufficient data volume of the initiator's training sample is solved, the accuracy of the power load prediction model is improved, and the power system is ensured. Run efficiently.
Patent Information
- Application Number
- CN202111265689.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2041-10-28
AI Technical Summary
In the prior art, due to insufficient training sample data of the initiator, the accuracy of the power load prediction model is poor, which affects the efficient operation of the power system.
By obtaining the power load data sets of the initiator and the participant, the similarity is determined, and based on the horizontal joint learning algorithm, the target power load data set is determined in the participant's data set, increasing the initiator's training sample data volume and improving power Accuracy of load prediction model.
The accuracy of the power load prediction model is improved, the efficient operation of the power system is ensured, and the accuracy of the model's prediction results is improved while ensuring data privacy through joint learning technology.
Smart Images

Figure CN114004398B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of energy technology, and in particular to a method, device, electronic device and computer-readable storage medium for establishing a power load forecasting model based on joint learning. Background Art
[0002] Power load forecasting is an important part of power system planning, and accurate power load forecasting is the basis for efficient operation of the power system.
[0003] In the prior art, power load forecasting is usually performed based on a training model. When training the model, the initiator may have insufficient training sample data due to cold start or other reasons, which further leads to poor accuracy of the power load forecasting model established by the initiator. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide a method, device, electronic device and computer-readable storage medium for establishing an electric load forecasting model based on joint learning, so as to solve the problem in the prior art that the electric load forecasting model established by the initiator has poor accuracy due to insufficient training sample data of the initiator.
[0005] In a first aspect of an embodiment of the present disclosure, a method for establishing an electric load prediction model based on joint learning is provided, comprising: obtaining a data set of electric load data of an initiator and a data set of electric load data of at least one participant; determining the similarity between the data set of electric load data of the initiator and the data set of electric load data of at least one participant; based on the similarity, determining a data set of target electric load data of at least one target party in the data set of electric load data of at least one participant, and performing model training using a horizontal joint learning algorithm based on the data set of electric load data of the initiator and the data set of target electric load data of at least one target party; and establishing an electric load prediction model according to the result of the model training.
[0006] According to a second aspect of an embodiment of the present disclosure, there is provided a device for establishing an electric load prediction model based on joint learning, comprising: an acquisition module, configured to acquire a data set of electric load data of an initiator and a data set of electric load data of at least one participant; a determination module, configured to determine the similarity between the data set of electric load data of the initiator and the data set of electric load data of at least one participant; a training module, configured to determine a data set of target electric load data of at least one target party in the data set of electric load data of at least one participant based on the similarity, and to perform model training using a horizontal joint learning algorithm based on the data set of electric load data of the initiator and the data set of target electric load data of at least one target party; and an establishment module, configured to establish an electric load prediction model according to the result of the model training.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0008] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0009] Compared with the prior art, the embodiments of the present disclosure have the following beneficial effects: by obtaining a data set of power load data of an initiator and a data set of power load data of at least one participant; determining the similarity between the data set of power load data of the initiator and the data set of power load data of at least one participant; based on the similarity, determining a data set of target power load data of at least one target party in the data set of power load data of at least one participant, and using a horizontal joint learning algorithm to perform model training based on the data set of power load data of the initiator and the data set of target power load data of at least one target party; according to the result of the model training, establishing a power load prediction model, which can combine data sets of power load data similar to the data set of power load data of the initiator, and increase the amount of training sample data of the initiator, therefore, when the amount of training sample data of the initiator is insufficient, the accuracy of the established power load prediction model is improved, so that the accuracy of the power load prediction result predicted by using the power load prediction model is higher, thereby ensuring the efficient operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0011] Figure 1 is a schematic diagram of a joint learning architecture of an embodiment of the present disclosure;
[0012] Figure 2 It is a flow chart of a method for establishing a power load forecasting model based on joint learning provided by an embodiment of the present disclosure;
[0013] Figure 3 is a flowchart of another method for establishing a power load forecasting model based on joint learning provided by an embodiment of the present disclosure;
[0014] Figure 4 is a schematic diagram of a device for establishing a power load forecasting model based on joint learning provided by an embodiment of the present disclosure;
[0015] Figure 5 is a schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0016] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0017] Federated learning refers to the comprehensive use of various AI (Artificial Intelligence) technologies to jointly explore the value of data and give rise to new intelligent formats and models based on joint modeling, while ensuring data security and user privacy. Federated learning has at least the following characteristics:
[0018] (1) A weakly centralized joint training model in which participating nodes control their own data to ensure data privacy and security in the process of co-creating intelligence.
[0019] (2) In different application scenarios, we use screening and / or combination of AI algorithms and privacy-preserving computing to establish multiple model aggregation optimization strategies to obtain high-level, high-quality models.
[0020] (3) Under the premise of ensuring data security and user privacy, methods to improve the performance of the federated learning engine are obtained based on multiple model aggregation optimization strategies. The performance method can be achieved by solving problems including computing architecture parallelism, information interaction in large-scale cross-domain networks, intelligent perception, and exception handling mechanisms to improve the overall performance of the federated learning engine.
[0021] (4) Obtain the needs of multiple users in each scenario, determine a reasonable assessment of the true contribution of each joint participant through a mutual trust mechanism, and distribute incentives.
[0022] Based on the above methods, we can establish an AI technology ecosystem based on federated learning, give full play to the value of industry data, and promote the implementation of scenarios in vertical fields.
[0023] A method, device, electronic device and computer-readable storage medium for establishing a power load forecasting model based on joint learning according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0024] Figure 1 Schematic diagram of a joint learning architecture of an embodiment of the present disclosure. Figure 1 As shown, the architecture of joint learning may include a server (central node) 101 and an initiator 102, a participant 103 and a participant 104, wherein the participant 103 and the participant 104 are target parties selected from all the participants based on the similarity between the initiator 102 and each of the participants.
[0025] In the joint learning process, the basic model can be established by the server 101, and the server 101 sends the model to the initiator 102, the participant 103, and the participant 104 with which the communication connection is established. The basic model can also be established by the initiator or any participant and then uploaded to the server 101, and the server 101 sends the model to the initiator and other participants with which the communication connection is established. The initiator 102, the participant 103, and the participant 104 build a model based on the downloaded basic structure and model parameters, use local data to train the model, obtain updated model parameters, and encrypt and upload the updated model parameters to the server 101. The server 101 aggregates the model parameters sent by the initiator 102, the participant 103, and the participant 104 to obtain the global model parameters, and transmits the global model parameters back to the initiator 102, the participant 103, and the participant 104. The initiator 102, the participant 103, and the participant 104 iterate their respective models according to the received global model parameters until the model finally converges, thereby realizing the training of the model. In the joint learning process, the data uploaded by the initiator 102, the participant 103 and the participant 104 are model parameters, and the local data will not be uploaded to the server 101, and all the participants can share the final model parameters, so joint modeling can be achieved on the basis of ensuring data privacy. It should be noted that the number of participants is not limited to the two as described above, but can be set as needed, and the embodiments of the present disclosure do not limit this.
[0026] Here, the server 101 may be a server that provides various services, for example, a background server that receives a request sent by an initiator or a participant that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the initiator or the participant, and generate a processing result. The server 101 may be a single server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in the embodiments of the present disclosure.
[0027] It should be noted that the server 101 can be hardware or software. When the server 101 is hardware, it can be various electronic devices that provide various services to the initiator 102, the participant 103, and the participant 104. When the server 101 is software, it can be multiple software or software modules that provide various services to the initiator 102, the participant 103, and the participant 104, or it can be a single software or software module that provides various services to the initiator 102, the participant 103, and the participant 104, and the embodiments of the present disclosure are not limited to this.
[0028] Figure 2 It is a flowchart of a method for establishing a power load forecasting model based on joint learning provided in an embodiment of the present disclosure. Figure 2The method for establishing a power load forecasting model based on joint learning can be executed by the server or any participant. Figure 2 As shown, the method for establishing the power load forecasting model based on joint learning includes:
[0029] S201, obtaining a data set of power load data of an initiator and a data set of power load data of at least one participant; wherein the initiator may be one of the multiple participants.
[0030] S202, determining the similarity between a data set of power load data of the initiator and a data set of power load data of at least one participant;
[0031] S203, based on the similarity, determining a data set of target power load data of at least one target party from a data set of power load data of at least one participant, and using a horizontal joint learning algorithm to perform model training based on the data set of power load data of the initiator and the data set of target power load data of at least one target party;
[0032] S204: Establishing a power load prediction model based on the model training results.
[0033] Specifically, taking the server as an example, the server obtains a data set of power load data of the power load forecast initiator and a data set of power load data of at least one power load forecast participant, and determines the similarity between the data in the data set of the power load data of the initiator and the data in the data set of power load data of each of the at least one participant; based on the similarity, the server determines at least one power load forecast target party among the at least one participant, and determines the data set of power load data of the at least one power load forecast target party as at least one target power load data data set; further, the server executes a horizontal joint learning algorithm based on the data set of the power load data of the initiator and the data set of at least one target power load data to train the basic model; the server finally establishes the power load forecast model according to the result of training the basic model.
[0034] The initiator of the power load forecast is the initiator of the power load forecast, that is, the party that initiates the power load forecast request according to the power consumption characteristics of different application scenarios and / or different forecast periods; the power load forecast participant is the participant of the power load forecast, that is, the party that responds to the power load forecast request of the initiator and provides a data set of corresponding power load data; the power load forecast target party is the party that participates in the joint modeling and provides a data set of corresponding power load data in response to the power load forecast request of the initiator, and is a participant selected from at least one participant based on similarity. It should be noted that the power load forecast initiator and the power load forecast participant can be located in the same area or in different areas, and the embodiments of the present disclosure do not limit this. For example, the power load forecast initiator can be Shaanxi Local Electric Power Company, Inner Mongolia Electric Power Group Co., Ltd., Hubei Danjiang Electric Power Co., Ltd., etc., and the power load forecast participant can be Sichuan Hydropower Investment and Operation Group Co., Ltd., Guangxi Guidong Electric Power Co., Ltd., Guangxi Zhuang Autonomous Region Baise Electric Power Co., Ltd., etc. In addition, it should be noted that the embodiments of the present disclosure do not limit the number of power load forecasting participants. For example, the number of power load forecasting participants can be one, two, three or more.
[0035] The data set of the power load data of the initiator and the data set of at least one participant include historical power load data and corresponding external correlation data, wherein the historical power load data may be power load data of the past few years, quarters or months, or power load data before and after the period of sudden high or sudden low point of power load, which is not limited by the embodiment of the present disclosure. External correlation data determines the power load of the power system, which is a factor affecting the power load, and may include: environmental data; factory production related data; economic data. Environmental data may include: power consumption area type (such as urban, suburban, residential, factory); time; weather conditions (such as daily maximum temperature, daily minimum temperature, humidity, rainfall, air pressure, wind speed); seasonal factors; holidays, working days, etc., which are not specifically limited here. For example, in the high temperature of summer, sudden high points of power load such as peak power consumption often occur, and in some traditional heavy industry focus areas, due to enterprise relocation, capacity replacement and other reasons, sudden low points of power load such as "new low load" may also appear in local areas, which are not listed one by one here. Factory production related data may further include: production plan; maintenance plan; raw material inventory; sales situation (such as price). For example, when the production plan surges, the factory's electricity consumption will also increase. In the embodiments of this specification, external correlation data may also include other types, which are not specifically limited here and can be selected according to the specific application scenario.
[0036] Similarity (vector similarity) refers to the similarity measurement between different samples. The method usually adopted is to calculate the "distance" between sample data. It should be understood that the closer the distance between two vectors, the greater the similarity. In the embodiment of the present disclosure, the "distance" between sample data refers to the distance between the feature vector of the data set of the power load data of the initiator and the feature vector of the data set of the power load data of at least one participant.
[0037] Federated learning can be divided into three categories according to the distribution of data sources of the participating parties: horizontal federated learning, vertical federated learning, and federated transfer learning. Here, horizontal federated learning is when the user features of two data sets overlap a lot but the users overlap less, the data sets are split horizontally (i.e., user dimension), and the data with the same user features but different users are taken out for training.
[0038] A model refers to a formalized expression of a practical problem or objective thing or law after abstraction, and is usually composed of three parts: a target, a variable, and a relationship. A model may include, but is not limited to, a mathematical model, a program model, a logic model, a structural model, a method model, an analysis model, a prediction model, a management model, a data model, a system model, etc. In an embodiment of the present disclosure, the model may be a power load prediction model, which may include any one of a linear regression model, a support vector regression model, and an XGBoost model.
[0039] It should be noted that the power load prediction model of the embodiment of the present disclosure is not limited to the linear regression model, support vector regression model and XGBoost model described above. For example, it can also be a logistic regression model (LogisticRegression Model), a polynomial regression model (Polynomial Regression Model), a stepwise regression model (Stepwise Regression Model), a ridge regression model (Ridge Regression Model), a lasso regression model (Lasso Regression Model) and an ElasticNet regression model, etc.
[0040] According to the technical solution provided by the embodiment of the present disclosure, a data set of power load data of an initiator and a data set of power load data of at least one participant are obtained; the similarity between the data set of power load data of the initiator and the data set of power load data of at least one participant is determined; based on the similarity, a data set of target power load data of at least one target party is determined in the data set of power load data of at least one participant, and a horizontal joint learning algorithm is used to perform model training based on the data set of power load data of the initiator and the data set of target power load data of at least one target party; according to the result of the model training, a power load prediction model is established, which can be combined with a data set of power load data similar to the data set of power load data of the initiator to increase the amount of training sample data of the initiator. Therefore, in the case where the amount of training sample data of the initiator is insufficient, the accuracy of the established power load prediction model is improved, so that the accuracy of the power load prediction result predicted by using the power load prediction model is higher, thereby ensuring the efficient operation of the power system.
[0041] In some embodiments, determining the similarity between a data set of power load data of an initiator and a data set of power load data of at least one participant includes: respectively calculating the Euclidean distance between the data set of power load data of the initiator and the data set of power load data of each of the at least one participant, wherein the Euclidean distance is used to measure the similarity between the data set of power load data of the initiator and the data set of power load data of the participant.
[0042] Specifically, the server calculates the Euclidean distance between the data in the data set of the initiator's power load data and the data in the data set of the power load data of each participant of at least one participant, wherein the Euclidean distance is used to measure the similarity between the data set of the initiator's power load data and the data set of the power load data of the participant, and the larger the Euclidean distance, the smaller the similarity.
[0043] Euclidean distance, also known as Euclidean metric or Euclidean distance, refers to the true distance between two points in m-dimensional space, or the natural length of a vector (i.e., the distance from the point to the origin). Euclidean distance is the most common distance metric, which measures the absolute distance between two points in multidimensional space. Euclidean distance can reflect the absolute difference of individual values, and is more used in analysis that needs to reflect the difference from the numerical size of the dimension, such as using user behavior indicators to evaluate user similarity and difference.
[0044] The Euclidean distance in two-dimensional and three-dimensional space is the actual distance between two points. The Euclidean distance formula in n-dimensional space is as follows:
[0045]
[0046] Where x=(x1,...,x n ), y=(y1,...,y n ), n is a positive integer greater than or equal to 1.
[0047] In this embodiment, x i The characteristic value corresponding to the data in the data set representing the power load data of the initiator in n dimensions, y i The characteristic value corresponding to the data in the data set representing the power load data of the n-dimensional participant.
[0048] In some embodiments, the Euclidean distance between the data set of the power load data of the initiator and the data set of the power load data of each of the at least one participant is calculated respectively, including: performing feature extraction on the data set of the power load data of the initiator and the data set of the power load data of each of the at least one participant respectively, wherein the feature is represented by a vector; and calculating the Euclidean distance between the feature vector of the data set of the power load data of the initiator and the feature vector of the data set of the power load data of each of the at least one participant respectively.
[0049] Here, feature extraction is the conversion of raw features into a set of features with obvious physical or statistical meaning or kernel. In machine learning, pattern recognition and image processing, feature extraction starts with an initial set of measurement data and establishes derived values (features) designed to provide information and non-redundant information, thereby facilitating subsequent learning and generalization steps, and in some cases bringing better interpretability. Feature extraction is related to dimensionality reduction, and the quality of features has a crucial impact on generalization ability. Feature extraction methods may include but are not limited to principal component analysis (PCA), linear discriminant analysis (LDA), independent component analysis (ICA), latent semantic indexing (LSI), etc. Further, feature extraction will obtain a new feature space through data conversion or data mapping.
[0050] In some embodiments, based on similarity, a data set of target power load data of at least one target party is determined in a data set of power load data of at least one participating party, including: based on Euclidean distance, determining whether the Euclidean distance is less than or equal to a preset distance threshold; when the Euclidean distance is less than or equal to the preset distance threshold, determining that the similarity is greater than or equal to the preset similarity threshold; and determining the data set of power load data corresponding to the power load data whose similarity is greater than or equal to the preset similarity threshold in the data set of power load data of the participating party as the data set of target power load data of the target party.
[0051] Specifically, the server determines whether the Euclidean distance between the data in the data set of the initiator's power load data and the data in the data set of the power load data of each of the at least one participating party is less than or equal to a preset distance threshold based on the Euclidean distance between the data in the data set of the power load data of the initiator and the data in the data set of the power load data of each participating party; further, if the Euclidean distance is less than or equal to the preset distance threshold, then the similarity is greater than or equal to the preset similarity threshold, and the server determines the data set of power load data corresponding to the power load data in the data set of the participating party whose similarity is greater than or equal to the preset similarity threshold as the data set of the target power load data of the target party.
[0052] Here, the preset distance threshold can be set according to user needs or according to the default mode. The embodiment of the present invention does not limit this. The preset distance threshold can be 3, 5, 7 or 9. The similarity can be calculated according to a preset calculation formula, where the preset calculation formula is: similarity = 1.0 / (1.0+Euclidean distance). For example, similarity where χ i The characteristic value corresponding to the data in the data set representing the power load data of the initiator in n dimensions, y i The characteristic value corresponding to the data in the data set representing the power load data of the n-dimensional participant. According to the preset calculation formula, the preset similarity threshold = 1.0 / (1.0+preset distance threshold). For example, if the preset distance threshold is 6, then the preset similarity threshold is 1.0 / (1.0+6), that is, 1 / 7.
[0053] Exemplarily, the data set of power load data includes the data set of power load data of the initiator, the data set of power load data of the first participant, the data set of power load data of the second participant, the data set of power load data of the third participant and the data set of power load data of the fourth participant, the preset distance threshold is 5, the preset similarity threshold is 1 / 6, the Euclidean distance between the data set of power load data of the initiator and the data set of power load data of the first participant is 3, and the similarity is 1 / 4, the Euclidean distance between the data set of power load data of the initiator and the data set of power load data of the second participant is 4, and the similarity is 1 / 5, the Euclidean distance between the data set of power load data of the initiator and the data set of power load data of the third participant is 7, and the similarity is 1 / 8, and the initiator's The Euclidean distance between the data set of the electric load data and the data set of the electric load data of the fourth participant is 8, and the similarity is 1 / 9; based on the Euclidean distance, the Euclidean distance between the data set of the electric load data of the initiator and the data set of the electric load data of the first participant and the Euclidean distance between the data set of the electric load data of the initiator and the data set of the electric load data of the second participant are less than the preset distance threshold, therefore, the similarity between the data set of the electric load data of the initiator and the data set of the electric load data of the first participant and the similarity between the data set of the electric load data of the initiator and the data set of the electric load data of the second participant are both greater than the preset similarity threshold; the data set of the electric load data of the first participant and the data set of the electric load data of the second participant are the target electric load data data sets of the target party.
[0054] Optionally, other methods may be used to calculate the similarity using the Euclidean distance.
[0055] In some embodiments, based on similarity, a data set of target power load data of at least one target party is determined in a data set of power load data of at least one participant, including: determining the size of similarity based on the size of Euclidean distance; sorting the data sets of power load data of all participants in order from large to small according to the similarity; and selecting data sets of power load data of a preset number of participants ranked first as the data sets of target power load data of the target party.
[0056] Specifically, the smaller the Euclidean distance is, the greater the similarity is, and the smaller the absolute difference of the individual values is. Based on the size of the Euclidean distance, the server determines the size of the similarity; further, the server sorts the data sets of the power load data of all participants in descending order according to the size of the similarity; the server selects the data sets of the power load data of a preset number of participants with larger similarities who are ranked first as the data sets of the target power load data of the target party.
[0057] Here, the preset number can be set according to user needs or according to a default mode, which is not limited in the embodiment of the present invention, and the preset number can be 3, 5, 7 or 9, etc. For example, if the initiator has a small amount of training sample data, the preset number can be increased, and if the initiator has a large amount of training sample data, the preset number can be reduced.
[0058] In some embodiments, based on a data set of power load data of an initiator and a data set of target power load data of at least one target party, a horizontal joint learning algorithm is used for model training, including: acquiring model parameters of a first local model of the initiator and model parameters of a second local model of the target party for horizontal joint learning to obtain learning parameters, wherein the first local model is obtained by the initiator locally training the data set of the power load data of the initiator using a machine learning algorithm, and the second local model is obtained by the target locally training the data set of the target power load data of the target party using a machine learning algorithm; and sending the learning parameters to the initiator and the target party so that the initiator updates the first local model based on the learning parameters and the target party updates the second local model based on the learning parameters.
[0059] Here, the number of the first local model is one.
[0060] The number of the second local models is at least one, which is consistent with the number of the target parties. Each target party locally trains a data set of its corresponding target power load data to obtain a second local model.
[0061] In some embodiments, based on a data set of power load data of an initiator and a data set of target power load data of at least one target party, a horizontal joint learning algorithm is used to perform model training, and the method also includes: obtaining a model weight value corresponding to a first local model and a model weight value corresponding to a second local model, wherein the model weight value is pre-set based on the number of samples and / or similarity of the data set of power load data; and performing horizontal joint learning based on the model parameters of the first local model, the model weight value corresponding to the first local model, the model parameters of the second local model, and the model weight value corresponding to the second local model to obtain learning parameters.
[0062] Specifically, after the server receives the model parameters of the first local model and the model parameters of the second local model, the server obtains the model weight value corresponding to the first local model and the model weight value corresponding to the second local model, wherein the model weight value is pre-set based on the number of samples and / or similarity of the data set of the power load data, and the model weight value is pre-stored in the server; after the server obtains the model weight value corresponding to the first local model and the model weight value corresponding to the second local model, the server performs horizontal joint learning on the first local model and the second local model according to the model weight value corresponding to the first local model and the model weight value corresponding to the second local model to obtain learning parameters. For example, in the horizontal joint learning process, the model weight value corresponding to the first local model is multiplied by the model parameter of the first local model to obtain the first training parameter, and the model weight value corresponding to the second local model is multiplied by the model parameter of the second local model to obtain the second training parameter, and then the first training parameter and the second training parameter are horizontally joint learned to obtain the learning parameter.
[0063] Here, the number of samples can be 100, 1000 or 10000, etc. For example, the data set of the initiator's power load data includes 1000 sets of historical power load data and corresponding external correlation data, then the number of samples of the data set of the initiator's power load data is 1000.
[0064] The model weight value is pre-set based on the sample number and / or similarity of the data set of power load data, including: obtaining the sample number of the data set of the power load data of the initiator and the sample number of the data set of the target power load data of each target party among all the target parties, and the similarity between the data set of the power load data of the initiator and the data set of the target power load data of each target party among all the target parties; pre-setting the model weight value based on the sample number and / or similarity of the data set of power load data, the larger the sample number of the data set of power load data, the higher the model weight value corresponding to the local model trained by the initiator or the target party corresponding to the data set of power load data, and the larger the similarity, the higher the model weight value corresponding to the second local model trained by the target party corresponding to the similarity. For example, the model weight value corresponding to the first local model can be the ratio of the sample number of the data set of the power load data of the initiator to the sum of the sample number of the data set of the power load data of the initiator and the sample number of the data set of the target power load data of the target party, and the calculation formula of the model weight value corresponding to the second local model can be:
[0065]
[0066] Where n represents the number of targets, p m represents the model weight value corresponding to the second local model trained by the mth target party, am represents the number of samples in the dataset of the target power load data of the mth target party, b m represents the similarity of the target power load data set of the mth target party. The similarity can be 1.0 / (1.0+Euclidean distance). i represents the number of samples in the dataset of the target power load data of the i-th target party, b i represents the similarity of the target power load data set of the i-th target party, a z represents the number of samples in the dataset of the target power load data of the zth target party, b z Represents the similarity of the data set of the target power load data of the z-th target party.
[0067] The following describes in detail the calculation process of the model weight value corresponding to the first local model and the model weight value corresponding to the second local model in the embodiment of the present disclosure through specific examples.
[0068] Assume that the number of samples of the initiator's power load data dataset is 300, the number of target parties is 4, namely the first target party, the second target party, the third target party and the fourth target party, the number of samples of the first target party's target power load data dataset is 600, and the similarity between the first target party's target power load data dataset and the initiator's power load data dataset is 0.60, the number of samples of the second target party's target power load data dataset is 500, and the similarity between the second target party's target power load data dataset and the initiator's power load data dataset is 0.85, the number of samples of the third target party's target power load data dataset is 800, and the similarity between the third target party's target power load data dataset and the initiator's power load data dataset is 0.72, the number of samples of the fourth target party's target power load data dataset is 1000, and the similarity between the fourth target party's target power load data dataset and the initiator's power load data dataset is 0.64.
[0069] The calculation formula of the model weight value corresponding to the first local model is:
[0070]
[0071] The calculated model weight value corresponding to the first local model is
[0072] The four target parties respectively train their power load data sets locally to obtain second local models. The number of second local models is 4, namely the second local model of the first target party, the second local model of the second target party, the second local model of the third target party and the second local model of the fourth target party.
[0073] The calculation formula of the model weight value corresponding to the second local model of the first target party is:
[0074]
[0075] The calculated model weight value corresponding to the second local model of the first target party is
[0076] The calculation formula of the model weight value corresponding to the second local model of the second target party is:
[0077]
[0078] The calculated model weight value corresponding to the second local model of the second target party is
[0079] The calculation formula of the model weight value corresponding to the second local model of the third target party is:
[0080]
[0081] The calculated model weight value corresponding to the second local model of the third target party is
[0082] The calculation formula of the model weight value corresponding to the second local model of the fourth target party is:
[0083]
[0084] The calculated model weight value corresponding to the second local model of the fourth target party is
[0085] According to the technical solution provided by the embodiment of the present disclosure, by obtaining the model weight value corresponding to the first local model and the model weight value corresponding to the second local model, wherein the model weight value is pre-set based on the number of samples and / or similarity of the data set of the power load data; based on the model parameters of the first local model, the model weight value corresponding to the first local model, the model parameters of the second local model and the model weight value corresponding to the second local model, horizontal joint learning is performed to obtain learning parameters, so that the power load prediction model established according to the results of model training can be more accurate.
[0086] In some embodiments, based on the results of model training, a power load prediction model is established, including: based on the results of model training, determining a first local model that is iterated to meet a convergence condition as the power load prediction model.
[0087] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0088] Figure 3 It is a flowchart of another method for establishing a power load forecasting model based on joint learning provided in an embodiment of the present disclosure. Figure 3 The method for establishing a power load forecasting model based on joint learning can be executed by the server or any participant. Figure 3 As shown, the method for establishing the power load forecasting model based on joint learning includes:
[0089] S301, obtaining a data set of power load data of an initiator and a data set of power load data of at least one participant; wherein the initiator may be one of the multiple participants.
[0090] S302, respectively calculating the Euclidean distance between the data set of the power load data of the initiator and the data set of the power load data of each participant in at least one participant, wherein the Euclidean distance is used to measure the similarity between the data set of the power load data of the initiator and the data set of the power load data of the participant;
[0091] S303, determining the similarity based on the Euclidean distance;
[0092] S304, sorting the data sets of power load data of all participants in descending order according to the similarity, and selecting the data sets of power load data of a preset number of participants ranked first as the data sets of target power load data of the target party;
[0093] S305, using a horizontal joint learning algorithm to perform model training based on a data set of power load data of the initiator and a data set of target power load data of at least one target party;
[0094] S306: Establish a power load prediction model based on the model training results.
[0095] According to the technical solution provided by the embodiment of the present disclosure, the Euclidean distance is calculated between the data set of the power load data of the power load forecast initiator and the data set of the power load data of at least one power load forecast participant, and the data set of the power load data of the participant with a smaller Euclidean distance, that is, a higher similarity, is used as the data set of the target power load data; based on the data set of the power load data of the initiator and the data set of the target power load data, a horizontal joint learning algorithm is used for model training, which can improve the quality of sample data required for training the power load forecast model, thereby improving the accuracy of the prediction results of the power load forecast model, thereby improving the accuracy of the power load prediction results predicted by the power load forecast model, and ensuring the efficient operation of the power system.
[0096] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0097] Figure 4 Schematic diagram of a device for establishing a power load forecasting model based on joint learning provided by an embodiment of the present disclosure. Figure 4 As shown, the power load forecasting model establishment device based on joint learning includes:
[0098] The acquisition module 401 is configured to acquire a data set of power load data of an initiator and a data set of power load data of at least one participant; wherein the initiator may also be one of the multiple participants.
[0099] A determination module 402 is configured to determine the similarity between a data set of power load data of the initiator and a data set of power load data of at least one participant;
[0100] The training module 403 is configured to determine, based on similarity, a data set of target power load data of at least one target party in a data set of power load data of at least one participant, and perform model training using a horizontal joint learning algorithm based on the data set of power load data of the initiator and the data set of target power load data of at least one target party;
[0101] The building module 404 is configured to build a power load prediction model according to the results of the model training.
[0102] According to the technical solution provided by the embodiment of the present disclosure, a data set of power load data of an initiator and a data set of power load data of at least one participant are obtained; the similarity between the data set of power load data of the initiator and the data set of power load data of at least one participant is determined; based on the similarity, a data set of target power load data of at least one target party is determined in the data set of power load data of at least one participant, and a horizontal joint learning algorithm is used to perform model training based on the data set of power load data of the initiator and the data set of target power load data of at least one target party; according to the result of the model training, a power load prediction model is established, which can be combined with a data set of power load data similar to the data set of power load data of the initiator to increase the amount of training sample data of the initiator. Therefore, in the case where the amount of training sample data of the initiator is insufficient, the accuracy of the established power load prediction model is improved, so that the accuracy of the power load prediction result predicted by using the power load prediction model is higher, thereby ensuring the efficient operation of the power system.
[0103] In some embodiments, Figure 4 The determination module 402 calculates the Euclidean distance between the data set of the power load data of the initiator and the data set of the power load data of each participant in at least one participant, wherein the Euclidean distance is used to measure the similarity between the data set of the power load data of the initiator and the data set of the power load data of the participant.
[0104] In some embodiments, Figure 4 The training module 403 determines whether the Euclidean distance is less than a preset distance threshold based on the Euclidean distance; when the Euclidean distance is less than the preset distance threshold, determines that the similarity is greater than the preset similarity threshold; and determines the data set of the power load data corresponding to the power load data with a similarity greater than the preset similarity threshold in the data set of the power load data of the participating party as the data set of the target power load data of the target party.
[0105] In some embodiments, Figure 4 The training module 403 determines the size of the similarity based on the size of the Euclidean distance; sorts the data sets of the power load data of all participants in order from large to small according to the similarity; and selects the data sets of the power load data of a preset number of participants in the front sort as the data sets of the target power load data of the target party.
[0106] In some embodiments, Figure 4The training module 403 obtains the model parameters of the first local model of the initiator and the model parameters of the second local model of the target party for horizontal joint learning to obtain learning parameters, wherein the first local model is obtained by the initiator using a machine learning algorithm to locally train a data set of the initiator's power load data, and the second local model is obtained by the target party using a machine learning algorithm to locally train a data set of the target power load data of the target party; the learning parameters are sent to the initiator and the target party, so that the initiator updates the first local model based on the learning parameters and the target party updates the second local model based on the learning parameters.
[0107] In some embodiments, Figure 4 The training module 403 obtains the model weight value corresponding to the first local model and the model weight value corresponding to the second local model, wherein the model weight value is pre-set based on the number of samples and / or similarity of the data set of power load data; based on the model parameters of the first local model, the model weight value corresponding to the first local model, the model parameters of the second local model and the model weight value corresponding to the second local model, horizontal joint learning is performed to obtain learning parameters.
[0108] In some embodiments, Figure 4 The establishment module 404 determines the first local model that is iterated to meet the convergence condition as the power load prediction model according to the result of model training.
[0109] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
[0110] Figure 5 Schematic diagram of an electronic device 5 provided by an embodiment of the present disclosure. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0111] Exemplarily, the computer program 503 may be divided into one or more modules / units, which are stored in the memory 502 and executed by the processor 501 to complete the present disclosure. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 503 in the electronic device 5.
[0112] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0113] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0114] The memory 502 may be an internal storage unit of the electronic device 5, for example, a hard disk or memory of the electronic device 5. The memory 502 may also be an external storage device of the electronic device 5, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. Further, the memory 502 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device. The memory 502 may also be used to temporarily store data that has been output or is to be output.
[0115] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0116] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0117] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0118] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0120] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0121] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0122] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.
Claims
1. A method for establishing a power load forecasting model based on joint learning, comprising: Acquire a data set of power load data of the initiator and a data set of power load data of at least one participant; Determining the similarity between a data set of power load data of the initiator and a data set of power load data of at least one participant; Based on the similarity, determining a data set of target power load data of at least one target party in the data set of power load data of at least one participant, and using a horizontal joint learning algorithm to perform model training based on the data set of power load data of the initiator and the data set of target power load data of at least one target party; According to the results of the model training, a power load prediction model is established; The model training using the horizontal joint learning algorithm includes: Obtaining model parameters of a first local model of the initiator and model parameters of a second local model of the target for horizontal joint learning to obtain learning parameters, wherein the first local model is obtained by the initiator using a machine learning algorithm to locally train a data set of the initiator's power load data, and the second local model is obtained by the target party using a machine learning algorithm to locally train a data set of the target power load data of the target party; The learning parameters are sent to the initiator and the target, so that the initiator updates the first local model based on the learning parameters and the target updates the second local model based on the learning parameters.
2. The method according to claim 1, characterized in that The determining of the similarity between the data set of the power load data of the initiator and the data set of the power load data of the at least one participant includes: The Euclidean distance between the data set of the power load data of the initiator and the data set of the power load data of each of the at least one participant is calculated respectively, wherein the Euclidean distance is used to measure the similarity between the data set of the power load data of the initiator and the data set of the power load data of the participant.
3. The method according to claim 2, characterized in that Determining, based on the similarity, a data set of target power load data of at least one target party in the data set of power load data of at least one participant, comprises: Based on the Euclidean distance, determining whether the Euclidean distance is less than or equal to a preset distance threshold; When the Euclidean distance is less than or equal to the preset distance threshold, determining that the similarity is greater than or equal to the preset similarity threshold; The data set of power load data corresponding to the power load data having a similarity greater than or equal to the preset similarity threshold in the data set of power load data of the participant is determined as the data set of target power load data of the target party.
4. The method according to claim 2, characterized in that: Determining, based on the similarity, a data set of target power load data of at least one target party in the data set of power load data of at least one participant, comprises: Determine the similarity based on the Euclidean distance. Sorting the data sets of the power load data of all the participants in descending order according to the similarity; The data sets of power load data of the preset number of participants ranked first are selected as the data sets of target power load data of the target party.
5. The method according to claim 1, characterized in that The data set based on the power load data of the initiator and the data set of the target power load data of the at least one target party adopts a horizontal joint learning algorithm to perform model training, and further includes: Obtaining a model weight value corresponding to the first local model and a model weight value corresponding to the second local model, wherein the model weight value is pre-set based on the number of samples of the data set of the power load data and / or the similarity; Based on the model parameters of the first local model, the model weight value corresponding to the first local model, the model parameters of the second local model and the model weight value corresponding to the second local model, horizontal joint learning is performed to obtain the learning parameters.
6. The method according to claim 1, characterized in that The method of establishing a power load prediction model according to the results of the model training comprises: According to the result of the model training, the first local model that is iterated to meet the convergence condition is determined as the power load prediction model.
7. A device for establishing a power load forecasting model based on joint learning, characterized in that: include: An acquisition module configured to acquire a data set of power load data of an initiator and a data set of power load data of at least one participant; a determination module configured to determine the similarity between the data set of the power load data of the initiator and the data set of the power load data of the at least one participant; A training module is configured to determine, based on the similarity, a data set of target power load data of at least one target party in the data set of power load data of at least one participant, and perform model training using a horizontal joint learning algorithm based on the data set of power load data of the initiator and the data set of target power load data of at least one target party; An establishing module is configured to establish a power load prediction model according to the result of the model training; The training module is specifically configured to: obtain model parameters of the first local model of the initiator and the model parameters of the second local model of the target party for horizontal joint learning to obtain learning parameters, wherein the first local model is obtained by the initiator using a machine learning algorithm to locally train a data set of the initiator's power load data, and the second local model is obtained by the target party using a machine learning algorithm to locally train a data set of the target power load data of the target party; send the learning parameters to the initiator and the target party, so that the initiator updates the first local model based on the learning parameters and the target party updates the second local model based on the learning parameters.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, 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 6 are implemented.
