Distributed optimization method of energy management system, energy management system and medium
By combining blockchain technology with distributed optimization methods, data tampering and security privacy issues in large-scale multi-agent systems are solved, high-security data sharing and storage are achieved, and the reliability of the system is improved.
Patent Information
- Application Number
- CN202411318466.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-02-21
AI Technical Summary
The distributed optimization method has data tampering and security privacy defects in large-scale multi-agent systems, and requires the aggregator to collect the results of the agent.
Combining blockchain technology and distributed optimization methods, data sharing and secure storage are realized through the blockchain storage of the computational results and objective function parameters of the blockchain, and data tampering is avoided.
It improves the security of large-scale agent systems and the correctness and reliability of calculation results, avoids data tampering problems, and enhances the immutability and robustness of the system.
Smart Images

Figure CN119494116A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of large-scale multi-agent system optimization, and specifically to a distributed optimization method, energy management system and medium for an energy management system. Background Art
[0002] Distributed optimization is one of the well-known methods for solving large-scale optimization problems. In distributed optimization, the original problem is decomposed and local problems are solved by multiple agents. Therefore, distributed optimization is suitable for large-scale multi-agent systems. However, distributed optimization also has limitations. It usually requires an aggregator to collect the calculation results of each agent, which makes the data easy to be tampered with, and has certain defects from the perspective of security and privacy. Summary of the invention
[0003] To solve the above problems, the present application provides a distributed optimization method, an energy management system and a medium for an energy management system, which combines blockchain technology with a distributed optimization method, effectively prevents attackers from tampering with data, improves the security of large-scale intelligent systems in power systems, and has profound engineering practical value.
[0004] In a first aspect, the present application provides a distributed optimization method for an energy management system, the energy management system comprising a plurality of intelligent agents and a blockchain, each of the intelligent agents being communicatively connected to the blockchain, the method comprising looping the following steps for several times until an optimal solution to the problem to be optimized is obtained:
[0005] Each of the intelligent agents obtains at least part of the parameters of its own objective function from the blockchain, calculates the objective function, and writes the obtained first calculation result into the blockchain;
[0006] The blockchain calculates the intelligent relationship between the intelligent agents based on the first calculation result of each intelligent agent, and writes the obtained second calculation result into the blockchain;
[0007] The blockchain updates at least part of the parameters according to the second calculation result.
[0008] Optionally, in the above-mentioned distributed optimization method of the management system, each of the intelligent agents obtains at least part of the parameters of its own objective function from the blockchain, and calculates the objective function, including:
[0009] A simplified model of the energy management system is constructed by using an exchange problem, and the exchange problem is converted into a Lagrangian function;
[0010] Constructing the objective function and constraint conditions of the problem to be optimized for each intelligent agent according to the information of each intelligent agent in the energy management system;
[0011] Each of the intelligent agents calculates its own objective function under the constraints based on at least part of the parameters obtained from the blockchain to obtain the first calculation result, wherein the at least part of the parameters include: the shadow price a(k) and the average value of the previous calculation cycle The first calculation result includes: the decision variable x of this calculation cycle i (k+1).
[0012] Optionally, in the above-mentioned distributed optimization method of the management system, the simplified model of the energy management system is constructed by using the exchange problem, and the exchange problem is converted into a Lagrangian function, including:
[0013] Define L = {1, 2, ..., n} to represent the set of agents, x i →R represents the decision variable vector, X i Represents x i The domain of f i represents a convex objective function, M = {m 1 ,m 2 ,…,m j....} represents a finite market set;
[0014] Then we get the vector Each element is the number of agents i in the finite market m. j The decision variables;
[0015] The Lagrangian function for constructing the exchange problem is formula (1):
[0016]
[0017] where α is the Lagrange multiplier, corresponding to the shadow price in the finite market;
[0018] The Lagrangian function is decomposed into formula (2):
[0019]
[0020] Optionally, in the above-mentioned distributed optimization method of the management system, the intelligent agent includes a factory intelligent agent, and the factory intelligent agent has a gas cogeneration system GT and a gas boiler BA;
[0021] The objective function and constraint conditions of the problem to be optimized of each intelligent agent are constructed according to the information of each intelligent agent in the energy management system, including:
[0022] The first objective function of minimizing the cost of the factory agent is constructed as shown in formula (3):
[0023] αBE BE+α BG BG+α E SE E +α H SH H Formula (3);
[0024] Among them, SE E SH H Respectively represent the transaction volume of electric energy and thermal energy in the region; BE and BG represent the transaction volume of electric energy and thermal energy purchased from outside the region; α E , α H Respectively represent the unit price of electricity and heat energy purchased in the region; α BE , α BG They represent the unit prices of electricity and heat purchased from outside the region respectively;
[0025] Constructing the first constraint condition of the first objective function, such as formula (4);
[0026]
[0027] Among them, BG GT , BG BA represent the input energy of gas-fired cogeneration system and gas-fired boiler respectively;
[0028] BG GT , They represent the minimum and maximum input energy of the gas-fired cogeneration system, respectively, and their values are determined by the equipment conditions of the gas-fired cogeneration system; BG BA , They represent the minimum and maximum input energy of the gas boiler, respectively, and their values are determined by the equipment conditions of the gas boiler; PE GT Indicates the electricity generated by the gas cogeneration system; PH GT , PH BA They represent the heat energy transaction volume of gas-fired cogeneration system and gas-fired boiler respectively; DE and DH represent the electricity demand and heat demand respectively; and Both represent the electrical input-output characteristic coefficient of the gas cogeneration system; and Both represent the heat input-output characteristic coefficient of the gas cogeneration system; a BA 、b BA and c BA Both represent the input-output characteristic coefficient of the gas boiler.
[0029] Optionally, in the above-mentioned distributed optimization method of the management system, the intelligent agent includes a building intelligent agent, and the building intelligent agent has a gas boiler BA;
[0030] The objective function and constraint conditions of the problem to be optimized of each intelligent agent are constructed according to the information of each intelligent agent in the energy management system, including:
[0031] The second objective function of minimizing the cost of the building intelligent body is constructed as shown in formula (5):
[0032] α BE BE+α BG BG+α E BE E +α H BH H Formula (5);
[0033] Among them, α BE , α BG Respectively represent the unit price of purchased electricity and heat energy in the region; α E , α H Respectively represent the unit price of electricity and heat purchased in the region; BE and BG represent the transaction volume of electricity and heat purchased from outside the region; BE E , BH H Respectively represent the electricity and heat energy purchased from the region;
[0034] Constructing the second constraint condition of the second objective function, as shown in formula (6);
[0035]
[0036] Among them, PH BA represents the heat energy transaction volume of the gas-fired cogeneration system and the gas-fired boiler; DE and DH represent the electricity demand and heat demand respectively; a BA 、b BA and c BA Both represent the input-output characteristic coefficient of the gas boiler; PH BA Indicates the heat energy transaction volume of gas boiler; BG BA Indicates the input energy of the gas boiler; BG BA , They respectively represent the minimum and maximum input energy of the gas boiler, and their values are determined by the equipment conditions of the gas boiler.
[0037] Optionally, in the above-mentioned distributed optimization method of the management system, the intelligent agent includes a factory intelligent agent and a building intelligent agent;
[0038] The constraint condition also includes a third constraint condition, such as formula (7):
[0039]
[0040] Among them, N F and N BRepresent the number of factory agents and building agents respectively; i is the agent index; SE E SH H Respectively represent the amount of electricity and heat traded in the region; BE E , BH H Respectively represent the electrical energy and thermal energy purchased from the region.
[0041] Optionally, in the above-mentioned distributed optimization method of the management system, the blockchain calculates the intelligent relationship between the intelligent agents based on the first calculation result of each intelligent agent, including:
[0042] Based on the multiplier alternating direction method, the intelligent relationship between the intelligent agents is constructed, as shown in formula (8):
[0043]
[0044] Among them, α represents the shadow price; represents the average value, ρ represents the penalty parameter, and ρ is shared between the blockchain and each of the intelligent agents;
[0045] Read the decision variable x of the current calculation cycle in the first calculation result of each of the intelligent agents i (k+1);
[0046] Based on the decision variable x of the current calculation cycle i (k+1), calculate the shadow price α(k+1) and average value of this calculation period
[0047] Optionally, in the above-mentioned distributed optimization method of the management system, the blockchain updates at least part of the parameters of each of the objective functions according to the second calculation result, including:
[0048] Replace the shadow price α(k) of the previous calculation period with the shadow price α(k+1) of the current calculation period in an overwriting manner;
[0049] and the average value of the previous calculation period in an overwritten manner Replaced with the average value of this calculation period
[0050] In a second aspect, the present application further provides an energy management system, the energy management system comprising a plurality of intelligent agents and a blockchain, each of the intelligent agents being communicatively connected to the blockchain, wherein each of the intelligent agents and the blockchain is used to cyclically execute the following steps several times until an optimal solution to the problem to be optimized is obtained:
[0051] Each of the intelligent agents obtains at least part of the parameters of its own objective function from the blockchain, calculates the objective function, and writes a first calculation result obtained into the blockchain;
[0052] The blockchain calculates the intelligence relationship between the intelligent agents based on the first calculation results of the intelligent agents, and writes the obtained second calculation results into the blockchain;
[0053] The blockchain updates at least part of the parameters according to the second calculation result until an optimal solution to the problem to be optimized is obtained.
[0054] In a third aspect, the present application provides a computer-readable storage medium storing a computer program, which implements the steps of the above-mentioned distributed optimization method of the management system when instructed by a processor.
[0055] At least one of the above technical solutions adopted in this application can achieve the following beneficial effects:
[0056] The present application includes multiple intelligent agents and blockchains through an energy management system, each intelligent agent is communicated and connected to the blockchain respectively, and each intelligent agent and the blockchain work together, including cyclically executing the following steps: for one calculation cycle, each intelligent agent obtains at least part of the parameters of its own objective function from the blockchain, calculates the objective function, and writes the obtained first calculation result into the blockchain; then the blockchain calculates the intelligent relationship between the intelligent agents based on the first calculation result of each intelligent agent, and writes the obtained second calculation result into the blockchain; finally, the blockchain updates at least part of the parameters of each objective function according to the second calculation result, and then enters the next calculation cycle until the optimal solution to the problem to be optimized is obtained. This application combines blockchain technology and distributed optimization methods. There is no need for an aggregator to collect the calculation results of each intelligent agent. Instead, the data of the calculation results are stored in the blockchain. Data sharing is achieved through blockchain technology. Regional block technology provides the immutability and robustness of the system and does not require the intervention of trusted institutions. It is very useful for coordination between parties that do not trust each other because it provides immutability, transparency and verifiability, effectively prevents the problem of data tampering, and ensures the correct execution of intelligent relationships, thereby ensuring the correctness and reliability of the calculation results. It has profound engineering practical value for improving the security of large-scale intelligent agent systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0058] Figure 1 A schematic diagram showing the structure of an energy management system according to an embodiment of the present application is shown;
[0059] Figure 2 A schematic diagram showing a flow chart of a distributed optimization method for an energy management system according to an embodiment of the present application;
[0060] Figure 3 A structural block diagram of a factory agent according to an embodiment of the present application is shown;
[0061] Figure 4 A structural block diagram of a building intelligent agent according to an embodiment of the present application is shown;
[0062] Figure 5 A schematic diagram of the structure of a computer device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0064] The idea of this application is to combine blockchain technology and distributed optimization methods. There is no need for an aggregator to collect the calculation results of each intelligent agent. Instead, the data of the calculation results are stored in the blockchain, and data sharing is achieved through blockchain technology to achieve and ensure the security of large-scale intelligent agent systems in power systems.
[0065] Figure 1 A schematic diagram of the structure of an energy management system according to an embodiment of the present application is shown. Figure 1 It can be seen that the energy management system 100 includes multiple intelligent agents 110 and a blockchain 120. Each intelligent agent 110 is respectively communicated with the blockchain 120. Each intelligent agent 110 can exchange data with the blockchain 120, and each intelligent agent 110 cannot usually directly exchange data with each other.
[0066] The distributed optimization method of the energy management system of the present application is implemented by each intelligent agent 110 and the blockchain 120 in collaboration. Specifically, each intelligent agent 110 and the blockchain 120 cyclically executes the following steps S210 to S230 several times until the optimal solution to the problem to be optimized is obtained:
[0067] Step S210: Each of the intelligent agents obtains at least part of the parameters of its own objective function from the blockchain, calculates the objective function, and writes the obtained first calculation result into the blockchain.
[0068] The intelligent agent in this application can be various intelligent agents. For the sake of convenience, the following description is based on factory intelligent agents and building intelligent agents.
[0069] Blockchain has attracted many research fields, such as finance, healthcare, agriculture, logistics, and power systems. Blockchain is defined as "an open distributed ledger that can efficiently record transactions between two parties in a verifiable and permanent manner". In blockchain, a peer-to-peer network that follows a communication protocol between nodes and verifies new blocks is usually managed. The blocks in the chain contain information about transactions, etc. Each block is identified by a cryptographic hash and carries a list of transactions and a hash to the previous block. Therefore, a blockchain is formed and it is possible to prevent attackers from tampering with previous blocks.
[0070] Distributed optimization is one of the well-known methods for solving large-scale optimization problems. In distributed optimization, the original problem is decomposed and local problems are solved by multiple agents. Therefore, distributed optimization is suitable for large-scale multi-agent systems. However, distributed optimization also has limitations. It usually requires an aggregator to collect the calculation results of each agent, such as the alternating direction method of multipliers (ADMM), which makes the data easy to be tampered with, and because not all decision variables and constants can be shared, it has certain defects from the perspective of security and privacy.
[0071] Therefore, how to solve the problem of needing an aggregator to collect the calculation results of each intelligent agent in an energy management system composed of multiple intelligent agents and prevent attackers from tampering with the data has profound engineering practical value for improving the security of large-scale intelligent agent systems.
[0072] In this regard, this application combines blockchain technology and distributed optimization methods. There is no need for an aggregator to collect the calculation results of each intelligent agent. Instead, the data of the calculation results is stored in the blockchain, and data sharing is achieved through blockchain technology.
[0073] exist Figure 1 Based on the structure shown, at least part of the parameters are provided by the blockchain, each agent solves its own problem to be optimized, and stores the calculation results in the blockchain.
[0074] Specifically, in some embodiments, each of the intelligent agents obtains at least part of the parameters of its own objective function from the blockchain, and calculates the objective function, including: using the exchange problem to construct a simplified model of the energy management system, and converting the exchange problem into a Lagrangian function; constructing the objective function and constraints of the problem to be optimized for each of the intelligent agents based on the information of each intelligent agent in the energy management system; each of the intelligent agents calculates its own objective function under the constraints based on at least part of the parameters obtained from the blockchain to obtain the first calculation result, wherein the at least part of the parameters include: the shadow price α(k) and the average value of the previous calculation period The first calculation result includes: the decision variable x of this calculation cycle i (k+1).
[0075] In the embodiment of the present application, an exchange problem (EP) is used as a simplified model of the energy management system, and then the parameters therein are defined, and the exchange problem (EP) is converted into the form of a Lagrangian function according to the setting of the parameters.
[0076] Specifically, in some embodiments, the simplified model of the energy management system is constructed by using the exchange problem, and the exchange problem is converted into a Lagrangian function, including:
[0077] Define L = {1, 2, ..., n} to represent the set of agents, x i →R represents the decision variable vector, X i Represents x i The domain of f i represents a convex objective function, M = {m 1 ,m 2 ,…,m j....} represents a finite market set;
[0078] Then we get the vector Each element is the number of agents i in the finite market m. j The decision variables;
[0079] Based on the above parameters, the Lagrangian function of the exchange problem can be expressed as formula (1):
[0080]
[0081] where α is the Lagrange multiplier, corresponding to the shadow price in the finite market;
[0082] Furthermore, the Lagrangian function expressed in equation (1) can be decomposed into equation (2):
[0083]
[0084] Consider a special zone consisting of factory agents and building agents, where each agent is independent and has pre-defined thermal and electrical requirements.
[0085] For different intelligent agents, the problems to be optimized are usually different.
[0086] For factory agents, Figure 3 The structure block diagram of a factory agent and according to an embodiment of the present application is shown. The factory agent has energy conversion equipment such as boilers and turbines, and can sell excess energy to other agents. Assuming that a factory agent has a gas cogeneration system (GT) and a gas boiler (BA), the objective function and constraint conditions of the problem to be optimized of each agent are constructed based on the information of each agent in the energy management system, including:
[0087] The first objective function of minimizing the cost of the factory agent is constructed as shown in formula (3):
[0088] α BE BE+α BG BG+α E SE E +α H SH H Formula (3);
[0089] Among them, SE E SH H Respectively represent the transaction volume of electric energy and thermal energy in the region; BE and BG represent the transaction volume of electric energy and thermal energy purchased from outside the region; α E , α H Respectively represent the unit price of electricity and heat energy purchased in the region; α BE , α BG They represent the unit prices of electricity and heat purchased from outside the region respectively;
[0090] Constructing the first constraint condition of the first objective function, such as formula (4);
[0091]
[0092] Among them, BG GT , BG BA represent the input energy of gas-fired cogeneration system and gas-fired boiler respectively; BG GT , They represent the minimum and maximum input energy of the gas-fired cogeneration system, respectively, and their values are determined by the equipment conditions of the gas-fired cogeneration system; BG BA , They represent the minimum and maximum input energy of the gas boiler, respectively, and their values are determined by the equipment conditions of the gas boiler; PE GTIndicates the electricity generated by the gas cogeneration system; PH GT , PH BA They represent the heat energy transaction volume of gas-fired cogeneration system and gas-fired boiler respectively; DE and DH represent the electricity demand and heat demand respectively; and Both represent the electrical input-output characteristic coefficient of the gas cogeneration system; and Both represent the heat input-output characteristic coefficient of the gas cogeneration system; a BA 、b BA and c BA Both represent the input-output characteristic coefficient of the gas boiler.
[0093] In the building intelligence, in order to meet its needs, energy is purchased from inside and outside the district and energy conversion equipment is operated. Figure 4 The structural block diagram of a building agent according to an embodiment of the present application is shown. Assuming that a building agent has a gas boiler (BA), the objective function and constraint conditions of the problem to be optimized of each agent are constructed according to the information of each agent in the energy management system, including:
[0094] The second objective function of minimizing the cost of the building intelligent body is constructed as shown in formula (5):
[0095] α BE BE+α BG BG+α E BE E +α H BH H Formula (5);
[0096] Among them, α BE , α BG Respectively represent the unit price of purchased electricity and heat energy in the region; α E , α H Respectively represent the unit price of electricity and heat purchased in the region; BE and BG represent the transaction volume of electricity and heat purchased from outside the region; BE E , BH H Respectively represent the electricity and heat energy purchased from the region;
[0097] Constructing the second constraint condition of the second objective function, as shown in formula (6);
[0098]
[0099] Among them, PH BA represents the heat energy transaction volume of the gas-fired cogeneration system and the gas-fired boiler; DE and DH represent the electricity demand and heat demand respectively; a BA 、b BA and cBA Both represent the input-output characteristic coefficient of the gas boiler; PH BA Indicates the heat energy transaction volume of gas boiler; BG BA Indicates the input energy of the gas boiler; BG BA , They respectively represent the minimum and maximum input energy of the gas boiler, and their values are determined by the equipment conditions of the gas boiler.
[0100] In addition, when the intelligent agents include both factory intelligent agents and building intelligent agents, the electric energy market and the thermal energy market are considered, and the constraint condition further includes a third constraint condition, such as formula (7):
[0101]
[0102] Among them, N F and N B Represent the number of factory agents and building agents respectively; i is the agent index; SE E SH H Respectively represent the amount of electricity and heat traded in the region; BE E , BH H Respectively represent the electrical energy and thermal energy purchased from the region.
[0103] In one calculation cycle, that is, after executing steps S210 to S230 once, the parameters obtained include: shadow price α(k) and average value These two parameters are also the parameters required by each agent in its respective optimization process. Therefore, when executing steps S210 to S230 of the current calculation cycle, each agent first reads the shadow price α(k) and the average value generated in the previous calculation cycle from the blockchain. Then, the objective function of this calculation cycle is calculated. Specifically, each agent calculates its own objective function based on at least part of the parameters obtained from the blockchain under the constraint conditions, and records the obtained calculation result as the first calculation result, wherein the first calculation result includes: the decision variable x of this calculation cycle i (k+1). And write the first calculation result into the blockchain.
[0104] Step S220: The blockchain calculates the intelligent relationship between the intelligent agents based on the first calculation results of each of the intelligent agents, and writes the obtained second calculation results into the blockchain.
[0105] In the blockchain, according to the first calculation result of each intelligent agent for its respective objective function, a calculation of an intelligent relationship is performed, and the result obtained is recorded as the second calculation result, and the second calculation result is still written into the blockchain.
[0106] Specifically, in some embodiments, the blockchain calculates the intelligent relationship between the intelligent agents based on the first calculation result of each intelligent agent, including:
[0107] Based on the multiplier alternating direction method, the intelligent relationship between the intelligent agents is constructed, as shown in formula (8):
[0108]
[0109] Among them, α represents the shadow price; represents the average value, ρ represents the penalty parameter, and ρ is shared between the blockchain and each of the intelligent agents; read the decision variable x of the current calculation cycle in the first calculation result of each of the intelligent agents i (k+1); based on the decision variable x of the current calculation cycle i (k+1), calculate the shadow price α(k+1) of this calculation period.
[0110] The alternating direction method of multipliers ADMM is a solution to the exchange problem EP. Then the decision variable x i and the shadow price α can be expressed as the following intelligent relationship of formula (8):
[0111]
[0112] The blockchain will calculate the shadow price α(k) and the average value of the previous calculation cycle Presented to each agent, and collect the x obtained by each agent through local optimization i (k+1), and then based on the intelligent relationship of the above formula (8), the shadow price α(k+1) and the average value of this calculation period are obtained In each agent, to solve a single local optimization problem, the penalty parameter ρ will be shared between the blockchain and the agents.
[0113] Step S230: The blockchain updates at least part of the parameters according to the second calculation result.
[0114] Finally, according to the second calculation result obtained in this calculation cycle, the parameters stored in the blockchain are updated. The blockchain contains many "blocks", called regional blocks. The blockchain stores the second calculation result in each block. Each block is recursively connected. The connection relationship between blocks is called a hash value, which is processed by an encryption algorithm to generate a unique value. The aforementioned intelligent relationship can be transparently checked and audited, ensuring the reliability of the regional block calculation results.
[0115] Specifically, the shadow price α(k) of the previous calculation period is replaced by the shadow price α(k+1) of the current calculation period in an overlay manner; and the average value of the previous calculation period is replaced by the average value of the current calculation period in an overlay manner. Replaced with the average value of this calculation period
[0116] Step S210 to step S230 constitute a calculation cycle, and the above process may be performed multiple times until an optimal solution is obtained.
[0117] Depend on Figure 2 It can be seen from the method described that the present application includes multiple intelligent agents and blockchains through an energy management system, each intelligent agent is respectively communicated and connected to the blockchain, and each intelligent agent and the blockchain work together, including cyclically executing the following steps. For one calculation cycle, each intelligent agent obtains at least part of the parameters of its own objective function from the blockchain, calculates the objective function, and writes the obtained first calculation result into the blockchain; then the blockchain calculates the intelligent relationship between the intelligent agents based on the first calculation result of each intelligent agent, and writes the obtained second calculation result into the blockchain; finally, the blockchain updates at least part of the parameters of each objective function according to the second calculation result, and then enters the next calculation cycle until the optimal solution to the problem to be optimized is obtained. This application combines blockchain technology and distributed optimization methods. There is no need for an aggregator to collect the calculation results of each intelligent agent. Instead, the data of the calculation results are stored in the blockchain. Data sharing is achieved through blockchain technology. Regional block technology provides the immutability and robustness of the system and does not require the intervention of trusted institutions. It is very useful for coordination between parties that do not trust each other because it provides immutability, transparency and verifiability, effectively prevents the problem of data tampering, and ensures the correct execution of intelligent relationships, thereby ensuring the correctness and reliability of the calculation results. It has profound engineering practical value for improving the security of large-scale intelligent agent systems.
[0118] Figure 5 A schematic diagram showing the structure of a computer device according to an embodiment of the present application is shown. Figure 5 As shown, the internal structure of the computer device may include a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, the functions or steps of the distributed optimization method of the energy management system are implemented.
[0119] In one embodiment, the computer device provided by the present application includes a memory and a processor, the memory stores a database and a computer program that can be executed on the processor, and the processor implements the functions or steps of the distributed optimization method of the energy management system of the present application when executing the computer program.
[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the functions or steps of the distributed optimization method of the energy management system of the present application are implemented.
[0121] It should be noted that the above functions or steps that can be implemented by the computer device or computer-readable storage medium can refer to the relevant description in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0122] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0123] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0124] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A distributed optimization method for an energy management system, characterized in that: The energy management system includes a plurality of intelligent agents and a blockchain, each of the intelligent agents is connected to the blockchain in communication, and the method includes looping and executing the following steps several times until an optimal solution to the problem to be optimized is obtained: Each of the intelligent agents obtains at least part of the parameters of its own objective function from the blockchain, calculates the objective function, and writes the obtained first calculation result into the blockchain; The blockchain calculates the intelligent relationship between the intelligent agents based on the first calculation result of each intelligent agent, and writes the obtained second calculation result into the blockchain; The blockchain updates at least part of the parameters according to the second calculation result.
2. The distributed optimization method of the management system according to claim 1, characterized in that: Each of the intelligent agents obtains at least part of the parameters of its own objective function from the blockchain, and calculates the objective function, including: A simplified model of the energy management system is constructed by using an exchange problem, and the exchange problem is converted into a Lagrangian function; Constructing the objective function and constraint conditions of the problem to be optimized for each intelligent agent according to the information of each intelligent agent in the energy management system; Each of the intelligent agents calculates its own objective function under the constraints based on at least some of the parameters obtained from the blockchain to obtain the first calculation result, wherein the at least some of the parameters include: the shadow price α(k) and the average value of the previous calculation cycle The first calculation result includes: the decision variable x of this calculation cycle i (k+1).
3. The distributed optimization method of the management system according to claim 2, characterized in that: The simplified model of the energy management system is constructed by adopting the exchange problem, and the exchange problem is converted into a Lagrangian function, including: Define L = {1, 2, ..., n} to represent the set of agents, x i →R represents the decision variable vector, X i Represents x i The domain of f i represents a convex objective function, M = {m1,m2,…,m j.... } represents a finite market set; Then we get the vector Each element is the number of agents i in the finite market m. j The decision variables; The Lagrangian function for constructing the exchange problem is formula (1): where α is the Lagrange multiplier, corresponding to the shadow price in the finite market; The Lagrangian function is decomposed into formula (2):
4. The distributed optimization method of the management system according to claim 2, characterized in that: The intelligent agent includes a factory intelligent agent, and the factory intelligent agent has a gas cogeneration system GT and a gas boiler BA; The objective function and constraint conditions of the problem to be optimized of each intelligent agent are constructed according to the information of each intelligent agent in the energy management system, including: The first objective function of minimizing the cost of the factory agent is constructed as shown in formula (3): a BE BE+a BG BG+a E SE E +a H SH H expression(3); Among them, SE E SH H Respectively represent the transaction volume of electric energy and thermal energy in the region; BE and BG represent the transaction volume of electric energy and thermal energy purchased from outside the region; α E , α H Respectively represent the unit price of electricity and heat energy purchased in the region; α BE , α BG They represent the unit prices of electricity and heat purchased from outside the region respectively; Constructing the first constraint condition of the first objective function, such as formula (4); Among them, BG GT , BG BA represent the input energy of gas-fired cogeneration system and gas-fired boiler respectively; BG GT , They represent the minimum and maximum input energy of the gas-fired cogeneration system, respectively, and their values are determined by the equipment conditions of the gas-fired cogeneration system; BG BA , They represent the minimum and maximum input energy of the gas boiler, respectively, and their values are determined by the equipment conditions of the gas boiler; PE GT Indicates the electricity generated by the gas cogeneration system; PH GT , PH BA They represent the heat energy transaction volume of gas-fired cogeneration system and gas-fired boiler respectively; DE and DH represent the electricity demand and heat demand respectively; and Both represent the electrical input-output characteristic coefficient of the gas cogeneration system; and Both represent the heat input-output characteristic coefficient of the gas cogeneration system; a BA 、b BA and c BA Both represent the input-output characteristic coefficient of the gas boiler.
5. The distributed optimization method of the management system according to claim 2, characterized in that: The intelligent agent includes a building intelligent agent, and the building intelligent agent has a gas boiler BA; The objective function and constraint conditions of the problem to be optimized of each intelligent agent are constructed according to the information of each intelligent agent in the energy management system, including: The second objective function of minimizing the cost of the building intelligent body is constructed as shown in formula (5): a BE BE+a BG BG+a E BE E +a H BH H expression(5); Among them, α BE , α BG Respectively represent the unit price of purchased electricity and heat energy in the region; α E , α H Respectively represent the unit price of electricity and heat purchased in the region; BE and BG represent the transaction volume of electricity and heat purchased from outside the region; BE E , BH H Respectively represent the electricity and heat energy purchased from the region; Constructing the second constraint condition of the second objective function, as shown in formula (6); Among them, PH BA represents the heat energy transaction volume of the gas-fired cogeneration system and the gas-fired boiler; DE and DH represent the electricity demand and heat demand respectively; a BA 、b BA and c BA Both represent the input-output characteristic coefficient of the gas boiler; PH BA Indicates the heat energy transaction volume of gas boiler; BG BA Indicates the input energy of the gas boiler; BG BA , They respectively represent the minimum and maximum input energy of the gas boiler, and their values are determined by the equipment conditions of the gas boiler.
6. The distributed optimization method of the management system according to claim 4 or 5, characterized in that: The intelligent agents include factory intelligent agents and building intelligent agents; The constraint condition also includes a third constraint condition, such as formula (7): Among them, N F and N B Represent the number of factory agents and building agents respectively; i is the agent index; SE E SH H Respectively represent the amount of electricity and heat traded in the region; BE E , BH H Respectively represent the electrical energy and thermal energy purchased from the region.
7. The distributed optimization method of a management system according to claim 1, characterized in that: The blockchain calculates the intelligent relationship between the intelligent agents based on the first calculation result of each intelligent agent, including: Based on the multiplier alternating direction method, the intelligent relationship between the intelligent agents is constructed, as shown in formula (8): Among them, α represents the shadow price; represents the average value, ρ represents the penalty parameter, and ρ is shared between the blockchain and each of the intelligent agents; Read the decision variable x of the current calculation cycle in the first calculation result of each of the intelligent agents i (k+1); Based on the decision variable x of the current calculation cycle i (k+1), calculate the shadow price α(k+1) and average value of this calculation period 8. The distributed optimization method of a management system according to claim 1, characterized in that: The blockchain updates at least part of the parameters according to the second calculation result, including: Replace the shadow price a(k) of the previous calculation period with the shadow price a(k+1) of the current calculation period in an overwriting manner; and the average value of the previous calculation period in an overwritten manner Replaced with the average value of this calculation period 9. An energy management system, characterized in that: The energy management system includes a plurality of intelligent agents and a blockchain, each of which is connected to the blockchain in communication, wherein each of the intelligent agents and the blockchain collaboratively and cyclically executes the following steps several times until an optimal solution to the problem to be optimized is obtained: Each of the intelligent agents obtains at least part of the parameters of its own objective function from the blockchain, calculates the objective function, and writes a first calculation result obtained into the blockchain; The blockchain calculates the intelligence relationship between the intelligent agents based on the first calculation results of the intelligent agents, and writes the obtained second calculation results into the blockchain; The blockchain updates at least part of the parameters according to the second calculation result.
10. A computer-readable storage medium storing a computer program, characterized in that: The computer program, when instructed by a processor, implements the steps of the distributed optimization method for an energy management system according to any one of claims 1 to 8.