Energy storage adaptive control method and device, electronic equipment and program product

By constructing a digital twin basic model and a large language model, and combining it with intelligent agents to generate initial control strategy code, the problems of high threshold and insufficient security of traditional energy storage control methods are solved, realizing full-process automation of home energy storage management and efficient and safe generation of control strategies.

CN123144174APending Publication Date: 2026-11-20NANTONG ALPHA ESS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611257367.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Traditional home energy storage control methods require customized modeling by professional engineers, which is a high barrier to entry and makes it difficult to meet safety requirements. Existing technologies also suffer from problems such as misaligned control strategies and insufficient data protection.

Method used

By constructing a digital twin foundational model and a large language model, combining intelligent agents to generate initial control strategy code, and deploying it in a lightweight manner on edge devices, the entire process of automated energy storage control is achieved, including load forecasting, strategy generation, and security verification, avoiding cloud involvement and manual coding.

Benefits of technology

It improves the accuracy and security of home-based energy storage management, and realizes fully automated processing from computing power assessment, device self-discovery, load forecasting, strategy generation and automatic execution of control strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123144174A_ABST
    Figure CN123144174A_ABST
Patent Text Reader

Abstract

The application discloses an energy storage adaptive control method and device, electronic equipment and program product. The method comprises the following steps: inputting historical household load data, environmental data and local knowledge base of a target household energy system into a large language model to generate a predicted load curve of the target household energy system; inputting device operation constraints, operation preferences, initial battery health status and the predicted load curve of the target household energy system into the large language model to generate an initial control strategy code; inputting the initial control strategy code, the initial battery health status and a to-be-verified scene set into a digital twin basic model to generate a verification result corresponding to the initial control strategy code; and deploying a safety control strategy in the verification result to the target household energy system to obtain an energy storage charging and discharging instruction for energy storage control of the target household energy system. The energy storage control strategy is automatically generated, and the energy storage control efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy storage control technology, and in particular to an energy storage adaptive control method, device, electronic equipment and program product. Background Technology

[0002] User energy storage systems typically consist of photovoltaic modules, energy storage batteries, hybrid inverters, and household loads. Their energy management strategies require a multi-objective trade-off between economy, safety, and comfort.

[0003] Traditional rule-based or model-based predictive control optimization methods require professional engineers to perform customized modeling and code development based on specific household topology, equipment parameters, and local electricity prices. This approach has high barriers to entry, long development cycles, and is prone to technical problems such as misaligned control strategies, insufficient data protection, and difficulty in meeting actual safety requirements. Consequently, there are technical issues related to insufficient control of household energy storage. Summary of the Invention

[0004] This invention provides an energy storage adaptive control method, device, electronic equipment, and program product to solve the technical problem of insufficient home energy storage control.

[0005] According to one aspect of the present invention, an adaptive control method for energy storage is provided, the method comprising: A basic digital twin model is constructed based on communication bus data, device access signals, and system configuration parameters in the target home energy system. The historical household load data, environmental data, and local knowledge base of the target household energy system are input into the large language model to generate the predicted load curve of the target household energy system. The deployment modes of the large language model include a sufficient computing power mode, a limited computing power mode, and an insufficient computing power mode. Each deployment mode includes one or more intelligent agents, including a knowledge retrieval agent, a search space generation agent, a code generation agent, and a code verification agent. The system obtains the equipment operation constraints, operation preferences, and initial battery health status of the target home energy system, and inputs the equipment operation constraints, operation preferences, initial battery health status, and predicted load curve of the target home energy system into the large language model to generate initial control strategy code; The initial control strategy code, the initial battery health state, and the set of scenarios to be verified are input into the digital twin basic model. Simulation yields the energy flow time-series trajectory information of the target home energy system within a future target time period. Multi-dimensional verification parameters are used to verify the energy flow time-series trajectory information to generate a verification result corresponding to the initial control strategy code. The energy flow time-series trajectory information includes grid exchange power trajectory information, battery charging power trajectory information, battery discharging power trajectory information, battery state of charge trajectory information, battery temperature trajectory information, and load power supply state trajectory. The verification result includes the safety control strategy corresponding to the initial control strategy code, the predicted battery health state, and a verification pass identifier and verification report for the initial control strategy code. The security control strategy in the verification results is deployed to the target home energy system to generate a target power command. The target power command is then loaded into the energy storage converter for execution via an edge controller to obtain energy storage charging and discharging commands for energy storage control of the target home energy system.

[0006] According to another aspect of the present invention, an energy storage adaptive control device is provided, the device comprising: The twin model building module is used to build a basic digital twin model based on communication bus data, device access signals and system configuration parameters in the target home energy system. The load curve generation module is used to input historical household load data, environmental data, and local knowledge base of the target household energy system into the large language model to generate the predicted load curve of the target household energy system; wherein, the deployment mode of the large language model includes a computing power sufficient mode, a computing power limited mode, and a computing power insufficient mode; different deployment modes include one or more intelligent agents, including a knowledge retrieval intelligent agent, a search space generation intelligent agent, a code generation intelligent agent, and a code verification intelligent agent; The initial strategy code generation module is used to obtain the equipment operation constraints, operation preferences and initial battery health status of the target home energy system, and input the equipment operation constraints, operation preferences and initial battery health status and predicted load curve of the target home energy system into the large language model to generate the initial control strategy code; The twin model verification module is used to input the initial control strategy code, the initial battery health state, and the set of scenarios to be verified into the digital twin base model, simulate the energy flow time-series trajectory information of the target home energy system within a future target time period, and verify the energy flow time-series trajectory information using multi-dimensional verification parameters to generate a verification result corresponding to the initial control strategy code. The energy flow time-series trajectory information includes grid exchange power trajectory information, battery charging power trajectory information, battery discharging power trajectory information, battery state of charge trajectory information, battery temperature trajectory information, and load power supply state trajectory. The verification result includes the safety control strategy corresponding to the initial control strategy code, the predicted battery health state, and a verification pass identifier and verification report for the initial control strategy code. The energy storage command generation module is used to deploy the safety control strategy in the verification results to the target home energy system, generate a target power command, and load the target power command to the energy storage converter for execution through the edge controller to obtain the energy storage charging and discharging command for the energy storage control of the target home energy system.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: One or more processors; and a memory communicatively connected to at least one processor; wherein the memory stores a computer program executable by at least one processor, which, when executed by one or more processors, causes one or more processors to implement an energy storage adaptive control method as described in the embodiments of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement an energy storage adaptive control method as described in the embodiments of the present invention.

[0009] According to another aspect of the present invention, this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements an energy storage adaptive control method as described in the embodiments of the present invention.

