A method and system for orderly load control of electric vehicle charging stations based on large language model

By using large language models and prompt technology to construct the charging load prediction model, the problem of inaccurate charging load prediction in the existing technology is solved, accurate prediction of future charging loads and optimized management of orderly charging, and improved the operating safety and efficiency of the power grid.

CN119047784BActive Publication Date: 2025-03-28NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411287073.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-03-28
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

The charging load prediction algorithm in the prior art is not accurate enough, resulting in the inability to accurately reflect the charging load power demand during the formulation of orderly charging strategy and power system regulation, and the inability to achieve orderly charging optimization goals such as clean energy absorption, grid peak cutting and valley filling, and frequency regulation and peak regulating.

Method used

The charging load prediction model is constructed by large language models and prompt technology. By collecting historical charging load data and environmental data, the model input volume is constructed, and fine-tuning parameters are added through parallel adapters, and the dual loss function is used for training to achieve accurate prediction of future charging load.

Benefits of technology

It improves the accuracy of charging station load prediction and load regulation efficiency, realizes the optimization management of orderly charging, and enhances the safe, reliable and economical operation of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119047784B_ABST
    Figure CN119047784B_ABST
Patent Text Reader

Abstract

The present invention relates to an orderly control method of electric vehicle charging station load based on a large language model, which is as follows: first, the historical charging load time series data of the electric vehicle charging station is collected and normalized; second, the corresponding working days / holidays, weather, temperature, traffic conditions and other environmental data are collected for the charging load time series segments to generate environmental data input; then, the charging load time series segments and environmental data are used as input to construct a charging load time series prediction model; a dual optimization target is constructed to train the charging load time series prediction model to predict the future charging load; finally, demand response is performed based on the charging load prediction result, and the charging facilities in the charging station are regulated to achieve the optimization management of the corresponding orderly charging according to the load prediction result. The scheme improves the accuracy of charging load prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of orderly charging load control of electric vehicles, and mainly relates to an orderly load control method and system for electric vehicle charging stations based on a large language model. Background Art

[0002] my country's electric vehicle industry is developing rapidly, and the number of charging piles installed in electric vehicle charging stations has increased rapidly, which has brought a great impact on the distribution network capacity. How to use the characteristics of electric vehicle energy loads to match electric vehicle charging loads with the power supply capacity of the distribution network and ensure the safe, reliable and economical operation of the distribution network is a key issue to be solved in the orderly charging of electric vehicles.

[0003] However, due to the inaccuracy of the charging load prediction algorithm in the existing technology, the charging load power demand situation cannot be accurately reflected in the orderly charging strategy formulation and power system regulation process. Therefore, it is impossible to further achieve orderly charging optimization goals such as clean energy consumption, grid peak shaving and valley filling, and frequency and peak regulation under the premise of meeting the charging needs of electric vehicles as much as possible.

[0004] In the demand response model of charging load of charging vehicles represented by charging stations, the charging load data is expressed as a time series characteristic. Therefore, the time series prediction model based on the Transformer architecture can provide more accurate calculation results in the time series prediction task. However, there are still some shortcomings for the prediction task of electric vehicle charging load, including: 1) The demand law of electric vehicle charging load is affected by environmental factors such as holidays, weather, temperature, and traffic conditions, and the influence of these factors cannot be reflected only by the charging load time series; 2) The time series prediction model based on the Transformer architecture is a deep neural network model, which requires large-scale training data support to obtain a valuable model. The historical charging load data of a single charging station is often difficult to meet the requirements.

[0005] Large language models are linguistic models that provide an important foundation for the recognition and reasoning of text sequences and play an important role in natural language processing tasks such as translation, question answering, and dialogue. Recent studies have shown that large language models have robust pattern recognition and reasoning capabilities when processing complex tag sequences. How to use large language models to model the task of predicting the charging load of electric vehicles, fully consider environmental factors such as holidays, weather, temperature, and traffic conditions, and accurately predict the charging load of charging stations is still a challenge.

[0006] In view of the above problems, there is an urgent need for an orderly load control method and system for electric vehicle charging stations based on a large language model. Summary of the invention

[0007] In order to solve the deficiencies in the prior art, the present invention provides a method and system for orderly control of loads at electric vehicle charging stations based on a large language model. The method and system collect historical charging load data and environmental data of electric vehicle charging stations, construct model input, and use a large language model and prompt technology to construct a charging load prediction model. Fine-tuning parameters are added through parallel adapters, and dual loss functions are used for training. The input is calculated to obtain a prediction of future charging loads for demand response and orderly charging optimization control of charging equipment.

[0008] In order to achieve the above object, the scheme of the present invention is as follows:

[0009] The first aspect of the present invention relates to a method for orderly regulating load of an electric vehicle charging station based on a large language model, the method comprising the following steps:

[0010] S1, collects the historical charging load time series data of electric vehicle charging stations and processes outliers based on the Hampel filter;

[0011] S2, normalize the historical charging load time series data, and perform segmentation based on the sliding time window method to generate the charging load time series segment input;

