A method and device for realizing intelligent charging of a battery swap cabinet based on historical data
Patent Information
- Application Number
- CN202410323774.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-20
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2044-03-20
AI Technical Summary
[0003]为了克服上述缺陷,本公开提出了一种基于历史数据实现换电柜智能充电的方法及装置,旨在解决现有技术中换电柜充电策略功能单一,无法智能调控从而增加电网负荷、浪费电费和增加运营成本等问题
[0045]本公开通过训练好的电价预测模型性能更好、计算效率更高,且能够准确预测未来电价,能够有效降低换电柜的运营成本和电网电力高峰时段的运行负荷,智能化地分配供电量且满足低成本经济运行。
Smart Images

Figure CN118107432B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of battery swapping cabinet charging control technology, specifically providing a method and device for realizing intelligent charging of battery swapping cabinets based on historical data. Background Technology
[0002] With the rapid development of social production and the economy, new energy electric vehicles and two-wheeled electric vehicles have seen significant growth. However, the resulting charging difficulties have become a major concern, leading to the increasing availability of charging piles and battery swapping stations to meet societal needs. Currently, battery swapping stations employ a disordered charging strategy: charging only when the battery is empty or when the battery is low. This means that at any time, if the swapping station detects a battery entering the station, the control system will immediately activate the charger. However, current charging infrastructure requires dedicated power grid capacity. The disordered charging by numerous swapping stations poses a significant challenge to the power grid, preventing the utilization of idle grid capacity and exacerbating the grid's burden during peak hours, resulting in resource waste. Furthermore, it wastes electricity and increases operating costs for swapping station operators. Therefore, developing a rational battery charging strategy is a pressing technical issue that needs to be addressed. Summary of the Invention
[0003] To overcome the aforementioned shortcomings, this disclosure proposes a method and apparatus for intelligent charging of battery swapping cabinets based on historical data. This aims to address the problems of existing battery swapping cabinets having limited charging strategies, lacking intelligent control, thus increasing grid load, wasting electricity, and raising operating costs. A well-trained electricity price prediction model offers better performance, higher computational efficiency, and accurate prediction of future electricity prices, effectively reducing the operating costs of battery swapping cabinets and the grid's operating load during peak hours. It also intelligently allocates power supply while meeting low-cost, economical operation requirements.
[0004] In a first aspect, this disclosure provides a method for intelligent charging of battery swapping cabinets based on historical data, the method comprising:
[0005] Acquire historical electricity price data and construct a historical electricity price dataset based on the historical electricity price data;
[0006] Construct a recurrent neural network model;
[0007] The recurrent neural network prediction model is trained based on the historical electricity price dataset to obtain the electricity price prediction model.
[0008] By inputting multiple future predicted time points into the electricity price prediction model, the electricity price prediction results corresponding to the multiple future predicted time points are obtained.
[0009] Based on the electricity price forecast, the battery charging time and charging power of the battery swapping cabinet are dynamically adjusted to achieve intelligent charging.
[0010] Optionally, the recurrent neural network prediction model is of the type of gated recurrent unit (GRU) recurrent neural network.
[0011] Optionally, the acquisition of historical electricity price data includes:
[0012] The raw electricity price data of relevant websites is crawled using web crawling technology. The raw electricity price data is then subjected to feature extraction and analysis. The analyzed features are transformed into time series vectors and stored in a database.
[0013] Optionally, the parameters of the gated recurrent unit (GRU) recurrent neural network are initialized before training. These parameters include a weight matrix and bias terms used to control the transmission and transformation of information in the sequence.
[0014] Optionally, training the recurrent neural network prediction model based on the historical electricity price dataset includes:
[0015] Establish the time series vector X = [x] of the real-time electricity price data for the previous 24 hours at time t. t-23 x t-22 , ..., x t ], where x t The input to the gated recurrent unit (GRU) recurrent neural network is given, and the value represents the electricity price at time t.
[0016] For each input time step, the Gated Recurrent Unit (GRU) recurrent neural network performs a forward propagation, receiving input x. t And the hidden state electricity price vector h from the previous time step t-1 And respectively through the weighting matrix W R W z And the sigmaoid function σ calculates the reset gate R for the current time step. t and Update Gate Z t ,
[0017] R t =σ(W R ·[x t h t-1 ]),
[0018] Z t =σ(W z ·[x t h t-1 ]),
[0019] Among them, W R W z These are used to calculate the reset gate R. t and Update Gate Z t The weight matrix, x tThe current electricity price, h t-1 The hidden state output of the Gated Recurrent Unit (GRU) recurrent neural network at the previous time step;
[0020] Based on the sigmoid function σ and the R obtained in the previous step t Update Gate Z t Calculate the hidden state at the current time step. Finally, based on all the above parameters, the current time step electricity price output h is calculated. t .
[0021] Optionally, the step of using the sigmoid function σ and the R obtained in the previous step... t Update Gate Z t Calculate the hidden state at the current time step. Finally, based on all the above parameters, the current time step electricity price output h is calculated. t Specifically, it includes:
[0022]
[0023] Among them, W h It is a weight matrix used to map the input and the previous hidden state to a new hidden state space.
[0024]
[0025] Optionally, training the recurrent neural network prediction model based on the historical electricity price dataset further includes:
[0026] The loss is calculated based on the difference between the predicted output value and the actual target value.
[0027] Perform backpropagation, using the calculated loss to propagate the error signal backward along the network, and adjust the network parameters to reduce the loss;
[0028] Based on the gradients calculated by backpropagation, the weights and biases of the network are updated using an optimization algorithm to minimize the loss function;
[0029] Through iterative training, repeat the above training steps until a predefined number of training iterations is reached, or until the electricity price prediction model reaches a satisfactory performance level.
[0030] Optionally, the step of dynamically adjusting the battery charging time and charging power of the battery swapping cabinet based on the electricity price forecast result to achieve intelligent charging includes:
[0031] Based on the electricity price forecasts for multiple future time points, the following optimal charging strategy is implemented:
[0032] If one or more of the predicted electricity prices at multiple future prediction time points are lower than a first preset electricity price threshold, then the sequence of prediction time points lower than the first preset electricity price threshold is determined as a low-price charging time sequence; if one or more of the predicted electricity prices at multiple future prediction time points are higher than a second preset electricity price threshold, then the sequence of prediction time points higher than the second preset electricity price threshold is determined as a low-power charging time sequence; wherein, the first preset electricity price threshold is less than the second preset electricity price threshold;
[0033] The remaining power value of all batteries in the battery swapping cabinet is detected in real time. For batteries with a remaining power value less than a preset power threshold, charging is performed first during the low-price charging period, or charging is performed at low power during the low-power charging period.
[0034] Optionally, the method further includes:
[0035] Obtain the charging duration and charging capacity of each charging cabinet in the microgrid under a future time period.
[0036] Predict the electricity price forecast results for multiple predicted time points in the future time period;
[0037] Based on the charging time, the amount of electricity to be charged, and the electricity price forecast for the future time period, the charging time of each charging cabinet to be charged is dynamically adjusted, provided that the total amount of electricity to be charged does not exceed a predetermined grid load threshold, so as to realize the power dispatch and low-cost electricity use of the microgrid.
[0038] Secondly, this disclosure provides a device for intelligent charging of battery swapping cabinets based on historical data, the method comprising:
[0039] An acquisition unit is used to acquire historical electricity price data and construct a historical electricity price dataset based on the historical electricity price data;
[0040] Building blocks are used to construct recurrent neural network models;
[0041] The training unit is used to train the recurrent neural network prediction model based on the historical electricity price dataset to obtain the electricity price prediction model;
[0042] The prediction unit is used to input multiple future prediction time points into the electricity price prediction model to obtain the electricity price prediction results corresponding to the multiple future prediction time points;
[0043] The charging unit is used to intelligently charge the batteries in the battery swapping cabinet based on the electricity price prediction results.
[0044] Compared with the prior art, the above-described one or more technical solutions disclosed herein have at least the following beneficial effects:
[0045] This disclosure utilizes a well-trained electricity price prediction model that offers superior performance, higher computational efficiency, and accurate prediction of future electricity prices. It effectively reduces the operating costs of battery swapping cabinets and the operating load of the power grid during peak hours, intelligently allocates power supply, and meets the requirements for low-cost and economical operation.
[0046] It should be understood that the description in the Summary of the Invention section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0047] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0048] Figure 1 This is a flowchart illustrating a method for intelligent charging of a battery swapping cabinet based on historical data, according to an embodiment of this disclosure.
[0049] Figure 2 This is a simplified calculation process diagram of a recurrent neural network prediction model according to an embodiment of the present disclosure;
[0050] Figure 3 This is a schematic diagram illustrating the main steps of the training process of a recurrent neural network prediction model according to an embodiment of the present disclosure;
[0051] Figure 4 This is a unit schematic diagram of a device for realizing intelligent charging of a battery swapping cabinet based on historical data according to an embodiment of the present disclosure;
[0052] Figure 5 This is a structural diagram of an exemplary electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0054] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0055] This invention collects historical reference electricity price data from smart meters over several periods, cleans and integrates the data into a time-series dataset, and trains a recurrent neural network (RNN) to obtain predicted electricity price data. The output of the RNN is then used to represent the environmental state at that stage. The trained electricity price prediction model can predict electricity prices for multiple future time points. Based on these predictions, the battery charging time and power of the battery swapping station are dynamically adjusted to achieve intelligent charging.
[0056] The following detailed description, in conjunction with the accompanying drawings, of a method and apparatus for intelligent charging of a battery swapping cabinet based on historical data, provided by the present disclosure, through specific embodiments, will be provided in detail.
[0057] Figure 1 This is a flowchart illustrating a method for intelligent charging of a battery swapping cabinet based on historical data, according to an embodiment of this disclosure. Figure 1 As shown, a method 100 for intelligent charging of battery swapping cabinets based on historical data is provided, the method 100 including:
[0058] S110: Obtain historical electricity price data and construct a historical electricity price dataset based on the historical electricity price data;
[0059] Optionally, web crawler technology can be used to crawl the original electricity price data of relevant websites, extract and analyze the features of the original electricity price data, transform the analyzed features into time series vectors, and store them in a database.
[0060] S120: Construct a recurrent neural network prediction model;
[0061] Preferably, the present invention uses a gated recurrent unit (GRU) recurrent neural network as the recurrent neural network prediction model. The gated recurrent unit (GRU) recurrent neural network is a variant of the recurrent neural network (RNN) used to process sequential data. Compared with traditional RNN structures (such as simple recurrent neural networks), GRU has better performance in handling long-term dependencies, and has fewer parameters and higher computational efficiency.
[0062] Recurrent neural network models can be built on computers with high-performance GPUs using industrial software such as IDEA or Matlab. A series of historical electricity price data collected and processed in advance can be input into the neural network model for training, thereby predicting future time-series electricity prices.
[0063] S130: Train the recurrent neural network prediction model based on the historical electricity price dataset to obtain the electricity price prediction model;
[0064] Figure 2 This is a simplified calculation process diagram of a recurrent neural network prediction model according to an embodiment of the present disclosure, as shown below. Figure 2 As shown, a recurrent neural network prediction model is constructed based on a gated recurrent unit (GRU) recurrent neural network. The specific implementation of the prediction model is divided into three stages, and its simplified calculation process is as follows:
[0065] Phase 1: Acquire historical electricity price data and construct a historical electricity price dataset based on the historical electricity price data;
[0066] Optionally, the acquisition of historical electricity price data includes:
[0067] The raw electricity price data of relevant websites is crawled using web crawling technology. The raw electricity price data is then subjected to feature extraction and analysis. The analyzed features are transformed into time series vectors and stored in a database.
[0068] Specifically, first, identify relevant websites that provide electricity price data, such as power company websites or government energy departments. Some energy data providers may offer developers access to historical electricity price data via API interfaces, which can be used to obtain the data. Then, write Python web crawler code to retrieve data from the internet. This code simulates browser behavior, accessing web pages and extracting the required information. The crawler can automatically browse web pages, crawl data, perform information extraction and analysis, and connect to the battery swapping cabinet control system. The Python crawler script collects electricity price data and sends it to the battery swapping cabinet control system via the internet, transforming the collected electricity price data into a time-series vector.
[0069] X = [x t-23 x t-22 , ..., x t ]
[0070] Where, x t As the input to the GRU, in this scheme, it represents the electricity price at time t, thus enabling the establishment of real-time electricity price data for the previous 24 hours.
[0071] Phase Two: Training Phase
[0072] Figure 3 This is a schematic diagram illustrating the main steps of the training process of a recurrent neural network prediction model according to an embodiment of this disclosure. Figure 3 As shown, the training process includes the following steps:
[0073] S131: Before training, the parameters of the Gated Recurrent Unit (GRU) recurrent neural network are initialized, including a weight matrix and bias terms, which control the transmission and transformation of information in the sequence. For sequence data, the data is organized according to sequence length and batches to facilitate input into the network.
[0074] S132: For each input time step, the Gated Recurrent Unit (GRU) recurrent neural network performs a forward propagation, receiving input x. t And the hidden state electricity price vector h from the previous time step t-1 And respectively through the weighting matrix W R W z And the sigmaoid function σ calculates the reset gate R for the current time step. t and Update Gate Z t The specific calculation formula and process will be explained in the next stage;
[0075] S133: Based on the sigmoid function σ and R obtained in the previous step t Z t Calculate the hidden state at the current time step. Finally, based on all the above parameters, the current time step electricity price output h is calculated. t The specific calculation formula and process will be explained in the next stage;
[0076] S134: Loss Calculation: Specifically, the loss is calculated based on the difference between the predicted output value and the actual target value;
[0077] Loss functions (such as cross-entropy loss function) are typically used to measure the difference between model predictions and actual values.
[0078] S135: The gated recurrent unit (GRU) recurrent neural network performs backpropagation, using the calculated loss to propagate the error signal backward along the network and adjust the network parameters to reduce the loss;
[0079] Optionally, the process uses gradient descent or its variants to update the weights and biases, and then uses an optimization algorithm (such as stochastic gradient descent, Adam, etc.) to update the network's weights and biases based on the gradients calculated by backpropagation in order to minimize the loss function.
[0080] S136: Repeat the above training steps through iterative training until a predefined number of training iterations is reached, or until the electricity price prediction model reaches a satisfactory performance level.
[0081] Phase 3: Calculating Electricity Prices
[0082] Based on the above GRU training process, the electricity price vector H = [h] for future times can be predicted in this stage. t h t+1 , ..., h t+24 ], where h t This indicates the prediction of electricity prices at time t.
[0083] Establish the time series vector X = [x] of the real-time electricity price data for the previous 24 hours at time t. t-23 x t-22 , ..., x t ], where x t The input to the gated recurrent unit (GRU) recurrent neural network is given, and the value represents the electricity price at time t.
[0084] Among them, the reset gate R t R determines how to combine new input information with previous memories. t The smaller the value, the more information needs to be forgotten and discarded in the previous moment. This acts as a reset gate, which helps to capture short-term dependencies in the time series.
[0085] Specifically, through the weight matrix W R W z And the sigmaoid function σ calculates the reset gate R for the current time step. t and Update Gate Z t The specific calculation formula is as follows:
[0086] R t =σ(W R ·[x t h t-1 ]),
[0087] Z t =σ(W z ·[x t h t-1 ]),
[0088] Among them, W R W z These are used to calculate the reset gate R. t and Update Gate Z t The weight matrix, x t The current electricity price, h t-1 The hidden state output of the Gated Recurrent Unit (GRU) recurrent neural network at the previous time step;
[0089] Among them, the step of using the sigmoid function σ and the R obtained in the previous step t Update Gate Z t Calculate the hidden state at the current time step. Finally, based on all the above parameters, the current time step electricity price output h is calculated. t Specifically, it includes:
[0090]
[0091] Among them, W h It is a weight matrix used to map the input and previous hidden states to a new hidden state space. The hidden states affect both the cyclic computation of the next time step and the output h of the current time step. t :
[0092]
[0093] S140: Input multiple future predicted time points into the electricity price prediction model to obtain the electricity price prediction results corresponding to the multiple future predicted time points;
[0094] Real-time monitoring of the battery charge level of each battery in the battery swapping cabinet and monitoring of signals after the user replaces the battery through the battery swapping cabinet;
[0095] After receiving the demand command that the battery needs to be charged, the electricity price prediction is performed based on the trained electricity price prediction model. Specifically, multiple future prediction time points are input into the electricity price prediction model to obtain the electricity price prediction results corresponding to the multiple future prediction time points.
[0096] S150: Based on the electricity price forecast results, the battery charging time and charging power of the battery swapping cabinet are dynamically adjusted to achieve intelligent charging.
[0097] This step, based on the electricity price prediction results, dynamically adjusts the battery charging time and charging power of the battery swapping cabinet to achieve intelligent charging. For example, the charging time is adjusted to the closest low electricity price period, or the charging is performed at high power during the low electricity price period, or the charging time or charging power is adjusted during the peak electricity consumption period with high electricity prices.
[0098] In this embodiment, by constructing and training a neural network model, the trained electricity price prediction model has better performance, higher computational efficiency, and can accurately predict future electricity prices. This can effectively reduce the operating costs of the battery swapping cabinet and the operating load of the power grid during peak hours, intelligently allocate power supply, and meet the requirements of low-cost economic operation. It also avoids the increase in operating costs and the increase in power grid load pressure caused by blind charging.
[0099] Optionally, the step of dynamically adjusting the battery charging time and charging power of the battery swapping cabinet based on the electricity price forecast result to achieve intelligent charging includes:
[0100] Based on the electricity price forecasts for multiple future time points, the following optimal charging strategy is implemented:
[0101] If one or more of the predicted electricity prices at multiple future prediction time points are lower than a first preset electricity price threshold, then the sequence of prediction time points lower than the first preset electricity price threshold is determined as a low-price charging time sequence; if one or more of the predicted electricity prices at multiple future prediction time points are higher than a second preset electricity price threshold, then the sequence of prediction time points higher than the second preset electricity price threshold is determined as a low-power charging time sequence; wherein, the first preset electricity price threshold is less than the second preset electricity price threshold;
[0102] The remaining power value of all batteries in the battery swapping cabinet is detected in real time. For batteries with a remaining power value less than a preset power threshold, charging is performed first during the low-price charging period, or charging is performed at low power during the low-power charging period.
[0103] According to this embodiment, generally speaking, high electricity prices correspond to peak electricity consumption periods. From the perspective of economic efficiency and low-cost operation, costs can be saved by reducing charging or power consumption during peak electricity consumption periods. Therefore, this embodiment predicts the electricity prices at multiple predicted time points in the future time period and obtains low-electricity-price charging time sequences and high-electricity-price charging time sequences, i.e., low-power charging time sequences, based on electricity price threshold comparisons. This enables orderly low-electricity-price charging and off-peak charging, thereby reducing the operating costs of the battery swapping cabinet.
[0104] Optionally, the method further includes:
[0105] Obtain the charging duration and charging capacity of each charging cabinet in the microgrid under a future time period.
[0106] Predict the electricity price forecast results for multiple predicted time points in the future time period;
[0107] Based on the charging time, the amount of electricity to be charged, and the electricity price forecast for the future time period, the charging time of each charging cabinet to be charged is dynamically adjusted, provided that the total amount of electricity to be charged does not exceed a predetermined grid load threshold, so as to realize the power dispatch and low-cost electricity use of the microgrid.
[0108] According to this embodiment, by obtaining the charging duration and the amount of electricity to be charged for each charging cabinet in the microgrid under a future time period, the expected charging consumption in the future time period is estimated and the electricity price prediction results corresponding to multiple prediction time points in the future time period are predicted. Based on the charging duration and the amount of electricity to be charged, as well as the electricity price prediction results in the future time period, and under the condition that the total amount of electricity to be charged does not exceed a predetermined grid load threshold, the charging time of each charging cabinet is dynamically adjusted to realize the power dispatch and low-cost electricity use of the microgrid.
[0109] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
[0110] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this disclosure is not limited to the described order of actions, because according to this disclosure, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this disclosure.
[0111] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0112] Figure 4 This is a unit schematic diagram of a device for intelligent charging of a battery swapping cabinet based on historical data, according to an embodiment of this disclosure. Figure 4 As shown, a device 200 for intelligent charging of battery swapping cabinets based on historical data is provided. The device 200 includes:
[0113] The acquisition unit 210 is used to acquire historical electricity price data and construct a historical electricity price dataset based on the historical electricity price data;
[0114] Building unit 220 is used to build a recurrent neural network model;
[0115] Training unit 230 is used to train the recurrent neural network prediction model based on the historical electricity price dataset to obtain an electricity price prediction model;
[0116] Prediction unit 240 is used to input multiple future prediction time points into the electricity price prediction model to obtain the electricity price prediction results corresponding to the multiple future prediction time points;
[0117] The charging unit 250 is used to intelligently charge the battery of the battery swapping cabinet based on the electricity price prediction results.
[0118] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and the same technical effect can be achieved, so it will not be repeated here.
[0119] Figure 5 A structural diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure is shown. Electronic device 300 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 300 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0120] like Figure 5 As shown, the electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 302 or a computer program loaded from a storage unit 308 into a random access memory (RAM) 303. The RAM 303 may also store various programs and data required for the operation of the electronic device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An I / O interface 305 is also connected to the bus 304.
[0121] Multiple components in electronic device 300 are connected to I / O interface 305, including: input unit 306, such as keyboard, mouse, etc.; output unit 307, such as various types of displays, speakers, etc.; storage unit 308, such as disk, optical disk, etc.; and communication unit 309, such as network card, modem, wireless transceiver, etc. Communication unit 309 allows electronic device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0122] The computing unit 301 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as method 300. For example, in some embodiments, method 100 may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured by any other suitable means (e.g., by means of firmware) to perform the method for intelligent charging of a battery swapping cabinet based on historical data.
[0123] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0124] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0125] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0126] It should be noted that this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute a method for realizing intelligent charging of the battery swapping cabinet based on historical data, and to achieve the corresponding technical effects achieved by the embodiments of this disclosure in executing its method. For the sake of brevity, it will not be described in detail here.
[0127] In addition, this disclosure also provides a computer program product, which includes a computer program that, when executed by a processor, implements a method for intelligent charging of a battery swapping cabinet based on historical data.
[0128] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including voice input, speech input, or tactile input).
[0129] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0130] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0131] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0132] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for intelligent charging of battery swapping cabinets based on historical data, characterized in that, The method includes: Acquire historical electricity price data and construct a historical electricity price dataset based on the historical electricity price data; Construct a recurrent neural network model; The recurrent neural network prediction model is trained based on the historical electricity price dataset to obtain the electricity price prediction model. By inputting multiple future predicted time points into the electricity price prediction model, the electricity price prediction results corresponding to the multiple future predicted time points are obtained. Based on the electricity price prediction results, the battery charging time and charging power of the battery swapping cabinet are dynamically adjusted to achieve intelligent charging, including: according to the electricity price prediction results corresponding to multiple future prediction time points, the following optimal charging strategy is executed: if one or more of the predicted electricity prices at multiple future prediction time points are lower than a first preset electricity price threshold, then the sequence of prediction time points lower than the first preset electricity price threshold is determined as a low-price charging time sequence; if one or more of the predicted electricity prices at multiple future prediction time points are higher than a second preset electricity price threshold, then the sequence of prediction time points higher than the second preset electricity price threshold is determined as a low-power charging time sequence; wherein, the first preset electricity price threshold is less than the second preset electricity price threshold; the remaining power value of all batteries in the battery swapping cabinet is detected in real time, and batteries with remaining power values less than a preset power value are preferentially charged during the low-price charging time, or charged at low power during the low-power charging time; The method further includes: Obtain the charging duration and the amount of electricity to be charged for each charging cabinet in the microgrid under a future time period. Predict the electricity price forecast results for multiple predicted time points in the future time period; Based on the charging time, the amount of electricity to be charged, and the electricity price forecast for the future time period, the charging time of each charging cabinet is dynamically adjusted under the condition that the total amount of electricity to be charged does not exceed a predetermined grid load threshold, thereby realizing power dispatching and low-cost electricity use of the microgrid.
2. The method according to claim 1, characterized in that, in, The recurrent neural network prediction model is of the Gated Recurrent Unit (GRU) recurrent neural network type.
3. The method as described in claim 2, characterized in that, in, The acquisition of historical electricity price data includes: The raw electricity price data of relevant websites is crawled using web crawling technology. The raw electricity price data is then subjected to feature extraction and analysis. The analyzed features are transformed into time-series vectors and stored in a database.
4. The method as described in claim 3, characterized in that, in, Before training, the parameters of the gated recurrent unit (GRU) recurrent neural network are initialized, including a weight matrix and bias terms, which are used to control the transmission and transformation of information in the sequence.
5. The method as described in claim 4, characterized in that, in, Training the recurrent neural network prediction model based on the historical electricity price dataset includes: Establish the time series vector of real-time electricity price data for the previous 24 hours at time t. ,in, The input to the gated recurrent unit (GRU) recurrent neural network is given, and the value represents the electricity price at time t. For each input time step, the Gated Recurrent Unit (GRU) recurrent neural network performs a forward propagation, receiving the input. And the hidden state electricity price vector of the previous time step And respectively through weighted matrices , and the sigmaoid function Calculate the reset gate for the current time step. and the update gate , , , in, , These are used to calculate the reset door. and the update gate The weight matrix, The current electricity price. The hidden state output of the Gated Recurrent Unit (GRU) recurrent neural network in the previous time step; According to the sigmoid function and the result obtained in the previous step Update door Calculate the hidden state at the current time step. Finally, the electricity price output for the current time step is calculated based on all the above parameters. .
6. The method as described in claim 5, characterized in that, in, According to the sigmoid function and the result obtained in the previous step Update door Calculate the hidden state at the current time step. Finally, the electricity price output for the current time step is calculated based on all the above parameters. Specifically, it includes: in, It is a weight matrix used to map the input and the previous hidden state to a new hidden state space. 。 7. The method as described in claim 6, characterized in that, in, The step of training the recurrent neural network prediction model based on the historical electricity price dataset further includes: The loss is calculated based on the difference between the predicted output value and the actual target value. Perform backpropagation, using the calculated loss to propagate the error signal backward along the network, and adjust the network parameters to reduce the loss; Based on the gradients calculated by backpropagation, the weights and biases of the network are updated using an optimization algorithm to minimize the loss function; Through iterative training, repeat the above training steps until a predefined number of training iterations is reached, or until the electricity price prediction model reaches a satisfactory performance level.
8. A device for intelligent charging of battery swapping cabinets based on historical data, used to implement the method described in any one of claims 1-7, characterized in that, The device includes: An acquisition unit is used to acquire historical electricity price data and construct a historical electricity price dataset based on the historical electricity price data; Building blocks are used to construct recurrent neural network models; The training unit is used to train the recurrent neural network prediction model based on the historical electricity price dataset to obtain the electricity price prediction model; The prediction unit is used to input multiple future prediction time points into the electricity price prediction model to obtain the electricity price prediction results corresponding to the multiple future prediction time points; The charging unit is used to intelligently charge the batteries in the battery swapping cabinet based on the electricity price prediction results.
Citation Information
Patent Citations
Electricity price prediction method and system based on bidirectional long-short-term neural network
CN110276638A
Method and device for predicting node electricity price
CN115601059A
Intelligent charging method of battery charging and replacing cabinet based on reinforcement learning algorithm
CN118182238A