[0010] The technical solution of this invention involves constructing a digital twin basic model based on communication bus data, device access signals, and system configuration parameters in a target home energy system; inputting historical home load data, environmental data, and a local knowledge base of the target home energy system into a large language model to generate a predicted load curve for the target home energy system; acquiring device operating constraints, operating preferences, and initial battery health status of the target home energy system, and inputting these parameters into the large language model to generate initial control strategy code; and then inputting the initial... The control strategy code, the initial battery health state, and the set of scenarios to be verified are input into the digital twin basic model. Simulation yields the energy flow time-series trajectory information of the target home energy system within a future target time period. Multi-dimensional verification parameters are used to verify this energy flow time-series trajectory information, generating verification results corresponding to the initial control strategy code. The safety control strategy from the verification results is deployed to the target home energy system, generating a target power command. This target power command is then loaded into the energy storage converter via an edge controller for execution, resulting in energy storage charging and discharging commands for energy storage control of the target home energy system. This technical solution deploys a digital twin basic model in the target home energy system and comprehensively analyzes data such as load data, environmental data, local knowledge base, and equipment operating constraints. This allows for the deployment of a lightweight large language model at the edge of the user's energy storage device. This enables fully automated processing from computing power assessment, device self-discovery, load prediction, strategy generation, safety verification, and automatic execution of control strategies, without cloud involvement or manual coding, significantly improving the accuracy and security of home energy storage management.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of an energy storage adaptive control method provided in Embodiment 1 of the present invention; Figure 2This is a flowchart of an energy storage adaptive control method provided in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of an energy storage adaptive control device according to Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the energy storage adaptive control method provided in Embodiment 4 of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "initial control strategy code," "security control strategy," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0016] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0017] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0018] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0019] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0020] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0021] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0022] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0023] Example 1 Figure 1 This is a flowchart of an energy storage adaptive control method provided in Embodiment 1 of the present invention. This embodiment is applicable to household energy storage load control and management scenarios, such as individual households with photovoltaic power generation capabilities. The method can be executed by an energy storage adaptive control device, which can be implemented in hardware and / or software, optionally through electronic devices such as mobile terminals, PCs, or servers. Figure 1 As shown, the method may specifically include: S110. Construct a digital twin basic model based on the communication bus data, device access signals and system configuration parameters in the target home energy system.

[0024] The communication bus data can include at least one of the device register data under protocols such as Modbus TCP / IP, CAN, and SunSpec; the device access signal can include at least one of the parameters such as the handshake message, device ID, and vendor code when the device accesses; the system configuration parameters can include at least one of the parameters such as the electricity pricing strategy (e.g., time-of-use pricing, real-time pricing), battery capacity, and rated power of the target home energy system's location. The digital twin basic model can be understood as a collection of logical algorithms running within a server or local gateway, capable of reflecting or simulating the energy dispatch trends of the entire "generation-storage-consumption" process in a home in real time, to obtain the power flow and equipment operation of the target home energy system at every moment.

[0025] Specifically, the device library containing hard device constraints in the target home energy system can be determined based on the acquired system configuration parameters. Then, based on the individual device objects in the target home energy system and the device access signals when they are connected, a topology map representing the connection relationships of each device is established, resulting in a home energy topology map. Finally, the obtained home energy topology map is combined with the collected communication bus data to construct a digital twin basic model. By using actual data from the target home energy system as the foundation, it is possible to promptly respond to the evolution of the target home energy system's operating status caused by the addition of new devices, adjustments to electricity pricing policies, or changes in user habits, thereby achieving a high degree of personalization and dynamic adaptation to user scenarios.

[0026] In one implementation, the step of constructing a digital twin basic model based on communication bus data, device access signals, and system configuration parameters in the target home energy system includes: extracting device feature codes of target devices based on communication bus data; classifying and identifying each device feature code of the target device based on a rule base; generating a device parameter table based on the identification results of multiple target devices; generating a device registry based on device access signals; constructing a home energy topology map based on the device parameter table, the device registry, and system configuration parameters; and constructing a digital twin basic model based on the device parameter table and the home energy topology map.

[0027] In this context, "target equipment" can be understood as any physical component in the target home energy system related to energy storage control, such as at least one of the following: photovoltaic inverter, battery, smart circuit breaker, and terminal electrical equipment. "Equipment signature" can be understood as a digital fingerprint representing different devices, which may include the target device's manufacturer code, device model code, or characteristic words. "Rule base" can be understood as a pre-defined software library used to represent the specific device model corresponding to different device signatures. "Equipment parameter table" can be understood as a structured table obtained through device parameter matching, which may include the operating parameter information of each device, such as the inverter's rated power and maximum DC voltage; the battery's rated capacity and maximum allowable charging and discharging current. "Equipment registry" can be understood as a dynamic name-based data table used to represent the current access status of connected devices. "Home energy topology diagram" can be understood as a graph representing the topological connection relationships of various target devices in the target home energy system, representing the flow of electricity in the target home energy system.

[0028] Specifically, device feature codes for each target device in the target home energy system can be extracted from communication bus data. These feature codes can then be categorized and identified according to a pre-defined rule base to generate a device parameter table for the target home energy system based on the identification results of multiple target devices. Furthermore, a device registry can be generated upon the connection of a new device, updating the number and type of devices in the target home energy system in a timely manner. Next, the identified device parameter table, the updated device registry, and the system configuration parameters corresponding to the target home energy system can be used to construct a home energy topology map representing the topological connections and energy flow of each device in the target home energy system. Finally, a digital twin model is constructed based on the device parameter table and the home energy topology map. This technical solution, by constructing a digital twin model, can clearly represent the power flow information of each device in the target home energy system, simulating the dynamic power flow state of the target home energy system.

[0029] S120. Input the historical household load data, environmental data and local knowledge base of the target household energy system into the large language model to generate the predicted load curve of the target household energy system.

[0030] Historical household load data can be understood as the electricity load data of each device in the target household energy system during a historical period. Environmental data can be understood as at least one of the environmental parameters of the target household energy system's environment, such as outdoor temperature, humidity, wind speed, and solar irradiance. The local knowledge base can be understood as a database used to store historically validated control strategy templates, and it may also include parameters such as different device parameters, electricity pricing strategies, historical operating experience, and corresponding historically validated code templates. The deployment modes of the large language model include a computing power sufficient mode, a computing power limited mode, and a computing power insufficient mode; different deployment modes include one or more intelligent agents, including a knowledge retrieval agent, a search space generation agent, a code generation agent, and a code verification agent. The large language model (LLM) can be understood as performing multimodal semantic understanding to generate a predictive model for predictive data within a certain time period. The predicted load curve can be understood as the data curve of the target household energy system's electricity load power within a certain future time period.

[0031] Specifically, historical household load data, environmental data, and a local knowledge base of the target household energy system can be input into a large language model. Depending on the deployment mode of the large language model, the input historical data is analyzed to generate a predicted load curve for the target household energy system over a certain future period. This technical solution, under the computing power constraints of the target household energy system, can achieve lightweight deployment of the large language model and adaptive computing power by deploying different agents, effectively improving the accuracy and feasibility of load prediction in the edge devices of the target household energy system.

