Dispatching method based on micro-grid and related equipment
By optimizing off-chain training and on-chain verification, the strategy adaptability and security issues in microgrid scheduling are solved, and efficient and reliable power scheduling strategy management is achieved.
Patent Information
- Application Number
- CN202510501585.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-21
- Publication Date
- 2025-09-05
AI Technical Summary
Existing technologies are difficult to adapt to dynamic and changing operating scenarios in microgrid operation and scheduling. They have problems such as high computational complexity, insufficient security and reliability, data update delays and high interaction costs, making it difficult to achieve transparency, immutability and credibility of strategies.
The historical operation data of the microgrid is obtained under the blockchain, and the training strategy parameters are optimized through reinforcement learning. The credibility of the strategy parameters is verified in combination with the trusted execution environment, and then uploaded to the blockchain to achieve transparency and traceability of the strategy.
It improves the efficiency and reliability of microgrid power dispatching, ensures the economy, adaptability and credibility of the strategy, and realizes the transparency and non-tamperability of the strategy.
Smart Images

Figure CN120601382A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of microgrids, and in particular to a microgrid-based scheduling method and related equipment. Background Art
[0002] In today's era of rapid digitalization and intelligentization, microgrids, as a crucial component in the development of distributed and clean power systems, require extensive data processing and dynamic decision-making for their operation and dispatch. The challenges facing microgrids are no longer limited to basic energy supply and demand balancing and price coordination, but now involve dynamic responses and reliable assurance across multiple parties. On the one hand, user demands are becoming increasingly complex and diverse, requiring guaranteed user satisfaction. Grid operators also need to maximize profits and minimize peak-to-average power ratios to alleviate peak demand pressures. On the other hand, computing power organizations must ensure the correctness and optimality of their strategies while preserving the security and privacy of data transmission and computation. The real-time nature and widespread impact of the power market require that overall dispatch decisions meet optimal solutions while ensuring the accuracy, security, and privacy of the results, while also improving user satisfaction.
[0003] In the field of microgrid operation, scheduling, and verification, existing technical solutions primarily include classical optimization and heuristic algorithms, decision optimization based on reinforcement learning, and external data verification using multi-party computation and oracles. However, these technologies suffer from poor scalability and computational complexity, and their performance can plummet when encountering new scenarios, making them difficult to adapt to the dynamic and ever-changing operational scenarios of microgrids. Furthermore, they suffer from low security and reliability, data update delays, and high interaction costs, making rapid auditing and feedback of results challenging. Summary of the Invention
[0004] The present disclosure proposes a microgrid-based scheduling method and related equipment to solve the above-mentioned technical problems to a certain extent.
[0005] In a first aspect, the present disclosure provides a microgrid-based power dispatching method, comprising:
[0006] Obtain historical operating data of the microgrid off-chain;
[0007] Optimizing and training initial strategy parameters based on the historical operation data to obtain target strategy parameters, wherein the target strategy parameters maximize the benefits of the terminals of the microgrid while satisfying satisfaction constraints;
[0008] Verifying the credibility of the target policy parameters in a trusted execution environment to obtain a trusted certification document;
[0009] The target policy parameters and the trusted certification file are uploaded to the blockchain for download by the terminal, so as to perform power scheduling based on the target policy parameters.
[0010] In a second aspect of the present disclosure, a microgrid-based power dispatching device is provided, comprising:
[0011] An acquisition module, configured to obtain historical operating data of the microgrid off-chain in the blockchain;
[0012] an optimization module, configured to optimize and train initial strategy parameters based on the historical operation data to obtain target strategy parameters, wherein the target strategy parameters maximize the benefits of the terminals of the microgrid while satisfying satisfaction constraints;
[0013] A verification module, configured to verify the credibility of the target policy parameters in a trusted execution environment to obtain a trusted certification document;
[0014] An upload module is used to upload the target policy parameters and the trusted certification file to the blockchain for download by the terminal, so as to perform power scheduling based on the target policy parameters.
[0015] In a third aspect of the present disclosure, an electronic device is provided, comprising one or more processors, a memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the method described in the first aspect.
[0016] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium containing a computer program is provided. When the computer program is executed by one or more processors, the processors are caused to execute the method described in the first aspect.
[0017] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the method described in the first aspect.
[0018] As can be seen from the above, the present disclosure provides a microgrid power dispatching method and related equipment, which obtains microgrid historical operation data off-chain and uses the historical operation data to optimize and train the initial policy parameters, with the goal of maximizing the terminal's benefits under the satisfaction constraint conditions, to obtain the target policy parameters; then, the credibility of the target policy parameters is verified in the trusted execution environment (TEE) to generate a trusted certification file; finally, the target policy parameters and the trusted certification file are uploaded to the blockchain chain for the terminal to download and perform power dispatch based on the policy parameters, ensuring the transparency, immutability and credibility of the policy. Optimization and trusted management of microgrid power dispatching strategies are achieved. Obtaining historical data off-chain ensures the richness and accessibility of data, and optimization training improves the economy and adaptability of the strategy; trusted execution environment verification ensures the authenticity and security of the policy parameters, and the trusted certification file enhances the credibility of the strategy; the storage and sharing of policy parameters and certification files on the blockchain chain achieves transparency and traceability of the strategy, effectively improving the efficiency and reliability of microgrid power dispatching. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 Schematic diagram of a power dispatching architecture of a microgrid according to an embodiment of the present disclosure.
[0021] Figure 2 Schematic diagram of the hardware structure of an exemplary electronic device according to an embodiment of the present disclosure.
[0022] Figure 3 Schematic diagram of a flow chart of a power dispatching method for a microgrid according to an embodiment of the present disclosure.
[0023] Figure 4 Schematic diagram of the principle of the power dispatching method of the microgrid according to an embodiment of the present disclosure.
[0024] Figure 5 Schematic diagram of the reinforcement learning and policy optimization process of an embodiment of the present disclosure.
[0025] Figure 6 Schematic diagram of the result credibility verification process of the embodiment of the present disclosure.
[0026] Figure 7 Schematic diagram of a power dispatching device for a microgrid according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0028] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the described object changes, the relative position relationship may also change accordingly.
[0029] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0030] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested 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 electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0031] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0032] Figure 1 Schematic diagram showing the power dispatching architecture of the microgrid according to an embodiment of the present disclosure. Figure 1The power dispatching architecture 100 of the microgrid may include a server 110, a terminal 120, and a network 130 that provides a communication link. The server 110 and the terminal 120 may be connected via a wired or wireless network 130. The server 110 may be an independent physical server, a server cluster or a distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, security services, and CDN.
[0033] Terminal 120 can be implemented in hardware or software. For example, when implemented in hardware, terminal 120 can be any electronic device with a display screen that supports page display, including but not limited to smartphones, tablet computers, e-book readers, laptop computers, and desktop computers. When terminal 120 is implemented in software, it can be installed in the electronic devices listed above; it can be implemented as multiple software or software modules (such as software or software modules used to provide distributed services), or it can be implemented as a single software or software module, and no specific limitations are given here.
[0034] It should be noted that the power dispatching method for the microgrid provided in the embodiment of the present application can be executed by the terminal 120 or by the server 110. It should be understood that Figure 1 The number of terminals, networks, and servers in the embodiment is for illustration only and is not intended to limit the number of terminals, networks, and servers.
[0035] Figure 2 FIG. 2 shows a schematic diagram of the hardware structure of an exemplary electronic device 200 provided in an embodiment of the present disclosure. Figure 2 As shown, electronic device 200 may include: processor 202, memory 204, network module 206, peripheral interface 208 and bus 210. Processor 202, memory 204, network module 206 and peripheral interface 208 are connected to each other through bus 210 in communication with each other within electronic device 200.
[0036] The processor 202 may be a central processing unit (CPU), a neural network processor (NPU), a microcontroller (MCU), a programmable logic device, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or one or more integrated circuits. The processor 202 may be used to perform functions related to the technology described in this disclosure. In some embodiments, the processor 202 may also include multiple processors integrated into a single logical component. For example, Figure 2 As shown, the processor 202 may include a plurality of processors 202a, 202b, and 202c.
[0037] The memory 204 may be configured to store data (eg, instructions, computer code, etc.). Figure 2 As shown, the data stored in the memory 204 may include program instructions (for example, program instructions for implementing the power dispatching method of the microgrid in the embodiment of the present disclosure) and data to be processed (for example, the memory may store configuration files of other modules, etc.). The processor 202 may also access the program instructions and data stored in the memory 204, and execute the program instructions to operate on the data to be processed. The memory 204 may include a volatile storage device or a non-volatile storage device. In some embodiments, the memory 204 may include a random access memory (RAM), a read-only memory (ROM), an optical disk, a magnetic disk, a hard disk, a solid-state drive (SSD), a flash memory, a memory stick, etc.
[0038] The network module 206 can be configured to provide the electronic device 200 with communication with other external devices via a network. The network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, near field communication (NFC)), a cellular network, the Internet, or a combination thereof. It will be appreciated that the type of network is not limited to the specific examples above. In some embodiments, the network module 206 can include any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, and the like.
[0039] The peripheral interface 208 can be configured to connect the electronic device 200 to one or more peripheral devices to implement information input and output. For example, the peripheral devices can include input devices such as a keyboard, a mouse, a touchpad, a touch screen, a microphone, and various sensors, and output devices such as a display, a speaker, a vibrator, and an indicator light.
[0040] The bus 210 can be configured to transmit information between the various components of the electronic device 200 (e.g., the processor 202, the memory 204, the network module 206, and the peripheral interface 208), such as an internal bus (e.g., a processor-memory bus), an external bus (USB port, PCI-E bus), etc.
[0041] It should be noted that although the architecture of the electronic device 200 shown above only shows the processor 202, the memory 204, the network module 206, the peripheral interface 208, and the bus 210, in a specific implementation, the architecture of the electronic device 200 may also include other components necessary for normal execution. In addition, it will be understood by those skilled in the art that the architecture of the electronic device 200 may also include only the components necessary to implement the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.
[0042] Existing technologies for microgrid operation, scheduling, and verification primarily include classical optimization and heuristic algorithms, reinforcement learning-based decision optimization, and multi-party computation and oracle-based external data verification. These technologies can address optimal scheduling and verification in specific scenarios, but they have inherent limitations when applied to complex microgrids, where real-time performance and reliability requirements are paramount.
[0043] Traditional microgrid scheduling often uses classical optimization and heuristic scheduling techniques, such as linear programming and dynamic programming. In small-scale scenarios, these methods can quickly find optimal solutions under deterministic conditions. Heuristic algorithms such as particle swarm optimization provide a feasible search strategy in scenarios with discrete parameters and slightly complex structures, finding optimal solutions within a certain period of time. However, as the scale of microgrids, decision-making dimensions, and uncertainty increase significantly, classical optimization and heuristic algorithms are prone to the curse of dimensionality, resulting in poor scalability and computational complexity. When environmental parameters change frequently and are difficult to predict, these algorithms need to be repeatedly re-solved, lacking continuous learning and adaptive features. Their performance may drop sharply when encountering new scenarios, making it difficult to adapt to the dynamic and changing operating scenarios of microgrids.
[0044] Reinforcement learning is a decision-making optimization method based on continuous interaction with the environment, updating strategies through trial and error and feedback, and learning adaptive strategies through iteration. Current research combines deep reinforcement learning with microgrid scheduling, approximating strategies through deep neural networks, thereby efficiently processing high-dimensional state and action spaces. Although reinforcement learning can theoretically approximate optimal strategies under sufficient exploration and appropriate hyperparameter settings, actual training is often limited by data, computing power, and time costs, and can often only achieve local optimal solutions. At the same time, the reinforcement learning process involves a large number of parameter updates and strategy iteration steps, which are not transparent to external observers. Without an effective verification mechanism, third parties cannot confirm whether the final strategy truly achieves the optimization goals set by the contract, or whether there is a possibility of data falsification and strategy forgery.
[0045] In decentralized and blockchain applications, multi-party computing (MPC) and oracle-based external data verification solutions provide a means for trusted importation and multi-party verification of external data. MPC ensures the authenticity of computational results without leaking sensitive information. Oracles can retrieve trusted data from off-chain and upload it to the chain, providing an external reference for policy verification. While oracle and MPC can provide data authenticity assurance, they lack direct support for optimality verification. Furthermore, real-time microgrid scheduling requires rapid decision-making and verification. Oracles and MPC suffer from data update delays and high interaction costs, making rapid audit and feedback on results challenging.
[0046] Therefore, how to balance the high-speed requirements of microgrid strategy formulation, efficient adaptability to complex transaction scenarios, security guarantees for data transmission and processing, and the correctness and optimality of strategy solutions has become a technical problem that needs to be solved urgently.
[0047] In view of this, the embodiments of the present disclosure provide a microgrid power dispatching method and related equipment. The method obtains the microgrid's historical operating data off-chain and uses the historical operating data to optimize and train the initial policy parameters, with the goal of maximizing the terminal's benefits under the satisfaction constraint. The target policy parameters are then obtained. The credibility of the target policy parameters is then verified in a trusted execution environment (TEE) to generate a trusted certification file. Finally, the target policy parameters and the trusted certification file are uploaded to the blockchain chain for the terminal to download and perform power dispatch based on the policy parameters, ensuring the transparency, immutability, and credibility of the policy. Optimization and trusted management of the microgrid power dispatching strategy are achieved. Obtaining historical data off-chain ensures the richness and accessibility of the data, while optimization training improves the economy and adaptability of the strategy. Trusted execution environment verification ensures the authenticity and security of the policy parameters, and the trusted certification file enhances the credibility of the strategy. The storage and sharing of policy parameters and certification files on the blockchain achieves transparency and traceability of the strategy, effectively improving the efficiency and reliability of microgrid power dispatching.
[0048] See also Figure 3 , Figure 3 The schematic flow chart of the power dispatching method of the microgrid according to the embodiment of the present disclosure is shown. The power dispatching method of the microgrid according to the embodiment of the present disclosure can be deployed on a terminal or a server. Figure 3 In the embodiment, the power dispatching method 300 of the microgrid may further include the following steps.
[0049] In step S310, historical operation data of the microgrid is obtained off-chain in the blockchain.
[0050] Blockchain can use encryption algorithms to link data in the form of "blocks" in chronological order into a chain. Each block contains the hash value of the previous block, forming an unalterable chain structure. Off-chain refers to the data storage or processing environment outside the blockchain network, as opposed to on-chain (within the blockchain network). Microgrids can include distributed energy sources (such as solar and wind energy), energy storage devices, and loads, and can operate independently or be connected to the main grid. Figure 4 , Figure 4 A schematic diagram illustrating the principles of a microgrid power dispatching method according to an embodiment of the present disclosure is provided. Historical operating data may refer to various data records generated during the operation of a microgrid, reflecting the system status and performance. For example, historical operating data may include historical electricity prices, historical power generation data, and historical power demand.
[0051] In step S320, the initial strategy parameters are optimized and trained based on the historical operation data to obtain target strategy parameters, where the target strategy parameters maximize the benefits of the terminals of the microgrid while satisfying satisfaction constraints.
[0052] Initial policy parameters may refer to policy parameters set before optimization training begins, serving as the starting point for training. Optimization training may refer to adjusting the initial policy parameters through algorithms and models to find the parameter combination that optimizes the objective function. Target policy parameters may refer to policy parameters obtained after optimization training that enable the microgrid to achieve higher performance under specific conditions. Terminals may refer to various devices or users within the microgrid, such as distributed energy devices, energy storage devices, and loads. Satisfaction constraints may refer to conditions that must be met during the optimization process to ensure that terminal operation meets user or system requirements. For example, satisfaction constraints may include ensuring that power meets user demand (supplied power is greater than or equal to demanded power), that voltage fluctuations are relatively stable (voltage fluctuations are within a preset voltage fluctuation range), and that users can complete transactions quickly (transaction times are within a preset duration). Maximizing revenue may refer to maximizing the overall revenue of the microgrid while satisfying the satisfaction constraints.
[0053] During microgrid operation, dynamic responses to load fluctuations, uncertainties in renewable energy generation, and real-time electricity price fluctuations are required. A reinforcement learning agent, through continuous interaction and trial-and-error learning, iteratively updates policy parameters to obtain the optimal strategy for maximizing revenue while satisfying user satisfaction constraints. Specifically, historical microgrid operating data can be collected, including data on power generation, consumption, energy storage, and grid status. This data is cleaned and preprocessed to remove noise and outliers. The state and action space of the microgrid is then established. For example, the system constructs a high-dimensional state and action space based on the microgrid's operating status, such as power generation, energy storage status, user demand, electricity pricing information, as well as decision variables such as price adjustments, energy storage scheduling, and electricity trading volume. This space is then used to provide a foundation for reinforcement learning modeling using the Stackelberg model. Off-chain policy training leverages scalable computing resources, simulation environments, and historical datasets, enabling the reinforcement learning agent to continuously update policy parameters over multiple rounds of trials. The initial policy can be generated randomly or based on simple heuristics, and training iterations are then used to converge to an optimal solution.
[0054] In some embodiments, optimizing and training the initial strategy parameters based on the historical operation data to obtain target strategy parameters includes:
[0055] Extracting multiple rounds of sequences of power generation, demand, and electricity price from the historical operation data to obtain multiple training samples;
[0056] The initial strategy parameters are trained multiple times based on the plurality of training samples until the training requirements are met, thereby obtaining the target strategy parameters; wherein, in each round of training, the intermediate strategy parameters are updated based on the training samples.
[0057] Among them, multiple rounds of sequences about power generation, demand, and electricity prices can be extracted from historical operating data. Each round of sequences serves as a training sample, containing data in three dimensions: power generation, demand, and electricity price. In this way, the original historical operating data can be converted into a format suitable for model training. By extracting multiple rounds of sequences, it is ensured that the training samples cover the operating conditions of different time periods, thereby increasing the generalization ability of the model. When initializing parameters, the initial policy parameters can be set, and a suitable model (such as a reinforcement learning model, a neural network model, etc.) can be selected to optimize the policy parameters. Based on the initial parameters, the model will use the extracted training samples to perform multiple rounds of training on the initial policy parameters. In each round of training, the intermediate policy parameters are updated based on the current training samples. Through multiple rounds of training, the policy parameters can be gradually adjusted to make them more consistent with the characteristics of historical data. The training process continues until the training requirements are met (such as the loss function converges, the maximum number of iterations is reached, etc.).
[0058] In some embodiments, updating the intermediate strategy parameters based on the training samples in each round of training includes:
[0059] For each round of training, an action is selected for each time step based on the training sample and the intermediate strategy parameters, and the corresponding reward is recorded to obtain an action-reward sequence of the current state, action, reward, and next state;
[0060] Storing the action reward sequence in a replay buffer;
[0061] A preset number of action reward sequences are periodically extracted from the replay buffer to perform gradient descent to update the intermediate policy parameters.
[0062] During each training round, the policy interacts with the environment. The current policy is determined based on the current state of the environment at the current time step (such as current power generation, demand, and electricity prices), combined with intermediate policy parameters. Based on the current state, the policy selects an action (such as adjusting the output power of a power generation device or changing the charge / discharge status of an energy storage device). After executing the selected action, the environment returns a reward signal representing the immediate benefit of the action. The next state can refer to changes in load or electricity price fluctuations caused by the execution of the trading strategy. The current state, the selected action, the reward obtained, and the next state are recorded to form a four-tuple (current state, action, reward, next state), which constitutes the action-reward sequence. By recording actions and rewards, the performance of the current policy under specific conditions is evaluated, providing training data for subsequent policy updates. All action-reward sequences generated during each training round are stored in a replay buffer. The replay buffer can be a finite-sized queue that stores historical experience for subsequent training. Storing historical experience allows the same data to be reused multiple times during training, improving data utilization. Randomly sampling data from the replay buffer can break temporal correlations and reduce variance during training. A preset number of action-reward sequences are randomly extracted from the replay buffer. Using these sequences, the gradient of the loss function with respect to the policy parameters is calculated, and intermediate policy parameters are updated using gradient descent.
[0063] Specifically, historical data, such as electricity prices and power generation data from the past year, can be used to repeatedly train the agent strategy in an offline environment to ensure that the initial strategy has better performance. The experience replay buffer can also be used to sample past interaction data, thereby improving computational decision-making efficiency. Figure 5 , Figure 5 A schematic diagram of the reinforcement learning and strategy optimization process according to an embodiment of the present disclosure is shown. Figure 4 and Figure 5Initial data can be collected: the initial state of the microgrid (such as current energy storage, electricity prices, and renewable energy generation forecasts) can be obtained from a historical database or real-time system. Then, the initial policy of the reinforcement learning agent is set: random initialization, a pretrained model, or other policies can be used as a starting point. Multiple rounds of power generation, demand, and price sequences are extracted from the historical dataset as training samples. An experience replay buffer can be created to store the "state-action-reward-next-state" sequence. The agent selects an action for each time step based on the current policy, records the immediate reward received during each period, and stores these samples in the replay buffer. Periodically, batches of samples are drawn from the buffer and gradient descent is performed to update the policy parameters, converging the policy towards a more optimal state. This process is repeated until the policy performance meets expectations or the set number of training rounds is reached. During training, policy parameter versions can be periodically saved, and the benefit indicators of each parameter version can be recorded in an index table to form a time series index chain for subsequent backtracking and comparison.
[0064] In some embodiments, the intermediate policy parameters of each round have corresponding identifiers, and the identifiers and corresponding metadata are recorded based on an index table, where the metadata includes the profit indicators and constraints corresponding to the intermediate policy parameters.
[0065] Specifically, each time a policy parameter is updated, the system records that version's policy parameters and key performance indicators using a hash pointer. This allows for easy tracing of the policy optimization process by consulting the policy version hash chain to locate each historical version and conduct comparative performance analysis. Each policy parameter version is identified using a separate hash pointer and stored in a distributed database. An index table maintains policy versions and their associated metadata, including payoff metrics and constraint satisfaction, enabling fast retrieval and efficient comparison.
[0066] In some embodiments, the method further comprises:
[0067] In response to the intermediate strategy parameters converging slowly or reaching a local optimum during the training, the intermediate strategy parameters corresponding to the previous round of training are backtracked based on the index table, and / or new training parameters are used for training.
[0068] Specifically, the reinforcement learning agent can dynamically adjust the algorithm parameter exploration rate, learning rate, and data call strategy based on training progress. If the system finds that the strategy is converging slowly or reaching a local optimum, it can backtrack to the previous version of the strategy or try new training parameters (such as new algorithm hyperparameters) based on the historical parameters recorded in the index.
[0069] In step S330, the credibility of the target policy parameters is verified in a trusted execution environment to obtain a trusted certification file.
[0070] Among them, the trusted execution environment can refer to a hardware-level security area that provides an isolated execution environment to ensure the confidentiality, integrity and verifiability of code and data. Trustworthiness verification can refer to verifying the target policy parameters in the trusted execution environment to ensure that they have not been tampered with and meet expectations. The trusted proof file can refer to a file generated after the trustworthiness verification passes, which proves the trustworthiness of the target policy parameters. In order to ensure the credibility and optimality of the final scheduling policy, the method of the embodiment of the present disclosure introduces a trusted verification mechanism on the chain. Through the trusted execution environment (TEE) and the challenge mechanism (CQM), the scheduling policy is compared and verified by multiple parties, and a verifiable proof is generated for the final policy parameters and related performance indicators. The proof is then stored on the chain together with the hash pointer of the policy. The policy verification program is run in the trusted execution environment, and the policy parameters and microgrid environment reference data, such as the electricity price series over a period of time, are used as input to simulate and evaluate the policy decision to verify that it meets the constraints and reaches the predetermined profit threshold. After the calculation is completed, the trusted execution environment outputs a remote attestation certificate to prove that the result is authentic and trustworthy and has not been tampered with.
[0071] In step S340, the target policy parameters and the trusted certification file are uploaded to the blockchain for download by the terminal to perform power scheduling based on the target policy parameters.
[0072] By uploading target policy parameters and trusted proof files to the blockchain and making them available for download by terminals, the credibility and up-to-dateness of the policy parameters can be ensured, thereby guiding terminal devices for efficient power dispatch. This process leverages the decentralized, tamper-proof, and traceable nature of blockchain, as well as the secure isolation mechanism of the trusted execution environment, providing strong technical support for microgrid operation. By completing the reinforcement learning training process off-chain and publishing the final policy and verification proof on-chain, intelligent optimization of microgrid dispatch is achieved.
[0073] In some embodiments, the method further comprises:
[0074] The blockchain smart contract receives a challenge request from a challenge terminal, wherein the challenge request includes a challenge type, initial proof data, and a challenge deposit;
[0075] comparing the initial proof data with at least one of transaction data, target policy parameters, and reward distribution of the original data to obtain a comparison result;
[0076] In response to the deviation of the comparison result being greater than or equal to the deviation threshold, determining the ruling result of the questioning request includes: the questioning is successful, modifying the target policy parameters, deducting at least part of the deposit of the violating party, and rewarding at least part of the deposit to the questioning terminal according to a preset ratio.
[0077] Original data refers to the relevant data provided when the original strategy was submitted, including transaction data and reward information. Challenges can be categorized as strategy optimality challenges, reward calculation challenges, and market disruption challenges. For these three types of challenges, the challenging computing power organization must provide corresponding initial proof data and submit a security deposit as per the challenge rules to prevent malicious challenges. Upon receiving a challenge, the system temporarily freezes the relevant transaction, conducts its own evaluation, or involves assisting nodes to verify the challenge and complete the smart contract's automated adjudication. The successful completion of a transaction requires that the strategy receive no new challenges within a certain challenge window, ensuring the timeliness and finality of the transaction.
[0078] In some embodiments, the method further comprises:
[0079] In response to the deviation of the comparison result being less than a deviation threshold, determining a ruling result of the challenge request includes: unsuccessful challenge, deducting at least a portion of the challenge deposit and / or reducing a reputation score of the challenged terminal.
[0080] Specifically, see Figure 6 , Figure 6 The figure shows a schematic diagram of the result trust verification process according to an embodiment of the present disclosure. Figure 4 and Figure 6, strategies can be submitted and recorded on-chain: a hash value of the final strategy parameters is calculated as the strategy version identifier; this hash value is submitted to the blockchain smart contract for evidence storage. The computing power organization is also required to upload a remote attestation with a hardware-level cryptographic signature generated by the trusted execution environment, demonstrating that the calculations executed in the trusted hardware have not been tampered with. This ensures that subsequent verification can be verified against this identifier. When an exception is triggered and a challenge is submitted, if a trading node questions the current strategy during the transaction, such as a suboptimal strategy, incorrect reward calculations, or a violation of trading rules, it can submit a challenge request by calling the challenge interface, selecting the challenge type and specific strategy. The challenge request must be accompanied by preliminary evidence, such as a forecast of a superior strategy's returns, a comparison of calculation formulas, or an explanation of the rule violation. A predetermined challenge deposit, based on the transaction size, must also be submitted to prevent malicious or invalid challenges. Upon receiving the challenge request, the smart contract automatically freezes the relevant transaction process and initiates a pre-set verification process, verifying the submitted evidence against the original data. The built-in validation module can be invoked to recalculate and compare transaction data, strategy parameters, and reward distribution to determine whether the results are significantly biased and the validity of the challenge. For example, the strategy is replicated based on the pre-trade environment, simulating the decision-making process and verifying whether the execution results of the strategy are consistent with the submitted results. Once the verification results are confirmed, the smart contract automatically determines whether the challenge is valid. If the challenge is valid, the strategy will be revised, the deposit of the offending party will be deducted, and the successful challenger will be rewarded proportionally. If the challenge is invalid, the deposit of the challenger will be deducted, and the credit deduction will be recorded. The final decision results, reward and punishment details, and related evidence data are all stored in the blockchain log and queryable for subsequent audit and traceability. At the same time, all nodes are notified to update the latest status. The trading system will set a fixed time to conduct a statistical review of transaction records that occurred in the past time period. It will randomly select existing transactions to verify whether their returns meet the level of the original strategy. The on-chain records are updated based on the latest verification results, so that the trustworthy status of the strategy dynamically reflects the latest performance and compliance.
[0081] Smart contracts on the blockchain quickly verify submitted proofs using pre-deployed verification keys or the public key of a trusted execution environment (TEE) to check the submitted policy proofs. For example, they can verify the basic correctness of the submitted policy proofs by checking whether the TEE signature meets pre-set conditions. If verification passes, the policy can be published according to pre-defined rules and a certain initial reward can be awarded, thus encouraging authentic and high-quality policy submissions.
[0082] Rewards for successful challenges primarily come from a pre-locked deposit or pledged assets by the challenged party. The challenged party (e.g., the party with the faulty execution or the initial policy provider) is required to provide lightweight verification and financial incentives in the relevant transaction. The blockchain smart contract quickly verifies the submitted proof using a pre-deployed verification key or a trusted execution environment (TEE) public key to check the submitted policy proof. For example, the TEE signature can be verified to determine its basic correctness by verifying that it meets pre-set conditions. If verification passes, the policy can be published according to pre-defined rules and a certain initial reward will be awarded, thus encouraging authentic and high-quality policy submissions. A certain deposit serves as a guarantee of integrity, which will be used to reward the challenger if a violation is proven.
[0083] A reputation score can be established for trading partners, with successfully completed transactions contributing to user reputation. If a trading partner maintains a high reputation over a long period of time, the platform can offer additional incentives, such as lower fees or transaction priority, to increase market participation. Furthermore, quotes and trade requests from highly reputable trading partners are more likely to gain the trust and approval of third parties, thereby promoting efficient and honest market operations.
[0084] The hash value of the final strategy parameters can be stored together with the verification proof in the on-chain smart contract and recorded in the index table. When checking the strategy performance, the validator only needs to find the corresponding hash pointer and proof through the index to quickly confirm the optimality of the strategy.
[0085] In some embodiments, the method further comprises:
[0086] The challenge request, the corresponding comparison result, and the adjudication result are stored in association in the transaction record of the blockchain log for query.
[0087] The trading system will set a fixed time to conduct a statistical review of transaction records that occurred in the past period. It will randomly select transactions that have occurred to verify whether their returns have reached the level of the original strategy. Based on this dynamic verification process, the reputation of the computing power institution will be re-evaluated.
[0088] In some embodiments, the method further comprises:
[0089] The historical versions of the intermediate policy parameters are stored in layers based on time periods, with the intermediate policy parameters of versions closer to the current time being located in a high-frequency layer, and the intermediate policy parameters of versions farther from the current time being located in a low-frequency layer;
[0090] locating a target intermediate policy parameter among the intermediate policy parameters based on the index table;
[0091] The credibility of the target intermediate policy parameters is reviewed based on given reference policy parameters.
[0092] The storage and retrieval of reinforcement learning training data and policy parameters rely heavily on index tables and hash pointer mechanisms. Through these mechanisms, policy validators, regulators, or users can trace the policy optimization process and conduct trusted audits of the final decisions.
[0093] As training iterations progress, a separate hash pointer is generated for each version of the policy parameters and stored in a distributed database. An index table links these versions by time or training step sequence, forming a traceable version chain. After each policy update, the policy parameter hash pointers are stored, and historical versions of the policy parameters are stored in layers based on time periods. Recent version parameters are stored in the high-frequency layer for quick query and fine-tuning; older versions are gradually migrated to the low-frequency layer for retrospective verification and rapid problem location. To ensure efficient verification, the index table also records the policy's payoff value, default status, satisfaction index, and hash pointers to relevant verification certificates for that version.
[0094] In some embodiments, the method further comprises:
[0095] Randomly sampling the transaction records based on a preset time interval to secondary verify whether the profit effect of the transaction records reaches the expected profit corresponding to the target strategy parameters, and obtaining a secondary verification result;
[0096] The trusted state corresponding to the target policy parameter on the chain is updated based on the secondary verification result.
[0097] When a validator needs to evaluate the credibility of a particular policy, they can obtain the hash pointer and corresponding verification certificate of the policy version from the chain. They can locate the policy parameter data in the distributed database through the index table and then review the policy against known reference data in the local environment.
[0098] If it is necessary to compare the performance of strategies at different training stages, the validator can trace back the strategy parameters and performance indicators of the previous version along the index chain. This allows for quick comparison of performance gains and optimization processes without having to store redundant data.
[0099] Smart contracts can set access control policies, ensuring only authorized regulators or stakeholders can request verification of specific policies, thereby protecting the policy provider's trade secrets. This retrieval mechanism, which associates policy parameters with proofs, ensures the integrity and efficiency of policy optimality verification. Without a fully authorized request, external entities cannot confirm the optimality and stability of a policy. The index chain design simplifies historical analysis and auditing, ensuring data consistency and reliability. Each node only needs to maintain its own policy-related index table, significantly reducing data management complexity and improving retrieval efficiency. When a third party needs to verify the validity and credibility of a policy, they can simply verify the policy parameters and proof data in parallel in the distributed database to complete the verification.
[0100] In summary, the method of the disclosed embodiment combines off-chain reinforcement learning strategy optimization with on-chain trusted verification mechanism to achieve intelligent, efficient, trustworthy and traceable microgrid operation and scheduling. Specifically, it includes:
[0101] For off-chain scheduling optimization, relevant computing power institutions can use reinforcement learning algorithms to model the high-dimensional state and action space of microgrids, dynamically optimizing electricity price adjustments and energy trading strategies. Combined with offline training models, initial strategy training can be performed using historical data during the offline phase, adapting to real-time data changes during operation to achieve dynamic response and rapid convergence of strategies. Furthermore, a versioned storage and index management mechanism has been introduced to archive strategy parameters in layers by time, enabling historical strategy versions to be traced back and compared for performance, ensuring a transparent and controllable decision-making process.
[0102] In terms of on-chain verification, trusted verification of strategy results is provided through technical means such as a trusted execution environment and a challenge mechanism. The system submits the hash pointer of the final strategy parameters and the corresponding verification proof to the chain for on-chain storage, forming an unalterable record that can be quickly verified and audited by verifiers and regulators. This mechanism greatly enhances the transparency of the results and solves the pain points of traditional reinforcement learning processes that are difficult to verify and audit. At the same time, the challenge mechanism effectively stimulates computing power institutions to upgrade the speed and accuracy of solutions, promoting the continuous improvement of reinforcement learning algorithms.
[0103] In terms of data management and storage, a design combining policy parameter index chains enables dynamic archiving, deduplication storage, and efficient retrieval of data. Pointer operations replace actual data movement, reducing storage overhead and retrieval latency. Furthermore, the system provides access control and compliance management mechanisms to ensure that policy and verification data are only available to authorized parties, further enhancing system security and privacy protection, and ensuring secure data sharing and compliant use.
[0104] As can be seen, the method according to the disclosed embodiments achieves intelligent decision-making and dynamic optimization of microgrid scheduling through on-chain and off-chain collaborative computing, while also ensuring the transparency, optimality, and credibility of the results through a trusted verification mechanism. This addresses the shortcomings of traditional solutions, such as unverifiable results and inefficient data management. Leveraging efficient data management, secure privacy protection, and robust policy optimization capabilities, it provides an innovative and feasible solution for the intelligent management and market-oriented operation of microgrids. Furthermore, it addresses the limitations of traditional microgrid solutions. Reinforcement learning intelligent scheduling builds models based on microgrid operators and users in real-world scenarios, shifting complex computations to off-chain computing mechanisms. This maximizes profits while satisfying constraints while reducing on-chain computational overhead and certification costs. Furthermore, trusted verification of results requires the publication, verification, and storage of proof of policy optimality on-chain, completing a closed loop of data-driven microgrid scheduling and full-process verification. This addresses the challenges of complex microgrid data, diverse requirements, and a lack of trust, laying the foundation for further development.
[0105] The method in this disclosed embodiment incorporates reinforcement learning strategy optimization and a trusted verification mechanism. Reinforcement learning enables solutions in complex scenarios while minimizing solution time; trusted verification ensures the security and transparency of off-chain computations and the reliability of policies. Together, these two approaches create a smart and reliable microgrid scheduling and data management solution.
[0106] It should be noted that the method of the embodiments of the present disclosure can be performed by a single device, such as a computer or server. The method of the embodiments of the present disclosure can also be applied in a distributed scenario, where multiple devices cooperate to perform the method. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiments of the present disclosure, and the multiple devices will interact with each other to complete the method.
[0107] It should be noted that the above description is limited to some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0108] Based on the same technical concept, corresponding to any of the above embodiments and methods, the present disclosure also provides a microgrid power dispatching device, see Figure 7 , the power dispatching device of the microgrid, the device comprising:
[0109] An acquisition module, configured to obtain historical operating data of the microgrid off-chain in the blockchain;
[0110] an optimization module, configured to optimize and train initial strategy parameters based on the historical operation data to obtain target strategy parameters, wherein the target strategy parameters maximize the benefits of the terminals of the microgrid while satisfying satisfaction constraints;
[0111] A verification module, configured to verify the credibility of the target policy parameters in a trusted execution environment to obtain a trusted certification document;
[0112] An upload module is used to upload the target policy parameters and the trusted certification file to the blockchain for download by the terminal, so as to perform power scheduling based on the target policy parameters.
[0113] In some embodiments, optimizing and training the initial strategy parameters based on the historical operation data to obtain target strategy parameters includes:
[0114] Extracting multiple rounds of sequences of power generation, demand, and electricity price from the historical operation data to obtain multiple training samples;
[0115] The initial strategy parameters are trained multiple times based on the plurality of training samples until the training requirements are met, thereby obtaining the target strategy parameters; wherein, in each round of training, the intermediate strategy parameters are updated based on the training samples.
[0116] In some embodiments, updating the intermediate strategy parameters based on the training samples in each round of training includes:
[0117] For each round of training, an action is selected for each time step based on the training sample and the intermediate strategy parameters, and the corresponding reward is recorded to obtain an action-reward sequence of the current state, action, reward, and next state;
[0118] Storing the action reward sequence in a replay buffer;
[0119] A preset number of action reward sequences are periodically extracted from the replay buffer to perform gradient descent to update the intermediate policy parameters.
[0120] In some embodiments, each round of the intermediate policy parameter has a corresponding identifier, and the identifier and corresponding metadata are recorded based on an index table, the metadata including the profit indicator and constraint conditions corresponding to the intermediate policy parameter;
[0121] The device further comprises:
[0122] A backtracking module is used to, in response to the intermediate strategy parameters converging slowly or reaching a local optimum during the training, backtrack the intermediate strategy parameters corresponding to the previous round of training based on the index table, and / or adopt new training parameters for training.
[0123] In some embodiments, the blockchain smart contract receives a challenge request from a challenge terminal, the challenge request including a challenge type, initial proof data, and a challenge deposit;
[0124] The device further comprises:
[0125] a comparison module, configured to compare the initial proof data with at least one of transaction data, target policy parameters, and reward distribution of the original data to obtain a comparison result;
[0126] a ruling module, configured to, in response to a deviation of the comparison result being greater than or equal to a deviation threshold, determine a ruling result of the challenge request, including: determining that the challenge is successful, modifying the target policy parameters, deducting at least a portion of the deposit of the violating party, and rewarding the at least a portion of the deposit to the questioning terminal according to a preset ratio; and
[0127] In response to the deviation of the comparison result being less than a deviation threshold, determining a ruling result of the challenge request includes: unsuccessful challenge, deducting at least a portion of the challenge deposit and / or reducing a reputation score of the challenged terminal.
[0128] In some embodiments, the apparatus further comprises:
[0129] A storage module, configured to store the challenge request, the corresponding comparison result, and the adjudication result in a transaction record of a blockchain log in an associated manner for query;
[0130] A secondary verification module is used to randomly select the transaction records based on a preset time interval to secondary verify whether the profit effect of the transaction records reaches the expected profit corresponding to the target strategy parameters, and obtain a secondary verification result;
[0131] A trusted state updating module is used to update the trusted state corresponding to the target policy parameter on the chain based on the secondary verification result.
[0132] In some embodiments, the storage module is further configured to store historical versions of the intermediate policy parameters in layers based on time periods, with intermediate policy parameters of versions closer to the current time being located in a high-frequency layer, and intermediate policy parameters of versions farther from the current time being located in a low-frequency layer;
[0133] The device further comprises:
[0134] a positioning module, configured to locate a target intermediate policy parameter among the intermediate policy parameters based on the index table;
[0135] A review module is used to review the credibility of the target intermediate policy parameters based on given reference policy parameters.
[0136] For the convenience of description, the above devices are described as being functionally divided into various modules. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0137] The apparatus of the above embodiment is used to implement the power dispatching method of the corresponding microgrid in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0138] Based on the same technical concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the power dispatching method of the microgrid as described in any of the above embodiments.
[0139] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0140] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the power dispatching method of the microgrid as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0141] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Within the scope of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of clarity.
[0142] In addition, to simplify the description and discussion, and so as not to obscure the embodiments of the present disclosure, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid obscuring the embodiments of the present disclosure, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the purview of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0143] Although the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0144] The embodiments of the present disclosure are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A power dispatching method based on microgrid, characterized in that: include: Obtain historical operating data of the microgrid off-chain in the blockchain; Optimizing and training initial strategy parameters based on the historical operation data to obtain target strategy parameters, wherein the target strategy parameters maximize the benefits of the terminals of the microgrid while satisfying satisfaction constraints; Verifying the credibility of the target policy parameters in a trusted execution environment to obtain a trusted certification document; The target policy parameters and the trusted certification file are uploaded to the blockchain for download by the terminal, so as to perform power scheduling based on the target policy parameters.
2. The method according to claim 1, characterized in that Optimizing and training the initial strategy parameters based on the historical operation data to obtain target strategy parameters includes: Extracting multiple rounds of sequences of power generation, demand, and electricity price from the historical operation data to obtain multiple training samples; The initial strategy parameters are trained multiple times based on the plurality of training samples until the training requirements are met, thereby obtaining the target strategy parameters; wherein, in each round of training, the intermediate strategy parameters are updated based on the training samples.
3. The method according to claim 2, characterized in that In each round of training, the intermediate strategy parameters are updated based on the training samples, including: For each round of training, an action is selected for each time step based on the training sample and the intermediate strategy parameters, and the corresponding reward is recorded to obtain an action-reward sequence of the current state, action, reward, and next state; Storing the action reward sequence in a replay buffer; A preset number of action reward sequences are periodically extracted from the replay buffer to perform gradient descent to update the intermediate policy parameters.
4. The method according to claim 2, characterized in that The intermediate policy parameters of each round have corresponding identifiers, and the identifiers and corresponding metadata are recorded based on the index table, where the metadata includes the profit indicators and constraints corresponding to the intermediate policy parameters; The method further comprises: In response to the intermediate strategy parameters converging slowly or reaching a local optimum during the training, the intermediate strategy parameters corresponding to the previous round of training are backtracked based on the index table, and / or new training parameters are used for training.
5. The method according to claim 1, wherein Also includes: The blockchain smart contract receives a challenge request from a challenge terminal, wherein the challenge request includes a challenge type, initial proof data, and a challenge deposit; comparing the initial proof data with at least one of transaction data, target policy parameters, and reward distribution of the original data to obtain a comparison result; In response to the deviation of the comparison result being greater than or equal to the deviation threshold, determining a ruling result of the challenge request includes: determining that the challenge is successful, modifying the target policy parameters, deducting at least a portion of the deposit of the violating party, and rewarding the at least a portion of the deposit to the questioning terminal according to a preset ratio; In response to the deviation of the comparison result being less than a deviation threshold, determining a ruling result of the challenge request includes: unsuccessful challenge, deducting at least a portion of the challenge deposit and / or reducing a reputation score of the challenged terminal.
6. The method according to claim 5, characterized in that The method further comprises: storing the challenge request, the corresponding comparison result, and the adjudication result in a transaction record of the blockchain log for query; Randomly sampling the transaction records based on a preset time interval to secondary verify whether the profit effect of the transaction records reaches the expected profit corresponding to the target strategy parameters, and obtaining a secondary verification result; The trusted state corresponding to the target policy parameter on the chain is updated based on the secondary verification result.
7. The method according to claim 4, characterized in that The method further comprises: The historical versions of the intermediate policy parameters are stored in layers based on time periods, with the intermediate policy parameters of versions closer to the current time being located in a high-frequency layer, and the intermediate policy parameters of versions farther from the current time being located in a low-frequency layer; locating a target intermediate policy parameter among the intermediate policy parameters based on the index table; The credibility of the target intermediate policy parameters is reviewed based on given reference policy parameters.
8. A power dispatching device based on a microgrid, characterized in that: include: An acquisition module, configured to obtain historical operating data of the microgrid off-chain in the blockchain; an optimization module, configured to optimize and train initial strategy parameters based on the historical operation data to obtain target strategy parameters, wherein the target strategy parameters maximize the benefits of the terminals of the microgrid while satisfying satisfaction constraints; A verification module, configured to verify the credibility of the target policy parameters in a trusted execution environment to obtain a trusted certification document; An upload module is used to upload the target policy parameters and the trusted certification file to the blockchain for download by the terminal, so as to perform power scheduling based on the target policy parameters.
9. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 7.