A processing method for predicting load of a transformer area based on electric vehicle data
By constructing a distribution area load forecasting model based on electric vehicle data and using Transformer or Bi-LSTM models for feature extraction and regression forecasting, the problem of distribution area electricity load forecasting is solved, and accurate forecasting of future distribution area electricity load is achieved, supporting the dynamic control of the smart grid.
Patent Information
- Application Number
- CN202411893183.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-20
AI Technical Summary
Existing technologies make it difficult to effectively predict various types of electricity loads in distribution substations based on electric vehicle data, especially the electricity loads of photovoltaic power stations, energy storage consumption, charging pile consumption, and daily residential and industrial and commercial facilities.
By collecting data on the electricity load of electric vehicles and transformer substations around the clock, a transformer substation load prediction model is constructed. The vehicle embedding coding tensor is used to predict multiple types of electricity load. The Transformer or Bi-LSTM model is used for feature extraction and regression prediction. The model is trained to predict future electricity load.
It enables accurate prediction of future electricity load in the distribution area, supports dynamic regulation of the smart grid, and improves the accuracy of power supply management.
Smart Images

Figure CN119674960B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for predicting the load of transformer substations based on electric vehicle data. Background Technology
[0002] The management model of smart grids aims to dynamically regulate the power supply of distribution substations. This requires the ability to predict various types of electrical loads within the substations (such as the load generated by photovoltaic power stations, the load consumed by energy storage facilities, the load consumed by charging piles, and the load generated by daily residential and industrial facilities). Data collection has revealed a correlation between the various types of electrical load data and the electric vehicle data (EV data) within the substation's service area, particularly for substations with EV charging piles. Therefore, it can be inferred that the corresponding various types of electrical loads can be predicted based on the collected EV data. How to predict the various types of electrical loads in a substation based on EV data is precisely the technical problem that this invention aims to solve. Summary of the Invention
[0003] The purpose of this invention is to address the shortcomings of existing technologies by providing a method for predicting transformer substation load based on electric vehicle data. This invention involves collecting data from all electric vehicles operating within the transformer substation's power supply area around the clock to obtain a vehicle dataset, and collecting data from various types of electrical loads within the substation to obtain a transformer substation dataset. A transformer substation load prediction model is constructed to predict multiple types of electrical loads within the substation based on the vehicle embedding encoding tensor input to the model. The model training dataset is then built based on the vehicle / substation datasets to train the transformer substation load prediction model. After model training, the transformer substation load prediction model is used to predict various types of electrical loads within a specified future time period based on the most recently collected data from the vehicle dataset. This invention solves the technical problem of how to predict various types of electrical loads within a transformer substation based on electric vehicle data.
[0004] To achieve the above objectives, embodiments of the present invention provide a method for processing data to predict the load of transformer substations based on electric vehicle data, the method comprising:
[0005] The power supply area of the first transformer substation is designated as the corresponding first area; all electric vehicles traveling within the first area are collected around the clock to obtain the corresponding first vehicle dataset; and all types of power loads in the first transformer substation are collected around the clock to obtain the corresponding first transformer substation dataset.
[0006] A transformer area load prediction model is constructed. The transformer area load prediction model is used to perform transformer area electricity load prediction processing based on the vehicle embedding encoding tensor input to the model and output the corresponding transformer area load prediction tensor. The transformer area load prediction tensor includes at least the photovoltaic power station load prediction vector, the energy storage load prediction vector, the electric vehicle charging load prediction vector, and the daily electricity load prediction vector.
[0007] Set the data sampling duration to the first sampling duration L. S And set the prediction interval to the first interval length L; A And set the prediction duration to the first prediction duration L; P Based on the first vehicle dataset, the first transformer area dataset, and the first sampling duration L... S The first interval duration L A and the first prediction duration L P A training dataset for the model is constructed and denoted as the first dataset; and the load prediction model for the transformer area is trained based on the first dataset;
[0008] After the model training is completed, the load prediction model for the transformer area is used to predict the load based on the most recent sampling duration L in the first vehicle dataset. S The collected data and the first prediction duration L P The electricity load of the first transformer area during the first forecast period is predicted; the interval between the start time and the current time of the first forecast period is the first interval length L. A The length of the first prediction period is the first prediction duration L. P .
[0009] Preferably, the first vehicle dataset includes multiple first vehicle data records; the first vehicle data record includes a first collection period, a first vehicle identifier, a first location type, a first vehicle type, a first parking status, a first start-up status, a first navigation mode, a first charging mode, and a first charging level; the first collection period includes a first period start time and a first period end time, and the length of the period between the first period start time and the first period end time is fixedly denoted as the first period length ΔL1; the first vehicle identifier is a unique identifier for the corresponding electric vehicle; the first location type is used to mark the location type of the corresponding electric vehicle in the current period, and the first location type includes commercial locations, residential areas, and roads; the first vehicle type includes private cars and commercial vehicles. The vehicle; the first parking status is used to mark the parking status of the corresponding electric vehicle in the current time period, and the first parking status includes yes and no; the first starting trip status is used to mark whether the corresponding electric vehicle is in the trip starting time period in the current time period, and the first starting trip status includes yes and no; the first navigation mode is used to mark the navigation mode adopted by the corresponding electric vehicle in the current time period, and the first navigation mode includes the shortest driving route navigation mode and the shortest driving time navigation mode; the first charging mode is used to mark whether the corresponding electric vehicle is in the charging state in the current time period and the corresponding charging mode, and the first charging mode includes not charging, regular charging and fast charging; the first charging amount is the total charging amount of the corresponding electric vehicle in the current time period, and the first charging amount is 0 when the first charging mode is not charging;
[0010] The first distribution area dataset includes multiple first distribution area data records; the first distribution area data records include a second collection period, a first total grid power distribution, a first total photovoltaic power generation load, a first total energy storage load, a first total electric vehicle charging load, and a first total daily electricity consumption load; the second collection period includes a second period start time and a second period end time, and the period length between the second period start time and the second period end time is fixed and denoted as the second period length ΔL2; the first total grid power distribution is the total grid-side power distribution of the first distribution area in the current second collection period; the first total photovoltaic power generation load is the total electricity consumption generated by all photovoltaic power generation stations in the first distribution area in the current second collection period; the first total energy storage load is the total electricity consumption consumed by all energy storage facilities in the first distribution area in the current second collection period; the first total electric vehicle charging load is the total electricity consumption consumed by all charging piles in the first distribution area in the current second collection period; the first total daily electricity consumption load is the total daily residential and industrial / commercial electricity consumption generated in the first distribution area in the current second collection period.
[0011] The first sampling duration L S It is an integer multiple of the first time period length △L1; the first prediction duration L P It is an integer multiple of the second time period length △L2;
[0012] The first dataset includes multiple first data records; each first data record includes a first vehicle embedding encoding tensor and a first electricity load label tensor; the first vehicle embedding encoding tensor is composed of multiple first vehicle embedding encoding vectors; each first vehicle embedding encoding vector corresponds to an electric vehicle; all first vehicle embedding encoding vectors have the same vector length M1, where M1 = L. S / △L1; The first vehicle embedding encoding vector is composed of M1 first time period encoding groups arranged in chronological order; each first time period encoding group corresponds to one first vehicle data record; the first time period encoding group includes location type encoding, vehicle type encoding, parking status encoding, start-trip status encoding, navigation mode encoding, charging mode encoding, and charging power encoding; the first electricity load label tensor includes a first generation load label vector, a first energy storage load label vector, a first charging load label vector, and a first daily load label vector, and the four label vectors have the same vector length M2, M2 = L P / △L2; The first power generation load label vector is formed by sequentially sorting M2 first power generation load labels; the first energy storage load label vector is formed by sequentially sorting M2 first energy storage load labels; the first charging load label vector is formed by sequentially sorting M2 first charging load labels; the first daily load label vector is formed by sequentially sorting M2 first daily load labels.
[0013] Preferably, the transformer area load prediction model comprises a feature extraction network and a regression prediction network; the transformer area load prediction model has at least two implementation methods, one based on a Transformer model and the other based on a Bi-LSTM model; when the transformer area load prediction model is implemented based on a Transformer model, the feature extraction network and the regression prediction network are implemented based on the encoder and decoder of the Transformer model, respectively; when the transformer area load prediction model is implemented based on a Bi-LSTM model, the feature extraction network is implemented by connecting a CNN network with linear layers, and the regression prediction network is implemented by connecting a Bi-LSTM model with an MLP network.
[0014] The feature extraction network is used to receive the vehicle embedding encoding tensor input from the model, and to perform electric vehicle electricity consumption feature extraction processing on the vehicle embedding encoding tensor to obtain the corresponding electric vehicle electricity consumption feature tensor, which is then sent to the regression prediction network; the regression prediction network is used to perform multi-class electricity load prediction processing based on the electric vehicle electricity consumption feature tensor to obtain the corresponding transformer area load prediction tensor and output it.
[0015] Preferably, the step based on the first vehicle dataset, the first transformer area dataset, and the first sampling duration L... S The first interval duration L A and the first prediction duration L P The dataset used to build the model training dataset is denoted as the first dataset, and it specifically includes:
[0016] Step 41, according to the first sampling duration L S The first vehicle dataset is sequentially segmented to obtain multiple corresponding first segment datasets;
[0017] Each of the first segment datasets consists of multiple first vehicle data records; and the time span of each first segment dataset is the first sampling duration L. S ;
[0018] Step 42: Take the first first segment dataset as the corresponding current segment dataset;
[0019] Step 43: Take the segment end time of the current segmented dataset as the corresponding current end time; and divide the current end time by the first interval duration L. A The sum of these times is used as the corresponding current prediction start time; and the current prediction start time is then combined with the first prediction duration L. P The sum of these times is used as the corresponding current prediction end time; and the current prediction start time and the current prediction end time together form the corresponding current prediction period.
[0020] Step 44: Extract all data records of the first transformer area that have a temporal intersection between the second collection period and the current prediction period in the first transformer area dataset to form a corresponding current transformer area data record set; extract the M2 first photovoltaic power generation load totals with the earliest time in the current transformer area data record set as corresponding M2 first power generation load labels and sort them in chronological order to form a corresponding first power generation load label vector; extract the M2 first energy storage load totals with the earliest time in the current transformer area data record set as corresponding M2 first energy storage load labels and sort them in chronological order to form a corresponding first energy storage load label vector; and then... The total charging load of the first electric vehicle from the earliest M2 records in the current transformer area data set is extracted as the corresponding M2 first charging load tags, and sorted in chronological order to form a corresponding first charging load tag vector; the total daily electricity consumption from the earliest M2 records in the current transformer area data set is extracted as the corresponding M2 first daily load tags, and sorted in chronological order to form a corresponding first daily load tag vector; and the obtained first generation load tag vector, first energy storage load tag vector, first charging load tag vector, and first daily load tag vector are combined to form a corresponding first electricity consumption load tag tensor;
[0021] Step 45: Cluster the first vehicle data records with the same first vehicle identifier in the current segmented dataset into one class, and sort all the first vehicle data records in the same class according to the chronological order to form the corresponding first record sequence.
[0022] Step 46: Each of the first record sequences is taken as the corresponding current record sequence; and a corresponding first vehicle embedding encoding vector is set for the current record sequence according to the vector data format of the first vehicle embedding encoding vector as the corresponding current encoding vector; the encoding values of all codes in all first time point encoding groups of the current encoding vector are initialized to 0; and a correspondence is established between each of the first vehicle data records in the current record sequence and a first time period encoding group in the current encoding vector according to the time period correspondence; and a round of traversal is performed on all the first vehicle data records in the current record sequence; and during this round of traversal, the currently traversed first vehicle data record is taken as the corresponding current record; and the first location type, first vehicle type, first parking status, first starting travel status, first navigation mode, and the first vehicle data record are set as the current record. The first charging mode is individually encoded to obtain the corresponding current location type code, current vehicle type code, current parking status code, current start travel status code, current navigation mode code, and current charging mode code. Based on a preset charging power embedding encoding rule, the first charging power of the currently recorded data is embedded and encoded to obtain the corresponding current charging power code. Based on the obtained current location type code, current vehicle type code, current parking status code, current start travel status code, current navigation mode code, current charging mode code, and current charging power code, the encoding values of the location type code, vehicle type code, parking status code, start travel status code, navigation mode code, charging mode code, and charging power code in the first time period encoding group corresponding to the current record in the current encoding vector are reset.
[0023] Step 47: After setting all the first vehicle embedding encoding vectors corresponding to the current segmented dataset, a corresponding first vehicle embedding encoding tensor is formed by all the first vehicle embedding encoding vectors corresponding to the current segmented dataset; and a corresponding first data record is formed by the first vehicle embedding encoding tensor corresponding to the current segmented dataset and the first electricity load label vector.
[0024] Step 48: Identify whether the current segmented dataset is the last first segmented dataset; if not, take the next first segmented dataset as the new current segmented dataset and return to step 43; if yes, then the corresponding first dataset is composed of all the obtained first data records.
[0025] Preferably, training the transformer area load prediction model based on the first dataset specifically includes:
[0026] Step 51: Based on a preset first segmentation ratio, the first dataset is divided into two data subsets, denoted as the first training set and the first evaluation set.
[0027] Wherein, both the first training set and the first evaluation set include multiple first data records; the ratio of the total number of records in the first training set and the first evaluation set satisfies the first segmentation ratio;
[0028] Step 52: Take the first data record of the first training set as the corresponding current training record;
[0029] Step 53: Input the first vehicle embedding encoding tensor of the current training record as the corresponding vehicle embedding encoding tensor into the transformer area load prediction model to perform transformer area power load prediction processing, and use the transformer area load prediction tensor output by the model as the corresponding first power load prediction tensor.
[0030] Step 54: Input the first power load prediction tensor and the first power load label tensor of the current training record into the preset first model loss function; and modulate the model parameters of the transformer area load prediction model in one round based on the preset first model optimizer in the direction of minimizing the first model loss function.
[0031] Wherein, the first model loss function includes at least the L1 loss function, the L2 loss function, and the cross-entropy loss function; the first model optimizer includes at least the SGD optimizer and the Adam optimizer;
[0032] Step 55: Identify whether the current training record is the last first data record in the first training set; if not, take the next first data record as the new current training record and return to step 53; if yes, proceed to step 56.
[0033] Step 56: Perform a traversal of all the first data records in the first evaluation set; during this traversal, take the currently traversed first data record as the corresponding current evaluation record; input the first vehicle embedding code tensor of the current evaluation record as the corresponding vehicle embedding code tensor into the transformer area load prediction model for transformer area power load prediction processing, and take the transformer area load prediction tensor output by the model as the corresponding second power load prediction tensor; and form a corresponding first prediction-label pair by the second power load prediction tensor and the first power load label tensor of the current evaluation record; and at the end of this traversal, input all the obtained first prediction-label pairs into the preset first model evaluation function to calculate the corresponding first evaluation value;
[0034] The first model evaluation function includes at least the RMSE function;
[0035] Step 57: Identify whether the first evaluation value meets the preset first evaluation value range; if not, return to step 52 to continue training; if it meets the range, stop model training and confirm that the prediction model training is complete.
[0036] Preferably, the method of using the transformer area load prediction model is based on the most recent first sampling duration L in the first vehicle dataset. S The collected data and the first prediction duration L P The forecast of various types of electricity load in the first forecast period of the first transformer area is carried out, specifically including:
[0037] Step 61: Periodically use the current time as the corresponding first sampling end time according to a preset first time frequency; and subtract the first sampling duration L from the first sampling end time. S The obtained time is used as the corresponding first sampling start time; and the first sampling start time and the first sampling end time constitute the corresponding first sampling period; and the first sampling end time is compared with the first interval duration L. A The sum of these two times is used as the corresponding first prediction start time; and the first prediction start time is then combined with the first prediction duration L. P The summation of the times is taken as the corresponding first prediction end time; and the first prediction start time and the first prediction end time constitute the corresponding first prediction period.
[0038] Step 62: Extract all the first data records in the first vehicle dataset that have a time intersection with the first collection period and the first sampling period, sort them in chronological order, and form the corresponding sampled vehicle dataset.
[0039] Step 63: Cluster the first vehicle data records with the same first vehicle identifier in the sampled vehicle dataset into one category, and sort all the first vehicle data records in the same category in chronological order to form the corresponding second single vehicle record sequence.
[0040] Step 64: Each second vehicle record sequence is taken as the corresponding current vehicle record sequence; a corresponding second vehicle embedding encoding vector is set for the current vehicle record sequence according to the vector data format of the first vehicle embedding encoding vector; the encoding values of all codes in all first time point encoding groups of the current vehicle embedding encoding vector are initialized to 0; a correspondence is established between each first vehicle data record in the current vehicle record sequence and a first time period encoding group within the current vehicle embedding encoding vector according to the time period correspondence; a traversal is performed on all first vehicle data records in the current vehicle record sequence; during this traversal, the currently traversed first vehicle data record is taken as the corresponding current record; and one-hot encoding is performed on the first location type, first vehicle type, first parking status, first starting travel status, first navigation mode, and first charging mode of the current record to obtain the corresponding... The system generates the following codes: current location type code, current vehicle type code, current parking status code, current starting travel status code, current navigation mode code, and current charging mode code. Based on a preset charging power embedding code rule, the system embeds and encodes the first charging power of the currently recorded data to obtain the corresponding current charging power code. Based on the obtained current location type code, current vehicle type code, current parking status code, current starting travel status code, current navigation mode code, current charging mode code, and current charging power code, the system resets the encoding values of the location type code, vehicle type code, parking status code, starting travel status code, navigation mode code, charging mode code, and charging power code in the first time period encoding group corresponding to the current record in the current vehicle embedding encoding vector. At the end of this round of traversal, all the second vehicle embedding encoding vectors corresponding to the sampled vehicle dataset are combined to form a corresponding second vehicle embedding encoding tensor.
[0041] Step 65: Input the second vehicle embedding coding tensor as the corresponding vehicle embedding coding tensor into the transformer area load prediction model to perform transformer area power load prediction processing, and use the transformer area load prediction tensor output by the model as the corresponding first transformer area load prediction tensor.
[0042] Step 66: Based on the photovoltaic power station load prediction vector, energy storage load prediction vector, electric vehicle charging load prediction vector, and daily electricity load prediction vector of the first distribution area load prediction tensor, construct the time curves of the four types of electricity loads within the first prediction period to obtain the corresponding photovoltaic power station load prediction curve, energy storage load prediction curve, charging load prediction curve, and daily electricity load prediction curve; and form the corresponding first distribution area load prediction curve set by the constructed time curves of the four types of electricity loads.
[0043] Step 67: Use the unique transformer area identifier of the first transformer area as the corresponding first transformer area identifier; use the preset data monitoring interface of the power grid management system as the corresponding first monitoring interface; and use the first transformer area identifier, the first prediction period, the first transformer area load prediction tensor, and the first transformer area load prediction curve set to form the corresponding first transformer area prediction record; and send the first transformer area prediction record to the power grid management system through the first monitoring interface.
[0044] This invention provides a method for predicting transformer substation load based on electric vehicle data. As described above, this invention collects vehicle datasets from all electric vehicles operating within the transformer substation's power supply area around the clock, and also collects substation datasets from various types of electrical loads within the substation area around the clock. A substation load prediction model is constructed to predict multiple types of electrical loads within the substation area based on the vehicle embedding encoding tensor input to the model. The model training dataset is then built based on the vehicle / substation datasets to train the substation load prediction model. After model training, the substation load prediction model is used to predict various types of electrical loads within a specified future time period based on the most recently collected data from the vehicle dataset. This invention solves the technical problem of how to predict various types of electrical loads within a transformer substation based on electric vehicle data. Attached Figure Description
[0045] Figure 1 A schematic diagram of a method for predicting transformer load based on electric vehicle data, provided in an embodiment of the present invention;
[0046] Figure 2 This is a schematic diagram of the data structure of the first vehicle dataset, the first platform dataset, and the first segment dataset provided in an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of the modules of the transformer area load prediction model provided in an embodiment of the present invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0049] This invention provides a method for predicting the load of a distribution substation based on electric vehicle data for intelligent terminals or systems on the smart grid side. The method is as follows: Figure 1 A schematic diagram of a method for predicting transformer load based on electric vehicle data, provided by an embodiment of the present invention, is shown, mainly including the following steps:
[0050] Step 1: Record the power supply area of the first transformer substation as the corresponding first area; collect all electric vehicles traveling in the first area around the clock to obtain the corresponding first vehicle dataset; and collect all types of power loads in the first transformer substation around the clock to obtain the corresponding first transformer substation dataset.
[0051] Here, as Figure 2 The data structure diagram of the first vehicle dataset, the first substation dataset, and the first segmented dataset provided in this embodiment of the invention is shown. The first vehicle dataset includes multiple first vehicle data records. Each first vehicle data record includes a first collection period, a first vehicle identifier, a first location type, a first vehicle type, a first parking status, a first start-up status, a first navigation mode, a first charging mode, and a first charging level. The first collection period includes a first period start time and a first period end time; the period length between the first period start time and the first period end time is fixed and denoted as the first period length ΔL1. The first vehicle identifier is a unique identifier for the corresponding electric vehicle. The first location type is used to mark the location type of the corresponding electric vehicle in the current period; the first location type includes commercial areas. The system includes: locations, residential areas, and roads; the first vehicle type includes private cars and commercial vehicles; the first parking status is used to mark the parking status of the corresponding electric vehicle in the current time period, including yes and no; the first starting trip status is used to mark whether the corresponding electric vehicle is in the starting trip period in the current time period, including yes and no; the first navigation mode is used to mark the navigation mode used by the corresponding electric vehicle in the current time period, including the shortest driving route navigation mode and the shortest driving time navigation mode; the first charging mode is used to mark whether the corresponding electric vehicle is in the charging state in the current time period and the corresponding charging mode, including not charging, regular charging, and fast charging; the first charging amount is the total charging amount of the corresponding electric vehicle in the current time period, and the first charging amount is 0 when the first charging mode is not charging.
[0052] like Figure 2 As shown, the first distribution area dataset of this embodiment includes multiple first distribution area data records; the first distribution area data records include a second collection period, a first grid distribution total, a first photovoltaic power generation load total, a first energy storage load total, a first electric vehicle charging load total, and a first daily electricity consumption load total; the second collection period includes a second period start time and a second period end time, and the period length between the second period start time and the second period end time is fixed and denoted as the second period length ΔL2; the first grid distribution total is the total grid-side power distribution of the first distribution area in the current second collection period; the first photovoltaic power generation load total is the total electricity consumption generated by all photovoltaic power generation stations in the first distribution area in the current second collection period; the first energy storage load total is the total electricity consumption consumed by all energy storage facilities in the first distribution area in the current second collection period; the first electric vehicle charging load total is the total electricity consumption consumed by all charging piles in the first distribution area in the current second collection period; and the first daily electricity consumption load total is the total daily residential and industrial / commercial electricity consumption generated in the first distribution area in the current second collection period.
[0053] Step 2: Construct a load forecasting model for the transformer substation area.
[0054] Here, the transformer area load prediction model of this embodiment of the invention is used to perform transformer area power load prediction processing based on the vehicle embedded coding tensor input to the model and output the corresponding transformer area load prediction tensor; wherein, the transformer area load prediction tensor includes at least the photovoltaic power station load prediction vector, the energy storage load prediction vector, the electric vehicle charging load prediction vector, and the daily power load prediction vector.
[0055] like Figure 3 The schematic diagram of the transformer area load prediction model provided in this embodiment of the invention is shown. The transformer area load prediction model in this embodiment of the invention consists of a feature extraction network and a regression prediction network.
[0056] It should be noted that the transformer area load prediction model in this embodiment of the invention has at least two implementation methods: one based on the Transformer model and the other based on the Bi-LSTM model. When the transformer area load prediction model is implemented based on the Transformer model, the feature extraction network and the regression prediction network are implemented based on the encoder and decoder of the Transformer model, respectively. When the transformer area load prediction model is implemented based on the Bi-LSTM model, the feature extraction network is implemented by connecting a CNN network with a linear layer, and the regression prediction network is implemented by connecting a Bi-LSTM model with an MLP network.
[0057] It should also be noted that the feature extraction network of the transformer area load forecasting model is used to receive the vehicle embedding encoding tensor input to the model, and to perform electric vehicle electricity consumption feature extraction processing on the vehicle embedding encoding tensor to obtain the corresponding electric vehicle electricity consumption feature tensor, which is then sent to the regression prediction network; the regression prediction network of the transformer area load forecasting model is used to perform multi-class electricity load forecasting processing based on the electric vehicle electricity consumption feature tensor to obtain the corresponding transformer area load forecasting tensor and output it.
[0058] Step 3, set the data sampling duration to the first sampling duration L. S And set the prediction interval to the first interval length L; A And set the prediction duration to the first prediction duration L; P Based on the first vehicle dataset, the first transformer area dataset, and the first sampling duration L S First interval duration L A And the first prediction duration L P The model training dataset is denoted as the first dataset; and the load prediction model for the transformer area is trained based on the first dataset.
[0059] Specifically, this includes: Step 31, setting the data sampling duration to the first sampling duration L. S And set the prediction interval to the first interval length L; A And set the prediction duration to the first prediction duration L; P ;
[0060] Here, the first sampling duration L in this embodiment of the invention S It is an integer multiple of the first time period length △L1; the first prediction duration L P It is an integer multiple of the length of the second time period △L2;
[0061] Step 32, based on the first vehicle dataset, the first transformer area dataset, and the first sampling duration L S First interval duration L A And the first prediction duration L P The dataset used to build the model training dataset is denoted as the first dataset.
[0062] The first dataset includes multiple first data records; each first data record includes a first vehicle embedding encoding tensor and a first electricity load label tensor; the first vehicle embedding encoding tensor consists of multiple first vehicle embedding encoding vectors; each first vehicle embedding encoding vector corresponds to one electric vehicle; all first vehicle embedding encoding vectors have the same vector length M1, where M1 = L. S / △L1; The first vehicle embedding encoding vector is composed of M1 first time period encoding groups arranged in chronological order; each first time period encoding group corresponds to a first vehicle data record; the first time period encoding group includes location type encoding, vehicle type encoding, parking status encoding, start trip status encoding, navigation mode encoding, charging mode encoding, and charging power encoding; the first electricity load label tensor includes the first generation load label vector, the first energy storage load label vector, the first charging load label vector, and the first daily load label vector, and the four label vectors have the same vector length M2, M2 = L P / △L2; The first generation load label vector is formed by sequentially sorting M2 first generation load labels; the first energy storage load label vector is formed by sequentially sorting M2 first energy storage load labels; the first charging load label vector is formed by sequentially sorting M2 first charging load labels; the first daily load label vector is formed by sequentially sorting M2 first daily load labels;
[0063] The current step 32 specifically includes: Step 321, according to the first sampling duration L S The first vehicle dataset is sequentially segmented to obtain multiple corresponding first segment datasets;
[0064] Each first segment dataset consists of multiple first vehicle data records; and the time span of each first segment dataset is the first sampling duration L. S ;
[0065] Step 322: Take the first first segment dataset as the corresponding current segment dataset;
[0066] Step 323: Take the segment end time of the current segmented dataset as the corresponding current end time; and divide the current end time by the first interval duration L. A The sum of these times is used as the current prediction start time; and the current prediction start time is then combined with the first prediction duration L. P The sum of these times is used as the corresponding current prediction end time; and the current prediction start time and current prediction end time together form the corresponding current prediction period.
[0067] Step 324: Extract all data records from the first transformer area that have a temporal intersection with the second collection period and the current prediction period in the first transformer area data set to form the corresponding current transformer area data record set; extract the M2 first photovoltaic power generation load totals from the current transformer area data record set as the corresponding M2 first power generation load labels and sort them in chronological order to form a corresponding first power generation load label vector; extract the M2 first energy storage load totals from the current transformer area data record set as the corresponding M2 first energy storage load labels and sort them in chronological order to form a corresponding first energy storage load label vector; and Extract the total charging load of the M2 earliest first electric vehicles from the current data record set of the transformer area as the corresponding M2 first charging load labels, and sort them in chronological order to form a corresponding first charging load label vector; extract the total daily electricity consumption of the M2 earliest first daily electricity consumption from the current data record set of the transformer area as the corresponding M2 first daily load labels, and sort them in chronological order to form a corresponding first daily load label vector; and combine the obtained first generation load label vector, first energy storage load label vector, first charging load label vector, and first daily load label vector to form a corresponding first electricity consumption label tensor;
[0068] Step 325: Cluster the first vehicle data records with the same first vehicle identifier in the current segmented dataset into one class, and sort all the first vehicle data records in the same class according to the chronological order to form the corresponding first record sequence.
[0069] Step 326: Each first record sequence is used as the corresponding current record sequence; a corresponding first vehicle embedding encoding vector is set for the current record sequence according to the vector data format of the first vehicle embedding encoding vector; the encoding values of all codes in all first time point encoding groups of the current encoding vector are initialized to 0; a correspondence is established between each first vehicle data record in the current record sequence and a first time period encoding group within the current encoding vector according to the time period correspondence; a traversal is performed on all first vehicle data records in the current record sequence; during this traversal, the currently traversed first vehicle data record is used as the corresponding current record; and the first location type, first vehicle type, first parking status, first starting travel status, first navigation mode, and... The first charging mode is individually encoded to obtain the corresponding current location type code, current vehicle type code, current parking status code, current start travel status code, current navigation mode code, and current charging mode code. Based on the preset charging power embedding encoding rules, the first charging power of the currently recorded data is embedded and encoded to obtain the corresponding current charging power code. Based on the obtained current location type code, current vehicle type code, current parking status code, current start travel status code, current navigation mode code, current charging mode code, and current charging power code, the encoding values of the location type code, vehicle type code, parking status code, start travel status code, navigation mode code, charging mode code, and charging power code of the first time period encoding group corresponding to the current record in the current encoding vector are reset.
[0070] Here, the charging power embedding coding rules can be customized based on application requirements. By default, a normalized embedding coding method can be used for coding. For example, the rated load of the transformer area can be used as the maximum load to normalize all charging power, or the rated load of the charging pile can be used as the maximum load to normalize all charging power.
[0071] Step 327: After setting all the first vehicle embedding encoding vectors corresponding to the current segmented dataset, a corresponding first vehicle embedding encoding tensor is formed by all the first vehicle embedding encoding vectors corresponding to the current segmented dataset; and a corresponding first data record is formed by the first vehicle embedding encoding tensor corresponding to the current segmented dataset and the first electricity load label vector.
[0072] Step 328: Identify whether the current segmented dataset is the last first segmented dataset; if not, use the next first segmented dataset as the new current segmented dataset and return to step 323; if yes, the corresponding first dataset is composed of all the obtained first data records.
[0073] Step 33, and train the transformer area load prediction model based on the first dataset;
[0074] Specifically, it includes: Step 331, dividing the first dataset into two data subsets based on a preset first segmentation ratio, denoted as the corresponding first training set and first evaluation set;
[0075] Wherein, the first segmentation ratio is a pre-set ratio parameter, such as 8:2; both the first training set and the first evaluation set include multiple first data records; the ratio of the total number of records in the first training set and the first evaluation set satisfies the first segmentation ratio;
[0076] Step 332: Take the first data record of the first training set as the corresponding current training record;
[0077] Step 333: Input the first vehicle embedding encoding tensor of the current training record as the corresponding vehicle embedding encoding tensor into the transformer area load prediction model to perform transformer area power load prediction processing, and use the transformer area load prediction tensor output by the model as the corresponding first power load prediction tensor.
[0078] Step 334: Input the first power load prediction tensor and the first power load label tensor of the current training record into the preset first model loss function; and modulate the model parameters of the transformer area load prediction model in one round based on the preset first model optimizer in the direction of minimizing the first model loss function;
[0079] The first model loss function includes at least the L1 loss function, the L2 loss function, and the cross-entropy loss function; the first model optimizer includes at least the SGD optimizer and the Adam optimizer.
[0080] Step 335: Identify whether the current training record is the last first data record of the first training set; if not, take the next first data record as the new current training record and return to step 333; if yes, proceed to step 336.
[0081] Step 336: Perform a traversal of all first data records in the first evaluation set; during this traversal, take the currently traversed first data record as the corresponding current evaluation record; input the first vehicle embedding code tensor of the current evaluation record as the corresponding vehicle embedding code tensor into the transformer area load prediction model for transformer area power load prediction processing, and take the transformer area load prediction tensor output by the model as the corresponding second power load prediction tensor; and form a corresponding first prediction-label pair by the second power load prediction tensor and the first power load label tensor of the current evaluation record; and at the end of this traversal, input all the obtained first prediction-label pairs into the preset first model evaluation function to calculate the corresponding first evaluation value;
[0082] The first model evaluation function includes at least the RMSE function;
[0083] Step 337: Identify whether the first evaluation value meets the preset first evaluation value range; if not, return to step 332 to continue training; if it meets the range, stop model training and confirm that the prediction model training is complete.
[0084] Here, the first evaluation value range is a pre-set numerical range.
[0085] Step 4: After model training is complete, the transformer area load prediction model is used based on the most recent first sampling time L in the first vehicle dataset. S The collected data and the first prediction duration L P Forecast the various types of electricity loads in the first forecast period of the first transformer area;
[0086] Wherein, the interval between the start time and the current time of the first prediction period is the first interval duration L. A The length of the first prediction period is the first prediction duration L. P ;
[0087] Specifically, this includes: Step 41, periodically using the current time as the corresponding first sampling end time according to a preset first time frequency; and subtracting the first sampling duration L from the first sampling end time. S The obtained time is used as the corresponding first sampling start time; and the first sampling start time and the first sampling end time constitute the corresponding first sampling period; and the first sampling end time is combined with the first interval duration L. A The sum of these two times is used as the corresponding first prediction start time; and the first prediction start time is then combined with the first prediction duration L. P The sum of the two times is taken as the corresponding first prediction end time; and the first prediction start time and the first prediction end time constitute the corresponding first prediction period.
[0088] Here, the first time frequency is a preset time frequency parameter;
[0089] Step 42: Extract all the first data records in the first vehicle dataset that have a time intersection with the first collection period and the first sampling period, sort them in chronological order, and form the corresponding sampled vehicle dataset.
[0090] Step 43: Cluster the first vehicle data records with the same first vehicle identifier in the sampled vehicle dataset into one class, and sort all the first vehicle data records in the same class according to the chronological order to form the corresponding second single vehicle record sequence.
[0091] Step 44: Each second vehicle record sequence is used as the corresponding current vehicle record sequence; a corresponding second vehicle embedding encoding vector is set for the current vehicle record sequence according to the vector data format of the first vehicle embedding encoding vector; the encoding values of all codes in all first time point encoding groups of the current vehicle embedding encoding vector are initialized to 0; a correspondence is established between each first vehicle data record in the current vehicle record sequence and a first time period encoding group within the current vehicle embedding encoding vector according to the time period correspondence; a traversal is performed on all first vehicle data records in the current vehicle record sequence; during this traversal, the currently traversed first vehicle data record is used as the corresponding current record; and one-hot encoding is performed on the first location type, first vehicle type, first parking status, first starting travel status, first navigation mode, and first charging mode of the current record to obtain... The system generates the corresponding current location type code, current vehicle type code, current parking status code, current start travel status code, current navigation mode code, and current charging mode code. Based on the charging power embedding encoding rules, it embeds and encodes the first charging power of the current record to obtain the corresponding current charging power code. Based on the obtained current location type code, current vehicle type code, current parking status code, current start travel status code, current navigation mode code, current charging mode code, and current charging power code, it resets the encoding values of the location type code, vehicle type code, parking status code, start travel status code, navigation mode code, charging mode code, and charging power code of the first time period encoding group corresponding to the current record in the current vehicle embedding encoding vector. At the end of this round of traversal, a corresponding second vehicle embedding encoding tensor is formed by all the second vehicle embedding encoding vectors corresponding to the sampled vehicle dataset.
[0092] Step 45: Input the second vehicle embedding coding tensor as the corresponding vehicle embedding coding tensor into the transformer area load prediction model to perform transformer area power load prediction processing, and use the transformer area load prediction tensor output by the model as the corresponding first transformer area load prediction tensor.
[0093] Step 46: Based on the photovoltaic power station load prediction vector, energy storage load prediction vector, electric vehicle charging load prediction vector, and daily electricity load prediction vector of the first distribution area load prediction tensor, construct the time curves of the four types of electricity loads in the first prediction period to obtain the corresponding photovoltaic power station load prediction curve, energy storage load prediction curve, charging load prediction curve, and daily electricity load prediction curve; and form the corresponding first distribution area load prediction curve set by the constructed time curves of the four types of electricity loads.
[0094] Step 47: Use the unique identifier of the first transformer area as the corresponding first transformer area identifier; use the preset data monitoring interface of the power grid management system as the corresponding first monitoring interface; and use the first transformer area identifier, the first prediction period, the first transformer area load prediction tensor, and the first transformer area load prediction curve set to form the corresponding first transformer area prediction record; and send the first transformer area prediction record to the power grid management system through the first monitoring interface.
[0095] In summary, this invention provides a method for predicting transformer substation load based on electric vehicle data. As described above, this invention collects vehicle datasets from all electric vehicles operating within the transformer substation's power supply area around the clock, and collects transformer substation datasets from various types of electrical loads within the substation area around the clock. It then constructs a transformer substation load prediction model to predict multiple types of electrical loads within the substation area based on the vehicle embedding encoding tensor input to the model. A model training dataset is built based on the vehicle / substation datasets to train the transformer substation load prediction model. After model training, the transformer substation load prediction model is used to predict various types of electrical loads within a specified future time period based on the most recently collected data from the vehicle dataset. This invention solves the technical problem of how to predict various types of electrical loads within a transformer substation based on electric vehicle data.
[0096] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0097] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0098] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting transformer load based on electric vehicle data, characterized in that, The method includes: The power supply area of the first transformer substation is designated as the corresponding first area; all electric vehicles traveling within the first area are collected around the clock to obtain the corresponding first vehicle dataset; and various types of power loads in the first transformer substation are collected around the clock to obtain the corresponding first transformer substation dataset; the first vehicle dataset includes multiple first vehicle data records; the first vehicle data record includes a first collection period, a first vehicle identifier, a first location type, a first vehicle type, a first parking status, a first starting travel status, a first navigation mode, a first charging mode, and a first charging amount; the first vehicle identifier is a unique identifier for the corresponding electric vehicle; the first navigation mode includes a shortest driving route navigation mode and a shortest driving time navigation mode; the first transformer substation dataset includes multiple first transformer substation data records; the first transformer substation data records include a second collection period, a first total grid power distribution, a first total photovoltaic power generation load, a first total energy storage load, a first total electric vehicle charging load, and a first total daily power load; A transformer area load prediction model is constructed. The transformer area load prediction model is used to perform transformer area electricity load prediction processing based on the vehicle embedding encoding tensor input to the model and output the corresponding transformer area load prediction tensor. The transformer area load prediction tensor includes at least the photovoltaic power station load prediction vector, the energy storage load prediction vector, the electric vehicle charging load prediction vector, and the daily electricity load prediction vector. Set the data sampling duration to the first sampling duration L. S And set the prediction interval to the first interval length L; A And set the prediction duration to the first prediction duration L; P Based on the first vehicle dataset, the first transformer area dataset, and the first sampling duration L... S The first interval duration L A and the first prediction duration L P A training dataset for the model is constructed and denoted as the first dataset; and the load prediction model for the transformer area is trained based on the first dataset; After the model training is completed, the load prediction model for the transformer area is used to predict the load based on the most recent sampling duration L in the first vehicle dataset. S The collected data and the first prediction duration L P The electricity load of the first transformer area during the first forecast period is predicted; the interval between the start time and the current time of the first forecast period is the first interval length L. A The length of the first prediction period is the first prediction duration L. P .
2. The method for processing transformer load prediction based on electric vehicle data according to claim 1, characterized in that, The first data collection period includes the start time and end time of the first period. The length of the period between the start time and the end time of the first period is fixed and denoted as the first period length △L1. The first location type is used to mark the location type of the corresponding electric vehicle in the current period. The first location type includes commercial places, residential areas, and roads. The first vehicle type includes private cars and commercial vehicles. The first parking status is used to mark the parking status of the corresponding electric vehicle in the current time period, and the first parking status includes yes and no; the first start trip status is used to mark whether the corresponding electric vehicle is in the start trip period in the current time period, and the first start trip status includes yes and no; the first navigation mode is used to mark the navigation mode used by the corresponding electric vehicle in the current time period. The first charging mode is used to mark whether the corresponding electric vehicle is in a charging state and the corresponding charging mode during the current period. The first charging mode includes not charging, regular charging and fast charging. The first charging amount is the total charging amount of the corresponding electric vehicle during the current period. When the first charging mode is not charging, the first charging amount is 0. The second data collection period includes the start time and end time of the second period. The length of the period between the start time and end time of the second period is fixed and denoted as the second period length ΔL2. The first total power grid distribution is the total power distribution of the first distribution area on the grid side during the current second data collection period. The first total photovoltaic power generation load is the total electricity load generated by all photovoltaic power stations in the first distribution area during the current second data collection period. The first total energy storage load is the total electricity load consumed by all energy storage facilities in the first distribution area during the current second data collection period. The first total electric vehicle charging load is the total electricity load consumed by all charging piles in the first distribution area during the current second data collection period. The first total daily electricity load is the total daily residential and industrial / commercial electricity load generated in the first distribution area during the current second data collection period. The first sampling duration L S It is an integer multiple of the first time period length △L1; the first prediction duration L P It is an integer multiple of the second time period length △L2; The first dataset includes multiple first data records; each first data record includes a first vehicle embedding encoding tensor and a first electricity load label tensor; the first vehicle embedding encoding tensor is composed of multiple first vehicle embedding encoding vectors; each first vehicle embedding encoding vector corresponds to an electric vehicle; all first vehicle embedding encoding vectors have the same vector length M1, where M1=L. S / △L1; The first vehicle embedding encoding vector is composed of M1 first time period encoding groups arranged in chronological order; each first time period encoding group corresponds to a first vehicle data record; the first time period encoding group includes location type encoding, vehicle type encoding, parking status encoding, start trip status encoding, navigation mode encoding, charging mode encoding, and charging power encoding; The first electricity load label tensor includes a first generation load label vector, a first energy storage load label vector, a first charging load label vector, and a first daily load label vector. All four label vectors have the same length, M2, where M2 = L. P / △L2; The first power generation load label vector is formed by sequentially sorting M2 first power generation load labels; the first energy storage load label vector is formed by sequentially sorting M2 first energy storage load labels; the first charging load label vector is formed by sequentially sorting M2 first charging load labels; the first daily load label vector is formed by sequentially sorting M2 first daily load labels.
3. The method for processing transformer load prediction based on electric vehicle data according to claim 2, characterized in that, The transformer area load prediction model comprises a feature extraction network and a regression prediction network. The model has at least two implementation methods: one based on a Transformer model and the other based on a Bi-LSTM model. When implemented using a Transformer model, the feature extraction network and the regression prediction network are implemented using the encoder and decoder of the Transformer model, respectively. When implemented using a Bi-LSTM model, the feature extraction network is implemented by connecting a CNN network with linear layers, and the regression prediction network is implemented by connecting a Bi-LSTM model with an MLP network. The feature extraction network is used to receive the vehicle embedding encoding tensor input from the model, and to perform electric vehicle electricity consumption feature extraction processing on the vehicle embedding encoding tensor to obtain the corresponding electric vehicle electricity consumption feature tensor, which is then sent to the regression prediction network; the regression prediction network is used to perform multi-class electricity load prediction processing based on the electric vehicle electricity consumption feature tensor to obtain the corresponding transformer area load prediction tensor and output it.
4. The method for processing transformer load prediction based on electric vehicle data according to claim 2, characterized in that, The data is based on the first vehicle dataset, the first transformer area dataset, and the first sampling duration L. S The first interval duration L A and the first prediction duration L P The dataset used to build the model training dataset is denoted as the first dataset, and it specifically includes: Step 41, according to the first sampling duration L S The first vehicle dataset is sequentially segmented to obtain multiple corresponding first segment datasets; Each of the first segment datasets consists of multiple first vehicle data records; and the time span of each first segment dataset is the first sampling duration L. S ; Step 42: Take the first first segment dataset as the corresponding current segment dataset; Step 43: Take the segment end time of the current segmented dataset as the corresponding current end time; and divide the current end time by the first interval duration L. A The sum of these times is used as the corresponding current prediction start time; and the current prediction start time is then combined with the first prediction duration L. P The sum of these times is used as the corresponding current prediction end time; and the current prediction start time and the current prediction end time together form the corresponding current prediction period. Step 44: Extract all data records of the first transformer area that have a temporal intersection between the second collection period and the current prediction period in the first transformer area dataset to form a corresponding current transformer area data record set; extract the M2 first photovoltaic power generation load totals with the earliest time in the current transformer area data record set as corresponding M2 first power generation load labels and sort them in chronological order to form a corresponding first power generation load label vector; extract the M2 first energy storage load totals with the earliest time in the current transformer area data record set as corresponding M2 first energy storage load labels and sort them in chronological order to form a corresponding first energy storage load label vector; and then... The total charging load of the first electric vehicle from the earliest M2 records in the current transformer area data set is extracted as the corresponding M2 first charging load tags, and sorted in chronological order to form a corresponding first charging load tag vector; the total daily electricity consumption from the earliest M2 records in the current transformer area data set is extracted as the corresponding M2 first daily load tags, and sorted in chronological order to form a corresponding first daily load tag vector; and the obtained first generation load tag vector, first energy storage load tag vector, first charging load tag vector, and first daily load tag vector are combined to form a corresponding first electricity consumption load tag tensor; Step 45: Cluster the first vehicle data records with the same first vehicle identifier in the current segmented dataset into one class, and sort all the first vehicle data records in the same class according to the chronological order to form the corresponding first record sequence. Step 46: Each of the first record sequences is taken as the corresponding current record sequence; and a corresponding first vehicle embedding encoding vector is set for the current record sequence according to the vector data format of the first vehicle embedding encoding vector as the corresponding current encoding vector; and the encoding values of all codes in all first time period encoding groups of the current encoding vector are initialized to 0; and a correspondence is established between each of the first vehicle data records in the current record sequence and a first time period encoding group in the current encoding vector according to the time period correspondence; and a traversal is performed on all the first vehicle data records in the current record sequence; and during this traversal, the currently traversed first vehicle data record is taken as the corresponding current record; and the first location type, first vehicle type, first parking status, first starting travel status, first navigation mode, and the... The first charging mode is individually encoded to obtain the corresponding current location type code, current vehicle type code, current parking status code, current start travel status code, current navigation mode code, and current charging mode code. Based on a preset charging power embedding encoding rule, the first charging power of the currently recorded data is embedded and encoded to obtain the corresponding current charging power code. Based on the obtained current location type code, current vehicle type code, current parking status code, current start travel status code, current navigation mode code, current charging mode code, and current charging power code, the encoding values of the location type code, vehicle type code, parking status code, start travel status code, navigation mode code, charging mode code, and charging power code in the first time period encoding group corresponding to the current record in the current encoding vector are reset. Step 47: After setting all the first vehicle embedding encoding vectors corresponding to the current segmented dataset, a corresponding first vehicle embedding encoding tensor is formed by all the first vehicle embedding encoding vectors corresponding to the current segmented dataset; and a corresponding first data record is formed by the first vehicle embedding encoding tensor corresponding to the current segmented dataset and the first electricity load label vector. Step 48: Identify whether the current segmented dataset is the last first segmented dataset; if not, take the next first segmented dataset as the new current segmented dataset and return to step 43; if yes, then the corresponding first dataset is composed of all the obtained first data records.
5. The method for processing transformer load prediction based on electric vehicle data according to claim 2, characterized in that, The step of training the transformer area load prediction model based on the first dataset specifically includes: Step 51: Based on a preset first segmentation ratio, the first dataset is divided into two data subsets, denoted as the first training set and the first evaluation set. Wherein, both the first training set and the first evaluation set include multiple first data records; the ratio of the total number of records in the first training set and the first evaluation set satisfies the first segmentation ratio; Step 52: Take the first data record of the first training set as the corresponding current training record; Step 53: Input the first vehicle embedding encoding tensor of the current training record as the corresponding vehicle embedding encoding tensor into the transformer area load prediction model to perform transformer area power load prediction processing, and use the transformer area load prediction tensor output by the model as the corresponding first power load prediction tensor. Step 54: Input the first power load prediction tensor and the first power load label tensor of the current training record into the preset first model loss function; and modulate the model parameters of the transformer area load prediction model in one round based on the preset first model optimizer in the direction of minimizing the first model loss function. Wherein, the first model loss function includes at least the L1 loss function, the L2 loss function, and the cross-entropy loss function; the first model optimizer includes at least the SGD optimizer and the Adam optimizer; Step 55: Identify whether the current training record is the last first data record in the first training set; if not, take the next first data record as the new current training record and return to step 53; if yes, proceed to step 56. Step 56: Perform a traversal of all the first data records in the first evaluation set; during this traversal, take the currently traversed first data record as the corresponding current evaluation record; input the first vehicle embedding code tensor of the current evaluation record as the corresponding vehicle embedding code tensor into the transformer area load prediction model for transformer area power load prediction processing, and take the transformer area load prediction tensor output by the model as the corresponding second power load prediction tensor; and form a corresponding first prediction-label pair by the second power load prediction tensor and the first power load label tensor of the current evaluation record; and at the end of this traversal, input all the obtained first prediction-label pairs into the preset first model evaluation function to calculate the corresponding first evaluation value; The first model evaluation function includes at least the RMSE function; Step 57: Identify whether the first evaluation value meets the preset first evaluation value range; if not, return to step 52 to continue training; if it meets the range, stop model training and confirm that the prediction model training is complete.
6. The method for processing transformer load prediction based on electric vehicle data according to claim 2, characterized in that, The load prediction model of the transformer area is used based on the most recent first sampling time L in the first vehicle dataset. S The collected data and the first prediction duration L P The forecast of various types of electricity load in the first forecast period of the first transformer area is carried out, specifically including: Step 61: Periodically use the current time as the corresponding first sampling end time according to a preset first time frequency; and subtract the first sampling duration L from the first sampling end time. S The obtained time is used as the corresponding first sampling start time; and the first sampling start time and the first sampling end time constitute the corresponding first sampling period; and the first sampling end time is compared with the first interval duration L. A The sum of these two times is used as the corresponding first prediction start time; and the first prediction start time is then combined with the first prediction duration L. P The summation of the times is taken as the corresponding first prediction end time; and the first prediction start time and the first prediction end time constitute the corresponding first prediction period. Step 62: Extract all the first data records in the first vehicle dataset that have a time intersection with the first collection period and the first sampling period, sort them in chronological order, and form the corresponding sampled vehicle dataset. Step 63: Cluster the first vehicle data records with the same first vehicle identifier in the sampled vehicle dataset into one category, and sort all the first vehicle data records in the same category in chronological order to form the corresponding second single vehicle record sequence. Step 64: Each second vehicle record sequence is taken as the corresponding current vehicle record sequence; a corresponding second vehicle embedding encoding vector is set for the current vehicle record sequence according to the vector data format of the first vehicle embedding encoding vector; the encoding values of all codes in all first time period encoding groups of the current vehicle embedding encoding vector are initialized to 0; a correspondence is established between each first vehicle data record in the current vehicle record sequence and a first time period encoding group in the current vehicle embedding encoding vector according to the time period correspondence; a traversal is performed on all first vehicle data records in the current vehicle record sequence; during this traversal, the currently traversed first vehicle data record is taken as the corresponding current record; and one-hot encoding is performed on the first location type, first vehicle type, first parking status, first starting travel status, first navigation mode, and first charging mode of the current record to obtain the corresponding current record. The system generates the following codes: current location type code, current vehicle type code, current parking status code, current starting travel status code, current navigation mode code, and current charging mode code. Based on a preset charging power embedding encoding rule, the system embeds and encodes the first charging power of the currently recorded data to obtain the corresponding current charging power code. Based on the obtained current location type code, current vehicle type code, current parking status code, current starting travel status code, current navigation mode code, current charging mode code, and current charging power code, the encoding values of the location type code, vehicle type code, parking status code, starting travel status code, navigation mode code, charging mode code, and charging power code in the first time period encoding group corresponding to the current record in the current vehicle embedding encoding vector are reset. At the end of this round of traversal, all the second vehicle embedding encoding vectors corresponding to the sampled vehicle dataset are combined to form a corresponding second vehicle embedding encoding tensor. Step 65: Input the second vehicle embedding coding tensor as the corresponding vehicle embedding coding tensor into the transformer area load prediction model to perform transformer area power load prediction processing, and use the transformer area load prediction tensor output by the model as the corresponding first transformer area load prediction tensor. Step 66: Based on the photovoltaic power station load prediction vector, energy storage load prediction vector, electric vehicle charging load prediction vector, and daily electricity load prediction vector of the first distribution area load prediction tensor, construct the time curves of the four types of electricity loads within the first prediction period to obtain the corresponding photovoltaic power station load prediction curve, energy storage load prediction curve, charging load prediction curve, and daily electricity load prediction curve; and form the corresponding first distribution area load prediction curve set by the constructed time curves of the four types of electricity loads. Step 67: Use the unique transformer area identifier of the first transformer area as the corresponding first transformer area identifier; use the preset data monitoring interface of the power grid management system as the corresponding first monitoring interface; and use the first transformer area identifier, the first prediction period, the first transformer area load prediction tensor, and the first transformer area load prediction curve set to form the corresponding first transformer area prediction record; and send the first transformer area prediction record to the power grid management system through the first monitoring interface.
Citation Information
Patent Citations
Processing method for predicting node load based on electric vehicle data
CN119721383A