[0032] In one implementation, the step of inputting historical household load data, environmental data, and a local knowledge base of the target household energy system into a large language model to generate a predicted load curve for the target household energy system includes: when the large language model is deployed in a computing power-sufficient mode and a computing power-constrained mode, the large language model includes a knowledge retrieval agent, a search space generation agent, a code generation agent, and a code verification agent; using the knowledge retrieval agent to retrieve matching code templates from the local knowledge base based on the historical household load data and environmental data; and using the search space generation agent to process the historical household load data and the environmental data... The analysis generates feature engineering and a model search space within the scope covered by the code template. A code generation agent is used to adjust the default decomposition model in the code template to the target decomposition model selected in the model search space to obtain the target code template. The historical household load data and the environmental data are input into the target code template to instantiate and generate initial prediction code. A code verification agent is used to verify the input function, output function, signature, and data type of the initial prediction code, constrained by the edge computing power of the target household energy system, to generate the predicted load curve of the target household energy system in the future target time period.

[0033] In this context, the code template can be understood as a reusable, standardized program template containing placeholders. Feature engineering can be understood as a list of all possible data transformations and processing methods to be tried. The model search space can be understood as all possible algorithm types and their hyperparameter value ranges to be tried. The target mode decomposition method can be understood as the mode decomposition method selected from feature engineering to replace the default mode decomposition module in the code template. The target prediction model can be understood as the prediction model selected from the model search space to be injected into the code template. The target code template can be understood as the code template constructed by replacing the default mode decomposition module with the target mode decomposition method, injecting the target prediction model, and sampling hyperparameters. The initial prediction code can be understood as the initial prediction data code generated based on the selected data and algorithm. The predicted load curve can be understood as the data curve of the target household energy system's load fluctuation over a future time period, obtained based on historical data.

[0034] Specifically, in both the computationally sufficient and computationally limited deployment modes of the large language model, the large language model can include a complete knowledge retrieval agent, a search space generation agent, a code generation agent, and a code verification agent. First, a knowledge retrieval agent can be used to retrieve a matching code template from a local knowledge base that matches the target household energy system, based on historical household load data and environmental data. Then, a search space generation agent can be used to analyze the historical household load data and the environmental data to generate feature engineering and a model search space within the coverage of the code template. Second, a code generation agent can be used to adjust the default decomposition model and default parameters in the code template to the parameters to be tried in feature engineering and the target decomposition model to be selected for trial in the model search space, thereby obtaining a target code template constructed from the selected parameters. Finally, historical household load data and environmental data can be input into the target code template, and by combining the historical and environmental parameters of the target household energy system, initial prediction code for the target household energy system for a future period can be instantiated and generated. Finally, a code verification agent can be employed, constrained by the edge computing power of the target home energy system, to perform consistency checks on the signatures and data types of the input and output functions of the initial prediction code, and to verify the operational status of the initial prediction code under the edge computing power of the target home energy system. If the verification fails, a structured error report is generated and fed back to the code generation agent to correct the initial prediction code. After iteration until the verification passes, the initial prediction code is run to generate the predicted load curve for the target home energy system within a future target time period. By deploying different agents to combine and analyze the input data, the accuracy of load prediction in the edge devices of the target home energy system is effectively improved.

[0035] S130. Obtain the equipment operation constraints, operation preferences, and initial battery health status of the target home energy system. Input the equipment operation constraints, operation preferences, initial battery health status, and predicted load curve of the target home energy system into the large language model to generate initial control strategy code.

[0036] The equipment operation constraints may include at least one of the following: maximum charging power, maximum discharging power, lower limit of SOC operation, upper limit of SOC operation, and rated battery capacity. Operational preferences may include at least one of the following: economic priority, backup power priority, and self-consumption priority. The initial battery health state can be understood as the battery health state at the time of prediction.

[0037] Specifically, the system acquires the equipment operating constraints, operating preferences, and initial battery health status of the target home energy system. These constraints, preferences, initial battery health status, and predicted load curves are then input into a large-scale language model. An agent deployed in both computationally-sufficient and computationally-limited modes analyzes the input data to generate initial control strategy code for the target equipment within the home energy system. This technical solution combines the target home energy system's electricity consumption preferences and equipment operating constraints, thereby generating energy storage control strategy code tailored to user needs. This achieves a closed loop from "predictive model development" to "autonomous control strategy," enhancing the implementability of the control strategy.

[0038] S140. Input the initial control strategy code, the initial battery health status, and the set of scenarios to be verified into the digital twin basic model, simulate to obtain the energy flow time-series trajectory information of the target home energy system in the future target time period, and use multi-dimensional verification parameters to verify the energy flow time-series trajectory information to generate a verification result corresponding to the initial control strategy code.

[0039] The energy flow time-series trajectory information can be understood as the trajectory information characterizing the power flow status of each target device in the target home energy system over a future time period. Specifically, it may include at least one of the following: grid exchange power trajectory information, battery charging power trajectory information, battery discharging power trajectory information, battery state of charge trajectory information, battery temperature trajectory information, and load power supply status trajectory information. The verification results may include at least one of the following verification information: the safety control strategy corresponding to the initial control strategy code, the predicted battery health status, the verification pass flag of the initial control strategy code, and the verification report.

[0040] Specifically, the initial control strategy code, initial battery health status, and the set of scenarios to be verified can be input into the digital twin basic model. In a local lightweight simulation environment, by running the initial control strategy code, the energy flow time-series trajectory information of the target home energy system within a future target time period is simulated. Furthermore, by collecting the energy flow time-series trajectory information within the predicted time period, the specific parameter values ​​of each type of parameter at each time point are determined. Finally, multi-dimensional verification parameters are used to verify each parameter value, thereby generating verification results corresponding to the initial control strategy code and obtaining a corrected safety control strategy. This technical solution, by employing a control strategy safety verification mechanism based on a home digital twin, allows for the verification and correction of the initial control strategy code under the actual operational constraints of each target device in the target home energy system, ensuring the security and executability of the control strategy code.

[0041] In one implementation, the method for constructing the set of scenarios to be verified includes: constructing the set of scenarios to be verified based on the historical household load data and the environmental data; wherein, the set of scenarios to be verified includes at least one of typical operating day scenarios, extreme weather scenarios, photovoltaic power output fluctuation scenarios, and high load impact scenarios, and each scenario to be verified includes the load demand sequence and photovoltaic power output sequence at each moment within the future target time period.

[0042] The typical operating day scenario can be understood as an operating scenario where the load level and photovoltaic output are at historically typical levels. Extreme weather scenarios include continuous cloudy / rainy scenarios and multi-day scenarios; extreme weather scenarios can be understood as operating scenarios where environmental parameters such as ambient temperature and solar irradiance are at historical extreme values, such as high-temperature scenarios and low-temperature scenarios. Photovoltaic output fluctuation scenarios can be understood as operating scenarios where photovoltaic output fluctuates randomly within the target time period. High load impact scenarios can be understood as operating scenarios where short-term peak loads occur in the target household energy system. High load impact scenarios include multi-load superposition scenarios where air conditioners, EV charging piles, and electric water heaters are all turned on simultaneously. The load demand sequence can be understood as a sequence of household electricity load demand values ​​at various times under the scenario to be verified. The photovoltaic output sequence can be understood as a sequence of photovoltaic power generation values ​​at various times under the scenario to be verified.