[0012] S3, collecting corresponding working days / holidays, weather, temperature, traffic conditions and other environmental data for the charging load time series segments, and generating environmental data input;

[0013] S4, taking charging load time series segments and environmental data as input, constructs a charging load time series prediction model based on a large language model and prompt technology;

[0014] S5, constructs dual optimization objectives, adopts the adapter-based large-scale model parameter efficient fine-tuning technology, trains the charging load time series prediction model, and realizes the prediction of future charging load;

[0015] S6, responding to demand based on the charging load forecast result, and regulating the charging facilities in the charging station to achieve optimized management of corresponding orderly charging according to the load forecast result.

[0016] As a preferred solution, in S1, the historical charging load time series data of the electric vehicle charging station is collected, and outlier processing is performed based on the Hampel filter, including:

[0017] Step 1: Collect the overall historical charging load time series data of the charging station from the metering equipment and management system of the electric vehicle charging station. The historical charging load time series data is expressed as where t1 ,t 2 ,...,t N represents the sampling time, N represents the maximum number of samples, and the value of each sample point represents the overall load of the charging station at the sampling time, in kilowatts (kW).

[0018] Step 2: Identify and process the outliers of the charging load history data based on the Hampel filter, and analyze the historical charging load time series data P origin Sort the load values ​​from small to large to get the sequence P order , median value M , The calculation formula is as follows:

[0019]

[0020] Where N represents the maximum number of samples. Indicates that N is an odd number of time series P order The middle position of and Indicates that N is an even number when the series P order The middle position of

[0021] Calculate the absolute deviation of each data point in the sequence data using the following formula:

[0022]

[0023] in, represents the data point in the historical charging load time series data, M P Represents the median of the sequence data.

[0024] The outlier judgment criteria of the Hampel filter are set as follows: if the data point The median absolute deviation (MAD) t Exceeding the threshold λ, that is, MAD t >λ, the value of the data point is considered an outlier. The method for dealing with outliers is to replace the value of the data point with the median value of the data set. The formula is as follows:

[0025]

[0026] in, Represents the load value after abnormal processing, which constitutes the historical charging load time series data P after abnormal processing hampel .

[0027] As a preferred solution, in S2, the historical charging load time series data is normalized and sliced ​​based on the sliding time window method to generate the charging load time series segment input, including:

[0028] Step 1: Normalize the historical charging load time series data after abnormal processing to obtain the normalized historical charging load time series data.

[0029] For sampling time t 1 ,t 2 ,...,t N Each data is normalized, and the calculation formula is as follows:

[0030]

[0031] in, represents the load data after abnormal processing, p t represents the normalized charging load data obtained after normalization calculation, p max Represents the maximum value in the historical charging load time series data, p min Indicates the minimum value in the historical charging load series data.

[0032] Step 2: Based on the sliding window method, the normalized historical charging load time series data is divided into segments of fixed window length to form a charging load time series segment set X and a charging load prediction result set Y.

[0033] The normalized historical charging load time series data is divided according to the window length K. Each data segment p after division t-K ,…,p t-1 An element of the charging load time series segment set X, x i =p t-K ,…,p t-1 At the same time, the next data p corresponding to the charging load timing segment t As an element of the charging load forecast result set Y, y i =p t . For each pair of x i and i All of them constitute the training data pair for charging load prediction.

[0034] As a preferred solution, in S3, the corresponding environmental data such as working days / holidays, weather, temperature, traffic conditions, etc. are collected for the charging load time series segments to generate environmental data input, including:

[0035] Step 1: According to each charging load time series segment, collect the environmental data corresponding to the time segment, including weekdays / holidays, weather, temperature, traffic conditions, etc.

[0036] The working day / holiday data corresponding to the charging load time series segment are determined through the holiday arrangement notices released on the Chinese government website, the holiday notices released on the local government website, and the rest days in the weekly calendar.

[0037] The weather data and temperature data corresponding to the charging load time series fragments were obtained through the website of the China Meteorological Administration using web crawler technology.

[0038] Through the Baidu Map Smart Transportation website, web crawler technology is used to obtain traffic conditions and congestion data corresponding to the charging load time segments.

[0039] Step 2: For each time series segment in the charging load time series segment set X, an environmental data set E is formed by the above-collected working day / holiday, weather, temperature, and traffic condition data.

[0040] Convert the collected environmental data into input form:

[0041]

[0042] Among them, e i Represents the charging load time series segment x i The corresponding environmental data input, e i ∈E. Indicates the current weather conditions. Indicates the current temperature. Indicates working day / non-working day identification. Indicates the traffic congestion index around the charging station. represents the average speed of vehicles around the charging station, p t-7day Indicates the charging load at the same time last week.

[0043] As a preferred solution, in S4, the charging load time series fragments and environmental data are used as inputs, and a charging load time series prediction model is constructed based on a large language model and prompt technology, including:

[0044] Step 1: Based on the prompt technology, construct a charging load time series prediction prompt text dataset.

