Training method and device for load prediction model of charging station

By using feature extraction and convolution processing between the charging station client and server, the load prediction model is trained using the federated learning framework, the problems of user privacy leakage and prediction accuracy in the prior art are solved, and the accuracy of charging load prediction is improved under the premise of protecting privacy.

CN120579160APending Publication Date: 2025-09-02GUANGDONG POWER GRID CO LTD DONGGUAN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510687169.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

While improving the prediction accuracy, the existing charging load prediction methods ignore user privacy protection, resulting in privacy information leakage and reduced prediction accuracy.

Method used

Through the federated learning framework, feature extraction and convolution processing are performed between the charging station client and server, and load prediction models are acquired and trained to ensure that data remains anonymous and encrypted during transmission and processing, avoiding data sharing.

Benefits of technology

On the premise of protecting user privacy, the accuracy of charging load prediction is improved, privacy data leakage is prevented, and data security is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120579160A_ABST
    Figure CN120579160A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a training method and device for a load prediction model of a charging station. The method comprises the following steps: acquiring historical charging data corresponding to a charging station client; performing feature extraction processing on the historical charging data corresponding to the charging station client to obtain initial feature data of the charging station client; sending the initial feature data to a server; for each charging station client, performing convolution processing on the initial feature data of all the charging station clients to obtain intermediate feature data of the charging station client; sending the intermediate feature data to a corresponding charging station client; and training the load prediction model of the charging station client according to the intermediate feature data sent by the server to obtain a trained load prediction model. According to the method, the accuracy of load prediction of the charging station can be improved on the premise of guaranteeing the privacy of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power information technology, and in particular to a method and device for training a load prediction model for a charging station. Background Art

[0002] With the increasing popularity of electric vehicles, the uncertainty of charging demand is also increasing. Accurate charging load forecasting is crucial for the stable operation of the power system. When forecasting charging load, users' charging behavior data is involved. This data contains a large amount of personal privacy information. If this private information is improperly used or leaked, it will pose a serious threat to user privacy.

[0003] While existing charging load forecasting methods can improve prediction accuracy to a certain extent, they often neglect user privacy protection, leading to privacy leaks and unnecessary user distress and losses. Furthermore, load forecasting involves sharing data between multiple parties, which can lead to malicious tampering or theft during the sharing process, reducing the accuracy of load forecasts.

[0004] Therefore, how to improve the accuracy of charging load prediction while protecting user privacy is an urgent problem that needs to be solved. Summary of the Invention

[0005] The embodiments of the present application provide a method and apparatus for training a load prediction model for a charging station, so as to improve the accuracy of charging load prediction while protecting user privacy.

[0006] In a first aspect, an embodiment of the present application provides a method for training a load prediction model for a charging station, comprising:

[0007] Obtaining historical charging data corresponding to the charging station client; wherein the historical charging data represents the charging load generated by the charging station charging electric vehicles in a historical time period;

[0008] Performing feature extraction processing on the historical charging data corresponding to the charging station client to obtain initial feature data of the charging station client; wherein the initial feature data represents the historical charging situation of the charging station client;

[0009] Sending the initial feature data to a server; wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client, performing convolution processing on the initial feature data of all charging station clients for each charging station client to obtain intermediate feature data of the charging station client, and sending the intermediate feature data to the corresponding charging station client; the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients;

[0010] The load prediction model of the charging station client is trained according to the intermediate feature data sent by the server to obtain a trained load prediction model.

[0011] In a second aspect, an embodiment of the present application provides a method for training a load prediction model for a charging station, comprising:

[0012] receiving initial feature data sent by each charging station client; wherein the initial feature data represents that after the charging station client obtains its own corresponding historical charging data, performing feature extraction processing on the historical charging data corresponding to the charging station client to obtain the initial feature data of the charging station client; wherein the initial feature data represents the historical charging status of the charging station client; and sending the initial feature data to the server;

[0013] For each of the charging station clients, performing convolution processing on the initial feature data of all the charging station clients to obtain intermediate feature data of the charging station client; wherein the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients;

[0014] The intermediate feature data is sent to the corresponding charging station client; wherein the intermediate feature data is used to indicate that the load prediction model of the charging station client is trained according to the intermediate feature data sent by the server to obtain a trained load prediction model.

[0015] In a third aspect, an embodiment of the present application provides a device for training a load prediction model for a charging station, the device being applied to a charging station client, comprising:

[0016] A first acquisition module is configured to acquire historical charging data corresponding to the charging station client; wherein the historical charging data represents the charging load generated by the charging station charging electric vehicles within a historical time period;

[0017] a feature extraction module, configured to perform feature extraction processing on the historical charging data corresponding to the charging station client to obtain initial feature data of the charging station client; wherein the initial feature data represents the historical charging status of the charging station client;

[0018] a sending module, configured to send the initial feature data to a server; wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client, and for each charging station client, perform convolution processing on the initial feature data of all charging station clients to obtain intermediate feature data of the charging station client, and send the intermediate feature data to the corresponding charging station client; the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients;

[0019] The first determination module is used to train the load prediction model of the charging station client according to the intermediate feature data sent by the server to obtain a trained load prediction model.

[0020] In a fourth aspect, an embodiment of the present application provides a training device for a load prediction model of a charging station, the device being applied to a server and comprising:

[0021] a receiving module, configured to receive initial feature data sent by each charging station client; wherein the initial feature data represents the initial feature data of the charging station client after the charging station client obtains its own corresponding historical charging data, performs feature extraction processing on the historical charging data corresponding to the charging station client, and obtains the initial feature data of the charging station client; wherein the initial feature data represents the historical charging status of the charging station client; and sends the initial feature data to the server;

[0022] a convolution module configured to perform convolution processing on the initial feature data of all charging station clients for each charging station client to obtain intermediate feature data of the charging station client; wherein the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients;

[0023] The second determination module is used to send the intermediate feature data to the corresponding charging station client; wherein the intermediate feature data is used to indicate that the load prediction model of the charging station client is trained according to the intermediate feature data sent by the server to obtain a trained load prediction model.

[0024] In a fifth aspect, an embodiment of the present application provides a training device for a load prediction model of a charging station, comprising: a memory, a processor;

[0025] The memory stores computer-executable instructions;

[0026] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0027] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementation methods of the first aspect.

[0028] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0029] The embodiment of the present application provides a method and device for training a load prediction model for a charging station. First, the historical charging data corresponding to the charging station client is obtained, and then the acquired historical charging data is subjected to feature extraction processing to obtain the initial feature data of the charging station client. The initial feature data is sent to the server, wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client. For each charging station client, the initial feature data of all charging station clients are convolutionally processed to obtain the intermediate feature data of the charging station client. The intermediate feature data is sent to the corresponding charging station client, and the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients. Finally, the client trains the load prediction model of the charging station client based on the intermediate feature data sent by the server to obtain a trained load prediction model. In this method, feature extraction is performed in each client so that data between the clients is not shared, thereby avoiding the leakage of private data and improving the accuracy of charging load prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0031] Figure 1 A flowchart of a method for training a load forecasting model for a charging station provided in this application;

[0032] Figure 2 A flowchart of a method for training a load forecasting model for a charging station provided in this application;

[0033] Figure 3 A flowchart of a method for training a load forecasting model for a charging station provided in this application;

[0034] Figure 4 A complete flow chart of a method for training a load forecasting model for a charging station provided in this application;

[0035] Figure 5A model iteration flow chart of a training method for a load prediction model for a charging station provided in this application;

[0036] Figure 6 A schematic diagram of the structure of a training device for a load forecasting model of a charging station provided in this application;

[0037] Figure 7 A schematic diagram of the structure of a training device for a load forecasting model of a charging station provided in this application;

[0038] Figure 8 A schematic diagram of the structure of a training device for a load forecasting model of a charging station provided in this application;

[0039] Figure 9 A schematic diagram of the structure of a training device for a load forecasting model of a charging station provided in this application;

