Electric vehicle charging method, device, equipment, medium and program product

By predicting electricity prices and generating charging strategies, the charging time of electric vehicles is adjusted to solve the problems of high electric vehicle charging costs and grid overload, and achieve efficient charging with lower electricity prices.

CN118082598BActive Publication Date: 2024-10-11ELECTRIC POWER SCI & RES INST OF STATE GRID TIANJIN ELECTRIC POWER CO +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410502594.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-25
Publication Date
2024-10-11
Estimated Expiration
2044-04-25

AI Technical Summary

Technical Problem

Existing electric vehicle charging methods fail to effectively reduce user charging costs and may lead to the risk of grid overload when a large number of electric vehicles are charged.

Method used

By receiving the charging service request of the target vehicle, it obtains its charging status information, actual electricity price information, historical electricity price information and expected end of charging time, uses the electricity price prediction model to predict future electricity prices, and generates a charging strategy based on the prediction results and current status to adjust the charging power. Charge during periods when electricity prices are lower.

Benefits of technology

It enables high-power charging during periods when electricity prices are low, reducing user charging costs and reducing the risk of grid overload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118082598B_ABST
    Figure CN118082598B_ABST
Patent Text Reader

Abstract

The present invention provides an electric vehicle charging method, device, equipment, medium and program product, the method comprising: in response to receiving a charging service request of a target vehicle, obtaining the charging status information of the target vehicle at the tth moment, the actual electricity price information at the tth moment, the historical electricity price information and the expected end time of charging; using an electricity price prediction model to process the historical electricity price information and the actual electricity price information at the tth moment to obtain the predicted electricity price information at the t+1th moment; inputting the predicted electricity price information at the t+1th moment, the charging status information at the tth moment, the actual electricity price information at the tth moment, the historical electricity price information and the expected end time of charging into a strategy model to obtain the charging strategy at the t+1th moment; performing a charging operation on the target vehicle according to the target charging power at the t+1th moment; when it is determined that t is less than the expected end time of charging, returning to perform the above charging operation; when it is determined that t is equal to the expected end time of charging, ending charging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of charging technology, and in particular to an electric vehicle charging method, device, equipment, medium and program product. Background Art

[0002] With the development of technology, the number of electric vehicles and their associated charging infrastructure is growing steadily. However, charging a large number of electric vehicles at the same time will put the power grid at risk of overloading, while the promotion of real-time electricity prices encourages users to shift charging time to off-peak hours, making charging costs adjustable.

[0003] In the related art, the charging plan is often only related to the arrival time of the electric vehicle and the estimated charging time, and there is a lack of a charging method that meets user needs and can effectively reduce user charging costs. Summary of the invention

[0004] In view of the above problems, the present invention provides an electric vehicle charging method, device, equipment, medium and program product.

[0005] According to a first aspect of the present invention, there is provided an electric vehicle charging method, comprising: in response to receiving a charging service request from a target vehicle, obtaining charging status information of the target vehicle at time t, actual electricity price information at time t, historical electricity price information and an estimated end time of charging, where t is an integer greater than or equal to 1; processing the historical electricity price information and the actual electricity price information at time t using an electricity price prediction model to obtain predicted electricity price information at time t+1; inputting the predicted electricity price information at time t+1, the charging status information at time t, the actual electricity price information at time t, the historical electricity price information and the estimated end time of charging into a strategy model to obtain a charging strategy at time t+1, wherein the charging strategy indicates a target charging power of the target vehicle at time t+1; performing a charging operation on the target vehicle at time t+1 according to the target charging power; in a case where it is determined that t is less than the estimated end time of charging, returning to perform the charging operation; and in a case where it is determined that t is equal to the estimated end time of charging, ending charging.

[0006] According to an embodiment of the present invention, the predicted electricity price information at the t+1th moment, the charging status information at the tth moment, the actual electricity price information at the tth moment, the historical electricity price information and the expected end time of charging are input into the strategy model to obtain the charging strategy at the t+1th moment, including: splicing the predicted electricity price information at the t+1th moment, the charging status information at the tth moment, the actual electricity price information at the tth moment, the historical electricity price information and the expected end time of charging to obtain a feature vector; and inputting the feature vector into the strategy model to obtain the charging strategy.

[0007] According to an embodiment of the present invention, the method further includes: based on a Markov state transition model, processing the target charging power at the t+1th moment and the charging status information at the tth moment to obtain the charging state transition probability of the target vehicle; and based on the charging state transition probability and the predetermined charging state at the t+1th moment corresponding to the charging strategy at the t+1th moment, obtaining the actual charging state at the t+1th moment.

[0008] According to an embodiment of the present invention, the above-mentioned strategy model includes: an actor network, at least two critic networks and at least two state value evaluation networks; the above-mentioned predicted electricity price information at the t+1th moment and the above-mentioned state of charge information at the tth moment are input into the strategy model to obtain the charging strategy at the t+1th moment, including: inputting the above-mentioned feature vector into the actor network, and outputting the charging strategy at the t+1th moment; wherein the model parameters of the above-mentioned actor network are obtained by training the above-mentioned at least two critic networks and the above-mentioned at least two state value evaluation networks based on the value evaluation results of multiple sample charging strategies output by the above-mentioned actor network.

[0009] According to an embodiment of the present invention, the above method also includes: obtaining the actual electricity price information at the t+1th moment and the battery loss parameters of the above target vehicle; based on the target reward function, according to the above actual electricity price information at the t+1th moment, the above battery loss parameters and the above target charging power, obtaining the reward value corresponding to the charging strategy at the t+1th moment; and fine-tuning the model parameters of the above strategy model based on the above reward value.