[0045] According to the charging load time series segment set X and the environmental data set E, a prompt function is used to form an input prompt text. According to the charging load prediction result set Y, a prompt function is also used to form an output prompt text. The input prompt text and the output prompt text are merged to form a load prediction prompt text corresponding to the charging load time series segment. According to this method, the charging load time series segment set is constructed into a charging load time series prediction prompt text set M, and the formula is as follows:

[0046]

[0047] and are the input part prompt function and the output part prompt function, which means that the i-th charging load time series segment x i 、Environmental data i And the load forecast result y i Convert to prompt text m i The conversion function of .

[0048] The prompt function is constructed using the template method. For the application scenario of charging load prediction of electric vehicle charging stations, the input part prompt function is constructed The template indicates:

[0049]

[0050] Output part prompt function The template indicates:

[0051] <![CDATA[Predict the charging load at the current moment as [p t .]]>

[0052] According to the specific charging load time series fragment, environmental data and prediction results, the prompt function template is filled in, and the prompt text is obtained by merging the input prompt and the output prompt.

[0053] Step 2: Based on the large language model, construct a charging load time series prediction model.

[0054] Based on the large language model, a neural network model is constructed to fine-tune the prompt text paragraphs. The model optimizes the joint probability of the prompt text paragraphs, so that the large language model can predict the charging load time series.

[0055] The charging load time series prediction model structure is based on a large language model. A parallel adapter is added between the Transformer layers of the large language model to form a large language model network structure with efficient parameter adjustment. The parallel position and internal structure of the adapter are shown in Figure 2. Figure 2 shown.

[0056] The logical representation of an adapter network is as follows:

[0057] Adapter(z)=W up (ReLU(W down z))+z,

[0058] Where Adapter(·) is the logical representation of the adapter, z represents the input of the adapter, and W up is the upward projection matrix, W down is the downward projection matrix, and ReLU(·) is the nonlinear transformation layer.

[0059] As a preferred solution, in S5, dual optimization objectives are constructed, and the charging load time series prediction model is trained using the adapter-based large-scale model parameter efficient fine-tuning technology, including:

[0060] Step 1: Construct the cross entropy optimization target according to the load forecast prompt text. The formula is as follows:

[0061]

[0062] in, represents the cross entropy optimization target of the generated sequence of the language model and the prompt text, cross_entropy(·) represents the cross entropy loss function, h(·) represents the output layer of the language model, Z represents the input of the language model, represents the output layer of the language model, M represents the prompt text set, and θ represents the parameters of the model fine-tuning.

[0063] The minimum square error optimization objective is constructed based on the load forecast results. The formula is as follows:

[0064]

[0065] in, represents the minimum square error optimization target of the charging load prediction result, X represents the charging load time series segment set, x i ∈X represents the i-th historical charging load segment, E represents the environmental data set, e i ∈E represents the environmental data corresponding to the i-th historical charging load segment, M represents the charging load time series prediction prompt text set, Y represents the charging load prediction result set, y i ∈Y represents the i-th load forecast result, θ represents the model fine-tuning parameters, LLM(·) represents the output generated by the large language model, Represents the input prompt function, f extract (·) represents the function that extracts prediction results from text.

[0066] The cross entropy optimization objective and the minimum square error optimization objective are combined to form a dual optimization objective. The formula is as follows:

[0067]

[0068] in, It is the loss function during parameter fine-tuning. The loss consists of two parts: the cross entropy optimization objective and the minimum square error optimization objective. β represents the balance parameter between the two parts. X represents the set of charging load time series fragments, Y represents the set of charging load prediction results, M represents the set of charging load time series prediction prompt texts, and θ represents the parameters of model fine-tuning.

[0069] Step 2: Using fine-tuning technology, fine-tune the above time series prediction model according to the charging load time series prediction prompt text set M and the charging load prediction result set Y.

[0070] As a preferred solution, in S5, the future charging load is predicted according to the trained charging load time series prediction model, including:

[0071] Step 1: Generate output prompt text based on new input prompt text, and extract load forecast results from it according to the prompt function.

[0072] According to the historical charging load time series data fragments of the charging station and the current environmental data, the input prompt text is constructed, the above charging load time series prediction model is applied to obtain the output prompt text, and the charging load prediction result is extracted from it.

[0073] The prediction is based on the charging load time series prediction model, and the formula is as follows:

[0074]

[0075] Among them, P LM (·; θ) means using the fine-tuned large language model to calculate the probability, θ represents the model fine-tuning parameters, Indicates that the current load forecast value The slot filling function that fills the prompt text m, It means searching for the value with the largest probability from the possible candidate results as the prediction result. Represents the normalized load forecast result output by the model.

[0076] Step 2: Denormalize the load forecast result to obtain the final charging load forecast result. The formula is as follows:

[0077]

[0078] in, represents the load forecasting result after denormalization, p max Indicates the maximum value in the historical charging load sequence data, p min Indicates the minimum value in the historical charging load sequence data. Represents the normalized load forecast result output by the model.

[0079] As a preferred solution, the method performs demand response based on the charging load forecast result, and regulates the charging facilities in the charging station to achieve optimized management of corresponding orderly charging according to the load forecast result.

[0080] The second aspect of the present invention relates to an orderly load control system for electric vehicle charging stations based on a large language model, the system comprising an input acquisition module, a model calculation module, and a load control module, wherein the input acquisition module is used to collect historical charging load data and environmental data of the electric vehicle charging station, and generate input quantities based on the method; the model calculation module is used to construct a charging load prediction model using a large language model and prompt technology, calculate the input quantities, and generate predictions for future charging loads; wherein the charging load prediction model uses an adapter to increase fine-tuning parameters and uses a dual loss function for training; the load control module is used to respond to demand based on the charging load prediction results, and regulate the charging facilities in the charging station to achieve optimal management of corresponding orderly charging according to the load prediction results.

[0081] The beneficial effect of the present invention is that, compared with the prior art, the method and system for orderly control of load of electric vehicle charging stations based on a large language model in the present invention adopts a large language model and prompting technology to construct a charging load prediction model, adds fine-tuning parameters through a parallel adapter, adopts a dual loss function for training, and calculates the input quantity to obtain a prediction of future charging load for demand response and orderly charging optimization control of charging equipment. The present invention utilizes the pattern recognition and reasoning capabilities of a large language model when processing complex tag sequences, improves the accuracy of the prediction model, improves the load prediction capability and load control efficiency of the charging station, and lays a solid foundation for achieving orderly charging.

[0082] The beneficial effects of the present invention also include:

[0083] 1. The present invention adopts prompt technology to convert environmental factors such as holidays, weather, temperature, traffic conditions, etc. that affect electric vehicle load prediction, integrates fragmented charging load time series, forms a large language model input composed of language text, and provides a method for integrating environmental factors and time series data.

[0084] 2. The present invention adopts a parallel adapter to increase the fine-tuning parameters. Through the parameter-efficient fine-tuning technology, only a small number of (additional) model parameters are fine-tuned without changing all model parameters, which effectively adapts the pre-trained language model to the charging load prediction task, achieves performance comparable to comprehensive fine-tuning, and significantly reduces the computing and storage costs.

[0085] 3. The present invention adopts dual optimization objectives for training. On the one hand, the prediction accuracy of the generated text of the large language model is considered, and the cross entropy loss function is used to measure the loss of the text. On the other hand, the accuracy of the charging load prediction result is considered, and the minimum error square function is used to calculate the numerical loss. The two types of losses are integrated to form a dual optimization objective, which improves the accuracy of charging load prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 A schematic diagram of the steps of a method for orderly load control of an electric vehicle charging station based on a large language model of the present invention;

[0087] Figure 2 It is a schematic diagram of the structure of a time series prediction model parameter fine-tuning parallel adapter of an orderly load control method of an electric vehicle charging station based on a large language model of the present invention;

[0088] Figure 3 The present invention is a schematic diagram of the module structure of an orderly load control system for an electric vehicle charging station based on a large language model. DETAILED DESCRIPTION

[0089] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in the present invention are only embodiments of a part of the present invention, not all embodiments. Based on the spirit of the present invention, all other embodiments not recorded in the present invention obtained by ordinary technicians in this field according to the embodiments recorded in the present invention without making creative work should belong to the protection scope of the present invention.

[0090] Figure 1 The figure is a schematic flow chart of the steps of a method for orderly load control of an electric vehicle charging station based on a large language model of the present invention. Figure 1 As shown, the first aspect of the present invention relates to a method for orderly load control of an electric vehicle charging station based on a large language model, the method comprising the following steps:

[0091] S1. Collect the historical charging load time series data of electric vehicle charging stations and process outliers based on the Hampel filter;

[0092] S2. Normalize the historical charging load time series data, and perform segmentation based on the sliding time window method to generate charging load time series segment input;

[0093] S3, collecting corresponding working days / holidays, weather, temperature, traffic conditions and other environmental data for the charging load time series segments, and generating environmental data input;

[0094] S4, taking charging load time series fragments and environmental data as input, constructing a charging load time series prediction model based on a large language model and prompt technology;

[0095] S5. Construct dual optimization objectives, adopt the adapter-based large-scale model parameter efficient fine-tuning technology, train the charging load time series prediction model, and realize the prediction of future charging load;

[0096] S6. Perform demand response based on the charging load forecast result, and regulate the charging facilities in the charging station to achieve optimized management of corresponding orderly charging according to the load forecast result.

[0097] In S1, the historical charging load time series data of the electric vehicle charging station is collected, and outlier processing is performed based on the Hampel filter, including:

[0098] Step 1: Collect the overall historical charging load time series data of the charging station from the metering equipment and management system of the electric vehicle charging station. The historical charging load time series data is expressed as where t 1 ,t 2 ,...,t N represents the sampling time, N represents the maximum number of samples, and the value of each sample point represents the overall load of the charging station at the sampling time, in kilowatts (kW).

[0099] Step 2: Identify and process the outliers of the charging load history data based on the Hampel filter, and analyze the historical charging load time series data P origin Sort the load values ​​from small to large to get the sequence P order , median value M , The calculation formula is as follows:

[0100]

[0101] Where N represents the maximum number of samples. Indicates that N is an odd number of time series P order The middle position of and Indicates that N is an even number when the series P order middle position.

[0102] Calculate the absolute deviation of each data point in the sequence data using the following formula:

[0103]

[0104] in, represents the data point in the historical charging load time series data, M P Represents the median of the sequence data.

[0105] The outlier judgment criteria of the Hampel filter are set as follows: if the data point The median absolute deviation (MAD) t Exceeding the threshold λ, that is, MAD t >λ, the value of the data point is considered an outlier. The method for dealing with outliers is to replace the value of the data point with the median value of the data set. The formula is as follows:

[0106]

[0107] in, Represents the load value after abnormal processing, which constitutes the historical charging load time series data P after abnormal processing hampel .

[0108] In S2, the historical charging load time series data is normalized and segmented based on the sliding time window method to generate the charging load time series segment input, including:

[0109] Step 1: Normalize the historical charging load time series data after abnormal processing to obtain the normalized historical charging load time series data.

[0110] For sampling time t 1 ,t 2 ,...,t N Each data is normalized, and the calculation formula is as follows:

[0111]

[0112] in, represents the load data after abnormal processing, p t represents the normalized charging load data obtained after normalization calculation, p max Represents the maximum value in the historical charging load time series data, p min Indicates the minimum value in the historical charging load series data.

[0113] Step 2: Based on the sliding window method, the normalized historical charging load time series data is divided into segments of fixed window length to form a charging load time series segment set X and a charging load prediction result set Y.

[0114] The normalized historical charging load time series data is divided according to the window length K. Each data segment p after division t-K ,…,p t-1 An element of the charging load time series segment set X, x i =p t-K ,…,p t-1 At the same time, the next data p corresponding to the charging load timing segment tAs an element of the charging load forecast result set Y, y i =p t . For each pair of x i and i All of them constitute the training data pair for charging load prediction.

[0115] In S3, the corresponding working days / holidays, weather, temperature, traffic conditions and other environmental data are collected for the charging load time series segments to generate environmental data input, including:

[0116] Step 1: According to each charging load time series segment, collect the environmental data corresponding to the time segment, including weekdays / holidays, weather, temperature, traffic conditions, etc.

[0117] The working day / holiday data corresponding to the charging load time series segment are determined through the holiday arrangement notices released on the Chinese government website, the holiday notices released on the local government website, and the rest days in the weekly calendar.

[0118] The weather data and temperature data corresponding to the charging load time series fragments were obtained through the website of the China Meteorological Administration using web crawler technology.

[0119] Through the Baidu Map Smart Transportation website, web crawler technology is used to obtain traffic conditions and congestion data corresponding to the charging load time segments.

[0120] Step 2: For each time series segment in the charging load time series segment set X, an environmental data set E is formed by the above-collected working day / holiday, weather, temperature, and traffic condition data.

[0121] Convert the collected environmental data into input form:

[0122]

[0123] Among them, e i Represents the charging load time series segment x i The corresponding environmental data input, e i ∈E. Indicates the current weather conditions. Indicates the current temperature. Indicates working day / non-working day identification. Indicates the traffic congestion index around the charging station. represents the average speed of vehicles around the charging station, p t-7day Indicates the charging load at the same time last week.

[0124] In S4, the charging load time series fragments and environmental data are used as inputs, and a charging load time series prediction model is constructed based on a large language model and prompt technology, including:

[0125] Step 1: Based on the prompt technology, construct a charging load time series prediction prompt text dataset.

[0126] According to the charging load time series segment set X and the environmental data set E, a prompt function is used to form an input prompt text. According to the charging load prediction result set Y, a prompt function is also used to form an output prompt text. The input prompt text and the output prompt text are merged to form a load prediction prompt text corresponding to the charging load time series segment. According to this method, the charging load time series segment set is constructed into a charging load time series prediction prompt text set M, and the formula is as follows:

[0127]

[0128] and are the input part prompt function and the output part prompt function, which means that the i-th charging load time series segment x i 、Environmental data i And the load forecast result y i Convert to prompt text m i The conversion function of .

[0129] The prompt function is constructed using the template method. For the application scenario of charging load prediction of electric vehicle charging stations, the input part prompt function is constructed The template indicates:

[0130]

[0131] Output part prompt function The template indicates:

[0132] <![CDATA[Predict the charging load at the current moment as [p t .]]>

[0133] According to the specific charging load time series fragment, environmental data and prediction results, the prompt function template is filled in, and the prompt text is obtained after combining the input prompt and the output prompt as follows:

[0134]

[0135] Note: For ease of understanding, the above prompt text examples show the values ​​before normalization. In actual application, use the normalized values.

[0136] Step 2: Based on the large language model, construct a charging load time series prediction model.

[0137] Based on the large language model, a neural network model is constructed to fine-tune the prompt text paragraphs. The model optimizes the joint probability of the prompt text paragraphs, so that the large language model can predict the charging load time series.

[0138] The charging load time series prediction model structure is based on a large language model. A parallel adapter is added between the Transformer layers of the large language model to form a large language model network structure with efficient parameter adjustment. The parallel position and internal structure of the adapter are shown in Figure 2. Figure 2 shown.

[0139] The logical representation of an adapter network is as follows:

[0140] Adapter(z)=W up (ReLU(W down z))+z,

[0141] Where Adapter(·) is the logical representation of the adapter, z represents the input of the adapter, and W up is the upward projection matrix, W down is the downward projection matrix, and ReLU(·) is the nonlinear transformation layer.

[0142] In S5, dual optimization objectives are constructed, and the charging load time series prediction model is trained using the adapter-based large-scale model parameter efficient fine-tuning technology, including:

[0143] Step 1: Construct the cross entropy optimization target according to the load forecast prompt text. The formula is as follows:

[0144]

[0145] in, represents the cross entropy optimization target of the generated sequence of the language model and the prompt text, cross_entropy(·) represents the cross entropy loss function, h(·) represents the output layer of the language model, Z represents the input of the language model, represents the output layer of the language model, M represents the prompt text set, and θ represents the parameters of the model fine-tuning.

[0146] The minimum square error optimization objective is constructed based on the load forecast results. The formula is as follows:

[0147]

[0148] in, represents the minimum square error optimization target of the charging load prediction result, X represents the charging load time series segment set, x i ∈X represents the i-th historical charging load segment, E represents the environmental data set, e i ∈e represents the environmental data corresponding to the i-th historical charging load segment, M represents the charging load time series prediction prompt text set, Y represents the charging load prediction result set, y i∈Y represents the i-th load forecast result, θ represents the model fine-tuning parameters, LLM(·) represents the output generated by the large language model, Represents the input prompt function, f extract (·) represents the function that extracts prediction results from text.

[0149] The cross entropy optimization objective and the minimum square error optimization objective are combined to form a dual optimization objective. The formula is as follows:

[0150]

[0151] in, It is the loss function during parameter fine-tuning. The loss consists of two parts: the cross entropy optimization objective and the minimum square error optimization objective. β represents the balance parameter between the two parts. X represents the set of charging load time series fragments, Y represents the set of charging load prediction results, M represents the set of charging load time series prediction prompt texts, and θ represents the parameters of model fine-tuning.

[0152] Step 2: Using fine-tuning technology, fine-tune the above time series prediction model according to the charging load time series prediction prompt text set M and the charging load prediction result set Y.

[0153] In S5, the future charging load is predicted based on the trained charging load time series prediction model, including:

[0154] Step 1: Generate output prompt text based on new input prompt text, and extract load forecast results from it according to the prompt function.

[0155] According to the historical charging load time series data fragments of the charging station and the current environmental data, the input prompt text is constructed, the above charging load time series prediction model is applied to obtain the output prompt text, and the charging load prediction result is extracted from it.

[0156] The prediction is based on the charging load time series prediction model, and the formula is as follows:

[0157]

[0158] Among them, P LM (·; θ) means using the fine-tuned large language model to calculate the probability, θ represents the model fine-tuning parameters, Indicates that the current load forecast value The slot filling function that fills the prompt text m, It means searching for the value with the largest probability from the possible candidate results as the prediction result. Represents the normalized load forecast result output by the model.

[0159] Step 2: Denormalize the load forecast result to obtain the final charging load forecast result. The formula is as follows:

[0160]

[0161] in, represents the load forecasting result after denormalization, p max Indicates the maximum value in the historical charging load sequence data, p min Indicates the minimum value in the historical charging load sequence data. Represents the normalized load forecast result output by the model.

[0162] The method performs demand response based on the charging load forecast result, and regulates the charging facilities in the charging station to achieve optimized management of corresponding orderly charging according to the load forecast result.

[0163] Figure 3 The present invention is a schematic diagram of the module structure of an orderly load control system for an electric vehicle charging station based on a large language model.

[0164] The second aspect of the present invention relates to an orderly load control system for electric vehicle charging stations based on a large language model, and the system is implemented using the steps of the method in the first aspect of the present invention; and the system includes an input acquisition module, a model calculation module, and a load control module, wherein the input acquisition module is used to collect historical charging load data and environmental data of the electric vehicle charging station, and generate input quantities based on the method S2-S3; the model calculation module is used to construct a charging load prediction model using a large language model and prompt technology, calculate the input quantity, and generate a prediction of the future charging load; wherein the charging load prediction model uses an adapter to increase fine-tuning parameters and uses a dual loss function for training; the load control module is used to respond to demand based on the charging load prediction results, and regulate the charging facilities in the charging station to achieve optimal management of the corresponding orderly charging according to the load prediction results.

[0165] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0166] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0167] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0169] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for orderly load control of electric vehicle charging stations based on a large language model, characterized in that: The method comprises the following steps: S1. Collect the historical charging load time series data of electric vehicle charging stations and process outliers based on the Hampel filter; S2. Normalize the historical charging load time series data, and perform segmentation based on the sliding time window method to generate charging load time series segment input; S3, collecting corresponding working day / holiday, weather, temperature, and traffic condition environmental data for the charging load time series segment, and generating environmental data input; S4, taking charging load time series fragments and environmental data as input, constructing a charging load time series prediction model based on a large language model and prompt technology; S5. Construct dual optimization objectives, adopt the adapter-based large-scale model parameter efficient fine-tuning technology, train the charging load time series prediction model, and realize the prediction of future charging load; S6. Perform demand response based on the charging load forecast results, and regulate the charging facilities in the charging station to achieve optimal management of corresponding orderly charging according to the charging load forecast results; In step S4, the charging load time series fragment and environmental data are used as input, and a charging load time series prediction model is constructed based on a large language model and prompt technology, including: Step 4-1: Based on the prompt technology, construct a charging load time series prediction prompt text dataset. According to the charging load time series segment set X and the environmental data set E, the prompt function is used to form the input prompt text. According to the charging load prediction result set Y, the prompt function is also used to form the output prompt text. The input prompt text and the output prompt text are merged to form the load prediction prompt text corresponding to the charging load time series segment. According to this method, the charging load time series segment set is constructed into the charging load time series prediction prompt text set M. The formula is as follows: and are the input part prompt function and the output part prompt function, which means that the i-th charging load time series segment x i 、Environmental data i And the load forecast result y i Convert to prompt text m i The conversion function is used to construct the prompt function for the application scenario of charging load prediction of electric vehicle charging stations. Step 4-2: Construct a charging load time series prediction model based on a large language model. Based on the large language model, a neural network model is constructed to fine-tune the prompt text paragraphs. The neural network model optimizes the joint probability of the prompt text paragraphs, so that the large language model can predict the charging load time series. The charging load time series prediction model structure is based on a large language model. Parallel adapters are added between the Transformer layers of the large language model to form a large language model network structure with efficient parameter adjustment. The logical representation of an adapter network is as follows: Adapter(z)=W up (ReLU(W down with))+with, Where Adapter(·) is the logical representation of the adapter, z represents the input of the adapter, and W up is the upward projection matrix, W down is the downward projection matrix, ReLU(·) is the nonlinear transformation layer; In step S5, a dual optimization objective is constructed, and the charging load time series prediction model is trained using the adapter-based large-scale model parameter efficient fine-tuning technology, including: Step 5-11: Construct the cross entropy optimization target according to the load forecast prompt text. The formula is as follows: in, represents the cross entropy optimization target of the generated sequence of the language model and the prompt text, cross_entropy(·) represents the cross entropy loss function, h(·) represents the output layer of the language model, Z represents the input of the language model, M represents the prompt text set, and θ represents the model fine-tuning parameters. The minimum square error optimization objective is constructed based on the load forecast results. The formula is as follows: in, represents the minimum square error optimization target of the charging load prediction result, X represents the charging load time series segment set, x i ∈X represents the i-th historical charging load segment, E represents the environmental data set, e i ∈E represents the environmental data corresponding to the i-th historical charging load segment, M represents the charging load time series prediction prompt text set, Y represents the charging load prediction result set, y i ∈Y represents the i-th load forecast result, θ represents the model fine-tuning parameters, LLM(·) represents the output generated by the large language model, Represents the input prompt function, f extract (·) represents the function of extracting prediction results from text, The cross entropy optimization objective and the minimum square error optimization objective are combined to form a dual optimization objective. The formula is as follows: in, It is the loss function during parameter fine-tuning. The loss consists of two parts: the cross entropy optimization objective and the minimum square error optimization objective. β represents the balance parameter between the two parts. X represents the set of charging load time series fragments, Y represents the set of charging load prediction results, M represents the set of charging load time series prediction prompt texts, and θ represents the parameters of model fine-tuning. Step 5-12: Use fine-tuning technology to fine-tune the above time series prediction model according to the charging load time series prediction prompt text set M and the charging load prediction result set Y.