[0040] Figure 10 A schematic diagram of the structure of a training device for a load forecasting model of a charging station provided in this application.

[0041] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0042] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0043] First, let’s explain the terms involved in this application:

[0044] Federated learning refers to a distributed machine learning framework that allows multiple participants to jointly train models without sharing the original data. In this approach, data remains local to each participant, while the model learning process is guided by a central server or coordinator via an encrypted communication protocol. Specifically, a central server coordinates the data learning process across charging stations, ensuring that data remains anonymous and encrypted during transmission and processing, effectively protecting user privacy.

[0045] With the increasing popularity of electric vehicles, the uncertainty of charging demand has increased. Accurate charging load forecasting is crucial for the stable operation of the power system. As a key technology in the field of new energy vehicles, electric vehicle charging load forecasting is of great significance for optimizing grid scheduling, improving the utilization rate of charging facilities, and enhancing the user charging experience.

[0046] With the rapid growth in the number of electric vehicles, users' charging behavior data is becoming increasingly rich. These data contain a large amount of personal privacy information, such as travel routes, home and office addresses, payment information, personal preferences, etc. If these data are improperly used or leaked, they will pose a serious threat to user privacy.

[0047] Existing charging load forecasting methods involve collecting historical charging data or model information from all charging stations and then processing it uniformly. However, during this process, data from different stations is not directly shared with other stations to prevent privacy leaks. Although this method is relatively simple to operate, it may face a high risk of privacy leaks during data processing. Another method is to implement strict privacy controls during the data collection phase, ensuring that data from each charging station is not shared between stations and is not directly integrated into the data collection and processing process. It is only indirectly learned and utilized through specific mechanisms when necessary. This method requires the construction of complex mechanisms to ensure that data can still be effectively utilized even without direct sharing, which places high demands on technical implementation.

[0048] The present application provides a method for training a load forecasting model for a charging station, which relates to the field of electric power information technology, and in particular to a method and device for training a load forecasting model for a charging station, aiming to solve the above technical problems of the prior art.

[0049] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0050] Figure 1 This is a flow chart of a method for training a load forecasting model for a charging station provided in this application. The method is applied to a charging station client, such as Figure 1 As shown, the method includes:

[0051] S101. Obtain historical charging data corresponding to a charging station client; wherein the historical charging data represents the charging load generated by the charging station charging electric vehicles during a historical time period.

[0052] For example, historical charging data represents the charging load generated by charging electric vehicles at a charging station over a historical period of time. This historical charging data can include the charging station's location information, charging time information, charging load data, and other information. The method for obtaining historical charging data corresponding to a charging station client can be to access the charging station's data management system via a computer. For example, if there are multiple charging clients, staff can obtain historical charging data for each charging station through the charging station's management system and use this historical charging data to train subsequent models.

[0053] The beneficial effect of this setting is that historical charging data is obtained, which facilitates the training of subsequent models and makes the model's load prediction for charging stations more accurate.

[0054] S102 : Perform feature extraction processing on the historical charging data corresponding to the charging station client to obtain initial feature data of the charging station client; wherein the initial feature data represents the historical charging situation of the charging station client.

[0055] For example, the initial feature data represents the historical charging conditions of charging station clients. For example, after acquiring the historical charging data of each charging station client, a neural network is applied to the data using this data as input for feature extraction. This historical charging data is typically presented as a time series, recording the charging load conditions of each charging station at different points in time. To extract high-level features from this raw data that are valuable for load forecasting, a one-dimensional transformation layer is applied to this historical data to extract features and generate the initial feature data.

[0056] The beneficial effect of this setting is that feature extraction and processing of historical charging data facilitates a more accurate description of the charging status of each charging station, improves the prediction accuracy of the model, and thus improves the accuracy of subsequent load predictions for each charging station.

[0057] S103. Send the initial feature data to the server; wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client, and for each charging station client, perform convolution processing on the initial feature data of all charging station clients to obtain intermediate feature data of the charging station client, and send the intermediate feature data to the corresponding charging station client; the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients.

[0058] Exemplarily, the initial feature data instructs the server to receive initial feature data sent by each charging station client. The initial feature data represents the charging history of the charging station client. After the charging client extracts features from the acquired historical charging data, it obtains the initial feature data. The charging station client then transmits this initial feature data to the server. Each charging station client may correspond to multiple feature data sets. After receiving the initial feature data from each charging station client, the server may perform convolution processing on the initial feature data of all charging station clients for each charging station client to obtain intermediate feature data corresponding to each charging station client. This intermediate feature data may include spatiotemporal correlations between the charging station client and other charging station clients, i.e., correlations in time and space. For example, spatial correlation refers to the locational relationship between the charging station clients, while temporal correlation refers to the correlation between the charging loads of the clients at different times. For example, if the charging loads of charging station client A and charging station client B are both high at 1:00 AM, then it is determined that the correlation between charging station client A and charging station client B is high at 1:00 AM. Finally, this intermediate feature data is transmitted again to each charging station client.

[0059] The beneficial effect of this setting is that by sending each initial feature data to the server for processing, it can ensure that data is not shared between the charging station clients, fully protect the privacy data, and avoid the leakage of privacy data.

[0060] S104: Train the load prediction model of the charging station client according to the intermediate feature data sent by the server to obtain a trained load prediction model.

[0061] Exemplarily, the intermediate feature data characterizes the spatiotemporal correlations between the charging station client and other charging station clients. After receiving the intermediate feature data generated by the server, the charging station client uses the intermediate feature data as input to train its load forecasting model, ultimately obtaining a trained load forecasting model. The training method may include inputting the acquired intermediate feature data into an initial load forecasting model. Multiple quantiles are pre-set for the prediction model of a charging station client, where these quantiles are used to describe the distribution of data during model training. The intermediate feature data includes the actual load data of the charging station, and the model can derive predicted values ​​of the load data based on this load data. Based on the preset quantiles, the actual load data of the charging station, and the predicted values ​​of the load data, a quantile loss value can be obtained based on a quantile loss function. Furthermore, based on the quantile loss values ​​at each quantile and the intermediate feature data, an optimal load forecasting model for the charging station client is obtained based on a multi-output quantile regression neural network model. This optimal load forecasting model is then determined as the trained load forecasting model.

[0062] The beneficial effect of this setting is that the model of the charging station client is trained using the intermediate feature data sent by the server, which can comprehensively consider the temporal and spatial relationships of each charging station client, thereby improving the accuracy of charging load prediction. In addition, using the server to send the intermediate feature data of each charging station client can also ensure that the data is not shared between the various charging station clients, avoiding the leakage of user privacy information.

[0063] The embodiment of the present application provides a method and device for training a load prediction model for a charging station. First, the historical charging data corresponding to the charging station client is obtained, and then the acquired historical charging data is subjected to feature extraction processing to obtain the initial feature data of the charging station client. The initial feature data is sent to the server, wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client. For each charging station client, the initial feature data of all charging station clients are convolutionally processed to obtain the intermediate feature data of the charging station client. The intermediate feature data is sent to the corresponding charging station client, and the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients. Finally, the client trains the load prediction model of the charging station client based on the intermediate feature data sent by the server to obtain a trained load prediction model. In this method, feature extraction is performed in each client so that data between the clients is not shared, thereby avoiding the leakage of private data and improving the accuracy of charging load prediction.

[0064] In one possible implementation, the load forecasting model of the charging station client is trained based on the intermediate feature data sent by the server to obtain a trained load forecasting model, including:

[0065] According to the intermediate feature data sent by the server, the current load forecasting model in the charging station client is trained to obtain initial model parameters; wherein the initial model parameters represent the model parameters of the model after the load forecasting model is trained based on the intermediate feature data; the initial model parameters are sent to the server; wherein the initial model parameters are used to instruct the server to receive the initial model parameters sent by each charging station client, and for each charging station client, the initial model parameters of all charging station clients are aggregated to obtain the global model parameters of the charging station client; the global model parameters are sent to the charging station client; according to the global model parameters sent by the server and the initial model parameters of the charging station client, the load forecasting model corresponding to the initial model parameters in the charging station client is trained to obtain a trained load forecasting model.