[0010] According to an embodiment of the present invention, the above-mentioned electricity price prediction model is a long short-term memory network; the above-mentioned electricity price prediction model is used to process the above-mentioned historical electricity price information and the above-mentioned actual electricity price information at the t-th moment to obtain the predicted electricity price information at the t+1-th moment, including: using the above-mentioned long short-term memory network to extract the time series characteristics of the above-mentioned historical electricity price information; and based on the above-mentioned time series characteristics, according to the above-mentioned actual electricity price information at the t-th moment, obtain the predicted electricity price information at the t+1-th moment.

[0011] A second aspect of the present invention provides an electric vehicle charging device, comprising: an acquisition module, for obtaining, in response to receiving a charging service request from a target vehicle, charging status information of the target vehicle at the tth moment, actual electricity price information at the tth moment, historical electricity price information and an estimated charging end time, where t is an integer greater than or equal to 1; a prediction module, for processing the historical electricity price information and the actual electricity price information at the tth moment using an electricity price prediction model to obtain predicted electricity price information at the t+1th moment; a strategy generation module, for inputting the predicted electricity price information at the t+1th moment, the charging status information at the tth moment, the actual electricity price information at the tth moment, the historical electricity price information and the estimated charging end time into a strategy model to obtain a charging strategy at the t+1th moment, wherein the charging strategy indicates a target charging power of the target vehicle at the t+1th moment; A charging module is used to perform a charging operation on the target vehicle according to the target charging power at the t+1th time; a first judgment module is used to return to perform the charging operation when it is determined that t is less than the expected end time of charging; and a second judgment module is used to end charging when it is determined that t is equal to the expected end time of charging.

[0012] According to an embodiment of the present invention, the above-mentioned strategy generation module includes: a feature vector generation submodule, which is used to splice the predicted electricity price information at the above-mentioned time t+1, the charging status information at the above-mentioned time t, the actual electricity price information at the above-mentioned time t, the above-mentioned historical electricity price information and the expected end time of charging to obtain a feature vector; a charging strategy generation submodule, which is used to input the above-mentioned feature vector into the above-mentioned strategy model to obtain the above-mentioned charging strategy.

[0013] According to an embodiment of the present invention, the above-mentioned device also includes: a charging transfer probability generation module, which is used to process the target charging power at the above-mentioned time t+1 and the charging status information at the tth time based on the Markov state transition model to obtain the charging state transfer probability of the above-mentioned target vehicle; an actual charging state module, which is used to obtain the actual charging state at the t+1th time based on the above-mentioned charging state transfer probability and the predetermined charging state at the t+1th time corresponding to the charging strategy at the above-mentioned time t+1.

[0014] According to an embodiment of the present invention, the above-mentioned strategy model includes: an actor network, at least two critic networks and at least two state value assessment networks; the above-mentioned strategy generation module includes:

[0015] The charging strategy generation submodule is used to input the above-mentioned feature vector into the actor network and output the charging strategy at the above-mentioned time t+1; wherein the model parameters of the above-mentioned actor network are trained based on the value evaluation results of multiple sample charging strategies output by the above-mentioned actor network using the above-mentioned at least two critic networks and the above-mentioned at least two state value evaluation networks.

[0016] According to an embodiment of the present invention, the above-mentioned device also includes: a battery loss parameter calculation module, which is used to obtain the actual electricity price information at the t+1th moment and the battery loss parameters of the above-mentioned target vehicle; a reward value calculation module, which is used to obtain the reward value corresponding to the charging strategy at the above-mentioned t+1th moment based on the target reward function, according to the above-mentioned actual electricity price information at the t+1th moment, the above-mentioned battery loss parameters and the above-mentioned target charging power; a parameter adjustment module, which is used to fine-tune the model parameters of the above-mentioned strategy model based on the above-mentioned reward value.

[0017] According to an embodiment of the present invention, the above-mentioned electricity price prediction model is a long short-term memory network; the above-mentioned prediction module includes: a time series feature extraction sub-module, which is used to extract the time series features of the above-mentioned historical electricity price information using the above-mentioned long short-term memory network; an electricity price prediction sub-module, which is used to obtain the predicted electricity price information at the t+1th moment based on the above-mentioned time series features and the actual electricity price information at the tth moment.

[0018] A third aspect of the present invention provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0019] The fourth aspect of the present invention further provides a computer-readable storage medium on which a computer program or instruction is stored, and the steps of the above method are implemented when the above computer program or instruction is executed by a processor.

[0020] The fifth aspect of the present invention also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when executed by a processor.

[0021] According to an embodiment of the present invention, by acquiring the charging status information, actual electricity price information, historical electricity price information and expected end time of charging of the target vehicle at time t, a trained electricity price prediction model is used to perform predictions to obtain future electricity price information, and a charging strategy for time t+1 is generated based on the future electricity price information and the current charging status. If the expected end time has not arrived at time t+1, charging is performed according to the target charging power indicated by the charging strategy. Electric vehicles can be charged at high power during time periods with lower electricity prices, thereby reducing users' charging costs and further reducing the risk of severe overload of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0023] Figure 1An application scenario diagram of an electric vehicle charging method according to an embodiment of the present invention is shown;

[0024] Figure 2 A flow chart showing an electric vehicle charging method according to an embodiment of the present invention is shown;