[0043] Specifically, based on historical household load data, load distribution over various time periods can be statistically analyzed to extract operating days where load levels and photovoltaic (PV) output are at typical levels, thus constructing typical operating day scenarios. Extreme weather scenarios can be constructed based on extreme temperature and extreme irradiance records from environmental data. Random fluctuations can be superimposed on historical PV output sequences to generate PV output fluctuation scenarios. Furthermore, peak loads of a preset multiple can be superimposed on typical load demand sequences to generate high load impact scenarios. This technical solution, by constructing a set of scenarios to be verified covering normal operating conditions and boundary conditions, can fully expose the potential risks of the initial control strategy code under different operating conditions, improving the comprehensiveness and reliability of the verification results.

[0044] In one implementation, the simulation to obtain the energy flow time-series trajectory information of the target home energy system within a future target time period further includes: using the predicted load curve, predicted photovoltaic output, electricity price signal, and current battery status as initial boundary conditions; dividing the future target time period into multiple simulation periods according to a preset simulation step size; running the initial control strategy code within each simulation period to determine the target power of each target device, and solving for power balance based on the electrical constraints in the home energy topology diagram and the device parameter table to update the operating state variables of the target home energy system; and collecting the operating state variables at each moment within each simulation period to obtain the energy flow time-series trajectory information.

[0045] The current battery state represents the initial battery health state of the target home energy system, including the battery state of charge, battery health state, and battery temperature at the start of the simulation. The duration of the future target time period is an integer multiple of the control strategy optimization cycle; for example, if the optimization cycle is 24 hours and the future target time period is 72 hours, this exposes the cumulative effect of the control strategy being executed across days. The operational state variables include the battery state of charge and battery temperature, with the battery temperature calculated based on the charging / discharging power and a preset thermal model.

[0046] Specifically, the simulation can be divided into multiple simulation periods, using a preset duration as the simulation step size, such as 15 minutes per simulation step, with the initial battery health state as the initial state for the simulation. Within each simulation period, the control logic indicated by the initial control strategy code is executed to determine the charging and discharging power of the energy storage battery and the grid exchange power. Based on the home energy topology diagram, it is verified whether the power flow direction of each branch meets the rated constraints in the equipment parameter table. Furthermore, the battery temperature is updated according to the charging and discharging power and the preset thermal model, and the battery state of charge is updated according to the charging and discharging capacity. After the simulation, the operating state quantities at each simulation moment are collected to generate energy flow time-series trajectory information. The battery life degradation can be estimated based on the cumulative charging and discharging throughput and discharge depth during the simulation process, resulting in a predicted battery health state. This technical solution, through time-by-time discretized simulation, can accurately reproduce the dynamic execution process of the control strategy within a future time period, providing a data foundation for multi-dimensional safety verification.

[0047] In one implementation, the predicted battery health state in the verification result is obtained as follows: a cumulative stress index is calculated based on the battery state-of-charge trajectory information and battery temperature trajectory information in the energy flow time-series trajectory information; wherein the cumulative stress index is obtained by weighted summation of the discharge depth, deep discharge indicator, and high temperature indicator at each simulation time, satisfying the following: In the formula: Sstress is the cumulative stress index; t0 is the simulation start time; Tsim is the total number of simulation steps; w1, w2, and w3 are the weighting coefficients of each stress factor, calibrated by the decay curve provided by the battery manufacturer; DOD(t) is the depth of discharge at time t; SOC(t) is the battery state of charge at time t; SOCdeep is the deep discharge threshold, such as 0.2; Tbatt(t) is the battery temperature at time t; Thigh is the high temperature threshold, such as 45℃; 1(·) is the indicator function, which takes the value of 1 when the condition is met, and 0 otherwise. The initial battery health state is updated based on the accumulated stress index to obtain the predicted battery health state at the end of the future target time period, satisfying: ; In the formula: SOHpred is the predicted battery health state; SOHcur is the current battery health state, i.e., the initial battery health state, which is reported in real time by the battery management system; α is the stress-capacity decay conversion coefficient, which is calibrated by the battery manufacturer's decay test data; Furthermore, the battery aging rate is determined based on the difference between the predicted battery health state and the current battery health state, and the simulation duration. This aging rate is then linearly extrapolated to the battery life termination threshold to obtain the remaining battery life, satisfying the following conditions: ; In the formula: rdeg is the battery aging rate; RUL is the remaining battery life; SOHEOL is the battery life termination threshold, such as 0.8. Optionally, the remaining battery life can also be converted into the remaining cycle number based on the user's average daily equivalent cycle count. The upper limit of the daily average cumulative stress in the multi-dimensional verification parameters can be determined based on the cumulative stress index and the number of simulation days, such as dividing the cumulative stress index by the number of simulation days to obtain the daily average cumulative stress, and comparing the daily average cumulative stress with the upper limit of the daily average cumulative stress. This technical solution provides a clear data source for the verification of the predicted battery health status and the battery remaining life threshold in the verification results through the battery life assessment chain of "cumulative stress - aging rate - RUL extrapolation", realizing refined management of battery life.

[0048] In one implementation, the step of inputting the initial control strategy code, the initial battery health state, and the set of scenarios to be verified into the digital twin basic model, simulating the energy flow time-series trajectory information of the target home energy system within a future target time period, and verifying the energy flow time-series trajectory information using multi-dimensional verification parameters to generate a verification result corresponding to the initial control strategy code includes: acquiring multi-dimensional verification parameters; wherein, the multi-dimensional verification parameters include a grid exchange power threshold, a battery charging power threshold, a battery discharging power trajectory, a battery state of charge threshold, a battery temperature threshold, and a battery remaining life threshold; and performing a security verification on the energy flow time-series trajectory information within the future target time period based on the multi-dimensional verification parameters to generate a verification result corresponding to the initial control strategy code.

[0049] The multi-dimensional verification parameters may also include the daily average cumulative stress limit and the power supply continuity requirements for critical loads.

[0050] Specifically, multi-dimensional verification parameters for the target home energy system can be pre-acquired. Then, based on the simulated energy flow time-series trajectory information, the operating status parameters of each target device at multiple time points are extracted. By matching and verifying the device's power, voltage, current, and other parameters, parameters in the initial control strategy that do not meet execution requirements can be automatically corrected. This generates verification results corresponding to the initial control strategy code and a corrected safety control strategy. This technical solution, through iterative correction of the initial control strategy and simulation safety verification, forms a closed loop of "verification—feedback—correction—re-verification" for the strategy code verification, effectively ensuring the reliability of the generated control strategy code.