[0066] Exemplarily, the initial model parameters represent the model parameters of the model after the load forecasting model is trained based on the intermediate feature data. The initial model parameters are used to instruct the server to receive the initial model parameters sent by each charging station client; for each charging station client, the initial model parameters of all charging station clients are aggregated to obtain the global model parameters of the charging station client. For example, after receiving the intermediate feature data sent by the server, the load forecasting model of the charging station client can obtain the predicted value of the charging load data based on the actual charging load data in the intermediate feature data. Based on the preset quantile loss function, the quantile loss value under a given quantile can be obtained. Among them, the mathematical formula of the quantile loss function can be:

[0067]

[0068] in, is the quantile loss function, q is the preset quantile, is the predicted value of the charging load data, and y is the actual charging load data.

[0069] The multi-output quantile regression neural network (MQNN) is used to improve computational efficiency by training a load model suitable for all quantiles, thereby finding the optimal load forecasting model. The mathematical formula of the multi-output quantile regression neural network can be:

[0070]

[0071] in, It is a load forecasting model, which contains all the parameters in the model, which can be weight parameters, bias parameters, convolution kernel parameters and other information. q is a preset quantile, which can have multiple quantiles. is the actual charging load data, which can represent the actual charging load data of the i-th charging station client at time p. is the predicted value of the charging load data, which may represent the predicted value of the charging load data of the i-th charging station client at time p.

[0072] The above mathematical formula is iterated to find the optimal load forecasting model, i.e., to determine the initial model parameters. Each charging station client then sends these initial model parameters to the server. The server aggregates the initial model parameters of all charging station clients to obtain a global model for each charging station client, i.e., the global model parameters. These are then distributed to the corresponding charging station clients. After obtaining their global model parameters, each charging station client combines them with their initial model parameters and uses them to train the load forecasting model again, resulting in a trained load forecasting model.

[0073] The beneficial effect of this setting is that the load forecasting model of the charging station client is trained using the global model parameters and the initial model parameters, which is convenient for improving the prediction accuracy of the load forecasting model in each charging station client. At the same time, the server is used to aggregate the model parameters of each initial model and then send them to each charging station client, which also avoids the leakage of user privacy information.

[0074] In one possible implementation, the current load prediction model in the charging station client is trained based on the intermediate feature data sent by the server to obtain initial model parameters, including: inputting the intermediate feature data sent by the server into the current load prediction model to obtain an output prediction value; wherein the prediction value represents the charging load predicted based on the intermediate feature data; based on the prediction value and the intermediate feature data, based on a preset loss function, the current load prediction model in the charging station client is trained to obtain initial model parameters.

[0075] For example, the predicted value represents the charging load predicted based on the intermediate feature data. After the server generates the intermediate feature data, each charging station client obtains its own intermediate feature data and uses the obtained intermediate feature data as input to the load prediction model to obtain the output predicted value. Based on the obtained predicted value and intermediate feature data, and based on a preset loss function, the current load prediction model in the charging station client is trained to obtain initial model parameters. The training steps can be:

[0076]

[0077] in, is the quantile loss function, q is the preset quantile, is the predicted value of the charging load data, and y is the actual charging load data.

[0078] A multi-output quantile regression neural network (MQNN) is used to improve computational efficiency by training a load model suitable for all quantiles, thereby finding the optimal load forecasting model. The model parameters corresponding to the optimal load forecasting model are the initial model parameters. The mathematical formula for the multi-output quantile regression neural network can be:

[0079]

[0080] in, It is a load forecasting model, which contains all the parameters in the model, which can be weight parameters, bias parameters, convolution kernel parameters and other information. q is a preset quantile, which can have multiple quantiles. is the actual charging load data, which can represent the actual charging load data of the i-th charging station client at time p. is the predicted value of the charging load data, which may represent the predicted value of the charging load data of the i-th charging station client at time p.

[0081] The beneficial effect of this setting is that when training the prediction model, the quantile loss function is used, which can maximize the guarantee that the error between the predicted value and the actual value is minimized, thereby improving the accuracy of the load forecasting model.

[0082] In one possible implementation, a load forecasting model corresponding to the initial model parameters in the charging station client is trained based on the global model parameters sent by the server and the initial model parameters of the charging station client to obtain a trained load forecasting model, including: determining intermediate model parameters based on the global model parameters sent by the server and the initial model parameters of the charging station client; wherein the intermediate model parameters are model parameters after the global model parameters and the initial model parameters are combined; according to the predicted value and the intermediate feature data, based on a preset loss function, the load forecasting model corresponding to the intermediate model parameters is trained to obtain a trained load forecasting model.

[0083] Exemplarily, the intermediate model parameters are model parameters obtained by combining the global model parameters with the initial model parameters. The intermediate feature data characterizes the spatiotemporal correlation between the charging station client and other charging station clients. The predicted value characterizes the charging load predicted based on the intermediate feature data. For example, after the server aggregates the initial model parameters of each charging station client, it can obtain the global model parameters of each client. Each client obtains its corresponding global model parameters, and then combines the obtained global model parameters with its own initial model parameters to obtain intermediate model parameters. Based on the predicted value and the intermediate feature data, the load prediction model corresponding to the intermediate model parameters is trained based on a preset loss function to obtain a trained load prediction model.

[0084] This setup has the beneficial effect of improving the model's personalization and adaptability by combining the global model parameters sent by the server with the client's initial model parameters to determine the intermediate model parameters. This allows the client model to better adapt to local data while gaining generalization capabilities from global data, thereby improving the accuracy of the load forecasting model.

[0085] Figure 2 A flow chart of a method for training a load forecasting model for a charging station provided in this application is shown as follows: Figure 2 As shown, the method includes:

[0086] S201. Obtain historical charging data corresponding to a charging station client; wherein the historical charging data represents the charging load generated by the charging station charging electric vehicles during a historical time period.

[0087] This step can refer to the above step S101 and will not be described in detail.

[0088] S202: Perform data cleaning on the historical charging data corresponding to the charging station client to obtain cleaned historical charging data.

[0089] Exemplarily, the historical charging data may include the charging load data of the charging station, the location information of the charging station, the charging time information, etc. For example, after obtaining the historical charging data of the charging station client, the data needs to be preprocessed, wherein the preprocessing may include cleaning the historical charging data, removing missing values ​​and outliers, and ensuring the quality and consistency of the data. The acquired charging data can be divided into predicted values ​​and demand observation values. For example, if a total of 10 data are acquired, the first 6 data can be used as observation values, and the last 4 data can be used as predicted values. The historical charging data is used to train the load forecasting model. For example, historical demand and calendar variables from N charging stations are used as input features. Specifically, historical demand is demand observation value, and calendar variables refer to the hour of the day, the day of the week, the date of the month, the day of the year, the month of the year, and the month of the year. The demand observation value of the i-th charging station at time step t is expressed as The corresponding calendar variable of charging station i is expressed as For convenience, use To express , express , which represents the input feature set of the i-th charging station in the time window [t+1, t+h]. The demand observation value set of the i-th client at the prediction time step p is recorded as , the demand forecast value set is recorded as , specifically expressed as:

[0090]

[0091]

[0092] Among them, t is the current time step, h is the offset of the current time step, is the demand observation value, is the predicted value.

[0093] You can define the size and number of one-dimensional convolution kernels in the model based on your needs. These kernels will slide across the time series data to extract different features. You can also set the stride and padding parameters to control the effect of the convolution operation and the dimensionality of the output features.

[0094] The beneficial effect of this setting is that it cleans the data, facilitates the removal of outliers, reduces the errors caused by outliers in the model, and improves the accuracy of the load forecasting model.

[0095] S203: Use a preset one-dimensional convolutional encoder to perform feature extraction processing on the cleaned historical charging data to obtain initial feature data of the charging station client.