[0025] Figure 3 A flowchart of obtaining a charging strategy at time t+1 according to an embodiment of the present invention is shown;

[0026] Figure 4 A schematic diagram of the structure of the critic network is shown;

[0027] Figure 5 A flowchart of obtaining predicted electricity price information according to an embodiment of the present invention is shown;

[0028] Figure 6 The structural diagram of the LSTM network is shown;

[0029] Figure 7 A schematic diagram showing a flow chart of an electric vehicle charging method according to an embodiment of the present invention;

[0030] Figure 8 A schematic diagram showing the prediction error value of the prediction model training based on the LSTM model according to an embodiment of the present invention as the rounds are iterated;

[0031] Fig. 9 A schematic diagram showing the charging and discharging cost according to an embodiment of the present invention as iterates with the number of training times is shown;

[0032] Fig.10 A schematic diagram showing iteration of a SoC over time according to an embodiment of the present invention is shown;

[0033] Fig.11 A structural block diagram of an electric vehicle charging device according to an embodiment of the present invention is shown; and

[0034] Fig.12 A block diagram of an electronic device suitable for implementing an electric vehicle charging method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0035] Below, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of concepts of the present invention.

[0036] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0037] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0038] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0039] The environmental friendliness of electric vehicles has led to their rapid development, and the number of various electric vehicles and their charging infrastructure is growing steadily. However, a large number of electric vehicles that do not need to be charged will put the power grid at risk of heavy overload. At the same time, the promotion of real-time electricity prices encourages the transfer of loads to non-peak hours, making the costs and benefits of charging and discharging dispatchable to a certain extent. The charging cost can be reduced by optimizing the charging plan. Due to the randomness of traffic conditions, user commuting behavior and real-time electricity prices, the time when electric vehicles arrive and leave the charging pile, the energy consumption of electric vehicles and electricity prices are dynamic and time-varying. Therefore, it is necessary to design an effective charging control strategy in a dynamic environment to effectively reduce the user's charging cost while meeting user needs and ensuring a good user experience, and to achieve grid demand response by guiding user behavior.

[0040] An embodiment of the present invention provides an electric vehicle charging method, comprising, in response to receiving a charging service request from a target vehicle, obtaining the charging status information of the target vehicle at the tth moment, the actual electricity price information at the tth moment, the historical electricity price information and the expected end time of charging, where t is an integer greater than or equal to 1; using an electricity price prediction model to process the historical electricity price information and the actual electricity price information at the tth moment to obtain the predicted electricity price information at the t+1th moment; inputting the predicted electricity price information at the t+1th moment, the charging status information at the tth moment, the actual electricity price information at the tth moment, the historical electricity price information and the expected end time of charging into a strategy model to obtain a charging strategy at the t+1th moment, wherein the charging strategy indicates the target charging power of the target vehicle at the t+1th moment; performing a charging operation on the target vehicle according to the target charging power at the t+1th moment; when it is determined that t is less than the expected end time of charging, returning to perform the above-mentioned charging operation; and when it is determined that t is equal to the expected end time of charging, ending charging.

[0041] Figure 1 An application scenario diagram of an electric vehicle charging method according to an embodiment of the present invention is shown.

[0042] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a terminal device 101 and a charging terminal device 102. A network 104 is used to provide a medium for a communication link between the terminal device 101, the charging terminal device 102 and a server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0043] The user can use the terminal device 101 and the charging terminal device 102 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0044] The terminal device 101 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.

[0045] The charging terminal device 102 may be a charging post with a display screen for providing charging services for electric vehicles, and the present invention does not limit the charging terminal device.

[0046] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the terminal device 101. The background management server may analyze and process received data such as user requests, and feed back processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0047] It should be noted that the electric vehicle charging method provided in the embodiment of the present invention can generally be executed by the server 105. Accordingly, the electric vehicle charging device provided in the embodiment of the present invention can generally be set in the server 105. The electric vehicle charging method provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, the charging terminal device 102 and / or the server 105. Correspondingly, the electric vehicle charging device provided in the embodiment of the present invention can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, the charging terminal device 102 and / or the server 105.

[0048] It should be understood that Figure 1 The number of terminal devices, charging terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, charging terminal devices, networks and servers may be provided as required.

[0049] The following will be based on Figure 1 The scene described by Figure 2~Figure 10 The electric vehicle charging method according to the embodiment of the invention is described in detail.

[0050] Figure 2 A flow chart of an electric vehicle charging method according to an embodiment of the present invention is shown.

[0051] like Figure 2 As shown, the electric vehicle charging method of this embodiment includes operations S210 to S260.

[0052] In operation S210 , in response to receiving a charging service request of a target vehicle, charging state information of the target vehicle at time t, actual electricity price information at time t, historical electricity price information, and an estimated charging end time are acquired.

[0053] Here, t is an integer greater than or equal to 1.

[0054] According to an embodiment of the present invention, the above-mentioned charging service request can be a charging service request sent by the user after connecting to the charging pile, selecting the charging service through the mobile phone and then paying, or it can be a charging service request sent after making a selection operation through the display screen on the charging pile and pre-deducting payment.

[0055] According to an embodiment of the present invention, the time scale of the above-mentioned moment may be hourly, for example, 12 o'clock.

[0056] In operation S220, the historical electricity price information and the actual electricity price information at the tth moment are processed using the electricity price prediction model to obtain the predicted electricity price information at the t+1th moment.

