Processing method for predicting node load based on electric vehicle data
By collecting and model training of electric vehicle data, the prediction of network node load is achieved, the problem of node-level power load regulation in the existing technology is solved, and the management capabilities of smart grids are improved.
Patent Information
- Application Number
- CN202411893181.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The prior art is difficult to dynamically regulate power load at the node level, and there is a lack of effective node load prediction methods.
By collecting all-weather data for electric vehicles in the power supply area of the network node, building vehicle and node data sets, and training node load prediction models to predict future power loads.
Accurate prediction of node load is achieved, which helps dynamic regulation of smart grids and improves the granularity of grid management.
Smart Images

Figure CN119721383A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a processing method for predicting node load based on electric vehicle data. Background Art
[0002] The distribution station area network can be divided into multiple network nodes in a grid manner, and the total load of all network nodes is the total load of the area. The management mode of the smart grid expects to perform node-level dynamic power regulation, and the premise is that the node-level power load prediction should be able to be achieved. Through data collection, it is found that for network nodes with electric vehicle charging piles in the power supply area, there is a correlation between the node power load data and the charging data of all electric vehicles (referred to as electric vehicles) in the area, and a series of related data of charging vehicles (such as the total number of vehicles, vehicle types, vehicle travel characteristics, etc.) are correlated with the charging data. It can be inferred that it is possible to predict the corresponding node load based on the collected electric vehicle data (referred to as electric vehicle data). How to predict the node load based on electric vehicle data is also the technical problem that the present invention needs to solve. Summary of the invention
[0003] The purpose of the present invention is to provide a processing method for predicting node load based on electric vehicle data in response to the defects of the prior art. The present invention collects data of all electric vehicles traveling in the power supply area of the network node around the clock to obtain a vehicle data set, and collects data of the power load of the network node around the clock to obtain a node data set; and constructs a model training data set based on the vehicle and node data sets and records it as the first data set; and based on the first data set, trains a node load prediction model for predicting node power load according to the vehicle embedded coding tensor input by the model; and after the model training is completed, uses the node load prediction model to predict the power load of the network node at a specified time in the future based on the collected data within the most recent specified time period in the vehicle data set. The present invention solves the technical problem of how to predict node load based on electric vehicle data.
[0004] To achieve the above object, an embodiment of the present invention provides a method for predicting node load based on electric vehicle data, the method comprising:
[0005] The power supply area of the first network node is recorded as the corresponding first area; and all-weather data collection is performed on all electric vehicles traveling in the first area to obtain a corresponding first vehicle data set; and all-weather data collection is performed on the power load of the first network node to obtain a corresponding first node data set;
[0006] Set the data sampling duration to the first sampling duration L S ; and set the prediction interval length to the first interval length LA ; and based on the first vehicle data set, the first node data set, the first sampling time L S and the first interval length L A The dataset for model training is recorded as the first dataset;
[0007] Constructing a node load prediction model; and training the node load prediction model based on the first data set; the node load prediction model is used to perform node power load prediction processing according to the vehicle embedded coding tensor input by the model and output the corresponding node load prediction amount;
[0008] After the model training is completed, the node load prediction model is used to calculate the first sampling time L in the first vehicle data set. S The collected data in the prediction is used to predict the power load of the first network node at the first prediction moment in the future; the interval between the first prediction moment and the current moment is the first interval length L A .
[0009] Preferably, the first vehicle data set includes multiple first vehicle data records; the first vehicle data record includes a first collection period, a first vehicle identification, a first location type, a first vehicle type, a first parking state, a first starting travel state, a first navigation mode, a first charging mode, and a first charging power; the first collection period includes a first period start time and a first period end time, and the period length between the first period start time and the first period end time is fixedly recorded as a first period length △L1; the first vehicle identification is a unique identification of 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 places, residential areas, and roads; the first vehicle type includes private cars and operating vehicle; the first parking state is used to mark the parking state of the corresponding electric vehicle in the current time period, and the first parking state includes yes and no; the first starting travel state is used to mark whether the corresponding electric vehicle is in the starting time period of travel in the current time period, and the first starting travel state 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 path 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 uncharged, regular charging and fast charging; the first charging power is the total charging power of the corresponding electric vehicle in the current time period, and the first charging mode is 0 when the first charging mode is uncharged;
[0010] The first node data set includes a plurality of first node data records; the first node data record includes a second collection period and a first node load total; the second collection period includes a second period start time and a second period end time, the period length between the second period start time and the second period end time is fixedly recorded as a second period length △L2, the second period length △L2 is N times the first period length △L1, N is a preset positive integer; the first node load total is the total power load of the first network node in the current second collection period;
[0011] The first sampling time L S is an integer multiple of the first time period length △L1;
[0012] The first data set includes multiple first data records; the first data record includes a first vehicle embedding coding tensor and a first power load label quantity; the first vehicle embedding coding tensor is composed of multiple first vehicle embedding coding vectors; each of the first vehicle embedding coding vectors corresponds to an electric vehicle; the vector lengths of all the first vehicle embedding coding vectors are equal to the vector length M, M=L S / △L1; the first vehicle embedded coding vector is composed of M first time period coding groups arranged in chronological order; each first time period coding group corresponds to one first vehicle data record; the first time period coding group includes a venue type code, a vehicle type code, a parking status code, a starting travel status code, a navigation mode code, a charging mode code, and a charging power code.
[0013] Preferably, the first vehicle data set, the first node data set, and the first sampling time L S and the first interval length L A The model training data set is recorded as the first data set, which specifically includes:
[0014] Step 31: according to the first sampling time L S Sequentially segmenting the first vehicle data set to obtain a corresponding plurality of first segmented data sets;
[0015] Each of the first segmented data sets is composed of a plurality of the first vehicle data records; and the time span of each of the first segmented data sets is the first sampling time length L S ;
[0016] Step 32, taking the first of the first segmented data sets as the corresponding current segmented data set;
[0017] Step 33: taking the segment end time of the current segment data set as the corresponding current end time; and summing the current end time with the first interval time L A The time obtained by adding them is used as the corresponding current prediction time; and the total load of the first node recorded in the first node data set corresponding to the second collection period whose start time of the second period in the first node data set is closest to the current prediction time is used as the corresponding current prediction load;
[0018] Step 34, grouping the first vehicle data records with the same first vehicle identifier in the current segmented data set into one category and sorting all the first vehicle data records belonging to the same category in chronological order to form a corresponding first single-vehicle record sequence;
[0019] Step 35, take each of the first bicycle record sequences as the corresponding current bicycle record sequence; and set a corresponding first vehicle embedded coding vector for the current bicycle record sequence as the corresponding current vehicle embedded coding vector according to the vector data format of the first vehicle embedded coding vector; and initialize the coding values of all the first time point coding groups of the current vehicle embedded coding vector to 0; and according to the time period correspondence, establish a correspondence between each of the first vehicle data records of the current bicycle record sequence and a first time period coding group in the current vehicle embedded coding vector; and perform a round of traversal of all the first vehicle data records of the current bicycle record sequence; and during this round of traversal, take the first vehicle data record currently traversed as the corresponding current record; and perform the first location type, the first vehicle type, the first parking state, the first starting travel state, the The first navigation mode and the first charging mode are respectively single-hot encoded to obtain the corresponding current place type code, current vehicle type code, current parking state code, current starting travel state code, current navigation mode code and current charging mode code; and based on a preset charging power embedding coding rule, the first charging power of the current record is embedded encoded to obtain the corresponding current charging power code; and based on the obtained current place type code, current vehicle type code, current parking state code, current starting travel state code, current navigation mode code, current charging mode code and current charging power code, the encoding values of the place type code, the vehicle type code, the parking state code, the starting travel state code, the navigation mode code, the charging mode code and the charging power code of the first time period code group corresponding to the current record in the current vehicle embedded coding vector are reset;
[0020] Step 36, after all the first vehicle embedding coding vectors corresponding to the current segmented data set are set, a corresponding first vehicle embedding coding tensor is formed by all the first vehicle embedding coding vectors corresponding to the current segmented data set; and the current predicted load corresponding to the current segmented data set is used as a corresponding first power load label quantity; and a corresponding first data record is formed by the first vehicle embedding coding tensor and the first power load label quantity corresponding to the current segmented data set;
[0021] Step 37, identifying whether the current segmented data set is the last of the first segmented data sets; if not, taking the next first segmented data set as the new current segmented data set and returning to step 33; if so, forming the corresponding first data set from all the obtained first data records.
[0022] Preferably, the node load prediction model includes a feature extraction network and a regression prediction network; the node load prediction model has at least two model implementation modes, one based on the Transformer model and the other based on the Bi-LSTM model; when the node 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 node 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;
[0023] The feature extraction network is used to receive the vehicle embedded coding tensor input by the model, and perform electric vehicle power consumption feature extraction processing on the vehicle embedded coding tensor to obtain the corresponding electric vehicle power consumption feature tensor and send it to the regression prediction network; the regression prediction network is used to perform node load prediction processing based on the electric vehicle power consumption feature tensor to obtain the corresponding node load prediction amount and output it.
[0024] Preferably, the training of the node load prediction model based on the first data set specifically includes:
[0025] Step 51, based on a preset first segmentation ratio, the first data set is divided into two data subsets recorded as a corresponding first training set and a first evaluation set;
[0026] Wherein, both the first training set and the first evaluation set include a plurality of the first data records; the ratio of the total number of records in the first training set and the first evaluation set meets the first segmentation ratio;
[0027] Step 52: Count the total number of records in the first data set to obtain the corresponding total number of records N r ; and based on the preset total number of single batch records B, the first data set is slid and divided into batches in a single-step sliding manner to obtain N b The first subset of records, 1 <B<N r , N b =N r -B+1;
[0028] The first batch of record subsets consists of B first data records, and the last B-1 first data records of the previous first batch of record subsets overlap with the first B-1 first data records of the next first batch of record subsets;
[0029] Step 53, taking the first of the first record subsets as the corresponding current subset;
[0030] Step 54, input the first vehicle embedded coding tensor of each of the first data records of the current subset as the corresponding vehicle embedded coding tensor into the node load prediction model to perform node power load prediction processing and use the node load prediction amount output by the model as the corresponding first power load prediction amount; and form a corresponding first prediction-label pair by the first power load prediction amount and the first power load label amount corresponding to each of the first data records of the current subset; and form a corresponding first prediction-label pair set by all the first prediction-label pairs corresponding to the current subset;
[0031] Step 55, bringing the first prediction-label pair set corresponding to the current subset into a preset first model loss function; and based on a preset first model optimizer, performing a round of modulation on the model parameters of the node load prediction model in a direction to minimize the first model loss function;
[0032] Wherein, the first model loss function includes at least an L1 loss function and an L2 loss function; the first model optimizer includes at least an SGD optimizer and an Adam optimizer;
[0033] Step 56, identifying whether the current subset is the last of the first batch of record subsets; if not, taking the next first batch of record subsets as the new current subset and returning to step 54; if yes, going to step 57;
[0034] Step 57, perform a round of traversal on all the first data records of the first evaluation set; and in this round of traversal, use the first data record currently traversed as the corresponding current evaluation record; and input the first vehicle embedded coding tensor of the current evaluation record as the corresponding vehicle embedded coding tensor into the node load prediction model to perform node power load prediction processing and use the node load prediction amount output by the model as the corresponding second power load prediction amount; and form a corresponding second prediction-label pair by the second power load prediction amount corresponding to the current evaluation record and the first power load label amount; and at the end of this round of traversal, form a corresponding second prediction-label pair set with all the second prediction-label pairs obtained; and bring the second prediction-label pair set into the preset first model evaluation function to calculate and obtain the corresponding first evaluation value;
[0035] Wherein, the first model evaluation function at least includes an RMSE function;
[0036] Step 58, identifying whether the first evaluation value meets the preset first evaluation value range; if not, returning to step 53 to continue training; if satisfied, stopping model training and confirming that the prediction model training is completed.
[0037] Preferably, the node load prediction model is used according to the first sampling time L most recently in the first vehicle data set. S The power load of the first network node at a first predicted time in the future is predicted based on the collected data in the network, specifically including:
[0038] Step 61: regularly use the current time as the corresponding first sampling end time according to the 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 form a corresponding first sampling period; and the first sampling end time and the first interval length L A The time obtained by adding the two is used as the corresponding first predicted time;
[0039] Step 62, extracting all the first data records in the first vehicle data set whose first collection period and the first sampling period have a time intersection, and sorting them in chronological order to form a corresponding sampled vehicle data set;
[0040] Step 63, grouping the first vehicle data records with the same first vehicle identifier in the sampled vehicle data set into one category and sorting all the first vehicle data records belonging to the same category in chronological order to form a corresponding second single-vehicle record sequence;
[0041] Step 64, take each of the second bicycle record sequences as the corresponding current bicycle record sequence; and set a corresponding second vehicle embedded coding vector for the current bicycle record sequence as the corresponding current vehicle embedded coding vector according to the vector data format of the first vehicle embedded coding vector; and initialize the coding values of all the first time point coding groups of the current vehicle embedded coding vector to 0; and establish a corresponding relationship between each of the first vehicle data records of the current bicycle record sequence and a first time period coding group in the current vehicle embedded coding vector according to the time period correspondence; and perform a round of traversal on all the first vehicle data records of the current bicycle record sequence; and during this round of traversal, take the first vehicle data record currently traversed as the corresponding current record; and perform unique hot encoding on the first location type, the first vehicle type, the first parking state, the first starting travel state, the first navigation mode and the first charging mode of the current record to obtain the corresponding The current place type code, the current vehicle type code, the current parking state code, the current starting travel state code, the current navigation mode code and the current charging mode code; and based on the preset charging power embedding coding rule, the first charging power of the current record is embedded and coded to obtain the corresponding current charging power code; and based on the obtained current place type code, the current vehicle type code, the current parking state code, the current starting travel state code, the current navigation mode code, the current charging mode code and the current charging power code, the coding values of the place type code, the vehicle type code, the parking state code, the starting travel state code, the navigation mode code, the charging mode code and the charging power code of the first time period coding group corresponding to the current record in the current vehicle embedding coding vector are reset; and at the end of this round of traversal, a corresponding second vehicle embedding coding tensor is formed by all the second vehicle embedding coding vectors corresponding to the sampled vehicle data set;
[0042] Step 65, inputting the second vehicle embedded coding tensor as the corresponding vehicle embedded coding tensor into the node load prediction model to perform node power load prediction processing and using the node load prediction amount output by the model as the corresponding first node load prediction amount;
[0043] Step 66: use the unique node identifier of the first network node as the corresponding first network node identifier; and use the preset data monitoring interface of the power grid side management system as the corresponding first monitoring interface; and use the first network node identifier, the first prediction time and the first node load prediction amount to form a corresponding first node prediction record; and send the first node prediction record to the power grid side management system through the first monitoring interface.
[0044] The embodiment of the present invention provides a processing method for predicting node load based on electric vehicle data. As can be seen from the above content, the embodiment of the present invention collects data on all electric vehicles traveling in the power supply area of the network node around the clock to obtain a vehicle data set, and collects data on the power load of the network node around the clock to obtain a node data set; and constructs a model training data set based on the vehicle and node data sets, and records it as the first data set; and based on the first data set, a node load prediction model for predicting node power load according to the vehicle embedded coding tensor input by the model is trained; and after the model training is completed, the node load prediction model is used to predict the power load of the network node at a specified time in the future based on the collected data within the most recent specified time in the vehicle data set. The embodiment of the present invention solves the technical problem of how to predict node load based on electric vehicle data. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A schematic diagram of a processing method for predicting node load based on electric vehicle data provided by an embodiment of the present invention;
[0046] Figure 2 A schematic diagram of the data structure of a first vehicle data set, a first node data set and a first segment data set provided in an embodiment of the present invention;
[0047] Figure 3 A schematic diagram of a module of a node load prediction model provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] The embodiment of the present invention provides a processing method for predicting node load based on electric vehicle data for a network node, a distribution station area or an intelligent terminal or system on the smart grid side. The method is as follows Figure 1A processing method for predicting node load based on electric vehicle data provided by an embodiment of the present invention is shown in a schematic diagram, which mainly includes the following steps:
[0050] Step 1: record the power supply area of the first network node as the corresponding first area; collect data on all electric vehicles traveling in the first area around the clock to obtain a corresponding first vehicle data set; and collect data on the power load of the first network node around the clock to obtain a corresponding first node data set.
[0051] Here, if Figure 2 As shown in the data structure diagram of the first vehicle data set, the first node data set and the first segmented data set provided in the embodiment of the present invention, the first vehicle data set of the embodiment of the present invention includes multiple first vehicle data records; the first vehicle data record includes a first collection period, a first vehicle identification, a first location type, a first vehicle type, a first parking state, a first starting travel state, a first navigation mode, a first charging mode, and a first charging power; the first collection period includes a first period start time and a first period end time, and the period length between the first period start time and the first period end time is fixedly recorded as a first period length △L1; the first vehicle identification is a unique identification of the corresponding electric vehicle; the first location type is used to mark the location type of the location of the corresponding electric vehicle in the current period, and the first location type includes a commercial location 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 starting travel status is used to mark whether the corresponding electric vehicle is in the starting time period of the travel in the current time period, and the first starting travel 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 path 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 charged, regular charging and fast charging; the first charging power is the total charging power of the corresponding electric vehicle in the current time period, and the first charging mode is 0 when the first charging power is not charged.
[0052] like Figure 2 As shown, the first node data set of the embodiment of the present invention includes multiple first node data records; the first node data record includes the second collection period and the total load of the first node; the second collection period includes the second period start time and the second period end time, and the period length between the second period start time and the second period end time is fixedly recorded as the second period length △L2, and the second period length △L2 is N times the first period length △L1, and N is a preset positive integer; the total load of the first node is the total power load of the first network node in the current second collection period.
[0053] Step 2: Set the data sampling duration to the first sampling duration L S ; and set the prediction interval length to the first interval length L A ; and based on the first vehicle data set, the first node data set, the first sampling time L S and the first interval duration L A The dataset for model training is recorded as the first dataset;
[0054] Specifically comprising: Step 21, setting the data sampling time length to the first sampling time length L S ; and set the prediction interval length to the first interval length L A ;
[0055] Here, the first sampling duration L of the embodiment of the present invention is S is an integer multiple of the first time period length △L1; the first interval length L of the embodiment of the present invention A Under normal circumstances, the default value is an integer multiple of the second time period length △L2;
[0056] Step 22, based on the first vehicle data set, the first node data set, and the first sampling time L S and the first interval duration L A The dataset for model training is recorded as the first dataset;
[0057] Among them, the first data set includes multiple first data records; the first data record includes a first vehicle embedding coding tensor and a first power load label quantity; the first vehicle embedding coding tensor is composed of multiple first vehicle embedding coding vectors; each first vehicle embedding coding vector corresponds to an electric vehicle; the vector lengths of all first vehicle embedding coding vectors are equal to the vector length M, M=L S / △L1; the first vehicle embedded coding vector is formed by M first time period coding groups arranged in chronological order; each first time period coding group corresponds to a first vehicle data record; the first time period coding group includes a venue type code, a vehicle type code, a parking state code, a starting travel state code, a navigation mode code, a charging mode code, and a charging power code;
[0058] Specifically, step 221, according to the first sampling time L S Sequentially segmenting the first vehicle data set to obtain a corresponding plurality of first segmented data sets;
[0059] Among them, Figure 2 As shown, each first segmented data set is composed of a plurality of first vehicle data records; and the time span of each first segmented data set is the first sampling time length L S ;
[0060] Step 222, taking the first first segmented data set as the corresponding current segmented data set;
[0061] Step 223: The segment end time of the current segment data set is used as the corresponding current end time; and the current end time is compared with the first interval length L. A The time obtained by adding them is used as the corresponding current prediction time; and the total load of the first node recorded in the first node data set corresponding to the second collection period whose start time of the second period in the first node data set is closest to the current prediction time is used as the corresponding current prediction load;
[0062] Step 224, clustering the first vehicle data records with the same first vehicle identifier in the current segmented data set into one category and sorting all the first vehicle data records belonging to the same category in chronological order to form a corresponding first single vehicle record sequence;
[0063] Step 225, taking each first bicycle record sequence as the corresponding current bicycle record sequence; and setting a corresponding first vehicle embedded coding vector as the corresponding current vehicle embedded coding vector for the current bicycle record sequence according to the vector data format of the first vehicle embedded coding vector; and initializing the coding values of all the codes of all the first time point coding groups of the current vehicle embedded coding vector to 0; and according to the time period correspondence, establishing a correspondence between each first vehicle data record of the current bicycle record sequence and a first time period coding group in the current vehicle embedded coding vector; and performing a round of traversal of all the first vehicle data records of the current bicycle record sequence; and in this round of traversal, taking the currently traversed first vehicle data record as the corresponding current record; and performing the first location type, the first vehicle type, the first parking state, and the first starting travel state of the current record. state, the first navigation mode and the first charging mode are respectively single-hot encoded to obtain the corresponding current place type code, current vehicle type code, current parking state code, current starting travel state code, current navigation mode code and current charging mode code; and based on the preset charging power embedding coding rule, the first charging power of the current record is embedded and encoded to obtain the corresponding current charging power code; and based on the obtained current place type code, current vehicle type code, current parking state code, current starting travel state code, current navigation mode code, current charging mode code and current charging power code, the encoding values of the place type code, vehicle type code, parking state code, starting travel state code, navigation mode code, charging mode code and charging power code of the first time period code group corresponding to the current record in the current vehicle embedded coding vector are reset;
[0064] Here, the charging power embedding coding rule can be customized based on application requirements, and a normalized embedded coding method can be used for encoding by default, for example, all charging powers are normalized with the rated load of the node as the maximum load;
[0065] Step 226, after all the first vehicle embedding coding vectors corresponding to the current segmented data set are set, a corresponding first vehicle embedding coding tensor is formed by all the first vehicle embedding coding vectors corresponding to the current segmented data set; and the current predicted load corresponding to the current segmented data set is used as a corresponding first power load label quantity; and a corresponding first data record is formed by the first vehicle embedding coding tensor and the first power load label quantity corresponding to the current segmented data set;
[0066] Step 227, identifying whether the current segmented data set is the last first segmented data set; if not, taking the next first segmented data set as the new current segmented data set and returning to step 223; if so, forming the corresponding first data set from all the obtained first data records.
[0067] Step 3: construct a node load prediction model; and train the node load prediction model based on the first data set;
[0068] Specifically including: step 31, constructing a node load prediction model;
[0069] Here, the node load prediction model of the embodiment of the present invention is used to perform node power load prediction processing according to the vehicle embedded coding tensor input by the model and output the corresponding node load prediction amount; Figure 3 As shown in the module schematic diagram of the node load prediction model provided by the embodiment of the present invention, the node load prediction model includes a feature extraction network and a regression prediction network;
[0070] It should be noted that the node load prediction model of the embodiment of the present invention has at least two model implementation modes, one is based on the Transformer model and the other is based on the Bi-LSTM model; when the node 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 node load prediction model is implemented based on the Bi-LSTM model, the feature extraction network is implemented by connecting the CNN network with the linear layer, and the regression prediction network is implemented by connecting the Bi-LSTM model with the MLP network;
[0071] It should also be noted that the feature extraction network of the node load prediction model is used to receive the vehicle embedding coding tensor input by the model, and perform electric vehicle power consumption feature extraction processing on the vehicle embedding coding tensor to obtain the corresponding electric vehicle power consumption feature tensor and send it to the regression prediction network; the regression prediction network of the node load prediction model is used to perform node load prediction processing according to the electric vehicle power consumption feature tensor to obtain the corresponding node load prediction amount and output it;
[0072] Step 32, training a node load prediction model based on the first data set;
[0073] Specifically, it includes: step 321, dividing the first data set into two data subsets based on a preset first division ratio and recording them as a corresponding first training set and a first evaluation set;
[0074] Here, the first segmentation ratio is a preset ratio parameter, such as 9:1; the first training set and the first evaluation set both include a plurality of 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;
[0075] Step 322: Count the total number of records in the first data set to obtain the corresponding total number of records N r ; Based on the preset total number of single batch records B, the first data set is slid and divided into batches in a single-step sliding manner to obtain N b a first subset of records;
[0076] Here, the total number of records in a single batch B is a preset positive integer, 1 <B<N r ; Total number of batches N b =N r -B+1; each first batch record subset consists of B first data records, and the last B-1 first data records of the previous first batch record subset overlap with the first B-1 first data records of the next first batch record subset;
[0077] Step 323, taking the first first batch record subset as the corresponding current subset;
[0078] Step 324, input the first vehicle embedded coding tensor of each first data record of the current subset as the corresponding vehicle embedded coding tensor into the node load prediction model to perform node power load prediction processing and use the node load prediction amount output by the model as the corresponding first power load prediction amount; and form a corresponding first prediction-label pair from the first power load prediction amount and the first power load label amount corresponding to each first data record of the current subset; and form a corresponding first prediction-label pair set from all the first prediction-label pairs corresponding to the current subset;
[0079] Step 325, bringing the first prediction-label pair set corresponding to the current subset into a preset first model loss function; and based on the preset first model optimizer, performing a round of modulation on the model parameters of the node load prediction model in a direction to minimize the first model loss function;
[0080] The first model loss function includes at least an L1 loss function and an L2 loss function; the first model optimizer includes at least an SGD optimizer and an Adam optimizer;
[0081] Step 326, identifying whether the current subset is the last first batch record subset; if not, taking the next first batch record subset as the new current subset and returning to step 324; if yes, going to step 327;
[0082] Step 327, perform a round of traversal on all first data records of the first evaluation set; and in this round of traversal, use the first data record currently traversed as the corresponding current evaluation record; and use the first vehicle embedded coding tensor of the current evaluation record as the corresponding vehicle embedded coding tensor to input the node load prediction model to perform node power load prediction processing and use the node load prediction amount output by the model as the corresponding second power load prediction amount; and form a corresponding second prediction-label pair by the second power load prediction amount corresponding to the current evaluation record and the first power load label amount; and at the end of this round of traversal, form a corresponding second prediction-label pair set with all the obtained second prediction-label pairs; and bring the second prediction-label pair set into the preset first model evaluation function to calculate and obtain the corresponding first evaluation value;
[0083] Wherein, the first model evaluation function at least includes the RMSE function;
[0084] Step 328, identifying whether the first evaluation value meets the preset first evaluation value range; if not, returning to step 323 to continue training; if satisfied, stopping model training and confirming the completion of prediction model training.
[0085] Here, the first evaluation value range is a preset value range.
[0086] Step 4: After the model training is completed, the node load prediction model is used to calculate the first sampling time L in the first vehicle data set. S predicting the power load of the first network node at a first predicted moment in the future based on the collected data;
[0087] The interval between the first predicted time and the current time is the first interval length L A ;
[0088] Specifically, step 41, regularly taking the current time as the corresponding first sampling end time according to the 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 form the corresponding first sampling period; and the first sampling end time and the first interval length L A The added time is used as the corresponding first prediction time;
[0089] Here, the first time frequency is a preset frequency parameter;
[0090] Step 42, extract all first data records in the first vehicle data set whose first collection period and the first sampling period have a time intersection, and sort them in chronological order to form a corresponding sampled vehicle data set;
[0091] Step 43, clustering the first vehicle data records with the same first vehicle identifier in the sampled vehicle data set into one category and sorting all the first vehicle data records belonging to the same category in chronological order to form a corresponding second single vehicle record sequence;
[0092] Step 44, taking each second bicycle record sequence as the corresponding current bicycle record sequence; and setting a corresponding second vehicle embedded coding vector as the corresponding current vehicle embedded coding vector for the current bicycle record sequence according to the vector data format of the first vehicle embedded coding vector; and initializing the coding values of all the first time point coding groups of the current vehicle embedded coding vector to 0; and according to the time period correspondence, establishing a correspondence between each first vehicle data record of the current bicycle record sequence and a first time period coding group in the current vehicle embedded coding vector; and performing a round of traversal on all the first vehicle data records of the current bicycle record sequence; and in this round of traversal, taking the currently traversed first vehicle data record as the corresponding current record; and performing unique hot encoding on the first location type, the first vehicle type, the first parking state, the first starting travel state, the first navigation mode and the first charging mode of the current record to obtain The corresponding current place type code, current vehicle type code, current parking state code, current starting travel state code, current navigation mode code and current charging mode code; and based on the charging power embedding coding rule, the first charging power of the current record is embedded and coded to obtain the corresponding current charging power code; and based on the obtained current place type code, current vehicle type code, current parking state code, current starting travel state code, current navigation mode code, current charging mode code and current charging power code, the coding values of the place type code, vehicle type code, parking state code, starting travel state code, navigation mode code, charging mode code and charging power code of the first time period coding group corresponding to the current record in the current vehicle embedding coding vector are reset; and at the end of this round of traversal, a corresponding second vehicle embedding coding tensor is formed by all the second vehicle embedding coding vectors corresponding to the sampled vehicle data set;
[0093] Step 45, inputting the second vehicle embedded coding tensor as the corresponding vehicle embedded coding tensor into the node load prediction model to perform node power load prediction processing and using the node load prediction amount output by the model as the corresponding first node load prediction amount;
[0094] Step 46, using the unique node identifier of the first network node as the corresponding first network node identifier; and using the preset data monitoring interface of the power grid side management system as the corresponding first monitoring interface; and using the first network node identifier, the first prediction time and the first node load prediction amount to form a corresponding first node prediction record; and sending the first node prediction record to the power grid side management system through the first monitoring interface.
[0095] The above content of the embodiment of the present invention demonstrates how to predict the node load at a future moment based on the collected data of a time period; it should also be noted that based on the method of the embodiment of the present invention, if the collected data of multiple consecutive time periods are used, the node load at multiple moments in a future time period can be predicted, and then the predicted values at multiple consecutive moments can be curve fitted to obtain the node load prediction curve in the future time period.
[0096] In summary, the embodiment of the present invention provides a processing method for predicting node load based on electric vehicle data. As can be seen from the above content, the embodiment of the present invention collects data on all electric vehicles traveling in the power supply area of the network node around the clock to obtain a vehicle data set, and collects data on the power load of the network node around the clock to obtain a node data set; and constructs a model training data set based on the vehicle and node data sets, and records it as the first data set; and based on the first data set, a node load prediction model for predicting node power load according to the vehicle embedded coding tensor input by the model is trained; and after the model training is completed, the node load prediction model is used to predict the power load of the network node at a specified time in the future based on the collected data within the most recent specified time period in the vehicle data set. The embodiment of the present invention solves the technical problem of how to predict node load based on electric vehicle data, and the embodiment of the present invention helps to refine the dynamic control granularity of the smart grid at the node level.
[0097] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0098] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0099] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method 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 in the scope of protection of the present invention.
Claims
1. A method for predicting node load based on electric vehicle data, characterized in that: The method comprises: The power supply area of the first network node is recorded as the corresponding first area; and all-weather data collection is performed on all electric vehicles traveling in the first area to obtain a corresponding first vehicle data set; and all-weather data collection is performed on the power load of the first network node to obtain a corresponding first node data set; Set the data sampling duration to the first sampling duration L S ; and set the prediction interval length to the first interval length L A ; and based on the first vehicle data set, the first node data set, the first sampling time L S and the first interval length L A The dataset for model training is recorded as the first dataset; Constructing a node load prediction model; and training the node load prediction model based on the first data set; the node load prediction model is used to perform node power load prediction processing according to the vehicle embedded coding tensor input by the model and output the corresponding node load prediction amount; After the model training is completed, the node load prediction model is used according to the first sampling time L in the first vehicle data set. S The collected data in the prediction is used to predict the power load of the first network node at the first prediction moment in the future; the interval between the first prediction moment and the current moment is the first interval length L A .
2. The method for predicting node load based on electric vehicle data according to claim 1, characterized in that: The first vehicle data set includes a plurality of 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 state, a first starting travel state, a first navigation mode, a first charging mode, and a first charging power; the first collection period includes a first period start time and a first period end time, and the period length between the first period start time and the first period end time is fixedly recorded as a first period length △L1; the first vehicle identifier is a unique identifier of 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 places, residential areas, and roads; the first vehicle type includes private cars and operating vehicles; The first parking state is used to mark the parking state of the corresponding electric vehicle in the current time period, and the first parking state includes yes and no; the first starting travel state is used to mark whether the corresponding electric vehicle is in the starting time period of travel in the current time period, and the first starting travel state 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 path navigation mode and the shortest driving time navigation mode; The first charging mode is used to mark whether the corresponding electric vehicle is in a charging state and the corresponding charging mode in the current time period, and the first charging mode includes no charging, normal charging and fast charging; the first charging power is the total charging power of the corresponding electric vehicle in the current time period, and the first charging power is 0 when the first charging mode is no charging; The first node data set includes a plurality of first node data records; The first node data record includes a second collection period and a first node load total; the second collection period includes a second period start time and a second period end time, the period length between the second period start time and the second period end time is fixedly recorded as a second period length △L2, the second period length △L2 is N times the first period length △L1, N is a preset positive integer; the first node load total is the total power load of the first network node in the current second collection period; The first sampling time L S is an integer multiple of the first time period length △L1; The first data set includes multiple first data records; the first data record includes a first vehicle embedding coding tensor and a first power load label quantity; the first vehicle embedding coding tensor is composed of multiple first vehicle embedding coding vectors; each of the first vehicle embedding coding vectors corresponds to an electric vehicle; the vector lengths of all the first vehicle embedding coding vectors are equal to the vector length M, M=L S / △L1; the first vehicle embedded coding vector is composed of M first time period coding groups arranged in chronological order; each first time period coding group corresponds to one first vehicle data record; the first time period coding group includes a venue type code, a vehicle type code, a parking status code, a starting travel status code, a navigation mode code, a charging mode code, and a charging power code.
3. The method for predicting node load based on electric vehicle data according to claim 2, characterized in that: The first vehicle data set, the first node data set, and the first sampling time L S and the first interval length L A The model training data set is recorded as the first data set, which specifically includes: Step 31: according to the first sampling time L S Sequentially segmenting the first vehicle data set to obtain a corresponding plurality of first segmented data sets; Each of the first segmented data sets is composed of a plurality of the first vehicle data records; and the time span of each of the first segmented data sets is the first sampling time length L S ; Step 32, taking the first of the first segmented data sets as the corresponding current segmented data set; Step 33: taking the segment end time of the current segment data set as the corresponding current end time; and summing the current end time with the first interval time L A The time obtained by adding them is used as the corresponding current prediction time; and the total load of the first node recorded in the first node data set corresponding to the second collection period whose start time of the second period in the first node data set is closest to the current prediction time is used as the corresponding current prediction load; Step 34, grouping the first vehicle data records with the same first vehicle identifier in the current segmented data set into one category and sorting all the first vehicle data records belonging to the same category in chronological order to form a corresponding first single-vehicle record sequence; Step 35, take each of the first bicycle record sequences as the corresponding current bicycle record sequence; and set a corresponding first vehicle embedded coding vector for the current bicycle record sequence as the corresponding current vehicle embedded coding vector according to the vector data format of the first vehicle embedded coding vector; and initialize the coding values of all the first time point coding groups of the current vehicle embedded coding vector to 0; and according to the time period correspondence, establish a correspondence between each of the first vehicle data records of the current bicycle record sequence and a first time period coding group in the current vehicle embedded coding vector; and perform a round of traversal of all the first vehicle data records of the current bicycle record sequence; and during this round of traversal, take the first vehicle data record currently traversed as the corresponding current record; and perform the first location type, the first vehicle type, the first parking state, the first starting travel state, the The first navigation mode and the first charging mode are respectively single-hot encoded to obtain the corresponding current place type code, current vehicle type code, current parking state code, current starting travel state code, current navigation mode code and current charging mode code; and based on a preset charging power embedding coding rule, the first charging power of the current record is embedded encoded to obtain the corresponding current charging power code; and based on the obtained current place type code, current vehicle type code, current parking state code, current starting travel state code, current navigation mode code, current charging mode code and current charging power code, the encoding values of the place type code, the vehicle type code, the parking state code, the starting travel state code, the navigation mode code, the charging mode code and the charging power code of the first time period code group corresponding to the current record in the current vehicle embedded coding vector are reset; Step 36, after all the first vehicle embedding coding vectors corresponding to the current segmented data set are set, a corresponding first vehicle embedding coding tensor is formed by all the first vehicle embedding coding vectors corresponding to the current segmented data set; and the current predicted load corresponding to the current segmented data set is used as a corresponding first power load label quantity; and a corresponding first data record is formed by the first vehicle embedding coding tensor and the first power load label quantity corresponding to the current segmented data set; Step 37, identifying whether the current segmented data set is the last of the first segmented data sets; if not, taking the next first segmented data set as the new current segmented data set and returning to step 33; if so, forming the corresponding first data set from all the obtained first data records.
4. The method for predicting node load based on electric vehicle data according to claim 2, characterized in that: The node load prediction model includes a feature extraction network and a regression prediction network; the node load prediction model has at least two model implementation modes, one based on the Transformer model and the other based on the Bi-LSTM model; when the node 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 node load prediction model is implemented based on the Bi-LSTM model, the feature extraction network is implemented by connecting the CNN network with the linear layer, and the regression prediction network is implemented by connecting the Bi-LSTM model with the MLP network; The feature extraction network is used to receive the vehicle embedded coding tensor input by the model, and perform electric vehicle power consumption feature extraction processing on the vehicle embedded coding tensor to obtain the corresponding electric vehicle power consumption feature tensor and send it to the regression prediction network; the regression prediction network is used to perform node load prediction processing based on the electric vehicle power consumption feature tensor to obtain the corresponding node load prediction amount and output it.
5. The method for predicting node load based on electric vehicle data according to claim 2, characterized in that: The training of the node load prediction model based on the first data set specifically includes: Step 51, based on a preset first segmentation ratio, the first data set is divided into two data subsets recorded as a corresponding first training set and a first evaluation set; Wherein, both the first training set and the first evaluation set include a plurality of the first data records; the ratio of the total number of records in the first training set and the first evaluation set meets the first segmentation ratio; Step 52: Count the total number of records in the first data set to obtain the corresponding total number of records N r ; and based on the preset total number of single batch records B, the first data set is slid and divided into batches in a single-step sliding manner to obtain N b The first subset of records, 1 <B<N r , N b =N r -B+1; The first batch of record subsets consists of B first data records, and the last B-1 first data records of the previous first batch of record subsets overlap with the first B-1 first data records of the next first batch of record subsets; Step 53, taking the first of the first record subsets as the corresponding current subset; Step 54, input the first vehicle embedded coding tensor of each of the first data records of the current subset as the corresponding vehicle embedded coding tensor into the node load prediction model to perform node power load prediction processing and use the node load prediction amount output by the model as the corresponding first power load prediction amount; and form a corresponding first prediction-label pair by the first power load prediction amount and the first power load label amount corresponding to each of the first data records of the current subset; and form a corresponding first prediction-label pair set by all the first prediction-label pairs corresponding to the current subset; Step 55, bringing the first prediction-label pair set corresponding to the current subset into a preset first model loss function; and based on a preset first model optimizer, performing a round of modulation on the model parameters of the node load prediction model in a direction to minimize the first model loss function; Wherein, the first model loss function includes at least an L1 loss function and an L2 loss function; the first model optimizer includes at least an SGD optimizer and an Adam optimizer; Step 56, identifying whether the current subset is the last of the first batch of record subsets; if not, taking the next first batch of record subsets as the new current subset and returning to step 54; if yes, going to step 57; Step 57, perform a round of traversal on all the first data records of the first evaluation set; and in this round of traversal, use the first data record currently traversed as the corresponding current evaluation record; and input the first vehicle embedded coding tensor of the current evaluation record as the corresponding vehicle embedded coding tensor into the node load prediction model to perform node power load prediction processing and use the node load prediction amount output by the model as the corresponding second power load prediction amount; and form a corresponding second prediction-label pair by the second power load prediction amount corresponding to the current evaluation record and the first power load label amount; and at the end of this round of traversal, form a corresponding second prediction-label pair set with all the second prediction-label pairs obtained; and bring the second prediction-label pair set into the preset first model evaluation function to calculate and obtain the corresponding first evaluation value; Wherein, the first model evaluation function at least includes an RMSE function; Step 58, identifying whether the first evaluation value meets the preset first evaluation value range; if not, returning to step 53 to continue training; if satisfied, stopping model training and confirming that the prediction model training is completed.
6. The method for predicting node load based on electric vehicle data according to claim 2, characterized in that: The node load prediction model is used to predict the first sampling time L most recently in the first vehicle data set. S The power load of the first network node at a first predicted time in the future is predicted based on the collected data in the network, specifically including: Step 61: regularly use the current time as the corresponding first sampling end time according to the 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 form a corresponding first sampling period; and the first sampling end time and the first interval length L A The time obtained by adding the two is used as the corresponding first predicted time; Step 62, extracting all the first data records in the first vehicle data set whose first collection period and the first sampling period have a time intersection, and sorting them in chronological order to form a corresponding sampled vehicle data set; Step 63, grouping the first vehicle data records with the same first vehicle identifier in the sampled vehicle data set into one category and sorting all the first vehicle data records belonging to the same category in chronological order to form a corresponding second single-vehicle record sequence; Step 64, take each of the second bicycle record sequences as the corresponding current bicycle record sequence; and set a corresponding second vehicle embedded coding vector for the current bicycle record sequence as the corresponding current vehicle embedded coding vector according to the vector data format of the first vehicle embedded coding vector; and initialize the coding values of all the first time point coding groups of the current vehicle embedded coding vector to 0; and establish a corresponding relationship between each of the first vehicle data records of the current bicycle record sequence and a first time period coding group in the current vehicle embedded coding vector according to the time period correspondence; and perform a round of traversal on all the first vehicle data records of the current bicycle record sequence; and during this round of traversal, take the first vehicle data record currently traversed as the corresponding current record; and perform unique hot encoding on the first location type, the first vehicle type, the first parking state, the first starting travel state, the first navigation mode and the first charging mode of the current record to obtain the corresponding The current place type code, the current vehicle type code, the current parking state code, the current starting travel state code, the current navigation mode code and the current charging mode code; and based on the preset charging power embedding coding rule, the first charging power of the current record is embedded and coded to obtain the corresponding current charging power code; and based on the obtained current place type code, the current vehicle type code, the current parking state code, the current starting travel state code, the current navigation mode code, the current charging mode code and the current charging power code, the coding values of the place type code, the vehicle type code, the parking state code, the starting travel state code, the navigation mode code, the charging mode code and the charging power code of the first time period coding group corresponding to the current record in the current vehicle embedding coding vector are reset; and at the end of this round of traversal, a corresponding second vehicle embedding coding tensor is formed by all the second vehicle embedding coding vectors corresponding to the sampled vehicle data set; Step 65, inputting the second vehicle embedded coding tensor as the corresponding vehicle embedded coding tensor into the node load prediction model to perform node power load prediction processing and using the node load prediction amount output by the model as the corresponding first node load prediction amount; Step 66: use the unique node identifier of the first network node as the corresponding first network node identifier; and use the preset data monitoring interface of the power grid side management system as the corresponding first monitoring interface; and use the first network node identifier, the first prediction time and the first node load prediction amount to form a corresponding first node prediction record; and send the first node prediction record to the power grid side management system through the first monitoring interface.
Citation Information
Patent Citations
Stack type self-encoding multi-model load prediction method and system based on LSTM
CN112016734A
Power grid dispatching method based on intra-regional electric vehicle charging load prediction
CN112036624A
Electric vehicle charging station load prediction method, device and equipment based on graph neural network
CN118941050A
Electric vehicle charging load prediction method based on PatchTST
CN119134285A
Cited By
Processing method for predicting transformer area load based on electric vehicle data
CN119674960A
A processing method for predicting load of a transformer area based on electric vehicle data
CN119674960B
Processing method and device for setting traffic scheduling mark based on SDN traffic prediction
CN121984921A