[0096] For example, historical charging data may include charging load data, charging station location information, charging time information, etc. The purpose of data cleaning is to remove noise, process missing values ​​and standardize data to ensure data quality and consistency. A one-dimensional convolutional encoder is then used to extract features from these cleaned data. Among them, historical charging data exists in the form of sequence data, and a one-dimensional convolutional encoder is a neural network structure used to process sequence data. Feature splicing or pooling methods are used to extract features from historical charging data. The data after feature extraction is converted into a feature vector, which is the initial feature data of the charging station client. These feature data can be used for further analysis or provided as input to other machine learning models for prediction or classification. For example, the features extracted from the i-th client are used The set of all client features is represented by express.

[0097] The beneficial effect of this setting is that the preset one-dimensional convolutional encoder is used to perform feature extraction processing on the cleaned historical charging data, which makes subsequent model training more effective and accurate and improves the prediction accuracy of the load forecasting model.

[0098] S204. Send the initial feature data to the server; wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client, and for each charging station client, perform convolution processing on the initial feature data of all charging station clients to obtain intermediate feature data of the charging station client, and send the intermediate feature data to the corresponding charging station client; the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients.

[0099] This step can refer to the above step S103 and will not be described in detail.

[0100] S205 . Train the load prediction model of the charging station client according to the intermediate feature data sent by the server to obtain a trained load prediction model.

[0101] This step can refer to the above-mentioned step S104 and will not be described in detail.

[0102] The embodiment of the present application provides a method and device for training a load prediction model for a charging station. First, the historical charging data corresponding to the charging station client is obtained, and then the acquired historical charging data is subjected to feature extraction processing to obtain the initial feature data of the charging station client. The initial feature data is sent to the server, wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client. For each charging station client, the initial feature data of all charging station clients are convolutionally processed to obtain the intermediate feature data of the charging station client. The intermediate feature data is sent to the corresponding charging station client, and the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients. Finally, the client trains the load prediction model of the charging station client based on the intermediate feature data sent by the server to obtain a trained load prediction model. In this method, feature extraction is performed in each client so that data between the clients is not shared, thereby avoiding the leakage of private data and improving the accuracy of charging load prediction.

[0103] In a possible implementation, the method further includes: obtaining current charging data corresponding to the charging station client; inputting the current charging data into a trained load prediction model to predict the charging load of the charging station client.

[0104] For example, after training a load prediction model for a charging station client based on historical charging data, a trained load prediction model is obtained. This trained load prediction model can improve the accuracy of charging load predictions while protecting user privacy. For example, by first obtaining the current charging data corresponding to the charging station client and inputting this current charging data into the trained load prediction model, the charging load of the charging station client can be predicted. For example, if the current time is 2:00 AM, the charging load of the charging station can be predicted for the next four hours based on the current charging data and the trained load prediction model.

[0105] The beneficial effect of this setting is that the charging load of the charging station is predicted using the trained load prediction model, which is convenient for improving the accuracy of the prediction while protecting user privacy.

[0106] Figure 3 This is a flow chart of a method for training a load prediction model for a charging station provided in this application. The method is applied to a server, such as Figure 3 As shown, the method includes:

[0107] S301. Receive initial feature data sent by each charging station client; wherein the initial feature data represents that after the charging station client obtains its own corresponding historical charging data, feature extraction processing is performed on the historical charging data corresponding to the charging station client to obtain the initial feature data of the charging station client; wherein the initial feature data represents the historical charging situation of the charging station client; and send the initial feature data to the server.

[0108] For example, the initial feature data represents the charging station client. After obtaining its corresponding historical charging data, the client can perform feature extraction on the historical charging data corresponding to the charging station client to obtain the initial feature data of the charging station client. The initial feature data represents the historical charging situation of the charging station client. After the charging station client performs feature extraction on the historical charging data, each charging station client sends the initial feature data to the server. The server receives the initial feature data of each charging station client and performs subsequent processing.

[0109] The beneficial effect of such a setting is that the server receives the initial feature data of each charging station client and processes it, so that the charging station clients do not share data, thereby avoiding the leakage of user privacy.

[0110] S302: For each charging station client, perform convolution processing on the initial feature data of all charging station clients to obtain intermediate feature data of the charging station client; wherein the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients.

[0111] Exemplarily, the intermediate feature data characterizes the spatiotemporal correlation between the charging station client and other charging station clients. For each charging station client, the initial feature data of all charging station clients are convolved to obtain the intermediate feature data of each charging station client. For example, a spatial-temporal graph convolutional network can be used for convolution processing to obtain the intermediate feature data of each charging station client. Among them, a spatial-temporal attention mechanism is introduced in the GNN layer of the spatial-temporal graph convolutional network. This mechanism enables the model to dynamically adjust the attention to different charging stations and different time steps, so as to more accurately capture the key information of load changes. The spatial-temporal attention mechanism includes two parts: space and time. The spatial attention part focuses on the mutual influence between charging stations, while the temporal attention part focuses on the pattern of load changes over time.

[0112] The spatial-temporal graph convolutional network (GCN) consists of a spatial-temporal convolutional module and a temporal convolutional module. The former aggregates spatial information from neighborhoods to capture the spatial dependencies between charging stations. The latter uses a convolutional neural network along the temporal dimension to capture load trends in time series data. By stacking multiple spatial-temporal convolutional layers, more complex dynamic spatial-temporal correlations can be extracted.

[0113] The beneficial effect of this setting is that by performing convolution processing on the initial feature data of all charging station clients, the charging station clients can not only learn from local data, but also benefit from the data of other clients, thereby achieving more comprehensive and accurate feature extraction, providing a more solid foundation for subsequent analysis, and improving the prediction accuracy of the load forecasting model.

[0114] S303. Send the intermediate feature data to the corresponding charging station client; wherein the intermediate feature data is used to indicate that the load prediction model of the charging station client is trained according to the intermediate feature data sent by the server to obtain a trained load prediction model.

[0115] Exemplarily, the intermediate feature data is used to instruct the charging station client's load forecasting model to be trained based on the intermediate feature data sent by the server, resulting in a trained load forecasting model. For example, after the server obtains the initial feature data for each charging station client, it can process the initial feature data using a spatial-temporal graph convolutional network to obtain intermediate feature data for each charging station client. Finally, the server transmits the obtained intermediate feature data to the corresponding charging station client.

[0116] The beneficial effect of this setting is that the server processes the initial feature data of each charging station client, which can ensure that data is not shared between different charging station clients and avoid the leakage of user privacy information. At the same time, the intermediate feature data of each charging station client generated by the server contains the information of all other charging station clients, which is convenient for comprehensive consideration of the characteristics of each charging station client, thereby improving the accuracy of the charging load prediction of the charging station client.

[0117] The embodiment of the present application provides a method and device for training a load prediction model for a charging station. First, the historical charging data corresponding to the charging station client is obtained, and then the acquired historical charging data is subjected to feature extraction processing to obtain the initial feature data of the charging station client. The initial feature data is sent to the server, wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client. For each charging station client, the initial feature data of all charging station clients are convolutionally processed to obtain the intermediate feature data of the charging station client. The intermediate feature data is sent to the corresponding charging station client, and the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients. Finally, the client trains the load prediction model of the charging station client based on the intermediate feature data sent by the server to obtain a trained load prediction model. In this method, feature extraction is performed in each client so that data between the clients is not shared, thereby avoiding the leakage of private data and improving the accuracy of charging load prediction.

[0118] In one possible implementation, for each charging station client, convolution processing is performed on the initial feature data of all charging station clients to obtain intermediate feature data of the charging station client, including: for each charging station client, spatial convolution processing is performed on the initial feature data of all charging station clients to determine the spatial information of each charging station client; wherein the spatial information represents the spatial correlation between the charging station client and other charging station clients; for each charging station client, temporal convolution processing is performed on the initial feature data of all charging station clients to determine the time information of each charging station client; wherein the time information represents the correlation between the charging station client and other charging station clients in charging time; and the intermediate feature data of the charging station client is obtained based on the spatial information and the time information.