[0057] According to an embodiment of the present invention, the actual electricity price at time t can be normalized and then input into the electricity price prediction model for processing to obtain the predicted electricity price information at time t+1. The actual electricity price at time t can be normalized by the following formula (1).

[0058] (1)

[0059] Among them, P t 1 is the normalized real-time electricity price at time t, P t is the original real-time electricity price at time t, P min and P max The minimum and maximum values ​​in the real-time electricity price.

[0060] For example, the predicted electricity price information at time t+1 can be obtained through the electricity price information of the past 24 hours and the actual electricity price at the current time t. Assuming that the current electricity price is 1 yuan at 11 o'clock, and the electricity price trend has been rising in the past 24 hours, the electricity price prediction model can predict that the electricity price at 12 o'clock may be 2 yuan.

[0061] In operation S230, the predicted electricity price information at time t+1, the charging state information at time t, the actual electricity price information at time t, the historical electricity price information and the estimated end time of charging are input into the strategy model to obtain the charging strategy at time t+1.

[0062] The charging strategy indicates the target charging power of the target vehicle at time t+1.

[0063] In operation S240, a charging operation is performed on the target vehicle according to the target charging power at time t+1.

[0064] In operation S250 , if it is determined that t is less than the estimated charging end time, the above charging operation is returned to be performed.

[0065] In operation S260 , if it is determined that t is equal to the estimated charging end time, charging is ended.

[0066] For example, if the actual electricity price information corresponding to time t is 2 yuan, and the predicted electricity price information corresponding to time t+1 is 1.5 yuan, assuming that time t is 11 o'clock, if the estimated end time of charging is 12 o'clock, charging will be stopped at 12 o'clock. If the estimated end time of charging is 13 o'clock, then at 12 o'clock, charging will be carried out according to the charging strategy at 12 o'clock output by the strategy model. Since the electricity price at 12 o'clock is cheaper than that at 11 o'clock, the charging strategy at 12 o'clock should be to increase the charging power. Then, charging will be carried out at 12 o'clock according to the charging power output by the strategy model.

[0067] According to an embodiment of the present invention, by acquiring the charging status information, actual electricity price information, historical electricity price information and expected end time of charging of the target vehicle at time t, a trained electricity price prediction model is used to perform predictions to obtain future electricity price information, and a charging strategy for time t+1 is generated based on the future electricity price information and the current charging status. If the expected end time has not arrived at time t+1, charging is performed according to the target charging power indicated by the charging strategy. Electric vehicles can be charged at high power during time periods with lower electricity prices, thereby reducing users' charging costs and further reducing the risk of severe overload of the power grid.

[0068] The following will be passed Figure 3 , to exemplarily describe the process of obtaining the charging strategy at time t+1 in operation S230.

[0069] like Figure 3 As shown, the process of obtaining the charging strategy at time t+1 includes operations S310 to S320.

[0070] In operation S310, the predicted electricity price information at time t+1, the charging state information at time t, the actual electricity price information at time t, the historical electricity price information and the estimated end time of charging are concatenated to obtain a feature vector.

[0071] Among them, the feature vector can be classified into three parts. The first is the price part including the predicted electricity price information at the t+1th moment, the actual electricity price information at the tth moment and the historical electricity price information. The second is the charging status information of the electric vehicle. The third is the expected end time of charging.

[0072] In operation S320 , the feature vector is input into a policy model to obtain a charging policy.

[0073] It should be noted that the above charging strategy needs to comply with the upper limit of the discharge power of the charging pile, as shown in the following formula (2).

[0074] (2)

[0075] Among them, a t is a scalar. When it is positive, it is charged. When it is negative, it is discharged.dis is a positive number, representing the upper limit of discharge power, P ch It is also a positive number, representing the upper limit of charging power.

[0076] According to an embodiment of the present invention, the above method may also include processing the target charging power at time t+1 and the charging status information at time t based on the Markov state transition model to obtain the charging state transition probability of the target vehicle; and obtaining the actual charging state at time t+1 based on the charging state transition probability and the predetermined charging state at time t+1 corresponding to the charging strategy at time t+1.

[0077] According to an embodiment of the present invention, the charging and discharging control process of an electric vehicle can be described as a Markov process, that is, under a given current state, the future state of the process is independent of the past state. Then, the charging state transition probability matrix of the target vehicle can be constructed based on the Markov state transition model as shown in the following formula (3).

[0078] (3)

[0079] Among them, s t represents the current state at time t, s t+1 represents the state at time t+1, a t Indicates action, Pr (s t+1 |s t , a t ) indicates s t After action a t Reaching state s t+1 The probability function, P(s t ,s t+1 ) indicates that from state s t Transfer to state s t+1 probability.

[0080] For example, the electric vehicle is currently in a charging state s t , then after action a t Unplug the charging port to stop charging t+1 ; It can also be that the current charging is at 40 kW as the charging state s t , the charging strategy at time t+1 is action a t , then s t+1 At time t+1, the battery is charged with a power of 50 kW.

[0081] According to an embodiment of the present invention, a Markov state transfer matrix can be used to process the current target charging state information and the target charging power at time t+1 to obtain a corresponding charging state transfer matrix. The actual charging state at time t+1 is further obtained by combining the above charging state transfer matrix with the predetermined charging state at time t+1, thereby obtaining the actual charging state after each charging strategy adjustment, thereby further improving the strategy accuracy.

[0082] According to an embodiment of the present invention, the above-mentioned strategy model includes an actor network, at least two critic networks and at least two state value assessment networks. The above-mentioned operation can specifically be inputting the feature vector into the actor network and outputting the charging strategy at the t+1th moment;