2. According to the method of orderly load control of electric vehicle charging station based on large language model described in claim 1, it is characterized in that: In step S1, the historical charging load time series data of the electric vehicle charging station is collected, and outlier processing is performed based on the Hampel filter, including: Step 1-1: Collect the historical charging load time series data of the charging station as a whole from the metering equipment and management system of the electric vehicle charging station. The historical charging load time series data is expressed as where t1, t2, ..., t N represents the sampling time, N represents the maximum number of samples, and the value of each sample point represents the overall load of the charging station at the sampling time, in kilowatts (kW). Step 1-2: Identify and process the outliers of the charging load history data based on the Hampel filter, and analyze the historical charging load time series data P origin Sort the load values ​​from small to large to get the sequence P order , median value M P The calculation formula is as follows: Where N represents the maximum number of samples. Indicates that N is an odd number of time series P order The middle position of and Indicates that N is an even number when the series P order The middle position of Calculate the absolute deviation of each data point in the sequence data using the following formula: in, represents the data point in the historical charging load time series data, M P represents the median of the sequence data. The outlier judgment criteria of the Hampel filter are set as follows: if the data point The median absolute deviation (MAD) t Exceeding the threshold λ, that is, MAD t >λ, the value of the data point is considered an outlier. The method for dealing with outliers is to replace the value of the data point with the median value of the data set. The formula is as follows: in, Represents the load value after abnormal processing, which constitutes the historical charging load time series data P after abnormal processing hampel .