[0119] For example, spatial information represents the spatial correlation between the charging station client and other charging station clients. Time information represents the correlation between the charging station client and other charging station clients in terms of charging time. For example, after the server obtains the initial feature data of each charging station client, for each of the charging station clients, spatial convolution processing is first performed on the initial feature data of all charging station clients to determine the spatial information of each charging station client, that is, a spatial attention matrix can be obtained. The spatial attention matrix can be expressed as:

[0120]

[0121]

[0122] Among them, S is the spatial attention matrix, that is, spatial information, which represents the spatial correlation between the charging station client and other charging station clients. is an element in the spatial attention matrix, which can be expressed as the spatial correlation between the i-th and j-th charging stations. is the normalized spatial attention matrix, which represents the normalized spatial correlation between the i-th and j-th charging stations. is the preset activation function, is a three-dimensional matrix whose dimensions are , representing the The input feature set of the layer space-time graph convolutional network, N represents the number of charging stations, represents the number of rows of the matrix, Represents the dimension of the input features of the lth layer, representing the number of features of the historical charging data of each charging station client at this layer, represents the embedding dimension of the lth layer, representing the dimension of the feature embedding space, is the bias parameter obtained in model training, is a learnable weight matrix used to adjust the attention strength between different sites, It is a learnable weight matrix used to perform a linear transformation on the input features.

[0123] After determining the correlation between each charging station client, that is, after determining the spatial information of each charging station client, for each charging station client, a temporal convolution process is performed on the initial feature data of all charging station clients to determine the correlation between the charging station client and other charging station clients in charging time, and obtain the temporal attention matrix, that is, the time information of each charging station client. The temporal attention matrix can be expressed as:

[0124]

[0125]

[0126] Where E represents the temporal attention matrix, where each element represents the dependency relationship between each charging station client at time step i and time step j, Represents the weight matrix that can be learned through model training, which is used to perform linear transformation on the calculated correlation. It can help the model map the input features to a new space to capture time dependencies. Represents a weight matrix that can be learned through model training and is used to transform between features and time steps to improve the flexibility and expressiveness of the model. Represents learnable bias parameters to enhance the flexibility of the model, represents the normalized temporal attention between time step i and time step j, indicating the importance of time step j to time step i.

[0127] In order to improve the accuracy of load forecasting and ensure that the model can flexibly cope with different time patterns, the normalized time attention matrix is ​​directly applied to the initial feature data to obtain the updated feature matrix, which can be expressed as:

[0128]

[0129] represents the updated feature matrix, N is the number of charging station clients, Represents the initial feature matrix set of all clients, each Represents the initial feature matrix composed of the initial feature data extracted from the i-th client, and its scale is , is the input feature dimension of the lth layer, representing the number of features of each charging station at this layer, It represents the embedding dimension of the i-th layer, which represents the dimension of the feature embedding space. represents the normalized temporal attention matrix.

[0130] After obtaining the updated feature matrices, we perform graph convolution on them in the spatial dimension to capture the spatial relationships between clients (i.e., charging stations). This step helps us obtain spatial features that reflect the mutual influence between charging stations. After graph convolution, we can obtain intermediate feature data. This can be expressed as:

[0131]

[0132] in, Represents the output feature matrix of the spatial-temporal graph convolutional network of the l+1th layer, that is, the intermediate feature data. is the parameter of the convolution kernel in the time dimension, It is a graph convolution kernel used to process graph structure data. is a graph convolution operation, where represents the standard convolution operation, represents the activation function, Represents the updated feature matrix.

[0133] Among them, the steps of graph convolution processing can be expressed as:

[0134]

[0135] It is a graph convolution kernel, used to process graph structure data; is a graph convolution operation, where represents the standard convolution operation, Represents the updated feature matrix. K is the number of iterations, which is a preset value. represents the recursive function used in the graph convolution operation, represents the normalized Laplace matrix, L represents the standard Laplace matrix; D represents the degree matrix of the graph, which represents the number of connections of each node; represents the maximum eigenvalue of the Laplace matrix L; Represents the Hadamard product, which is used to combine the result of graph convolution with the spatial attention matrix; represents a weighted adjacency matrix defined by distance. The degree matrix D is a diagonal matrix whose diagonal elements represent the degree of node i in the power system, that is, the number of charging station clients directly connected to the i-th node. The Laplace matrix L represents the local structural information of the graph; charging stations with close geographical locations are more similar in the feature space.

[0136] This arrangement has the beneficial effect of convolutionally processing the initial feature data of all charging station clients for each charging station client, determining the correlation between different charging station clients at different times, and thus revealing the interrelationships and dependencies between charging stations. This helps optimize resource allocation, predict charging demand, and promote coordination and cooperation between charging stations.

[0137] In a possible implementation, the method further includes: receiving initial model parameters sent by each charging station client; wherein the initial model parameters represent model parameters obtained by training the current load forecasting model in the charging station client according to the intermediate feature data after the charging station client receives the intermediate feature data; for each charging station client, aggregating the initial model parameters of all charging station clients to obtain global model parameters of the charging station client; wherein the global model parameters include the initial model parameters of all charging station clients; and sending the global model parameters to the charging station client.

[0138] Exemplarily, the initial model parameters represent the model parameters obtained by training the current load forecasting model in the charging station client according to the intermediate feature data after the charging station client receives the intermediate feature data. The global model parameters include the initial model parameters of all charging station clients. For example, after the server obtains the initial model parameters of each charging station client, for each charging station client, the initial model parameters of all charging station clients are aggregated to obtain the global model parameters of the charging station client. When aggregating the initial model parameters, in the traditional method, in order to realize the charging load prediction of electric vehicles without sharing site information, a federated learning mechanism (English: FL) with a central server is adopted. The commonly used FL aims to find a common model for all clients by solving the following optimization problem. The goal can be expressed as:

[0139]

[0140] in, and are the loss functions of the load forecasting model and client i regarding historical charging data, w is the global model parameter of the global model, is the weight assigned to client i based on the dataset obtained from the historical charging data of the charging station clients, and N represents the total number of charging station clients.

[0141] Since the charging load data of different charging stations are different, it is necessary to learn the common features and individual features between stations through a personalized model. A typical method to obtain a personalized model is to use local data to update the local model, while using the global model as a penalty term to ensure that the global information is learned by the local model, which is expressed as:

[0142]

[0143] in, is the load forecasting model, is the initial model parameter, w is the global model parameter, is the weight assigned to client i based on the dataset obtained from the historical charging data of the charging station client, is the penalty coefficient.

[0144] The above method can obtain an effective personalized model, but the global model adopts "average" aggregation, which is vulnerable to malicious attacks. In order to improve the robustness of the global model against malicious model attacks, a new aggregation rule is required, that is, to determine an objective function, which can be expressed as:

[0145]

[0146] in, is the load forecasting model, is the initial model parameter of the i-th charging station client, is the penalty coefficient, N is the number of charging station clients, is the weight coefficient, that is, if the difference between a certain initial model parameter and the other initial model parameters is too large, the weight coefficient of the initial model is lower. Here it can be expressed as client i in calculating the local model When the model of client j The weight parameter is, when the model of client j is similar to the model of client i, A larger value indicates that client i trusts client j's information more.

[0147] When aggregating the initial model parameters, any initial model parameters that differ significantly are discarded. By solving the above expression and iterating through this process, the global model parameters for each charging station client are determined. Finally, the global model parameters for each charging station client are sent to the corresponding charging station client.

[0148] The beneficial effect of this setting is that the initial model parameters with excessive differences are discarded through the weight coefficient, making the global model parameters obtained after aggregation more accurate. At the same time, the initial model parameters are aggregated in the server, and the global model parameters obtained after aggregation are distributed to the corresponding charging station clients. In this way, the charging station clients do not directly share data, which ensures the security of user privacy information and improves the accuracy of the load forecasting model in predicting charging loads.