[0083] The model parameters of the actor network are trained by using at least two critic networks and at least two state value evaluation networks based on the value evaluation results of multiple sample charging strategies output by the actor network.

[0084] According to an embodiment of the present invention, the above method may further include:

[0085] Obtain the actual electricity price information at time t+1 and the battery loss parameters of the target vehicle; based on the target reward function, obtain the reward value corresponding to the charging strategy at time t+1 according to the actual electricity price information at time t+1, the battery loss parameters and the target charging power; and fine-tune the model parameters of the strategy model based on the reward value.

[0086] According to an embodiment of the present invention, the battery loss parameter may be, for example, the battery percentage SoC and the battery capacity C. Then, the feature vector may be expressed as: , where p t-23 , p t-22 …p t-1 Represents historical electricity price information, p t represents the actual electricity price at time t, Q t Represents the predicted electricity price information obtained by the predicted electricity price prediction model, SoC t represents the percentage of power at time t, C represents the battery capacity (related to electric vehicles and is a fixed value), t represents the current time, and t d Indicates the estimated time when charging will end.

[0087] According to an embodiment of the present invention, the above-mentioned strategy model may be, for example, a SAC (Soft Actor-Critic) model, which consists of an actor network π φ , two state value assessment networks and two critic networks q θ1 and qθ2 Among them, π φ Interacting with the environment and obtaining feedback, the critic network can also be called an action value assessment network.

[0088] Figure 4 A schematic diagram of the critic network structure is shown.

[0089] like Figure 4 As shown in Figure 1, it contains four fully connected layers, and the first three layers are activated using the Relu activation function. The input of the network is the state-action pair (s t , a t ), outputs an estimate of the q value. The q value represents the expected value of the long-term return of taking an action in a given state. By adopting two critic network structures, generating two q values, and calculating the average value as the target q value, it can effectively reduce the problem of over-estimation or under-estimation of the q value of the electric vehicle scheduling action, and obtain a q value closer to the true value, so as to accurately learn the optimal scheduling strategy and avoid converging on the suboptimal scheduling strategy.

[0090] According to the embodiment of the present invention, the q value may be calculated by the following formula (4).

[0091] (4)

[0092] Among them, q target (t) represents the target q value at time t, q θ1 (t) represents the critic network at time t q θ1 The obtained q value, q θ2 (t) represents the critic network at time t q θ2 The obtained q value.

[0093] According to an embodiment of the present invention, a target network and a replay buffer are also applied in the training process of the SAC model. The initialization process and network update process of the SAC model mentioned in the present invention are the same as those of the general SAC model. First, five networks are randomly initialized, and the experience buffer Δ is cleared. Then, the charging and discharging action experience is collected. The actor network interacts with the environment to collect charging and discharging sample data and stores it in the experience buffer Δ. After the experience buffer Δ stores more than the amount of samples sampled once, training begins. Mini-batch sampling is performed on the charging samples of the experience buffer Δ, and the stochastic gradient method is used to train the neural network. First, the online state evaluation network is updated, and the target v value formula (5) of the following state evaluation network is obtained based on the above formula (3).

[0094] (5)

[0095] Among them, α is the entropy weight parameter (i.e., the uncertainty of the behavior), which is used to balance the entropy and expected return of the strategy; π is the target strategy of the actor network, that is, a mapping from state to behavior. More specifically, it defines the probability distribution of choosing various possible behaviors a under a given state S, and q target (t) represents the action value function of the strategy based on the actor network at time t, that is, the expected return that can be obtained under given states and actions, E at~π represents the expectation operator, which means taking action a from state s according to policy π t expected value.

[0096] Afterwards, the online critic network and the target critic network can be updated separately according to the existing SAC algorithm, and then the actor network and the state evaluation network can be updated to complete the weight update of the entire SAC model and obtain a trained SAC network.

[0097] According to the embodiment of the present invention, the reward value feedback can be performed on the above strategy model according to the electric vehicle executing the corresponding charging strategy, and the corresponding reward value can be calculated by the following formula (6).

[0098] (6)

[0099] Among them, p t represents the current real-time electricity price, a t represents the charging strategy, which determines the charging power, B c is the battery loss coefficient, B max is the total energy of the battery.

[0100] According to an embodiment of the present invention, B c Battery loss factor, B max The total energy of the battery is a constant for an electric car that is charged in a short time. c ×|a t | / B max E It can indicate the loss of battery.

[0101] According to an embodiment of the present invention, by calculating the reward value based on the actual electricity price and battery parameters, the actual battery loss is taken into account to calculate the reward value at the corresponding moment, so that the corresponding strategy output can be closer to the actual situation and more accurate, thereby further protecting the interests of users.

[0102] According to an embodiment of the present invention, the electricity price prediction model is a long short-term memory network, which is as follows: Figure 5 , to exemplarily describe the process of obtaining predicted electricity price information in operation S220.

[0103] like Figure 5 As shown, the process of obtaining predicted electricity price information includes operations S510 to S520.

[0104] In operation S510, time series features of historical electricity price information are extracted using a long short-term memory network.

[0105] According to an embodiment of the present invention, the historical electricity price data at the hourly scale may be input into the LSTM (Long Short-Term Memory) after data normalization. The normalization process here is similar to the normalization process in operation S220 and will not be repeated here.

[0106] In operation S520 , based on the time series characteristics, predicted electricity price information at time t+1 is obtained according to the actual electricity price information at time t.