[0051] Furthermore, specific methods for modifying the initial control strategy include: (1) Error location: Analyze error reports and classify violation records into five categories: battery over-discharge, battery overheating, transformer overload, life safety breach, and comfort breach, and locate the time period of the violation and the associated power trajectory; (2) Correction operator mapping: Call the predefined deterministic correction operator according to the violation type to generate correction instructions; Battery over-discharge: Raise the lower limit of SOC and compress the maximum depth of discharge, and calculate the correction amount quantitatively according to the over-limit range. Battery overheating: Limit charging and discharging power; Transformer overload: Add grid exchange power constraints to the code; Lifetime safety breach: Tighten the SOC operating range, limit the number of daily cycles, and increase the aging cost coefficient according to the dynamic aging cost model; Comfort breach: Add power supply continuity constraints for critical loads and set up emergency SOC reserves; (3) The Coder modifies the control strategy code in a targeted manner based on the correction instructions, with the original code, error report and correction operator as context, to obtain the correction strategy.

[0052] By adopting the above strategy, the initial control strategy is iteratively modified to obtain a modified safety control strategy.

[0053] Furthermore, a maximum number of iterations can be set, such as 5 times; if the verification passes within the maximum number of iterations, the corrected safety control strategy is output; if the number of iterations is exhausted and the verification still fails, the preset conservative default strategy is executed, such as the rule control strategy of photovoltaic self-consumption and charging only during off-peak hours, to ensure that a safe control strategy can be executed in any situation; the violation record, correction operator and verification result of each iteration can be written to the verification log to ensure that the correction process is traceable.

[0054] S150. Deploy the security control strategy from the verification results to the target home energy system, generate a target power command, and load the target power command to the energy storage converter for execution through the edge controller to obtain the energy storage charging and discharging command for the energy storage control of the target home energy system.

[0055] The target power command can be understood as instructing devices in the target home energy system to operate at a specific power value. The edge controller can be understood as an embedded device deployed within the target home energy system, used to receive and execute the target power command. The energy storage converter is a device connecting the energy storage battery and the home grid, used to precisely control the bidirectional flow of electrical energy between the battery and the grid.

[0056] Specifically, the safety control strategy from the verification results can be deployed to the target home energy system. By executing the safety control strategy, the target power command for each control cycle is calculated and generated. Furthermore, the target power command can be received by an edge controller and loaded onto the energy storage converter for execution. By monitoring the physical value of the target power command and cutting off power commands that do not meet the hardware safety threshold, the energy storage charging and discharging commands for the energy storage control of the target home energy system are obtained. This technical solution, through a "slow strategy evolution" approach to generating the target power command and a "millisecond-level real-time protection" energy storage converter monitoring architecture, can provide a safety net for the power commands ultimately executed by the hardware devices, thereby greatly improving the safety and reliability of the target home energy system's operation.

[0057] In one implementation, the step of deploying the safety control strategy from the verification results to the target home energy system, generating a target power command, and loading the target power command to the energy storage converter for execution via an edge controller to obtain energy storage charging and discharging commands for energy storage control of the target home energy system includes: hot-loading the verification pass identifier and the safety control strategy from the verification results to the target home energy system, and calculating and generating the target power command in conjunction with the real-time status data of the target home energy system; and using an edge controller to load the target power command to the energy storage converter for execution to generate energy storage charging and discharging commands for energy storage control of the target home energy system.

[0058] Specifically, based on the verification pass indicator in the verification results, the verified safety control strategy can be hot-loaded into the target home energy system. By performing short-cycle hot-load calculations on the safety control strategy and the real-time status data of the target home energy system, a target power command within a relatively short period can be obtained. Furthermore, an edge controller can be used to load the target power command into the energy storage converter for execution. The actual executed power value in the target power command from the energy storage converter is monitored, and power exceeding a set threshold is cut off, thereby generating energy storage charging and discharging commands for the energy storage control of the target home energy system. This technical solution ensures the safety of energy storage control in the target home energy system through short-cycle real-time calculations and a hard-coded safety bypass monitoring mechanism in the energy storage converter.

[0059] In another implementation, the method further includes: using an edge controller to load the target power command into the energy storage converter for execution, and monitoring the actual hardware execution value corresponding to the target power command; if the actual hardware execution value is greater than a preset execution threshold, cutting off the control of the safety control strategy over the target home energy system through the underlying controller, and performing deterministic protection actions.

[0060] The technical solution of this invention involves constructing a digital twin basic model based on communication bus data, device access signals, and system configuration parameters in a target home energy system; inputting historical home load data, environmental data, and a local knowledge base of the target home energy system into a large language model to generate a predicted load curve for the target home energy system; acquiring device operating constraints, operating preferences, and initial battery health status of the target home energy system, and inputting these parameters into the large language model to generate initial control strategy code; and then inputting the initial... The control strategy code, the initial battery health state, and the set of scenarios to be verified are input into the digital twin basic model. Simulation yields the energy flow time-series trajectory information of the target home energy system within a future target time period. Multi-dimensional verification parameters are used to verify this energy flow time-series trajectory information, generating verification results corresponding to the initial control strategy code. The safety control strategy from the verification results is deployed to the target home energy system, generating a target power command. This target power command is then loaded into the energy storage converter via an edge controller for execution, resulting in energy storage charging and discharging commands for energy storage control of the target home energy system. This technical solution deploys a digital twin basic model in the target home energy system and comprehensively analyzes data such as load data, environmental data, local knowledge base, and equipment operating constraints. This allows for the deployment of a lightweight large language model at the edge of the user's energy storage device. This enables fully automated processing from computing power assessment, device self-discovery, load prediction, strategy generation, safety verification, and automatic execution of control strategies, without cloud involvement or manual coding, significantly improving the accuracy and security of home energy storage management.

[0061] Example 2 Figure 2 This is a flowchart of an energy storage adaptive control method provided in Embodiment 2 of the present invention. This embodiment refines the technical solution of "obtaining the equipment operating constraints, operating preferences, and initial battery health status of the target home energy system; inputting the equipment operating constraints, operating preferences, initial battery health status, and predicted load curve of the target home energy system into the large language model to generate initial control strategy code" based on the above embodiments. Specific implementation details can be found in the description of this embodiment. Technical features that are the same as or similar to those in the foregoing embodiments will not be repeated here. Figure 2 As shown, the method may specifically include: S210. Construct a digital twin basic model based on the communication bus data, device access signals and system configuration parameters in the target home energy system.

[0062] S220. Input the historical household load data, environmental data and local knowledge base of the target household energy system into the large language model to generate the predicted load curve of the target household energy system.

[0063] S230. Generate an intelligent agent using a search space, and generate a search space for a family of control strategies based on the device operation constraints and operation preferences of the target home energy system.