[0149] In a possible implementation, for each of the charging station clients, the initial model parameters of all charging station clients are aggregated to obtain the global model parameters of the charging station client; including: for each charging station client, determining the similarity between the charging client and other charging station clients; wherein the similarity represents the degree of similarity of the initial model parameters between different charging station clients; based on the similarity between the charging client and other charging station clients, determining the weight information of the charging client and the weight information of other charging station clients; wherein the weight information represents the importance of the charging station client; based on the weight information of the charging client and the weight information of other charging station clients, aggregating the initial model parameters of all charging station clients to obtain the global model parameters of the charging station client.

[0150] Exemplarily, similarity characterizes the degree of similarity of the initial model parameters between different charging station clients. Weight information characterizes the importance of the charging station client. For each of the charging station clients, the similarity between the charging client and the other charging station clients must first be determined, and the initial model parameters with large similarity differences must be discarded to determine the initial model parameters to be aggregated. During the model iteration process, the weights of the various initial model parameters can be determined based on the similarity between the charging client and the other charging station clients. The weights of the initial model parameters can be adjusted using preset adjustment parameters. The adjustment parameters can adjust the weights of the initial model parameters with large differences to 0, so that the initial model parameters do not participate in the aggregation. Finally, based on the weight information of the charging client and the weight information of other charging station clients, the initial model parameters of all charging station clients are aggregated to obtain the global model parameters of the charging station client. For example, in the process of aggregating the model parameters of each charging station client to obtain the global model parameters corresponding to each charging station client, first determine an objective function for aggregating the initial model parameters, and use the gradient descent method to solve the objective function. The gradient descent method can be expressed as:

[0151]

[0152] in, represents the model parameters of client i at time step t and local iteration k+1, represents the model parameters of client i at time step t and local iteration K, Represents the learning rate, which controls the step size of parameter updates; Represents the gradient of the objective function, which indicates the direction in which the function grows fastest in the parameter space. is the weight coefficient, that is, if the difference between a certain initial model parameter and the other initial model parameters is too large, the weight coefficient of the initial model is lower. Here it can be expressed as client i in calculating the local model When the model of client j The weight parameter is, when the model of client j is similar to the model of client i, A larger value indicates that client i trusts client j's information more.

[0153] During aggregation, to defend against malicious model attacks from clients during the global model aggregation process, the server aggregates different global models based on model similarity and spatial relationships. In this approach, clients not only share their own model information but also combine the model information of neighboring clients to form a comprehensive message. The mathematical formula for aggregation can be expressed as:

[0154]

[0155] represents the model of the i-th client in the t-th round of communication, and ; Is a function based on the attention mechanism to measure and The degree of difference between them decreases monotonically, satisfying .

[0156] Select ,in As the credit parameter of client i to other clients. In addition, in order to utilize the spatial relationship between different stations, the spatial graph weighted adjacency matrix Reweight the similarity values, i.e.:

[0157]

[0158] in, is a weighted adjacency matrix preset based on distance, is the weighted adjacency matrix calculated based on the similarity between models, and R is a matrix set of N rows and N columns consisting of real numbers; Preset for balance and The constant is called the channel weight.

[0159] Each client will update the local model for K iterations to find the inexact solution of the objective function. The local model is then sent to the server and aggregated according to the above method to obtain the global model set of each charging station client. Each client downloads its own global model and combines the obtained global model parameters with local data. It then updates the local model parameters by solving the objective function. After a preset number of iterations of client model updates and server parameter aggregation, the final model parameters for each client are obtained, and these final models are used to perform prediction tasks.

[0160] The beneficial effect of this setting is that, based on the similarity of the model parameters of each charging station client, the model parameters with large differences are discarded, which can avoid malicious leakage or tampering of user privacy information, and improve the accuracy of charging load prediction while ensuring the security of user privacy information.

[0161] Figure 4 This is a complete flow chart of a training method for a load forecasting model for a charging station provided in this application, such as Figure 4 As shown, the specific steps include:

[0162] S401, extracting features from the historical charging data of each electric vehicle charging station client through a one-dimensional convolutional encoder, and uploading the extracted features to the central server in combination with a federated learning mechanism with a central server.

[0163] S402. The central server uses a spatiotemporal graph convolutional network to model the spatiotemporal relationship between features and generate new spatiotemporal features.

[0164] S403: Each client obtains the spatiotemporal features generated by the central server and combines them with the initial features extracted in step S1 as input to the subsequent final prediction model. The combined features are then used for initial local training to obtain the model parameters of the local client.

[0165] S404: Each client uploads its local model parameters to the central server. The server aggregates different global models based on model similarity and spatial relationships and distributes the aggregated global model to each client for a new round of local training. Each client combines the received global model parameters with local data and updates its local model parameters through local training.

[0166] S405. After the client local update process and the central server aggregation process are cycled for a specified number of times, the final model parameters of each client are obtained, and the electric vehicle charging demand prediction is completed with the help of the final model.

[0167] Exemplarily, after acquiring historical charging data, the acquired historical charging data is first preprocessed. Preprocessing may include removing outliers and missing values ​​to ensure consistent data quality. After obtaining the preprocessed historical charging data, the historical charging data is subjected to feature extraction processing using a one-dimensional convolutional encoder to generate initial feature data, which is then transmitted to the server. For each charging station client's initial feature data, the server processes this initial feature data using a spatiotemporal graph convolutional neural network to generate new spatiotemporal features, namely, intermediate feature data. Each charging station client then acquires the corresponding intermediate feature data and combines it with its own initial feature data. The combined data is used to train the load forecasting model to obtain the initial model parameters for the charging station client. Each charging station client transmits its initial model parameters to the server, which combines all initial model parameters and performs aggregation processing to obtain the intermediate model parameters for each charging station client. The intermediate model parameters are the model parameters obtained by combining the global model parameters with the initial model parameters. The intermediate model parameters are sent to the corresponding charging station clients. Based on the initial model parameters of the intermediate model parameters, the load forecasting model of each charging station client is trained. This process is repeated until a preset number of iterations is reached to obtain the model parameters of the final load forecasting model. The load forecasting model corresponding to the final model parameters is then used to predict the charging load of electric vehicles.

[0168] The beneficial effect of this setting is that the server is used to aggregate the initial model parameters, and feature extraction is performed locally on the charging station client, so that different charging station clients do not share data, avoid the leakage of user privacy information, and improve the accuracy of charging load prediction.

[0169] Figure 5 The model iteration flow chart of the training method of the load prediction model of a charging station provided in this application is shown in the figure, which specifically includes the following steps:

[0170] S501: The client uses the global model parameters received from the central server as the starting point for local training.

[0171] S502: Determine the total number of local training cycles K and initialize the cycle variable k=0.

[0172] S503: Whether the current cycle number is less than the specified total cycle number K of local training.

[0173] S504: End the loop, each client obtains the model parameters of this local training and transmits them to the central server.

[0174] S505: The local client calculates the current gradient of the local objective function and updates the model parameters using the gradient descent method.

[0175] S506: Set k=k+1 and prepare to enter the next cycle.

[0176] For example, each charging station client obtains its corresponding global model parameters from the server and combines them with the initial model parameters as input for training the load forecasting model in the charging station client, which is then iterated continuously. When the number of iterations reaches a preset number, model training is terminated, and the obtained model parameters (i.e., the initial model parameters) are transmitted to the server. If the number of iterations does not reach the preset number, the model is iterated again using gradient descent to update the model parameters, with k set to k+1, until the number of iterations reaches the preset number, at which point model training is terminated.

[0177] The beneficial effect of such a setting is that by training the load forecasting model of the charging station client, the optimal model parameters are determined, thereby facilitating improving the accuracy of the charging station load forecast.

[0178] Figure 6 This is a structural diagram of a training device for a load forecasting model of a charging station provided in this application. The device is applied to a charging station client, such as Figure 6 As shown, the present embodiment provides a training device 600 for a load prediction model of a charging station, including:

[0179] The first acquisition module 601 is configured to acquire historical charging data corresponding to the charging station client; wherein the historical charging data represents the charging load generated by the charging station for charging electric vehicles in a historical time period;

[0180] A feature extraction module 602 is configured to perform feature extraction processing on the historical charging data corresponding to the charging station client to obtain initial feature data of the charging station client; wherein the initial feature data represents the historical charging status of the charging station client;

[0181] The sending module 603 is configured to send the initial feature data to the server; wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client, and for each charging station client, perform convolution processing on the initial feature data of all charging station clients to obtain intermediate feature data of the charging station client, and send the intermediate feature data to the corresponding charging station client; the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients;

[0182] The first determining module 604 is configured to train the load prediction model of the charging station client according to the intermediate feature data sent by the server to obtain a trained load prediction model.

[0183] Figure 7 This is a structural diagram of a training device for a load prediction model of a charging station provided by this application, which is applied to a server, such as Figure 7 As shown, the present embodiment provides a charging station load prediction model training device 700 including a first acquisition module 701, a feature extraction module 702, a sending module 703, and a first determination module 704. The feature extraction module 702 includes a cleaning unit 7021 and an extraction unit 7022, and the first determination module 704 includes a first training unit 7041, a sending unit 7042, and a second training unit 7043.

[0184] In one example, the first determining module 704 includes:

[0185] A first training unit 7041 is configured to train the current load forecasting model in the charging station client based on the intermediate feature data sent by the server to obtain initial model parameters; wherein the initial model parameters represent model parameters of the load forecasting model after training based on the intermediate feature data;

[0186] a sending unit 7042 configured to send the initial model parameters to the server; wherein the initial model parameters are used to instruct the server to receive the initial model parameters sent by each charging station client, aggregate the initial model parameters of all charging station clients for each charging station client, obtain the global model parameters of the charging station client, and send the global model parameters to the charging station client;

[0187] The second training unit 7043 is used to train the load prediction model corresponding to the initial model parameters in the charging station client according to the global model parameters sent by the server and the initial model parameters of the charging station client to obtain a trained load prediction model.

[0188] In one example, the first training unit 7041 includes:

[0189] an input subunit, configured to input the intermediate characteristic data sent by the server into a current load forecasting model to obtain an output prediction value; wherein the prediction value represents the charging load predicted based on the intermediate characteristic data;

[0190] The first training subunit is used to train the current load forecasting model in the charging station client according to the predicted value and the intermediate feature data based on a preset loss function to obtain initial model parameters.

[0191] In one example, the second training unit 7043 includes:

[0192] a first determining subunit, configured to determine intermediate model parameters based on the global model parameters sent by the server and the initial model parameters of the charging station client; wherein the intermediate model parameters are model parameters obtained by combining the global model parameters and the initial model parameters;

[0193] The second training subunit is used to train the load forecasting model corresponding to the intermediate model parameters according to the predicted value and the intermediate feature data based on a preset loss function to obtain a trained load forecasting model.

[0194] In one example, the feature extraction module 702 includes:

[0195] a cleaning unit 7021, configured to perform data cleaning on the historical charging data corresponding to the charging station client to obtain cleaned historical charging data;

[0196] The extraction unit 7022 is configured to perform feature extraction processing on the cleaned historical charging data using a preset one-dimensional convolutional encoder to obtain initial feature data of the charging station client.

[0197] In one example, it also includes:

[0198] A second acquisition module is used to obtain current charging data corresponding to the charging station client;

[0199] The input module is used to input the current charging data into the trained load prediction model to predict the charging load of the charging station client.

[0200] Figure 8 This is a structural diagram of a training device for a load forecasting model of a charging station provided in this application, such as Figure 8 As shown, the present embodiment provides a training device 800 for a load prediction model of a charging station, including:

[0201] Receiving module 801 is configured to receive initial feature data sent by each charging station client; wherein the initial feature data represents the charging station client, after obtaining its corresponding historical charging data, performing feature extraction processing on the historical charging data corresponding to the charging station client to obtain the initial feature data of the charging station client; wherein the initial feature data represents the historical charging status of the charging station client; and sending the initial feature data to the server;

[0202] Convolution module 802 is configured to perform convolution processing on the initial feature data of all charging station clients for each charging station client to obtain intermediate feature data of the charging station client; wherein the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients;

[0203] The second determination module 803 is used to send the intermediate feature data to the corresponding charging station client; wherein the intermediate feature data is used to indicate that the load prediction model of the charging station client is trained according to the intermediate feature data sent by the server to obtain a trained load prediction model.

[0204] Figure 9 This is a structural diagram of a training device for a load forecasting model of a charging station provided in this application, such as Figure 9 As shown, a training device 900 for a load prediction model of a charging station provided in this embodiment includes a receiving module 901, a convolution module 902, and a second determination module 903, wherein the convolution module 902 includes a first convolution unit 9021, a second convolution unit 9022, a determination unit 9023, a receiving unit 9024, an aggregation unit 9025, and a sending unit 9026.

[0205] In one example, the convolution module 902 includes:

[0206] A first convolution unit 9021 is configured to perform spatial convolution processing on the initial feature data of all charging station clients for each charging station client to determine spatial information of each charging station client; wherein the spatial information represents the spatial correlation between the charging station client and other charging station clients;

[0207] The second convolution unit 9022 is configured to perform time convolution processing on the initial feature data of all charging station clients for each charging station client to determine time information of each charging station client; wherein the time information represents the correlation between the charging time of the charging station client and other charging station clients;

[0208] The determining unit 9023 is configured to obtain intermediate feature data of the charging station client according to the spatial information and the time information.

[0209] In one example, the convolution module 902 further includes:

[0210] Receiving unit 9024 is configured to receive initial model parameters sent by each charging station client; wherein the initial model parameters represent model parameters obtained by training the current load forecasting model in the charging station client based on the intermediate feature data after the charging station client receives the intermediate feature data;

[0211] an aggregation unit 9025 configured to aggregate the initial model parameters of all charging station clients for each charging station client to obtain global model parameters of the charging station client; wherein the global model parameters include the initial model parameters of all charging station clients;

[0212] The sending unit 9026 is configured to send the global model parameters to the charging station client.

[0213] In one example, the aggregation unit 9025 includes:

[0214] A second determining subunit is configured to determine, for each of the charging station clients, a similarity between the charging station client and other charging station clients; wherein the similarity represents a degree of similarity between initial model parameters of different charging station clients;

[0215] A third determining subunit is configured to determine weight information of the charging client and weight information of other charging station clients based on similarities between the charging client and other charging station clients; wherein the weight information represents the importance of the charging station client;

[0216] The aggregation subunit is used to aggregate the initial model parameters of all charging station clients according to the weight information of the charging client and the weight information of other charging station clients to obtain the global model parameters of the charging station client.

[0217] This embodiment provides a training device for a load prediction model of a charging station, which can execute the method provided in the above method embodiment. Its implementation principle and technical effects are similar, and are not described in detail in this embodiment.

[0218] Figure 10 This is a schematic diagram of the structure of a training device for a load forecasting model of a charging station provided in this application. Figure 10 As shown, the electronic device 1000 provided in this embodiment includes: at least one processor 1001 and a memory 1002. Optionally, the device 1000 further includes a communication component 1003. The processor 1001, the memory 1002 and the communication component 1003 are connected via a bus.

[0219] During the specific implementation process, at least one processor 1001 executes the computer-executable instructions stored in the memory 1002, so that the at least one processor 1001 performs the above method.

[0220] The specific implementation process of the processor 1001 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0221] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.

[0222] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.

[0223] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0224] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0225] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0226] The readable storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0227] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0228] The division of units is merely a logical functional division; actual implementations may employ alternative divisions, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, any direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units, either through an interface, electrical, mechanical, or other means.

[0229] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0230] In addition, each functional unit in each embodiment of the present invention 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.