[0107] According to an embodiment of the present invention, the above historical electricity price information is generally the historical electricity price information of the previous 24 hours at the current moment or the historical electricity price information of an integer multiple of 24 hours. The LSTM network is well-known for its strong ability to model the time dependence of time series data, and has achieved great results in smart grid applications such as load forecasting. In addition, electricity price fluctuations are quasi-periodic and have natural temporal characteristics, so future electricity prices can be inferred from past electricity prices. Therefore, the LSTM network is used in the present invention to predict electricity prices.

[0108] Figure 6 A schematic diagram of the structure of the LSTM network is shown.

[0109] Specifically, the LSTM network can be expanded into a 23-layer neural network, with the first layer inputting x t-22 =p t-22 – p t-23 , where p t-22 and p t-23 They represent the electricity prices at time steps t-22 and t-23 respectively. The input gate and forget gate of the LSTM unit can be expressed as follows (7) and (8), respectively.

[0110] (7)

[0111] (8)

[0112] Among them, W i , R i , W f , R f is the weight matrix of the input gate and the forget gate; b i and b f is the bias vector of the input gate and the forget gate; σ is the sigmoid function that outputs a value between 0 and 1, which determines how much information should be allowed to pass.

[0113] Model input information Q' t-1 It can be expressed by the following formula (9).

[0114] (9)

[0115] Where h is the hyperbolic tangent function, W z and R z is the weight matrix; B z is the bias vector. The input gate determines the Q' to be added to the unit t -1. Therefore, the computing unit state can be expressed as the following formula (10):

[0116] (10)

[0117] in, Represents element-by-element multiplication operation; Indicates from The amount of information added; Indicates that from the previous state The amount of information inherited. The output of the cell is determined by the output gate and can be expressed as follows (11):

[0118] (11)

[0119] Among them, Q t-1 represents the output of step t-1, h is the hyperbolic tangent function, N t-1 Represents the previous state Q after the hyperbolic tangent function t-2 The amount of information.

[0120] According to an embodiment of the present invention, the LSTM network output is Q t , which contains the future electricity price trend. The predicted electricity price information predicted by LSTM is crucial to reducing the charging cost, and the charging strategy can be adjusted based on the predicted electricity price.

[0121] Figure 7 A schematic flow chart of a method for charging an electric vehicle according to an embodiment of the present invention is shown.

[0122] As shown in the figure, the embodiment of the present invention performs charging simulation on the data of a single electric vehicle. The data set uses 180 days of data starting from January 1, 20XX. The first 20 days of each month are used as training sets, and the last 10 days are used as test sets. The discount factor is set to 0.99 so that the algorithm has good foresight. In the long short-term memory network, a 128-dimensional feature vector is extracted based on the electricity price of the past 24 hours, and then input into the strategy model SAC. The number of units in the hidden layer and output layer of the SAC model are 128 and 9 respectively. During the training process, the parameters of the actor network and the critic network are randomly initialized and updated by gradient descent.

[0123] Figure 8 A schematic diagram showing the prediction error value of the prediction model training based on the LSTM model according to an embodiment of the present invention as the rounds are iterated.

[0124] like Figure 8 As shown, the present invention trains the LSTM model for 30,000 generations to learn the optimal way to predict electricity price information, wherein the horizontal axis represents the training rounds and the vertical axis represents the prediction error. It can be seen that with the increase of the iteration rounds, the prediction of the electricity price information is getting closer and closer to the true value.

[0125] Fig. 9 A schematic diagram showing the charging and discharging cost as a function of the number of training iterations according to an embodiment of the present invention is shown.

[0126] like Fig. 9 As shown in the figure, a total of 50,000 trainings were conducted. In the first 7,000 trainings, the charging and discharging strategies were randomly selected, and the policy model was allowed to learn the charging and discharging strategies through the selection results. Then, from the 7,000th to the 50,000th time, the e-greedy method was used to balance the exploration-utilization dilemma, and the charging action was randomly selected with a probability of e, otherwise the policy model would make the selection. At the same time, the e-greedy decay strategy was used to gradually form a deterministic strategy. In this stage, the probability e decreased from 1.0 to 0.1, and then remained at 0.1. It can be seen that after 18,000 generations, the cumulative reward began to gradually increase. At 35,000 generations, the cumulative reward converged to around -0.75 yuan, accompanied by small oscillations. The results show that the proposed method successfully learns the strategy to maximize the cumulative reward.

[0127] Fig.10 A schematic diagram showing iteration of a SoC over time according to an embodiment of the present invention is shown.

[0128] like Fig.10 As shown in the figure, the SoC during the charging and discharging process of the electric vehicle changes with the real-time electricity price, which causes battery loss. Through the reward function of the above formula (6), the battery loss during the charging and discharging process of the electric vehicle can be punished to guide the policy model to learn the optimal policy.

[0129] Based on the above electric vehicle charging method, the present invention also provides an electric vehicle charging device. Fig.11 The device is described in detail.

[0130] Fig.11 A structural block diagram of an electric vehicle charging device according to an embodiment of the present invention is shown.

[0131] like Fig.11 As shown, the electric vehicle charging device 1100 of this embodiment includes an acquisition module 1110 , a prediction module 1120 , a strategy generation module 1130 , a charging module 1140 , a first judgment module 1150 , and a second judgment module 1160 .