[0064] The control strategy family search space can be understood as a multidimensional collection of all executable control parameters. For example, the "SOC threshold at which energy storage begins charging" is set to a searchable range of [20%, 50%], and the "peak discharge rate" is set to [0.5C, 1C].

[0065] Specifically, a search space can be used to generate intelligent agents, thereby generating a search space for a family of control strategies based on the equipment operation constraints and operating preferences of the target home energy system.

[0066] S240. Using a code-generated intelligent agent, the control strategy family search space is sampled to obtain control strategy parameter samples, and control strategy code is generated based on the control strategy parameter samples and the predicted load curve.

[0067] The control strategy parameter sample can be understood as a specific combination of executable control values. The control strategy code can be understood as a complete and runnable simulation scheduling code script obtained by substituting the code template, which is used to indicate the specific movement actions of energy storage in the future time period under the given parameter combination.

[0068] Specifically, a search space is used to generate intelligent agents, and a search space for a family of control strategies is generated based on the equipment operation constraints and operating preferences of the target home energy system.

[0069] S250. Using Bayesian optimization, the control strategy code is deployed in the target device of the target home energy system. With the goal of minimizing the sum of total electricity cost and dynamic battery aging cost within the simulation period, the optimal control strategy parameters are determined by iteratively solving the power balance equation time by time, and the initial control strategy code is generated based on the optimal control strategy parameters.

[0070] The simulation cycle can be a small time slice divided into future periods, such as 15 minutes per simulation cycle. Dynamic battery aging cost can be understood as the depreciation cost of the battery life after each deep charge-discharge cycle. Optimal control strategy parameters can be understood as the best set of specific values ​​obtained through iterative solutions.

[0071] Specifically, by employing Bayesian optimization, the control strategy code is deployed in the target devices of the target home energy system. With the objective of minimizing the sum of total electricity costs and dynamic battery aging costs over multiple simulation cycles, the optimal control strategy parameters are determined through iterative solutions to the power balance equation across each simulation cycle. Furthermore, the initial control strategy code is generated based on these optimal parameters. This effectively reduces the overall operating cost of the energy storage system within operational cost constraints, thereby improving the economic viability of the energy storage system.

[0072] In one implementation, generating the initial control strategy code further includes: when the deployment mode of the large language model is a computing power shortage mode, the large language model includes a knowledge retrieval agent; using the knowledge retrieval agent, retrieving matching historically verified control strategy parameters from the local knowledge base based on historical household load data and environmental data, and instantiating the control strategy parameters to generate the initial control strategy code.

[0073] Specifically, when the large language model is deployed in a computing power-deficient mode—that is, when the computing power of edge devices is insufficient—the large language model only includes a knowledge retrieval agent. In this case, the knowledge retrieval agent can retrieve the most matching historically validated control strategy parameters from the local knowledge base based on historical household load data and environmental data. The initial control strategy code is generated by directly instantiating and converting these control strategy parameters. By deploying only the knowledge retrieval agent on edge devices with insufficient computing power, relatively efficient and reliable control strategy code generation can be achieved, ensuring basic energy storage control of the target household energy system and improving the feasibility of the energy storage control strategy.

[0074] S260. Input the initial control strategy code, the initial battery health status, and the set of scenarios to be verified into the digital twin basic model, simulate to obtain the energy flow time-series trajectory information of the target home energy system in the future target time period, and use multi-dimensional verification parameters to verify the energy flow time-series trajectory information to generate a verification result corresponding to the initial control strategy code.

[0075] S270. Deploy the security control strategy from the verification results to the target home energy system, generate a target power command, and load the target power command to the energy storage converter for execution through the edge controller to obtain the energy storage charging and discharging command for the energy storage control of the target home energy system.

[0076] The technical solution of this invention generates an intelligent agent by using a search space, and generates a search space for a family of control strategies based on the device operation constraints and operation preferences of the target home energy system. A code-generated intelligent agent is used to sample the search space of the control strategy family to obtain control strategy parameter samples, and control strategy code is generated based on the control strategy parameter samples and the predicted load curve. Using Bayesian optimization, the control strategy code is deployed in the target devices of the target home energy system. The objective is to minimize the sum of total electricity costs and dynamic battery aging costs within the simulation period. The optimal control strategy parameters are determined by iteratively solving the power balance equation time-by-time, and initial control strategy code is generated based on these parameters. This technical solution deploys a digital twin basic model in the target home energy system and comprehensively analyzes data such as load data, environmental data, local knowledge base, and device operating constraints. This allows for the direct execution of both complete and relatively simplified multi-agent large language models at the edge, achieving lightweight deployment and adaptive matching of computing power, significantly improving the reliability and accuracy of home energy storage management.

[0077] Example 3 Figure 3 This is a schematic diagram of an energy storage adaptive control device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a twin model construction module 301, a load curve generation module 302, an initial strategy code generation module 303, a twin model verification module 304, and an energy storage command generation module 305.

[0078] The system includes a twin model construction module 301, used to construct a digital twin basic model based on communication bus data, device access signals, and system configuration parameters in the target home energy system; a load curve generation module 302, used to input historical home load data, environmental data, and local knowledge base of the target home energy system into the large language model to generate a predicted load curve for the target home energy system; wherein the deployment modes of the large language model include a computing power sufficient mode, a computing power limited mode, and a computing power insufficient mode; different deployment modes include one or more intelligent agents, including a knowledge retrieval intelligent agent, a search space generation intelligent agent, a code generation intelligent agent, and a code verification intelligent agent; an initial strategy code generation module 303, used to obtain the device operation constraints, operation preferences, and initial battery health status of the target home energy system, input the device operation constraints, operation preferences, initial battery health status, and predicted load curve of the target home energy system into the large language model to generate initial control strategy code; and a twin model verification module 304, used to verify the initial control strategy... The code, the initial battery health state, and the set of scenarios to be verified are input into the digital twin basic model. The simulation obtains the energy flow time-series trajectory information of the target home energy system within a future target time period. The energy flow time-series trajectory information is verified using multi-dimensional verification parameters to generate a verification result corresponding to the initial control strategy code. The energy flow time-series trajectory information includes grid exchange power trajectory information, battery charging power trajectory information, battery discharging power trajectory information, battery state of charge trajectory information, battery temperature trajectory information, and load power supply state trajectory. The verification result includes a safety control strategy corresponding to the initial control strategy code, a predicted battery health state, a verification pass identifier for the initial control strategy code, and a verification report. The energy storage command generation module 305 is used to deploy the safety control strategy from the verification result to the target home energy system, generate a target power command, and load the target power command to the energy storage converter for execution through an edge controller to obtain energy storage charging and discharging commands for energy storage control of the target home energy system.