[0231] If a function is implemented as 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 technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0232] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0233] Finally, it should be noted that those skilled in the art will readily identify other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art not disclosed herein. The present invention is not limited to the precise structure described above and illustrated in the accompanying drawings, and various modifications and variations may be made without departing from the scope thereof. The scope of the present invention is limited solely by the appended claims.

Claims

1. A method for training a load forecasting model for a charging station, characterized in that: The method is applied to a charging station client; the method includes: Obtaining historical charging data corresponding to the charging station client; wherein the historical charging data represents the charging load generated by the charging station charging electric vehicles in a historical time period; Performing feature extraction processing on the historical charging data corresponding to the charging station client to obtain initial feature data of the charging station client; wherein the initial feature data represents the historical charging situation of the charging station client; Sending the initial feature data to a server; wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client, performing convolution processing on the initial feature data of all charging station clients for each charging station client to obtain intermediate feature data of the charging station client, and sending the intermediate feature data to the corresponding charging station client; the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients; The load prediction model of the charging station client is trained according to the intermediate feature data sent by the server to obtain a trained load prediction model.

2. The method according to claim 1, characterized in that Training the load prediction model of the charging station client according to the intermediate feature data sent by the server to obtain a trained load prediction model includes: Training the current load forecasting model in the charging station client based on the intermediate feature data sent by the server to obtain initial model parameters; wherein the initial model parameters represent model parameters of the load forecasting model after training based on the intermediate feature data; Sending the initial model parameters to the server; wherein the initial model parameters are used to instruct the server to receive the initial model parameters sent by each charging station client, for each charging station client, aggregating the initial model parameters of all charging station clients to obtain the global model parameters of the charging station client, and sending the global model parameters to the charging station client; According to the global model parameters sent by the server and the initial model parameters of the charging station client, the load forecasting model corresponding to the initial model parameters in the charging station client is trained to obtain a trained load forecasting model.

3. The method according to claim 2, characterized in that The current load forecasting model in the charging station client is trained based on the intermediate feature data sent by the server to obtain initial model parameters, including: Inputting the intermediate characteristic data sent by the server into the current load forecasting model to obtain an output prediction value; wherein the prediction value represents the charging load predicted based on the intermediate characteristic data; According to the predicted value and the intermediate characteristic data, based on a preset loss function, the current load forecasting model in the charging station client is trained to obtain initial model parameters.

4. The method according to claim 3, characterized in that Training a load forecasting model corresponding to the initial model parameters in the charging station client according to the global model parameters sent by the server and the initial model parameters of the charging station client to obtain a trained load forecasting model, including: Determining intermediate model parameters based on the global model parameters sent by the server and the initial model parameters of the charging station client; wherein the intermediate model parameters are model parameters after the global model parameters and the initial model parameters are combined; According to the predicted value and the intermediate characteristic data, based on a preset loss function, the load forecasting model corresponding to the intermediate model parameters is trained to obtain a trained load forecasting model.

5. The method according to claim 1, wherein Performing feature extraction processing on the historical charging data corresponding to the charging station client to obtain initial feature data of the charging station client, including: Performing data cleaning on the historical charging data corresponding to the charging station client to obtain cleaned historical charging data; A preset one-dimensional convolutional encoder is used to perform feature extraction processing on the cleaned historical charging data to obtain initial feature data of the charging station client.

6. The method according to any one of claims 1 to 5, characterized in that Also includes: Obtaining current charging data corresponding to the charging station client; The current charging data is input into the trained load prediction model to predict the charging load of the charging station client.

7. A method for training a load prediction model for a charging station, characterized in that: The method is applied to a server; the method comprises: receiving initial feature data sent by each charging station client; wherein the initial feature data represents that after the charging station client obtains its own corresponding historical charging data, performing feature extraction processing on the historical charging data corresponding to the charging station client to obtain the initial feature data of the charging station client; wherein the initial feature data represents the historical charging status of the charging station client; and sending the initial feature data to the server; For each of the charging station clients, performing convolution processing on the initial feature data of all the charging station clients to obtain intermediate feature data of the charging station client; wherein the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients; The intermediate feature data is sent to the corresponding charging station client; wherein the intermediate feature data is used to indicate that the load prediction model of the charging station client is trained according to the intermediate feature data sent by the server to obtain a trained load prediction model.

8. The method according to claim 7, characterized in that For each of the charging station clients, convolution processing is performed on the initial feature data of all the charging station clients to obtain intermediate feature data of the charging station client, including: For each of the charging station clients, performing spatial convolution processing on the initial feature data of all the charging station clients to determine the spatial information of each of the charging station clients; wherein the spatial information represents the spatial correlation between the charging station client and other charging station clients; For each of the charging station clients, performing time convolution processing on the initial feature data of all the charging station clients to determine time information of each of the charging station clients; wherein the time information represents the correlation between the charging time of the charging station client and other charging station clients; According to the spatial information and the time information, intermediate feature data of the charging station client is obtained.

9. The method according to claim 7 or 8, characterized in that Also includes: Receiving initial model parameters sent by each charging station client; wherein the initial model parameters represent model parameters obtained by training the current load forecasting model in the charging station client according to the intermediate feature data after the charging station client receives the intermediate feature data; For each of the charging station clients, aggregating the initial model parameters of all the charging station clients to obtain global model parameters of the charging station client; wherein the global model parameters include the initial model parameters of all the charging station clients; The global model parameters are sent to the charging station client.

10. The method according to claim 9, characterized in that For each of the charging station clients, aggregating the initial model parameters of all the charging station clients to obtain the global model parameters of the charging station client; including: For each of the charging station clients, determining the similarity between the charging station client and other charging station clients; wherein the similarity represents the degree of similarity of initial model parameters between different charging station clients; Determining weight information of the charging client and weight information of other charging station clients based on the similarity between the charging client and other charging station clients; wherein the weight information represents the importance of the charging station client; According to the weight information of the charging client and the weight information of other charging station clients, the initial model parameters of all charging station clients are aggregated to obtain the global model parameters of the charging station client.

11. A training device for a load forecasting model of a charging station, characterized in that: The device is applied to a charging station client, and includes: A first acquisition module is configured to acquire historical charging data corresponding to the charging station client; wherein the historical charging data represents the charging load generated by the charging station charging electric vehicles within a historical time period; a feature extraction module, configured to perform feature extraction processing on the historical charging data corresponding to the charging station client to obtain initial feature data of the charging station client; wherein the initial feature data represents the historical charging status of the charging station client; a sending module, configured to send the initial feature data to a server; wherein the initial feature data is used to instruct the server to receive the initial feature data sent by each charging station client, and for each charging station client, perform convolution processing on the initial feature data of all charging station clients to obtain intermediate feature data of the charging station client, and send the intermediate feature data to the corresponding charging station client; the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients; The first determination module is used to train the load prediction model of the charging station client according to the intermediate feature data sent by the server to obtain a trained load prediction model.

12. A training device for a load forecasting model of a charging station, characterized in that: The device is applied to a server and includes: a receiving module, configured to receive initial feature data sent by each charging station client; wherein the initial feature data represents the initial feature data of the charging station client after the charging station client obtains its own corresponding historical charging data, performs feature extraction processing on the historical charging data corresponding to the charging station client, and obtains the initial feature data of the charging station client; wherein the initial feature data represents the historical charging status of the charging station client; and sends the initial feature data to the server; a convolution module configured to perform convolution processing on the initial feature data of all charging station clients for each charging station client to obtain intermediate feature data of the charging station client; wherein the intermediate feature data represents the spatiotemporal correlation between the charging station client and other charging station clients; The second determination module is used to send the intermediate feature data to the corresponding charging station client; wherein the intermediate feature data is used to indicate that the load prediction model of the charging station client is trained according to the intermediate feature data sent by the server to obtain a trained load prediction model.

13. A training device for a load forecasting model of a charging station, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 10 when executed by a processor.

15. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 10 when executed by a processor.