[0132] The acquisition module 1110 is used to, in response to receiving a charging service request from a target vehicle, acquire the charging status information of the target vehicle at time t, the actual electricity price information at time t, the historical electricity price information, and the estimated end time of charging, where t is an integer greater than or equal to 1. In one embodiment, the acquisition module 1110 can be used to perform the operation S210 described above, which will not be repeated here.

[0133] The prediction module 1120 is used to process the historical electricity price information and the actual electricity price information at the tth moment using the electricity price prediction model to obtain the predicted electricity price information at the t+1th moment. In one embodiment, the prediction module 1120 can be used to perform the operation S220 described above, which will not be described in detail here.

[0134] The strategy generation module 1130 is used to input the predicted electricity price information at the t+1th moment, the charging state information at the tth moment, the actual electricity price information at the tth moment, the historical electricity price information and the estimated end time of charging into the strategy model to obtain the charging strategy at the t+1th moment, wherein the charging strategy indicates the target charging power of the target vehicle at the t+1th moment. In one embodiment, the strategy generation module 1130 can be used to perform the operation S230 described above, which will not be repeated here.

[0135] The charging module 1140 is used to perform a charging operation on the target vehicle according to the target charging power at the t+1th time. In one embodiment, the charging module 1140 can be used to perform the operation S240 described above, which will not be described in detail here.

[0136] The first judgment module 1150 is used to return to perform the above charging operation when it is determined that t is less than the expected end time of charging. In one embodiment, the first judgment module 1150 can be used to perform the operation S250 described above, which will not be described in detail here.

[0137] The second judgment module 1160 is used to terminate charging when it is determined that t is equal to the expected charging termination time. In one embodiment, the second judgment module 1160 can be used to perform the operation S260 described above, which will not be described in detail here.

[0138] According to an embodiment of the present invention, the above-mentioned strategy generation module includes: a feature vector generation submodule, which is used to splice the predicted electricity price information at the above-mentioned time t+1, the charging status information at the above-mentioned time t, the actual electricity price information at the above-mentioned time t, the above-mentioned historical electricity price information and the expected end time of charging to obtain a feature vector; a charging strategy generation submodule, which is used to input the above-mentioned feature vector into the above-mentioned strategy model to obtain the above-mentioned charging strategy.

[0139] According to an embodiment of the present invention, the above-mentioned device also includes: a charging transfer probability generation module, which is used to process the target charging power at the above-mentioned time t+1 and the charging status information at the tth time based on the Markov state transition model to obtain the charging state transfer probability of the above-mentioned target vehicle; an actual charging state module, which is used to obtain the actual charging state at the t+1th time based on the above-mentioned charging state transfer probability and the predetermined charging state at the t+1th time corresponding to the charging strategy at the above-mentioned time t+1.

[0140] According to an embodiment of the present invention, the above-mentioned strategy model includes: an actor network, at least two critic networks and at least two state value assessment networks; the above-mentioned strategy generation module includes:

[0141] The charging strategy generation submodule is used to input the above-mentioned feature vector into the actor network and output the charging strategy at the above-mentioned time t+1; wherein the model parameters of the above-mentioned actor network are trained based on the value evaluation results of multiple sample charging strategies output by the above-mentioned actor network using the above-mentioned at least two critic networks and the above-mentioned at least two state value evaluation networks.

[0142] According to an embodiment of the present invention, the above-mentioned device also includes: a battery loss parameter calculation module, which is used to obtain the actual electricity price information at the t+1th moment and the battery loss parameters of the above-mentioned target vehicle; a reward value calculation module, which is used to obtain the reward value corresponding to the charging strategy at the above-mentioned t+1th moment based on the target reward function, according to the above-mentioned actual electricity price information at the t+1th moment, the above-mentioned battery loss parameters and the above-mentioned target charging power; a parameter adjustment module, which is used to fine-tune the model parameters of the above-mentioned strategy model based on the above-mentioned reward value.

[0143] According to an embodiment of the present invention, the above-mentioned electricity price prediction model is a long short-term memory network; the above-mentioned prediction module includes: a time series feature extraction sub-module, which is used to extract the time series features of the above-mentioned historical electricity price information using the above-mentioned long short-term memory network; an electricity price prediction sub-module, which is used to obtain the predicted electricity price information at the t+1th moment based on the above-mentioned time series features and the actual electricity price information at the tth moment.

[0144] According to an embodiment of the present invention, any multiple modules among the acquisition module 1110, the prediction module 1120, the strategy generation module 1130, the charging module 1140, the first judgment module 1150, and the second judgment module 1160 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the acquisition module 1110, the prediction module 1120, the strategy generation module 1130, the charging module 1140, the first judgment module 1150, and the second judgment module 1160 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 1110, the prediction module 1120, the strategy generation module 1130, the charging module 1140, the first judgment module 1150, and the second judgment module 1160 can be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function can be executed.

[0145] Fig.12 A block diagram of an electronic device suitable for implementing an electric vehicle charging method according to an embodiment of the present invention is shown.

[0146] like Fig.12As shown, the electronic device 1200 according to an embodiment of the present invention includes a processor 1201, which can perform various appropriate actions and processes according to the program stored in the ROM (Read Only Memory) or the program loaded from the storage part 1208 to the RAM (Random Access Memory). The processor 1201 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 1201 may also include an onboard memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0147] In RAM 1203, various programs and data required for the operation of electronic device 1200 are stored. Processor 1201, ROM 1202 and RAM 1203 are connected to each other via bus 1204. Processor 1201 performs various operations of the method flow according to the embodiment of the present invention by executing the program in ROM 1202 and / or RAM 1203. It should be noted that the program can also be stored in one or more memories other than ROM 1202 and RAM 1203. Processor 1201 can also perform various operations of the method flow according to the embodiment of the present invention by executing the program stored in the one or more memories.