[0079] In this embodiment of the invention, the twin model construction module 301 constructs a digital twin basic model based on communication bus data, device access signals, and system configuration parameters in the target home energy system. The load curve generation module 302 generates a predicted load curve for the target home energy system by inputting historical home load data, environmental data, and a local knowledge base into a large language model. The initial strategy code generation module 303 obtains the device operating constraints, operating preferences, and initial battery health status of the target home energy system, inputs these data into the large language model, and generates an initial control strategy code. The twin model verification module 304 inputs the initial control strategy code, the initial battery health status, and a set of scenarios to be verified into the digital twin basic model, simulates the energy flow time-series trajectory information of the target home energy system within a future target time period, and verifies the energy flow time-series trajectory information using multi-dimensional verification parameters to generate a verification result corresponding to the initial control strategy code. The energy storage command generation module 305 deploys the security control strategy from the verification results to the target home energy system, generates a target power command, and loads the target power command to the energy storage converter for execution via an edge controller to obtain energy storage charging and discharging commands for energy storage control of the target home energy system. This technical solution deploys a digital twin basic model in the target home energy system and comprehensively analyzes data such as load data, environmental data, local knowledge base, and equipment operating constraints. This allows for the deployment of a lightweight large language model at the edge of the user's energy storage device, enabling fully automated processing from computing power assessment, device self-discovery, load forecasting, strategy generation, security verification, and automatic execution of control strategies, without cloud involvement or manual coding. This significantly improves the accuracy and security of home energy storage management.

[0080] Based on the above-mentioned optional technical solutions, the twin model construction module 301 may optionally include: a device parameter table generation unit, an energy topology map construction unit, and a twin model construction unit. Specifically, the device parameter table generation unit is used to extract device feature codes of target devices based on communication bus data, classify and identify each target device's device feature code based on a rule base, and generate a device parameter table based on the identification results of multiple target devices; the energy topology map construction unit is used to generate a device registry based on device access signals, and construct a home energy topology map based on the device parameter table, the device registry, and system configuration parameters; the twin model construction unit is used to construct a digital twin basic model based on the device parameter table and the home energy topology map.

[0081] Based on the above-mentioned optional technical solutions, the load curve generation module 302 may optionally include: a knowledge retrieval unit, a search space generation unit, a code generation unit, and a code verification unit. In the deployment modes of the large language model, namely, a computing power-sufficient mode and a computing power-constrained mode, the large language model includes a knowledge retrieval agent, a search space generation agent, a code generation agent, and a code verification agent. The knowledge retrieval unit uses the knowledge retrieval agent to retrieve and match code templates from a local knowledge base based on historical household load data and environmental data. The search space generation unit uses the search space generation agent to analyze the historical household load data and environmental data to generate feature engineering and a model search space within the coverage of the code template. The code generation unit uses the code generation agent to adjust the default decomposition model in the code template to the target decomposition model selected in the model search space to obtain a target code template, and inputs the historical household load data and environmental data into the target code template to instantiate and generate initial prediction code. The code verification unit uses the code verification agent to verify the input function, output function, signature, and data type of the initial prediction code, constrained by the edge computing power of the target household energy system, to generate a predicted load curve for the target household energy system within a future target time period.

[0082] Based on the above-mentioned optional technical solutions, the initial strategy code generation module 303 may optionally include: a search space generation unit, a code generation unit, and an initial strategy code generation unit. Specifically, the search space generation unit is further configured to use a search space generation agent to generate a control strategy family search space based on the device operation constraints and operating preferences of the target home energy system; the code generation unit is further configured to use a code generation agent to sample the control strategy family search space to obtain control strategy parameter samples, and generate control strategy code based on the control strategy parameter samples and the predicted load curve; the initial strategy code generation unit is further configured to use Bayesian optimization to deploy the control strategy code in the target devices of the target home energy system, aiming to minimize the sum of total electricity costs and dynamic battery aging costs within the simulation period, iteratively solving the power balance equation time-by-time to determine the optimal control strategy parameters, and generating initial control strategy code based on the optimal control strategy parameters.

[0083] Based on the above-mentioned optional technical solutions, the initial strategy code generation module 303 may optionally include a knowledge retrieval unit. Specifically, when the deployment mode of the large language model is a computing power shortage mode, the large language model includes a knowledge retrieval agent; the knowledge retrieval unit is further configured to use the knowledge retrieval agent to retrieve matching historically verified control strategy parameters from a local knowledge base based on historical household load data and environmental data, and instantiate the control strategy parameters to generate initial control strategy code.

[0084] Based on the above-mentioned optional technical solutions, the twin model verification module 304 may optionally include: a verification parameter acquisition unit and a verification result generation unit. The verification parameter acquisition unit is used to acquire multi-dimensional verification parameters; wherein the multi-dimensional verification parameters include a grid exchange power threshold, a battery charging power threshold, a battery discharging power trajectory, a battery state of charge threshold, a battery temperature threshold, and a battery remaining life threshold; the verification result generation unit is used to perform a security verification of the energy flow time-series trajectory information within a future target time period based on the multi-dimensional verification parameters, so as to generate a verification result corresponding to the initial control strategy code.

[0085] Based on the above-mentioned optional technical solutions, the energy storage command generation module 305 may optionally include: a target power command calculation unit and an energy storage charge / discharge command generation unit. The target power command calculation unit is used to hot-load the verification pass identifier and the safety control strategy from the verification result into the target home energy system, and calculate and generate a target power command by combining the real-time status data of the target home energy system. The energy storage charge / discharge command generation unit is used to load the target power command into the energy storage converter for execution using an edge controller to generate energy storage charge / discharge commands for energy storage control of the target home energy system.

[0086] The energy storage adaptive control device provided in this embodiment of the invention can execute an energy storage adaptive control method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0087] Example 4 Figure 4A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device 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. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), 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 invention described and / or claimed herein.

[0088] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0089] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0090] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 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 processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as an energy storage adaptive control method.

[0091] In some embodiments, an energy storage adaptive control method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the energy storage adaptive control method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform an energy storage adaptive control method by any other suitable means (e.g., by means of firmware).

[0092] 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.

[0093] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0094] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. 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 fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0095] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) 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 electronic device. 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 sound input, voice input, or tactile input).

[0096] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations 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., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0097] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0098] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.

[0099] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0100] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. 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 invention should be included within the scope of protection of this invention.

Claims

1. An adaptive control method for energy storage, characterized in that, include: A basic digital twin model is constructed based on communication bus data, device access signals, and system configuration parameters in the target home energy system. The historical household load data, environmental data, and local knowledge base of the target household energy system are input into the large language model to generate the predicted load curve of the target household energy system. The deployment modes of the large language model include a sufficient computing power mode, a limited computing power mode, and an insufficient computing power mode. Each deployment mode includes one or more intelligent agents, including a knowledge retrieval agent, a search space generation agent, a code generation agent, and a code verification agent. The system obtains the equipment operation constraints, operation preferences, and initial battery health status of the target home energy system, and inputs the equipment operation constraints, operation preferences, initial battery health status, and predicted load curve of the target home energy system into the large language model to generate initial control strategy code; The initial control strategy code, the initial battery health state, and the set of scenarios to be verified are input into the digital twin basic model. Simulation yields the energy flow time-series trajectory information of the target home energy system within a future target time period. Multi-dimensional verification parameters are used to verify the energy flow time-series trajectory information to generate a verification result corresponding to the initial control strategy code. The energy flow time-series trajectory information includes grid exchange power trajectory information, battery charging power trajectory information, battery discharging power trajectory information, battery state of charge trajectory information, battery temperature trajectory information, and load power supply state trajectory. The verification result includes the safety control strategy corresponding to the initial control strategy code, the predicted battery health state, and a verification pass identifier and verification report for the initial control strategy code. The security control strategy in the verification results is deployed to the target home energy system to generate a target power command. The target power command is then loaded into the energy storage converter for execution via an edge controller to obtain energy storage charging and discharging commands for energy storage control of the target home energy system.