3. According to the method of orderly load control of electric vehicle charging station based on large language model described in claim 1, it is characterized in that: In step S2, the historical charging load time series data is normalized and segmented based on the sliding time window method to generate charging load time series segment input, including: Step 2-1: Normalize the historical charging load time series data after abnormal processing to obtain the normalized historical charging load time series data. For sampling times t1, t2, ..., t N Each data is normalized, and the calculation formula is as follows: in, represents the load data after abnormal processing, p t represents the normalized charging load data obtained after normalization calculation, p max Represents the maximum value in the historical charging load time series data, p min Indicates the minimum value in the historical charging load sequence data. Step 2-2: Based on the sliding window method, the normalized historical charging load time series data is divided into segments of fixed window length to form a charging load time series segment set X and a charging load prediction result set Y. The normalized historical charging load time series data is divided according to the window length K. Each data segment p after division t-K ,…,p t-1 An element of the charging load time series segment set X, x i =p t-K ,…,p t-1 , and at the same time, the next data p corresponding to the charging load timing segment t As an element of the charging load forecast result set Y, y i =p t , each pair of x i and i All of them constitute the training data pair for charging load prediction.

4. According to the method of orderly load control of electric vehicle charging stations based on a large language model as described in claim 1, it is characterized in that: In step S3, the corresponding working day / holiday, weather, temperature, and traffic condition environmental data are collected for the charging load time series segments to generate environmental data input, including: Step 3-1: According to each charging load time series segment, collect the environmental data corresponding to the time segment, including working days / holidays, weather, temperature, and traffic conditions. Step 3-2: For each time series segment in the charging load time series segment set X, the collected working day / holiday, weather, temperature, and traffic condition data form an environmental data set E. Convert the collected environmental data into input form: Among them, e i Represents the charging load time series segment x i The corresponding environmental data input, e i ∈E, Indicates the current weather conditions. Indicates the current temperature. Indicates working day / non-working day identification. Indicates the traffic congestion index around the charging station. represents the average speed of vehicles around the charging station, p t-7day Indicates the charging load at the same time last week.