[0148] According to an embodiment of the present invention, the electronic device 1200 may further include an I / O interface 1205, which is also connected to the bus 1204. The electronic device 1200 may further include one or more of the following components connected to the I / O interface 1205: an input portion 1206 including a keyboard, a mouse, etc.; an output portion 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1208 including a hard disk, etc.; and a communication portion 1209 including a network interface card such as a LAN card, a modem, etc. The communication portion 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed, so that a computer program read therefrom is installed into the storage portion 1208 as needed.

[0149] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present invention is implemented.

[0150] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the ROM 1202 and / or RAM 1203 described above and / or one or more memories other than ROM 1202 and RAM 1203.

[0151] The embodiment of the present invention also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the electric vehicle charging method provided by the embodiment of the present invention.

[0152] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when it is executed by the processor 1201. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0153] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1209, and / or installed from the removable medium 1211. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0154] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the processor 1201, the above functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0155] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0156] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0157] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways, even if such combinations and / or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All of these combinations and / or combinations fall within the scope of the present invention.

[0158] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination. The scope of the present invention is defined by the attached claims and their equivalents. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

Claims

1. A method for charging an electric vehicle, characterized in that: The method comprises: In response to receiving a charging service request from a target vehicle, obtaining charging status information of the target vehicle at time t, actual electricity price information at time t, historical electricity price information, and an estimated end time of charging, where t is an integer greater than or equal to 1; The historical electricity price information and the actual electricity price information at the tth moment are processed by using an electricity price prediction model to obtain predicted electricity price information at the t+1th moment; Inputting the predicted electricity price information at the time t+1, the charging state information at the time t, the actual electricity price information at the time t, the historical electricity price information and the estimated end time of charging into the strategy model, and obtaining the charging strategy at the time t+1, wherein the charging strategy indicates the target charging power of the target vehicle at the time t+1; At time t+1, a charging operation is performed on the target vehicle according to the target charging power; If it is determined that t is less than the estimated charging end time, returning to perform the above charging operation; and When it is determined that t is equal to the estimated charging end time, charging is ended.

2. The method according to claim 1, characterized in that The predicted electricity price information at the t+1th moment, the charging state information at the tth moment, the actual electricity price information at the tth moment, the historical electricity price information and the estimated end time of charging are input into the strategy model to obtain the charging strategy at the t+1th moment, including: The predicted electricity price information at the time t+1, the charging state information at the time t, the actual electricity price information at the time t, the historical electricity price information and the estimated end time of charging are concatenated to obtain a feature vector; and The feature vector is input into the strategy model to obtain the charging strategy.

3. The method according to claim 2, characterized in that The method further comprises: Based on the Markov state transition model, the target charging power at time t+1 and the charging state information at time t are processed to obtain the charging state transition probability of the target vehicle; and Based on the charging state transition probability and the predetermined charging state at the time t+1 corresponding to the charging strategy at the time t+1, an actual charging state at the time t+1 is obtained.

4. The method according to claim 2, characterized in that: The strategy model includes: an actor network, at least two critic networks, and at least two state value assessment networks; The step of inputting the feature vector into the strategy model to obtain the charging strategy includes: Input the feature vector into the actor network, and output the charging strategy at the time t+1; The model parameters of the actor network are obtained by training the at least two critic networks and the at least two state value evaluation networks based on value evaluation results of multiple sample charging strategies output by the actor network.

5. The method according to claim 1 or 4, characterized in that: The method further comprises: Obtaining actual electricity price information at time t+1 and battery loss parameters of the target vehicle; Based on the target reward function, according to the actual electricity price information at the time t+1, the battery loss parameter and the target charging power, a reward value corresponding to the charging strategy at the time t+1 is obtained; and Model parameters of the policy model are fine-tuned based on the reward value.

6. The method according to claim 1, characterized in that The electricity price prediction model is a long short-term memory network; The method of using the electricity price prediction model to process the historical electricity price information and the actual electricity price information at the tth moment to obtain the predicted electricity price information at the t+1th moment includes: Extracting the time series characteristics of the historical electricity price information using the long short-term memory network; and Based on the time series characteristics, the predicted electricity price information at the t+1th moment is obtained according to the actual electricity price information at the tth moment.

7. An electric vehicle charging device, characterized in that: The device comprises: an acquisition module, configured to, in response to receiving a charging service request from a target vehicle, acquire charging status information of the target vehicle at time t, actual electricity price information at time t, historical electricity price information, and an estimated end time of charging, where t is an integer greater than or equal to 1; A prediction module, used to process the historical electricity price information and the actual electricity price information at the tth moment by using an electricity price prediction model to obtain the predicted electricity price information at the t+1th moment; A strategy generation module, used to input the predicted electricity price information at the t+1th time, the charging state information at the tth time, the actual electricity price information at the tth time, the historical electricity price information and the expected end time of charging into a strategy model to obtain a charging strategy at the t+1th time, wherein the charging strategy indicates a target charging power of the target vehicle at the t+1th time; A charging module, used for performing a charging operation on the target vehicle according to the target charging power at time t+1; A first judgment module is used to return to execute the above charging operation when it is determined that t is less than the estimated charging end time; and The second judgment module is used to end charging when it is determined that t is equal to the estimated charging end time.

8. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.