2. The energy storage adaptive control method according to claim 1, characterized in that, The construction of a digital twin basic model based on communication bus data, device access signals, and system configuration parameters in the target home energy system includes: Based on the communication bus data, the device feature code of the target device is extracted, and the device feature code of each target device is classified and identified based on the rule base. A device parameter table is generated based on the identification results of multiple target devices. A device registry is generated based on the device access signal, and a home energy topology is constructed based on the device parameter table, the device registry, and the system configuration parameters. A digital twin basic model is constructed based on the device parameter table and the home energy topology diagram.

3. The energy storage adaptive control method according to claim 1, characterized in that, The step of inputting historical household load data, environmental data, and a local knowledge base of the target household energy system into a large language model to generate a predicted load curve for the target household energy system includes: When the large language model is deployed in both a computing power-sufficient mode and a computing power-constrained mode, the large language model includes a knowledge retrieval agent, a search space generation agent, a code generation agent, and a code verification agent. A knowledge retrieval agent is used to retrieve matching code templates from the local knowledge base based on historical household load data and environmental data; A search space-generated agent is used to analyze the historical household load data and the environmental data to generate a feature engineering and model search space within the scope covered by the code template. A code generation agent is used to adjust the default decomposition model in the code template to the target decomposition model selected in the model search space to obtain the target code template. The historical household load data and the environmental data are input into the target code template to instantiate and generate the initial prediction code. A code verification agent is used to verify the input function, output function, signature, and data type of the initial prediction code, constrained by the edge computing power of the target home energy system, in order to generate the predicted load curve of the target home energy system in the future target time period.

4. The energy storage adaptive control method according to claim 1, characterized in that, The process involves acquiring the device operating constraints, operating preferences, and initial battery health status of the target home energy system, inputting these parameters into the large language model, and generating initial control strategy code, including: A search space is used to generate an intelligent agent, and a search space for a family of control strategies is generated based on the device operation constraints and operation preferences of the target home energy system. A code-generated intelligent agent is used to sample the search space of the control strategy family to obtain control strategy parameter samples, and control strategy code is generated based on the control strategy parameter samples and the predicted load curve. Using Bayesian optimization, the control strategy code is deployed in the target device of the target home energy system. With the goal of minimizing the sum of total electricity cost and dynamic battery aging cost within the simulation period, the optimal control strategy parameters are determined by iteratively solving the power balance equation time by time. Initial control strategy code is then generated based on the optimal control strategy parameters.

5. The energy storage adaptive control method according to claim 1, characterized in that, The generation of the initial control strategy code also includes: When the deployment mode of the large language model is a computing power insufficient mode, the large language model includes a knowledge retrieval agent; A knowledge retrieval agent is used to retrieve matching historically verified control strategy parameters from the local knowledge base based on historical household load data and environmental data, and to instantiate the control strategy parameters to generate initial control strategy code.

6. The energy storage adaptive control method according to claim 1, characterized in that, The process involves inputting the initial control strategy code, the initial battery health state, and the set of scenarios to be verified into the digital twin basic model to simulate and obtain the energy flow time-series trajectory information of the target home energy system within a future target time period. Multi-dimensional verification parameters are then used to verify the energy flow time-series trajectory information to generate verification results corresponding to the initial control strategy code, including: Obtain multi-dimensional verification parameters; wherein, the multi-dimensional verification parameters include grid exchange power threshold, battery charging power threshold, battery discharging power trajectory, battery state of charge threshold, battery temperature threshold, and battery remaining life threshold; The energy flow time-series trajectory information within the future target time period is security-verified based on the multi-dimensional verification parameters to generate a verification result corresponding to the initial control strategy code.

7. The energy storage adaptive control method according to claim 1, characterized in that, The security control strategy from the verification results is deployed to the target home energy system, a target power command is generated, and the target power command is loaded into the energy storage converter for execution via an edge controller to obtain energy storage charging and discharging commands for energy storage control of the target home energy system, including: The verification results are hot-loaded into the target home energy system using the verification identifier and the security control strategy, and a target power command is calculated and generated by combining the real-time status data of the target home energy system. An edge controller is used to load the target power command into the energy storage converter for execution, so as to generate energy storage charging and discharging commands for energy storage control of the target home energy system.

8. An energy storage adaptive control device, characterized in that, The device includes: The twin model building module is used to build a basic digital twin model based on communication bus data, device access signals and system configuration parameters in the target home energy system. The load curve generation module is used to input historical household load data, environmental data, and local knowledge base of the target household energy system into the large language model to generate the predicted load curve of the target household energy system; wherein, the deployment mode of the large language model includes a computing power sufficient mode, a computing power limited mode, and a computing power insufficient mode; different deployment modes include one or more intelligent agents, including a knowledge retrieval intelligent agent, a search space generation intelligent agent, a code generation intelligent agent, and a code verification intelligent agent; The initial strategy code generation module is used to obtain the equipment operation constraints, operation preferences and initial battery health status of the target home energy system, and input the equipment operation constraints, operation preferences and initial battery health status and predicted load curve of the target home energy system into the large language model to generate the initial control strategy code; The twin model verification module is used to input the initial control strategy code, the initial battery health state, and the set of scenarios to be verified into the digital twin base model, simulate the energy flow time-series trajectory information of the target home energy system within a future target time period, and verify the energy flow time-series trajectory information using multi-dimensional verification parameters to generate a verification result corresponding to the initial control strategy code. The energy flow time-series trajectory information includes grid exchange power trajectory information, battery charging power trajectory information, battery discharging power trajectory information, battery state of charge trajectory information, battery temperature trajectory information, and load power supply state trajectory. The verification result includes the safety control strategy corresponding to the initial control strategy code, the predicted battery health state, and a verification pass identifier and verification report for the initial control strategy code. The energy storage command generation module is used to deploy the safety control strategy in the verification results to the target home energy system, generate a target power command, and load the target power command to the energy storage converter for execution through the edge controller to obtain the energy storage charging and discharging command for the energy storage control of the target home energy system.

9. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the energy storage adaptive control method as described in any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the energy storage adaptive control method as described in any one of claims 1-7.