5. The method for orderly load control of electric vehicle charging stations based on a large language model according to claim 1, characterized in that: In step S5, the future charging load is predicted according to the trained charging load time series prediction model, including: Step 5-21: Generate output prompt text based on the new input prompt text, and extract the load forecast result from it according to the prompt function. According to the historical charging load time series data fragments of the charging station and the current environmental data, the input prompt text is constructed, the above charging load time series prediction model is applied to obtain the output prompt text, and the charging load prediction result is extracted from it. The prediction is based on the charging load time series prediction model, and the formula is as follows: Among them, P LM (·; θ) means using the fine-tuned large language model to calculate the probability, θ represents the model fine-tuning parameters, Indicates that the current load forecast value The slot filling function that fills the prompt text m, It means searching for the value with the largest probability from the possible candidate results as the prediction result. represents the normalized load forecasting result output by the model, Step 5-22: Denormalize the load forecast result to obtain the final charging load forecast result. The formula is as follows: in, represents the load forecasting result after denormalization, p max Indicates the maximum value in the historical charging load sequence data, p min Indicates the minimum value in the historical charging load sequence data. Represents the normalized load forecast result output by the model.

6. An orderly load control system for electric vehicle charging stations based on a large language model, characterized in that: Used to implement the method for orderly load control of electric vehicle charging stations based on a large language model as described in any one of claims 1 to 5, The system includes an input acquisition module, a model calculation module, and a load control module, wherein: The input acquisition module is used to collect historical charging load data and environmental data of the electric vehicle charging station and generate environmental data input. The model calculation module is used to construct a charging load prediction model using a large language model and prompt technology, calculate the input amount of environmental data, and generate a prediction of future charging load; wherein the charging load prediction model uses an adapter to increase fine-tuning parameters and uses a dual loss function for training; The load control module is used to respond to demand based on the charging load forecast result and to control the charging facilities in the charging station so as to achieve optimized management of corresponding orderly charging according to the load forecast result.

7. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for orderly load control of an electric vehicle charging station based on a large language model as described in any one of claims 1 to 5 above is implemented.

Citation Information

Patent Citations

  • Charging facility load prediction method and system based on multilayer optimization kernel extreme learning machine

    CN114692956A

  • Short-term electric vehicle charging load probability prediction method based on composite quantile regression

    CN116796892A