A building producer-consumer electric-carbon collaborative transaction double-layer decision method and system

By constructing a two-layer decision-making method for collaborative trading of electricity and carbon among building producers and consumers, the problems of redundant measurement of green electricity carbon benefits and lack of differentiated carbon compliance paths are solved. Dynamic mutual recognition and differentiated compliance of electricity and carbon trading among building producers and consumers are realized, improving economic and low-carbon benefits. The method has strong adaptability and efficient and feasible model solution.

CN122311984APending Publication Date: 2026-06-30TIANJIN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2026-05-29
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies in building producer-consumer electricity-carbon trading suffer from problems such as redundant measurement of green electricity carbon benefits, lack of differentiated carbon compliance pathways, and poor adaptability of electricity-carbon synergy models, making it difficult to achieve synergistic optimization of economic costs and low-carbon goals.

Method used

A two-tier decision-making method for co-trading electricity and carbon among building producers and consumers is constructed. Through a two-tier optimization framework for co-trading electricity and carbon, individual buildings are classified according to carbon emission compliance requirements, the amount of CCER mutual recognition is calculated, a dynamic mutual recognition mechanism for carbon emission reduction is constructed, and the solution is obtained through a two-tier nonlinear optimization model and a single-tier mixed integer linear programming model to achieve dynamic mutual recognition and differentiated compliance.

Benefits of technology

To solve the problem of redundant measurement of the carbon benefits of green electricity, adapt to differentiated compliance requirements, improve the synergistic adaptability of electricity and carbon, reduce energy costs and carbon emissions, and ensure a win-win situation for all parties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122311984A_ABST
    Figure CN122311984A_ABST
Patent Text Reader

Abstract

This invention discloses a two-tier decision-making method and system for collaborative electricity-carbon trading among building producers and consumers. The method constructs a two-tier optimization framework for collaborative electricity-carbon trading based on the functional responsibilities of upper-level aggregators and the carbon trading positioning of lower-level building producers and consumers. It categorizes individual buildings according to differentiated carbon emission compliance requirements and calculates CCER mutual recognition amounts based on the principle of emission reduction equivalence and the amount of green electricity consumed in each scheduling period. Through dynamic application and allocation by aggregators, a dynamic carbon emission reduction mutual recognition mechanism is constructed. Combining the framework and mutual recognition mechanism, a two-tier objective function and constraints including building thermal balance are constructed, forming a two-tier nonlinear optimization model. This model is then transformed into a single-tier mixed-integer linear programming model through Boolean variable constraint relaxation, Lagrangian function construction, KKT condition transformation, and strong duality principle and Big M method linearization to obtain the decision results. This invention solves the problems of missing differentiated carbon compliance paths for building producers and consumers and poor adaptability of the electricity-carbon collaborative model in existing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of building energy conservation and low carbon technology, specifically to a two-tier decision-making method and system for collaborative trading of electricity and carbon by building producers and consumers. Background Technology

[0002] With the large-scale integration of distributed photovoltaic, energy storage systems, and smart HVAC equipment, traditional building users have gradually transformed into building prosumers with both energy production and consumption capabilities. These prosumers urgently need to explore integrated decision-making pathways that balance economic cost control and carbon compliance. Co-optimization of the electricity-carbon market has become a core direction for promoting energy conservation and carbon reduction in the building sector, and related modeling and decision-making methods have become a hot topic in industry research and application.

[0003] However, existing technologies still have significant limitations in practical applications: On the one hand, inconsistent accounting standards among different environmental rights mechanisms and fragmented trading platforms lead to prominent risks of double-counting of green electricity carbon benefits. Moreover, existing research mostly focuses on macro-policy design or regional-level entity collaboration optimization, lacking quantitative research on carbon compliance path design and carbon emission rights mutual recognition strategies for individual building producers and consumers, making it difficult to adapt to the differentiated needs of building scenarios. On the other hand, existing modeling schemes for building producers and consumers have obvious shortcomings, either focusing only on energy cost optimization without incorporating carbon compliance constraints, or using fixed carbon prices and linear compliance strategies that cannot adapt to the dynamically fluctuating electricity-carbon market, or failing to reflect the dynamic substitution characteristics of green electricity mutual recognition. These approaches cannot completely solve the problem of double-counting of green electricity carbon benefits, nor can they achieve a synergistic balance between economic benefits and low-carbon goals, thus restricting the enthusiasm and effectiveness of building producers and consumers in participating in the collaborative governance of the electricity-carbon market.

[0004] Therefore, there is an urgent need for a two-tier decision-making method for co-trading electricity and carbon for building producers and consumers to address the problems of redundant measurement of green electricity and carbon benefits, lack of differentiated carbon compliance paths for building producers and consumers, and poor adaptability of electricity-carbon co-trading models in existing technologies. Summary of the Invention

[0005] To address these issues, this invention provides a two-tier decision-making method and system for collaborative electricity-carbon trading among building producers and consumers. This method solves problems such as redundant measurement of green electricity carbon benefits, lack of differentiated carbon compliance paths for building producers and consumers, and poor adaptability of the electricity-carbon collaborative model in existing technologies, thereby achieving synergistic optimization of economic costs and low-carbon goals.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a two-tier decision-making method for co-trading electricity and carbon among building producers and consumers, comprising: Based on the functional responsibilities of upper-level aggregators and the carbon trading positioning of lower-level prosumers, a two-layer optimization framework for electricity-carbon collaborative trading is constructed. Based on the aforementioned two-layer optimization framework for electricity-carbon collaborative trading, individual buildings are classified according to carbon emission compliance requirements. Based on the differentiated compliance needs of individual buildings of a given type, and according to the principle of emission reduction equivalence, and based on the green electricity consumption of each individual building in each scheduling period, the mutual recognition amount of national certified voluntary emission reductions (CCERs) is calculated. Aggregators aggregate the mutual recognition amount of each individual building by time period to form the CCER application amount and act as agents for the application. After the CCER certificate is approved, the CCER is allocated to the corresponding individual building according to the actual green electricity contribution of each individual building in the corresponding scheduling period, thus constructing a dynamic mutual recognition mechanism for carbon emission reduction. Based on the aforementioned two-layer optimization framework for electricity-carbon collaborative trading and the aforementioned dynamic mutual recognition mechanism for carbon emission reduction, objective functions are constructed for the upper-layer aggregator and the lower-layer building prosumer, respectively. Based on the objective functions, combined with the upper-layer constraints and the lower-layer constraints considering building heat balance, a two-layer nonlinear optimization model is constructed. The two-layer nonlinear optimization model includes an upper-layer model and a lower-layer model. The two-level nonlinear optimization model is relaxed by Boolean variable constraints to obtain a relaxed two-level nonlinear optimization model. Based on the relaxed two-level nonlinear optimization model, the Lagrangian function of the lower-level producer-consumer is constructed. Based on the Lagrangian function, the lower-level model is transformed into additional constraints through KKT conditions and embedded into the upper-level model to generate a two-level associated model. The two-level associated model is linearized using the strong duality principle and the Big M method to obtain a single-level mixed integer linear programming model. The decision results are obtained by solving the single-layer mixed integer linear programming model using a commercial solver.

[0007] As a preferred option for a two-tier decision-making method for co-trading electricity and carbon in the building industry, individual buildings are classified into industrial buildings, commercial and residential buildings, and zero-carbon buildings according to their carbon emission compliance requirements. Among them, industrial buildings are buildings with mandatory carbon emission compliance requirements, commercial and residential buildings are buildings without mandatory carbon emission compliance requirements and whose mutual recognized CCERs can be sold for profit, and zero-carbon buildings are buildings that need to offset all their carbon emissions through mutual recognition of CCERs and the purchase of carbon allowances.

[0008] The formula for calculating the CCER mutual recognition amount is as follows: ; ; In the formula, The amount of CCER obtained through mutual recognition; Mutual recognition factor; t represents the amount of green electricity consumed; t represents the time interval; i represents the building energy consumer number. Green electricity factor for electricity purchase; Photovoltaic power generation for building consumers; and These represent the electricity purchased and sold by building producers to aggregators, respectively.

[0009] As a preferred option for a two-tier decision-making method for co-trading electricity and carbon among building producers and consumers, the objective function expression of the upper-level aggregator is: ; In the formula, The total number of consumers in the construction industry; The scheduling period; and These refer to the unit price of electricity purchased and sold by building producers and consumers from aggregators; and These refer to the unit price at which aggregators purchase and sell electricity from the upper-level power grid; and These refer to the aggregator's purchase and sale of electrical energy from the upstream power grid; , and , These refer to the unit price and quantity of carbon allowances purchased and sold by building producers and consumers from aggregators; , and , These refer to the unit price and quantity of carbon allowances that aggregators buy and sell from the carbon market; Cost coefficient for aggregators using energy storage equipment; and These are the charging and discharging power of the energy storage device;

[0010] The objective function expression for the lower-level prosumers is: ; In the formula, and These refer to the power consumption of building producers and consumers when purchasing and selling electricity to aggregators.

[0011] As a preferred option for a two-layer decision-making method for co-trading electricity and carbon in the building producer-consumer market, the upper-layer constraints include: electricity purchase and sale price constraints, carbon quota purchase and sale incentive price constraints, upper and lower limits constraints for grid electricity purchase and sale, upper and lower limits constraints for carbon quota purchase and sale in the carbon market, energy storage device constraints, upper-layer power balance and carbon quota balance constraints. The lower-level constraints include: building thermal balance constraints, indoor temperature constraints, HVAC cooling power constraints, upper and lower limits constraints for electricity purchase and sale, photovoltaic equipment output constraints, upper and lower limits constraints for carbon quota purchase and sale, lower-level power balance and carbon quota balance constraints. In the process of constraining building thermal balance, an RC network model is used to describe the thermal dynamic process of a specified area, and to quantitatively characterize the thermal balance state between the wall and the area. The area consists of two types of nodes: wall nodes and area nodes. They are connected by thermal resistance with heat transfer capability and grounded by thermal capacity with heat storage capability to simulate the building's heat storage characteristics.

[0012] As a preferred scheme for a two-level decision-making method for co-trading electricity and carbon among building prosumers, the two-level nonlinear optimization model is subjected to Boolean variable constraint relaxation to obtain the relaxed two-level nonlinear optimization model. In the process, the cost of purchasing and selling electricity is set in the lower-level objective function, and the purchase price and the sales price are made inconsistent; building prosumers trade electricity with aggregators. The linearization process for the bilayer correlation model includes objective function linearization and complementary relaxation condition linearization. Objective function linearization is based on the strong duality principle. The dual objective function of the lower-level linear objective function is equivalent to the original objective function. Substituting the lower-level dual objective function into the upper-level objective function achieves the linearization of the upper-level objective function. Complementary relaxation conditional linearization is achieved by introducing Boolean variables and a sufficiently large constant M; The objective function expression for the single-layer mixed-integer linear programming model is: ; In the formula, The objective function is the dual problem objective function of the lower-level objective function.

[0013] This invention also provides a two-tier decision-making system for co-trading electricity and carbon in the building industry, employing the above-mentioned two-tier decision-making method for co-trading electricity and carbon in the building industry, including: The module for constructing a two-tier optimization framework for electricity-carbon collaborative trading is used to build a two-tier optimization framework for electricity-carbon collaborative trading based on the functional responsibilities of upper-level aggregators and the carbon trading positioning of lower-level building prosumers. The carbon emission reduction dynamic mutual recognition mechanism construction module is used to classify individual buildings according to carbon emission compliance requirements based on the aforementioned electricity-carbon collaborative trading two-layer optimization framework; based on the differentiated compliance needs of individual buildings of a set type, according to the principle of emission reduction equivalence, and based on the green electricity consumption of each individual building in each scheduling period, calculate and obtain the mutual recognition amount of national certified voluntary emission reduction (CCER); the aggregator aggregates the mutual recognition amount of each individual building in each time period to form the CCER application amount and acts as an agent for the application; after the CCER certificate is approved, the CCER is allocated to the corresponding individual building according to the actual green electricity contribution of each individual building in the corresponding scheduling period, thus constructing a dynamic carbon emission reduction mutual recognition mechanism; A two-layer nonlinear optimization model construction module is used to construct objective functions for the upper-layer aggregator and the lower-layer building prosumer based on the two-layer optimization framework for electricity-carbon collaborative trading and the dynamic mutual recognition mechanism for carbon emission reduction, respectively; based on the objective functions, combined with the upper-layer constraints and the lower-layer constraints considering building heat balance, a two-layer nonlinear optimization model is constructed; the two-layer nonlinear optimization model includes an upper-layer model and a lower-layer model; A single-layer mixed-integer linear programming model acquisition module is used to perform Boolean variable constraint relaxation on the two-layer nonlinear optimization model to obtain a relaxed two-layer nonlinear optimization model; based on the relaxed two-layer nonlinear optimization model, a Lagrangian function of the lower-level producer-consumer is constructed; based on the Lagrangian function, the lower-level model is transformed into additional constraints through KKT conditions and embedded into the upper-level model to generate a two-layer associated model; the two-layer associated model is linearized through the strong duality principle and the Big M method to obtain a single-layer mixed-integer linear programming model. The single-layer mixed-integer linear programming model solution module is used to solve the single-layer mixed-integer linear programming model by setting a commercial solver to obtain the decision results.

[0014] As a preferred solution for a two-tier decision-making system for co-trading electricity and carbon in the building producer-consumer market, the carbon emission reduction dynamic mutual recognition mechanism construction module categorizes individual buildings into industrial buildings, commercial and residential buildings, and zero-carbon buildings based on their carbon emission compliance requirements. Among these, industrial buildings are those with mandatory carbon emission compliance requirements, commercial and residential buildings are those without mandatory carbon emission compliance requirements whose mutually recognized CCERs can be sold for profit, and zero-carbon buildings are those that need to offset all their carbon emissions through mutual recognition of CCERs and the purchase of carbon allowances.

[0015] The formula for calculating the CCER mutual recognition amount is as follows: ; ; In the formula, The amount of CCER obtained through mutual recognition; Mutual recognition factor; t represents the amount of green electricity consumed; t represents the time interval; i represents the building energy consumer number. Green electricity factor for electricity purchase; Photovoltaic power generation for building consumers; and These represent the electricity purchased and sold by building producers to aggregators, respectively.

[0016] As a preferred solution for a two-tier decision-making system for collaborative electricity-carbon trading among building producers and consumers, the objective function expression of the upper-level aggregator in the two-tier nonlinear optimization model construction module is: ; In the formula, The total number of consumers in the construction industry; The scheduling period; and These refer to the unit price of electricity purchased and sold by building producers and consumers from aggregators; and These refer to the unit price at which aggregators purchase and sell electricity from the upper-level power grid; and These refer to the aggregator's purchase and sale of electrical energy from the upstream power grid; , and , These refer to the unit price and quantity of carbon allowances purchased and sold by building producers and consumers from aggregators; , and , These refer to the unit price and quantity of carbon allowances that aggregators buy and sell from the carbon market; Cost coefficient for aggregators using energy storage equipment; and These are the charging and discharging power of the energy storage device; The objective function expression for the lower-level prosumers is: ; In the formula, and These refer to the power consumption of building producers and consumers when purchasing and selling electricity to aggregators.

[0017] As a preferred solution for a two-layer decision-making system for electricity-carbon collaborative trading among building producers and consumers, the upper-layer constraints in the two-layer nonlinear optimization model construction module include: electricity purchase and sale price constraints, carbon quota purchase and sale incentive price constraints, upper and lower limit constraints for grid electricity purchase and sale, upper and lower limit constraints for carbon quota purchase and sale in the carbon market, energy storage device constraints, upper-layer power balance and carbon quota balance constraints. The lower-level constraints include: building thermal balance constraints, indoor temperature constraints, HVAC cooling power constraints, upper and lower limits constraints for electricity purchase and sale, photovoltaic equipment output constraints, upper and lower limits constraints for carbon quota purchase and sale, lower-level power balance and carbon quota balance constraints. In the process of constraining building thermal balance, an RC network model is used to describe the thermal dynamic process of a specified area, and to quantitatively characterize the thermal balance state between the wall and the area. The area consists of two types of nodes: wall nodes and area nodes. They are connected by thermal resistance with heat transfer capability and grounded by thermal capacity with heat storage capability to simulate the building's heat storage characteristics.

[0018] As a preferred solution for a two-layer decision-making system for electricity-carbon collaborative trading among building prosumers, the single-layer mixed-integer linear programming model acquisition module performs Boolean variable constraint relaxation on the two-layer nonlinear optimization model to obtain the relaxed two-layer nonlinear optimization model. In the process, the cost of purchasing and selling electricity is set in the lower-layer objective function, and the purchase price and the sales price are made inconsistent; building prosumers trade electricity with aggregators. The linearization process for the bilayer correlation model includes objective function linearization and complementary relaxation condition linearization. Objective function linearization is based on the strong duality principle. The dual objective function of the lower-level linear objective function is equivalent to the original objective function. Substituting the lower-level dual objective function into the upper-level objective function achieves the linearization of the upper-level objective function. Complementary relaxation conditional linearization is achieved by introducing Boolean variables and a sufficiently large constant M; In the single-layer mixed-integer linear programming model acquisition module, the objective function expression of the single-layer mixed-integer linear programming model is: ; In the formula, The objective function is the dual problem objective function of the lower-level objective function.

[0019] The present invention has the following advantages: First, we will address the problem of redundant measurement of the carbon benefits of green electricity by achieving real-time matching between CCERs and green electricity consumption through a dynamic mutual recognition mechanism, thereby clarifying the emission reduction value of building producers and consumers.

[0020] Second, it adapts to differentiated compliance needs, develops exclusive carbon trading pathways based on building type, and balances mandatory compliance, proactive emission reduction and zero-carbon targets, making it more flexible.

[0021] Third, enhance the adaptability of electricity and carbon synergy, with the two-layer model conforming to the actual decision-making logic of buildings, and optimize energy use strategies by combining heat storage characteristics to improve scheduling accuracy.

[0022] Fourth, it enhances economic and low-carbon benefits, reducing energy costs for building producers and consumers, decreasing carbon emissions, and ensuring reasonable profits for aggregators, achieving a win-win situation for all parties.

[0023] Fifth, the model is efficient and feasible to solve. After constraint relaxation and linearization transformation, it can be quickly solved by commercial solvers, and has strong engineering implementation capabilities. Attached Figure Description

[0024] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0025] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0026] Figure 1 This is a flowchart illustrating a two-tier decision-making method for co-trading electricity and carbon for building producers and consumers, as provided in Embodiment 1 of the present invention. Figure 2 This is a schematic diagram of the RC thermal dynamics model in a two-layer decision-making method for co-trading electricity and carbon among building producers and consumers provided in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the process for obtaining a single-layer mixed integer linear programming model in a two-layer decision-making method for co-trading electricity and carbon among building producers and consumers provided in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram illustrating the aggregation of electricity-carbon trading in one possible embodiment provided in Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of the power optimization scheduling results for building producer-consumer P3 in one possible embodiment of Embodiment 1 of the present invention; Figure 6 This is a schematic diagram of the architecture of a two-layer decision-making system for collaborative electricity-carbon trading between building producers and consumers, provided in Embodiment 2 of the present invention. Detailed Implementation

[0027] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] Example 1

[0029] See Figure 1Embodiment 1 of the present invention provides a two-tier decision-making method for co-trading electricity and carbon for building producers and consumers, comprising the following steps: S1. Based on the functional responsibilities of upper-level aggregators and the carbon trading positioning of lower-level building prosumers, construct a two-layer optimization framework for electricity-carbon collaborative trading; S2. Based on the aforementioned two-layer optimization framework for electricity-carbon collaborative trading, individual buildings are classified according to carbon emission compliance requirements. Based on the differentiated compliance needs of individual buildings of a given type, and according to the principle of emission reduction equivalence, and based on the green electricity consumption of each individual building in each scheduling period, the mutual recognition amount of national certified voluntary emission reduction (CCER) is calculated. Aggregators aggregate the mutual recognition amount of each individual building by time period to form the CCER application amount and apply on behalf of the applicant. After the CCER certificate is approved, the CCER is allocated to the corresponding individual building according to the actual green electricity contribution of each individual building in the corresponding scheduling period, thus constructing a dynamic mutual recognition mechanism for carbon emission reduction. S3. Based on the aforementioned two-layer optimization framework for electricity-carbon collaborative trading and the aforementioned dynamic mutual recognition mechanism for carbon emission reduction, objective functions are constructed for the upper-layer aggregator and the lower-layer building prosumer, respectively. Based on the objective functions, combined with the upper-layer constraints and the lower-layer constraints considering building thermal balance, a two-layer nonlinear optimization model is constructed. The two-layer nonlinear optimization model includes an upper-layer model and a lower-layer model. S4. Relax the Boolean variable constraints of the two-level nonlinear optimization model to obtain a relaxed two-level nonlinear optimization model; based on the relaxed two-level nonlinear optimization model, construct the Lagrangian function of the lower-level producer-consumer; based on the Lagrangian function, transform the lower-level model into additional constraints through KKT conditions and embed them into the upper-level model to generate a two-level associated model; linearize the two-level associated model through the strong duality principle and the Big M method to obtain a single-level mixed integer linear programming model. S5. Solve the single-layer mixed integer linear programming model by setting a commercial solver to obtain the decision results.

[0030] In this embodiment, in step S1, a two-layer optimization framework for electricity-carbon collaborative trading is constructed based on the functional responsibilities of the upper-level aggregator and the carbon trading positioning of the lower-level building prosumers.

[0031] Specifically, building producers and consumers, along with aggregators, construct an electricity-carbon trading framework. Through a two-tiered architecture and an electricity-carbon collaborative trading mechanism, they achieve efficient allocation and value maximization of energy resources.

[0032] The aggregators at the upper level act as the core hubs, connecting building prosumers with the upper-level power grid and carbon market, and are responsible for electricity purchase and sale and carbon quota management. Relying on energy storage equipment, they use flexible charging and discharging strategies to smooth out fluctuations in electricity supply and demand among building prosumers, achieving peak-valley regulation and surplus electricity storage. Simultaneously, based on the energy consumption plans of building prosumers, combined with market supply and demand and operating costs, they dynamically formulate electricity purchase and sale prices and carbon quota incentive prices, maximizing their own economic benefits through differentiated pricing mechanisms.

[0033] The lower-level building prosumers consist of various types of individual buildings. These buildings generate and consume renewable energy locally through rooftop photovoltaics, and utilize HVAC systems to intelligently control indoor temperature and create flexible electricity loads, taking advantage of the building's thermal inertia. Notably, building prosumers trade only with aggregators based on the electricity-carbon price set by the aggregators, simplifying the trading process and lowering the barriers and costs for individuals to participate in the market.

[0034] As two independent stakeholders, building prosumers and aggregators make dynamic decisions through electricity and carbon price signals. Aggregators dynamically adjust electricity and carbon incentive prices based on market fluctuations and internal supply and demand, guiding building prosumers to use electricity during off-peak hours and improve the self-consumption rate of photovoltaic power. Building prosumers, in turn, adjust the operation sequence of their equipment based on the electricity-carbon price information released by aggregators, and rationally allocate the proportion of photovoltaic power for self-consumption and uploading, thereby reducing energy costs while maximizing the carbon emission reduction benefits brought by green electricity consumption.

[0035] In this embodiment, in step S2, based on the dual-layer optimization framework of electricity-carbon collaborative trading, individual buildings are classified according to carbon emission compliance requirements; based on the differentiated compliance requirements of the set type of building, according to the principle of emission reduction equivalence, and based on the green electricity consumption of each building in each scheduling period, the mutual recognition amount of national certified voluntary emission reduction (CCER) is calculated; the aggregator applies for the aggregation of the mutual recognition amount of CCER for each building, and after the CCER certificate is approved, it is allocated according to the actual green electricity contribution of each building in the corresponding scheduling period, thus constructing a dynamic mutual recognition mechanism for carbon emission reduction.

[0036] Specifically, the coupling of electricity and carbon is essentially a two-way interaction between electricity production and consumption and carbon emission responsibility and rights. Under the "carbon emitter responsibility" standard, the electricity decisions and carbon compliance behaviors of building producers and consumers form a coordinated regulation based on electricity consumption and carbon pricing to control electricity consumption.

[0037] From the perspective of electricity's core impact on carbon, the electricity consumption choices of building prosumers directly determine carbon emissions and compliance pressure. Specifically, building prosumers incur indirect carbon emissions when purchasing conventional grid electricity, which must be offset through carbon allowances or CCERs. However, if they consume photovoltaic green electricity themselves, it can be converted into CCERs through a dynamic mutual recognition mechanism, reducing the need for allowance purchases. Excess CCERs can also be used for carbon trading. Simultaneously, by leveraging building thermal inertia and implementing peak-shifting electricity consumption through HVAC systems, the amount of electricity purchased during high-carbon emission periods can be reduced, indirectly lowering regional carbon emissions and further alleviating compliance pressure.

[0038] From the perspective of carbon's guiding role in electricity, carbon prices and carbon quota status influence the electricity consumption strategies of building prosumers through costs. When carbon prices rise, the implicit carbon cost of purchased electricity increases, prompting building prosumers to improve their photovoltaic self-consumption rate and reduce electricity consumption during periods of high carbon prices through HVAC pre-cooling and cold storage to control total costs. When quotas are scarce, building prosumers prioritize converting green electricity into CCERs to fulfill their obligations; if there is a quota surplus, they sell it for profit, forming a cycle where carbon constraints guide the decarbonization of electricity.

[0039] Aggregators and a dynamic mutual recognition mechanism are key to the successful implementation of this coupling. Aggregators, acting on prices from the upstream market, dynamically set electricity-carbon prices, ensuring accurate transmission of electricity-carbon signals. The dynamic mutual recognition mechanism, on the other hand, converts green electricity consumption into CCERs (China Certified Energy Credits), resolving the issue of double-counting the carbon benefits of green electricity and realizing the value transformation of electricity and carbon, thus becoming the core link in the electricity-carbon coupling process.

[0040] In this embodiment, based on different carbon emission compliance requirements, individual buildings are divided into three types: industrial buildings, commercial and residential buildings, and zero-carbon buildings. Industrial buildings are a type of building with relatively large carbon emissions and have explicit carbon emission compliance requirements. Commercial and residential buildings are generally equipped with small-scale renewable energy power generation equipment and have no mandatory carbon emission compliance requirements. They can be sold on the market through the mutual recognition of green electricity consumption CCERs, bringing economic benefits to building producers and consumers. Zero-carbon buildings have the most stringent carbon emission requirements, that is, they must achieve "zero" carbon emissions. All carbon emissions generated must be offset by CCERs obtained through mutual recognition of green electricity consumption or by purchasing carbon allowances. If there are still surplus CCERs, they can be sold to generate revenue.

[0041] In this embodiment, since CCER applications require reaching a certain scale threshold, the CCERs mutually recognized by various building prosumers through green energy consumption must be applied for through an aggregator acting as an agent. Unlike the static agency model with fixed cycles and fixed scales, the aggregator will integrate the application volume in real time based on the dynamically changing green energy consumption of each building prosumer. After the CCER certificate is approved, the aggregator will accurately distribute the CCER to the corresponding entity according to the actual green energy contribution of each building prosumer during that period. This dynamic operation ensures that the mutual recognition volume of CCERs is completely synchronized with the time and scale dimensions of green energy consumption, avoiding the mutual recognition lag or volume mismatch caused by static applications.

[0042] In today's energy and environmental economic system, green electricity trading consistently adheres to the two principles of exclusivity of environmental rights and polluter responsibility. Its cost structure consists of two parts: electricity cost and environmental premium, reflecting the close link between environmental rights and green electricity itself. This structure ensures seamless integration of electricity volume and environmental rights, thus forming a "certificate-electricity integration" trading model. This high level of integration provides favorable support for promoting the establishment of a nationally unified certification mechanism, circulation platform, and pricing system. Against this backdrop, this invention analyzes green electricity trading under the "certificate-electricity integration" model. Specifically, the environmental rights of green electricity dynamically adapt to the real-time status of green electricity consumption. Renewable energy generators no longer retain the corresponding CCER certification rights; instead, building prosumers on the user side dynamically initiate CCER certificate applications based on their own time-of-use carbon quota needs and real-time green electricity consumption data.

[0043] The mutual recognition of emission reductions from green electricity consumption and CCERs is based on the principle of emission reduction equivalence, and its calculation formula is as follows: (1) In the formula, The amount of CCER obtained through mutual recognition; Mutual recognition factor; This refers to the amount of green electricity consumed.

[0044] The green electricity consumed by each building producer-consumer originates from the green electricity generated and consumed by their own renewable energy equipment and the green electricity traded with the upstream power grid. Therefore, the amount of CCER mutually recognized by building producer-consumer i in time period t... It can be represented as: (2) In the formula, t is the time interval; i is the building consumer number; Green electricity factor for electricity purchase; Photovoltaic power generation for building consumers; and These represent the electricity purchased and sold by building producers to aggregators, respectively.

[0045] In this embodiment, the core carbon emissions of building prosumers originate from indirect carbon emissions generated by purchasing electricity from the upper-level power grid. Although these emissions do not directly occur at the building's energy consumption end, they are directly related to the building's electricity consumption behavior. According to the "carbon emitter responsibility" standard, building prosumers, as the main actors in electricity consumption, must bear the responsibility for fulfilling their obligations regarding these indirect carbon emissions. This breaks the traditional model where carbon emission responsibility is uniformly borne by power generation companies, effectively delegating it to the user side. Formula for calculating carbon emissions from building producers and consumers: (3) In the formula, Carbon emissions from building producers and consumers; This is the grid reference emission factor.

[0046] When a carbon quota assessor faces a carbon quota shortage, they can choose to purchase additional quotas on the carbon trading market; conversely, if there is a surplus, they can sell the excess on the market to generate revenue. Given that industrial and building producers and consumers are required to fulfill their carbon quota obligations, this invention employs a baseline method to allocate their initial carbon quotas free of charge. The specific allocation amount is closely related to each producer and consumer's electricity purchases from the grid. The calculation formula is as follows: As shown: (4) In the formula, Free carbon credits for building producers and consumers. The free quota coefficient obtained from purchasing electricity from the power grid.

[0047] In this embodiment, in step S3, objective functions for the upper-level aggregator and the lower-level building prosumer are constructed based on the electricity-carbon collaborative trading dual-layer optimization framework and the carbon emission reduction dynamic mutual recognition mechanism, respectively; based on the objective functions, combined with the upper-level constraints and the lower-level constraints considering building thermal balance, a dual-layer nonlinear optimization model is constructed; the dual-layer nonlinear optimization model includes an upper-level model and a lower-level model.

[0048] Specifically, the upper-level aggregator maximizes its economic benefits by optimizing electricity prices and carbon allowance incentive prices for building prosumers, providing them with electricity and carbon allowance purchase and sale services, and simultaneously using energy storage devices for charging and discharging, and trading with the upper-level power grid and carbon market. Its objective function expression is as follows: (5) In the formula, The total number of consumers in the construction industry; The scheduling period; and These refer to the unit price of electricity purchased and sold by building producers and consumers from aggregators; and These refer to the unit price at which aggregators purchase and sell electricity from the upper-level power grid; and These refer to the aggregator's purchase and sale of electrical energy from the upstream power grid; , and , These refer to the unit price and quantity of carbon allowances purchased and sold by building producers and consumers from aggregators; , and , These refer to the unit price and quantity of carbon allowances that aggregators buy and sell from the carbon market; Cost coefficient for aggregators using energy storage equipment; and These represent the charging and discharging power of the energy storage device.

[0049] The objective function of the upper-level aggregator corresponds to the upper-level constraints, including: electricity purchase and sale price constraints, carbon quota purchase and sale incentive price constraints, grid electricity purchase and sale upper and lower limit constraints, carbon market carbon quota purchase and sale upper and lower limit constraints, energy storage device constraints, upper-level power balance and carbon quota balance constraints.

[0050] Specifically, constraints on electricity purchase and sale prices: When setting electricity purchase and sale prices for building prosumers, aggregators must simultaneously consider both their own revenue and the purchasing intentions of building prosumers. Therefore, the prices set by aggregators must be limited to a reasonable range; that is, the purchase price for electricity by building prosumers cannot be higher than the price at which they purchase directly from the upstream market, and the sale price of electricity by building prosumers cannot be lower than the price at which they sell directly to the upstream market. Specific constraints are as follows: -Mode As shown: (6) (7) In the formula, The lower limit coefficient for the purchase price of building products and consumers; This is the upper limit coefficient for the selling price of building products and services.

[0051] Incentive price constraints for purchasing and selling carbon allowances: In this invention, when aggregators trade carbon allowances with the higher-level carbon market, a fixed carbon price that does not fluctuate over time is used, simplifying the complexity of transactions with external markets. However, when trading carbon with building prosumers, a time-sharing incentive carbon price is introduced as the upper and lower price limits. The transaction price is determined by an optimization model within these limits to incentivize building prosumers to participate in low-carbon scheduling. Specific constraints are as follows: -Mode As shown: (8) (9) In the formula, The upper limit for carbon purchase incentive prices; This is the lower limit of the carbon sales incentive price.

[0052] Upper and lower limits constraints on power grid purchase and sale: Aggregators face upper and lower power limits when purchasing and selling electricity from the upstream power grid, and cannot purchase and sell electricity simultaneously. Specific constraints are shown in equations (10)-(12): (10) (11) (12) In the formula, The upper limit of the power capacity for aggregators to purchase and sell electrical energy; and These are 0-1 Boolean variables representing the aggregator's purchase and sale of electricity to the upstream power grid.

[0053] Carbon market carbon quota trading upper and lower limits constraints: Aggregators are also subject to upper and lower limits on the amount of carbon allowances they can purchase and sell in the carbon market, and they cannot purchase and sell carbon simultaneously. Specific constraints are shown in equations (13)-(15): (13) (14) (15) In the formula, The upper limit for the purchase and sale of carbon allowances by aggregators; and These are 0-1 Boolean variables representing aggregators purchasing and selling carbon from the higher-level carbon market, respectively.

[0054] Upper-level power balance and carbon quota balance constraints: The upper-level power balance constraint is shown in equation (16): (16) Unlike electricity, which requires real-time balance between supply and demand, aggregators do not need to meet compliance requirements at all times during the purchase and sale of carbon allowances. That is, aggregators can purchase carbon allowances in a concentrated manner at opportune times, thereby forming allowance surpluses in certain periods. The dynamic relationship of these surpluses is shown in equations (17)-(18): (17) (18) In the formula, and These represent the remaining carbon allowances for aggregators during time period t and time period t-1, respectively.

[0055] Constraints of energy storage devices: (19) (20) (twenty one) (twenty two) (twenty three) (twenty four) In the formula: and These are 0-1 Boolean variables representing the charging and discharging of the energy storage device, respectively. and These represent the remaining power of the energy storage devices during time period t and time period t-1, respectively. and These refer to the charging and discharging efficiencies of energy storage devices, respectively. and These are the minimum and maximum values ​​of the energy storage device's power, respectively. and These represent the initial and final values ​​of the energy storage device's power, respectively.

[0056] In the above formula, the expression - The upper and lower limits of the charging and discharging power of energy storage devices are defined, and it is restricted that they cannot charge and discharge simultaneously; A specific method for calculating the remaining power of energy storage devices is given; formula Upper and lower limits are set for the remaining power of the energy storage device to ensure that the power is maintained within a reasonable range; To ensure that the energy storage device maintains a consistent electrical state throughout the entire process, thus achieving energy balance.

[0057] In this embodiment, the lower-level building prosumers, based on the electricity-carbon price set by the upper-level aggregator, rationally plan the amount of electricity they purchase and sell from the aggregator, the quantity of carbon allowances they purchase and sell, and the way they use their own energy resources, while meeting their own energy needs and indoor thermal comfort, in order to minimize energy costs. Their objective function is shown in the equation. As shown: (25) In the formula, and These refer to the power consumption of building producers and consumers when purchasing and selling electricity to aggregators.

[0058] The first term in the formula represents the cost of electricity purchased by building producers from aggregators; the second term represents the cost of carbon purchased by building producers from aggregators.

[0059] The constraints corresponding to the objective function of the lower-level producers and consumers include: building heat balance constraints, indoor temperature constraints, HVAC cooling power constraints, upper and lower limits constraints for electricity purchase and sale, photovoltaic equipment output constraints, upper and lower limits constraints for carbon quota purchase and sale, lower-level power balance and carbon quota balance constraints.

[0060] Specifically, building thermal balance constraints: Because buildings possess heat storage properties, indoor temperature adjustments by building consumers lag behind HVAC (heating and ventilation) control. HVAC systems, however, can be flexibly adjusted according to the energy usage plans of building consumers, thus providing them with greater flexibility in terms of control.

[0061] This invention assumes that each building consists of multiple similar cooling zones, such as Figure 2 As shown, an RC network model is used to describe the thermal dynamics of each region, and to quantitatively characterize the thermal balance between the walls and the regions. In the model, each region consists of two types of nodes: wall nodes and region nodes. They are connected by thermal resistance with heat transfer capability and grounded by thermal capacity with heat storage capability, thereby simulating the heat storage characteristics of the building.

[0062] Figure 2 In the text, the subscripts E, W, S, and N represent the east, west, south, and north directions, respectively; the superscripts room, wall, out, and win represent the interior, wall, exterior, and window, respectively; T represents temperature, R represents thermal resistance, and C represents heat capacity. HVAC cooling capacity; This represents the heat gain from indoor activities. As shown in the graph, , , , These represent the outdoor temperatures in the east, west, south, and north directions, respectively. , , , These represent the wall temperatures in the east, west, south, and north directions, respectively. , , , These represent the thermal resistances of the walls in the east, west, south, and north directions, respectively. , , , These represent the heat capacity of the walls in the east, west, south, and north directions, respectively. , These represent the thermal resistance of windows facing south and north, respectively. This represents the indoor air temperature. Taking region n in building consumer i as an example, a regional wall thermal dynamics model and an indoor thermal dynamics model are constructed from the diagram, as shown in the equation. Japanese style As shown: (26) (27) In the formula, This represents the state of sunlight received by the wall. If the wall is exposed to sunlight, the value is 1; otherwise, the value is 0. The heat absorption rate of the wall; The surface area of ​​the wall; The intensity of light received by the wall; For window transmittance; For window area; The intensity of light received by the window; , , , , These are the dual variables of the corresponding equality constraints.

[0063] Indoor temperature constraints: When considering indoor environmental control strategies, the formula Indoor temperature comfort range constraints: (28) In the formula, and These are the minimum and maximum comfortable indoor temperatures, respectively. and These are the dual variables of the inequality constraint.

[0064] HVAC cooling power constraints: HVAC systems primarily ensure indoor temperature comfort in buildings through their cooling function. The linear relationship between their power consumption and cooling power can be simplified to the equation... At the same time, power consumption is also subject to upper and lower limits, as shown in the formula. As shown: (29) (30) In the formula, This refers to the power consumption of the HVAC system. Energy efficiency ratio; This represents the maximum power consumption of the HVAC system. and For formula The dual variable.

[0065] Upper and lower limits constraints on electricity purchase and sale: Building producers and consumers face upper and lower power limits when purchasing and selling electricity from aggregators, and cannot purchase and sell electricity simultaneously. Specific constraints are shown in equations (31)-(33): (31) (32) (33) In the formula, The upper limit on the amount of electricity that can be purchased and sold by building producers and consumers; and These are 0-1 Boolean variables representing electricity purchases and sales from aggregators by building producers and consumers; and For formula The dual variable; and For formula The dual variable.

[0066] Photovoltaic equipment output constraints: The output of photovoltaic equipment must not exceed the predicted value. , as shown As shown: (34) In the formula, and Let be the dual variable of this inequality.

[0067] Upper and lower limits on the purchase and sale of carbon allowances: Construction producers and consumers face upper and lower limits when purchasing and selling carbon allowances from aggregators, and cannot purchase and sell carbon simultaneously. Specific constraints are shown in equations (35)-(37): (35) (36) (37) In the formula, The upper limit on the number of carbon credits that construction producers and consumers can purchase and sell; and These are 0-1 Boolean variables representing the purchase and sale of carbon by building producers and consumers to aggregators; and For formula The dual variable; and For formula The dual variable.

[0068] Lower-level power balance and carbon quota balance constraints: (38) (39) In the formula, Fixed load for building consumers; size is the total number of cooling zones included in the building consumer. and These represent the remaining carbon allowances for building producers and consumers during time period t and t-1, respectively. and They are respectively formulas Japanese style The dual variable.

[0069] To prevent construction producers from excessively purchasing and hoarding carbon credits, an upper limit should be set on their remaining carbon credits: (40) In the formula, This represents the upper limit of the remaining carbon allowance; and For formula The dual variable.

[0070] In this embodiment, in step S4, the two-layer nonlinear optimization model is subjected to Boolean variable constraint relaxation to obtain a relaxed two-layer nonlinear optimization model; based on the relaxed two-layer nonlinear optimization model, the Lagrangian function of the lower-level producer-consumer is constructed; based on the Lagrangian function, the lower-level model is transformed into additional constraints through KKT conditions and embedded into the upper-level model to generate a two-layer correlation model; through the strong duality principle and the Big M method, the two-layer correlation model is linearized to obtain a single-layer mixed integer linear programming model.

[0071] Specifically, such as Figure 3 As shown, for the two-level optimization model, such as The nonlinearity caused by the bivariate product and the coupling relationship between the upper and lower level models pose challenges for conventional solution methods. To address this, this invention first relaxes the constraints involving 0-1 Boolean variables in the lower level model. Then, it constructs the Lagrangian function of the lower-level producer-consumer model and uses KKT conditions to equivalently transform the objective function and constraints of the lower level model, embedding these as additional constraints into the upper-level objective function, thus converting the bi-level model into a single-level model. Based on this, the transformed model undergoes linearization: the nonlinear objective function is reconstructed using the strong duality principle, and the complementary relaxation conditions of the inequality constraints are linearized using the Big-MMethod. Finally, the original problem is transformed into a single-level mixed-integer linear programming problem that can be directly solved using commercial solvers. Figure 3 middle, Let m represent the dual variable corresponding to the equality constraint, where m takes the value 1, 2, ..., 7; and Let k represent the dual variables corresponding to the lower bound inequality constraint and the upper bound inequality constraint, respectively, where k takes values ​​of 1, 2, ..., 8.

[0072] Among them, the 0-1 Boolean variable constraint relaxation process is as follows: From the formula Japanese style It is known that building producers and consumers are not allowed to simultaneously purchase or sell electricity or carbon allowances at any given time. Since this constraint contains 0-1 Boolean variables and is non-linear, it is difficult to directly transform it using KKT conditions in the lower-level building producer and consumer model; therefore, it must be relaxed.

[0073] This invention follows the relaxation approach for energy storage charging and discharging constraints, taking the purchase and sale of electricity by building producers and consumers as an example: In the lower-level objective function, set... The cost of purchasing and selling electricity, and to ensure that the purchase price and the selling price are different, can be directly calculated using the formula. Relaxation. The following example of electricity purchase and sale by building producers and consumers demonstrates this: The total cost for building prosumers to trade electricity with aggregators is: (41) Assumption and , Let be a constant, taking the value (0, 1). If there exist two optimal solutions with the same cost: Solution 1 involves the construction prosumer paying... Purchase electricity, and at the same time Electricity sales; Option two is for building consumers to only purchase electricity. Electricity purchase. Two optimal solutions are satisfied: (42) Mode This indicates that for building consumers, both options can replenish the same amount of electricity at the same time. However, from an economic perspective, the cost of option one is... The cost of Option 2 is Therefore: (43) Mode This indicates that Option 2 is more economical for building producers and consumers. Therefore, in the objective function... Under these circumstances, Option 1 cannot be the optimal solution, as it will not involve simultaneous purchase and sale of electricity, thus... This can be directly relaxed. Similarly, the same argument can be made for carbon allowance trading: If the prices for buying and selling carbon allowances are inconsistent, in order to meet the cost minimization needs of construction prosumers, they will not be allowed to simultaneously buy and sell carbon allowances. Therefore, the equation... It can also be relaxed directly.

[0074] In this embodiment, the two-layer model is transformed into a single-layer model: In the decision-making process of building prosumers, the electricity price and carbon quota incentive price set by aggregators can be considered as fixed values, which makes the lower-level model exhibit linear characteristics. Based on this characteristic, the objective function and constraints of the lower-level model are transformed using KKT conditions, and then incorporated as constraints into the upper-level model, transforming the original two-level model into a single-level model with equilibrium constraints. Taking building prosumer i as an example, dual variables are introduced into the equality constraints and inequality constraints in its lower-level model, and then the lower-level objective function is combined with the constraints to construct the model as shown in the equation. The Lagrange function shown: (44) In the formula: For the set of lower-level decision variables; The set of dual variables for equality constraints; The set of dual variables for inequality constraints; Energy costs for building consumer i; Let be the set of equality constraints, where This is the constraint for the k-th equality; Let be the dual variable of the k-th equality constraint; Let be the set of inequality constraints, where This is the constraint for the m-th inequality; Let be the dual variable of the m-th inequality constraint.

[0075] For each formula Taking the partial derivatives of the lower-level decision variables and dual variables in the equation, we can obtain the stationarity condition under the KKT conditions, as shown in the equation. -Mode As shown: (45) (46) (47) (48) (49) (50) (51) (52) (53) (54) (55)

[0076] The partial derivatives of the dual variables of the equality constraints with respect to the Lagrange function yield the same results as the original equality constraints, which will not be repeated here. The inequality constraints can then be written as complementary relaxation conditions in the KKT conditions, as shown in equation [equation missing]. -Mode As shown: (56) (57) (58) (59) (60) (61) (62) (63)

[0077] In the formula, express , ,and .

[0078] In this embodiment, the model is linearized: I. Linearization of the objective function: Based on the principle of strong duality, the dual objective function of the lower-level linear objective function is equivalent to the original objective function. Since the lower and upper-level objective functions contain the same terms, the dual objective function of the lower-level objective function can be substituted into the upper-level objective function, replacing some terms to linearize the upper-level objective function. This effectively solves the problem of nonlinear terms appearing in the multiplication of two variables. The dual objective function of the lower-level objective function is shown in the equation. As shown: (64) Utilization The upper-level objective function The nonlinear part in the equation is replaced, and the objective function after replacement is as follows: As shown: (65) In the formula, The objective function is the dual problem objective function of the lower-level objective function.

[0079] II. Linearization of complementary relaxation conditions: According to the Big M theory, the formula -Mode Linearization, by introducing Boolean variables , And a sufficiently large constant M can further transform it into the equation Equation (73): (66) (67) (68) (69) (70) (71) (72) (73) The two-layer optimization model for electricity-carbon collaborative trading can be transformed into the following formula: The objective function includes the constraints on the operation and transactions of the upper-level aggregator (equation). -Mode ) and the constraints on the operation and transaction of lower-level prosumers after KKT condition transformation (formula) -Mode ,Mode -Mode ,Mode -Mode ,Mode -Mode A mixed-integer linear programming model.

[0080] In this embodiment, in step S5, the single-layer mixed integer linear programming model is solved by setting a commercial solver to obtain the decision result.

[0081] Specifically, a suitable commercial solver is selected: the GUROBI solver in MATLAB is chosen. This solver has efficient solving capabilities for mixed-integer linear programming problems and can handle linear constraints, integer variables, and objective functions in the model. Next, the model parameters are input and the solution is started: the electricity price, carbon price, equipment parameters, constraint boundaries, and other data set in the example are substituted into the model, and parameters such as solution accuracy and iteration count are set before starting the solution process. Finally, the decision results are output and analyzed: after the solution is completed, the optimal decision scheme for the upper-level aggregator is output, including the time-of-use electricity price, carbon quota incentive price, trading power / quantity with the upper-level grid / carbon market, and energy storage charging and discharging strategies; simultaneously, the optimal decision schemes for each lower-level building prosumer are output, including the electricity purchased and sold to the aggregator, the carbon quota trading quantity, the ratio of photovoltaic power self-consumption to uploading, and HVAC operating power adjustment strategies, forming a complete decision system covering the entire electricity-carbon trading process, providing precise guidance for actual operation.

[0082] In one possible embodiment, a specific example is provided as follows:

[0083] I. Example Setup This invention selects a typical summer day in North my country and takes three building prosumers as research objects to analyze the proposed method and model. Each prosumer covers various types of buildings, but their composition ratios differ significantly. Building prosumer P1 mainly consists of industrial buildings due to the presence of many factories; building prosumer P2 is located in a residential area with a high proportion of commercial and residential buildings; and building prosumer P3 is mainly composed of zero-carbon buildings.

[0084] Electricity-carbon trading between building prosumers and aggregators is based on a 1-hour timescale. Aggregators purchase electricity from the upstream grid at a 10% lower price than building prosumers purchase directly. The time-of-use (TOU) feed-in tariff and the upper limit of the TOU incentive carbon price are shown in Table 1. The lower limit for the price aggregators sell electricity to building prosumers is set at 50% of the TOU feed-in tariff, creating room for price optimization. The carbon trading price between aggregators and the carbon market is fixed: a purchase price of 70 yuan / ton and a selling price of 40 yuan / ton.

[0085] Table 1. Time-of-use electricity price and time-of-use incentive carbon price ceiling

[0086] Assuming that the heat storage characteristics of the three building producers and consumers differ, and their insulation performance is ranked as P1>P2>P3, the RC thermal dynamic model parameters are shown in Table 2, and other key parameters are shown in Table 3. Table 2 RC thermal dynamic model parameters

[0087] Table 3 Other parameters

[0088] II. Analysis of Optimization Results of the Example

[0089] Aggregator optimization results analysis: Aggregators, based on the time-of-use electricity price in the higher-level electricity market and the fixed carbon price in the carbon market, and considering the energy consumption and carbon quota needs of various building prosumers at the lower level, comprehensively optimize their electricity-carbon trading schemes for purchasing and selling electricity to the higher-level market, their own energy storage equipment charging and discharging plans, and the electricity-carbon trading prices they set for building prosumers. Figure 4 As shown, the overall electricity-carbon trading situation of aggregators is presented.

[0090] Depend on Figure 4(a) It is evident that the aggregators' electricity trading strategies exhibit significant time-period characteristics. During the 0:00-8:00 period, due to weak photovoltaic output and low electricity prices, aggregators primarily meet the electricity needs of building consumers by purchasing electricity from the upstream grid and utilize the low-price period to charge energy storage devices. During the 9:00-16:00 period, as photovoltaic output increases, aggregators first sell excess electricity from building consumers back to the upstream grid, and then moderately release energy storage power during the peak electricity price period of 10:00-12:00 to obtain additional... The aggregator generates external revenue, and then, between 13:00 and 16:00, it re-injects the electricity sold to building prosumers into the energy storage device to provide reserves for discharge during the evening peak electricity price period. Between 17:00 and 24:00, although photovoltaic output gradually declines, electricity prices remain high, and the aggregator mainly relies on the energy storage device to release electricity to supply building prosumers, maximizing profits. When electricity prices fall back to low levels between 23:00 and 24:00, the aggregator again purchases electricity from the upstream grid to replenish the energy storage device, meeting the dispatch needs of the following day. The above analysis shows that by fully utilizing the fluctuations in photovoltaic output and the time difference in electricity prices, the aggregator can not only maximize profits but also maintain the balanced operation of the energy storage device.

[0091] like Figure 4 As shown in (b), during the period from 00:00 to 13:00, aggregators mainly conduct small-scale carbon allowance transactions with construction prosumers and the higher-level carbon market. From 14:00 onwards, the carbon allowance prices set by aggregators are at a relatively high level. Due to carbon allowance inventory constraints, construction prosumers begin to gradually sell back their previously reserved carbon allowances to aggregators, resulting in a continuous accumulation of carbon allowance holdings by aggregators. It is worth noting that before the carbon price climbed again at 19:00, construction prosumers purchased allowances from aggregators in advance to meet their carbon emission needs for the period from 20:00 to 24:00, thereby reducing their transaction costs.

[0092] Analysis of the optimization results of the building producer-consumer model: Building prosumers coordinate and optimize their strategies for purchasing and selling photovoltaic power generation, HVAC operations, and electricity and carbon allowances based on the electricity-carbon trading prices set by aggregators. Figure 5 This includes fluctuations in P3 electricity prices for building producers and consumers, results of optimized energy resource scheduling, and changes in HVAC output and indoor temperature in individual areas.

[0093] Depend on Figure 5As can be seen from (a), the energy consumption and trading behavior of building prosumer P3 is influenced by both electricity prices and photovoltaic (PV) output. During the period of high PV output from 9:00 to 16:00, P3 prioritizes consuming local PV power to meet rigid load and air conditioning load demands, and sells some surplus electricity to aggregators, thereby reducing electricity purchase costs and obtaining revenue from electricity sales. After 18:00 to 22:00, PV output declines significantly and electricity purchase prices remain high. P3 then reduces its purchases from aggregators and adjusts its air conditioning load to reduce electricity demand during periods of high electricity prices, demonstrating its ability to flexibly dispatch power based on price signals and renewable energy output.

[0094] Partial and further combination Figure 5 As shown in part (b) of the comparison, buildings possess a certain heat storage capacity. Building consumers can increase HVAC power consumption to pre-cool the room temperature during periods of low electricity prices and reduce power consumption during periods of high electricity prices, thereby reducing electricity costs while ensuring user comfort. Taking the 5:00 PM time period as an example, since the electricity price set by the aggregator and building consumers is lower during this period, building consumers choose to increase HVAC power to lower the room temperature in advance; after entering the peak electricity price period at 6:00 PM, building consumers correspondingly reduce HVAC power, achieving a significant reduction in overall electricity costs. In addition, the building where building consumer P3 is located has better insulation performance than the other two, with greater heat capacity and thermal resistance, resulting in a slower rise in room temperature. Therefore, it tends to adopt a multiple pre-cooling strategy rather than continuously operating HVAC equipment at high power, thereby further reducing energy consumption and operating costs.

[0095] Because the three building prosumers cover different building types, their carbon trading characteristics differ significantly. Building prosumer P1 mainly deals with industrial buildings, receiving a large number of free carbon allowances, but with limited photovoltaic power generation output. Its CCER mutual recognition volume is dynamically calculated based on real-time green electricity consumption, resulting in a relatively low overall volume. It needs to flexibly adjust its carbon allowance purchase and sale timing based on its remaining carbon allowances and carbon price changes. Building prosumer P2 mainly deals with commercial and residential buildings, not bearing carbon emission compliance obligations. Its mutually recognized CCERs are sold to aggregators when carbon allowance incentive prices are high to maximize profits. Building prosumer P3 mainly deals with zero-carbon buildings, with sufficient photovoltaic power generation output and a high CCER mutual recognition volume. However, due to the lack of free allowances, it needs to use CCERs for compliance to meet emission requirements. In summary, all three building prosumers operate on a dynamic mutual recognition mechanism, adapting to real-time changes in CCERs and periodic fluctuations in carbon allowance incentive prices, following the principle of buying low and selling high to reduce overall transaction costs. Due to the upper limit on carbon allowance inventory for construction producers and consumers, they maximize profits by selling remaining CCERs when the amount of mutual recognition of CCERs is high at midday and the carbon selling price is at its peak. They also concentrate on purchasing carbon allowances at night (around 19:00) before carbon emissions increase, the amount of mutual recognition of CCERs decreases, and the carbon purchase price rises, thus reserving carbon allowances for future compliance needs. By scientifically controlling the timing of transactions and carbon allowance inventory, construction producers and consumers effectively reduce transaction costs while balancing compliance guarantees and economic benefits.

[0096] Comparative case analysis: To explore in depth the impact of three key factors—dynamic mutual recognition mechanism for carbon emission reductions, optimization of electricity-carbon pricing, and building thermal storage flexibility—on system economics and carbon emissions, this invention sets up the following five comparative scenarios, as shown in Table 4: Table 4 Comparison of Scene Settings

[0097] Scenario 1: Using a two-layer optimization model, building prosumers can participate in the pricing process of aggregated e-commerce carbon trading, while considering the dynamic mutual recognition mechanism of carbon emission reduction and giving full play to the flexibility of building heat storage. This scenario is the optimization scheme proposed in this invention. Scenario 2: Without considering the dynamic mutual recognition mechanism for carbon emission reductions, the green electricity emission reductions of building producers and consumers cannot be mutually recognized as CCERs, and therefore cannot be used for carbon emission compliance or generate revenue. Scenario 3: Aggregators directly publish fixed electricity-carbon purchase and sale prices, and building producers and consumers cannot influence the price-setting process through energy consumption strategies; Scenario 4: Without considering the building's heat storage flexibility, the indoor temperature is maintained at a fixed value (22℃) throughout the day; Scenario 5: Without considering the dynamic mutual recognition mechanism for carbon emission reductions, building producers and consumers passively accept the electricity-carbon price given by aggregators, and without considering the flexibility of building thermal storage, this is a traditional scenario.

[0098] As shown in Table 5, the revenue of upper-level aggregators, the total cost of lower-level building prosumers, and the total carbon emissions are summarized and compared for five scenarios. As shown in Table 6, the details are further refined, listing the electricity purchase cost, carbon purchase cost, and corresponding carbon emissions of each building prosumer.

[0099] Table 5 Summary of Key Indicators for Each Scenario

[0100] As shown in Table 5, Scenario 1 achieved the dual control objectives of system cost and carbon emissions, demonstrating the significant advantages of the proposed multi-dimensional collaborative optimization strategy. Specifically, although the aggregator revenue (32,393.80 yuan) in Scenario 1 was not the highest among the five scenarios, its total cost for building prosumers was the lowest, at only 112,942.04 yuan, a reduction of approximately 25.1% compared to Scenario 5. This indicates that the overall economic efficiency of the system was maximized while ensuring carbon compliance and user comfort. Meanwhile, its total carbon emissions were only 99.063 tons, only slightly higher than the total emissions of Scenario 2 by 1.1%, and lower than the total carbon emissions of Scenario 5 by 8.13%, demonstrating a good emission reduction effect.

[0101] Table 6 Summary of Key Indicators for Building Producers and Consumers in Various Scenarios

[0102] As detailed in Table 6, all building prosumers in Scenario 1 fully utilized the dynamic mutual recognition mechanism for carbon emission reductions to participate in carbon trading. Prosumers P2 and P3, in particular, not only met carbon emission compliance requirements but also gained net profits, effectively guiding the realization of the value of green electricity emission reductions. In contrast, Scenario 2 eliminated this mutual recognition mechanism, causing building prosumers P2 and P3 to lose carbon trading revenue and their carbon purchase costs to turn positive. In particular, building prosumer P3's carbon purchase cost reached a high of 2204.87 yuan. This is because P3 primarily builds zero-carbon buildings, and its compliance originally relied mainly on mutually recognized CCERs. With the removal of this mechanism, P3 needed to purchase a large amount of carbon allowances from aggregators to meet compliance requirements, thus drastically increasing its carbon purchase costs.

[0103] Although Scenario 2 achieved lower carbon emissions (97.976 tons), there was a certain sacrifice in system economics. This phenomenon indicates that the CCER mechanism can not only tap into the value of green electricity emission reduction but also alleviate user expenditure pressure while maintaining carbon compliance targets. Meanwhile, without a dynamic mutual recognition mechanism, building producers and consumers rely on direct carbon purchases to meet compliance requirements. To reduce costs, all entities actively tighten their energy consumption behavior, resulting in a slight decrease in total emissions. However, with a dynamic mutual recognition mechanism, low-cost emission reductions can be used for offsetting, which to some extent relaxes carbon emission constraints, explaining why Scenario 1's carbon emissions are slightly higher than Scenario 2. This shows that the two-layer optimization algorithm not only optimizes carbon compliance targets but also balances economics and carbon emissions. While meeting carbon emission requirements, Scenario 1 maximizes economic benefits through the two-layer optimization algorithm, demonstrating the advantages of a multi-dimensional collaborative optimization strategy.

[0104] Further observation of scenarios 3 and 5 reveals that aggregators set fixed electricity-carbon prices, depriving building prosumers of their participation rights and preventing them from strategically adjusting their responses to price signals, leading to a general increase in electricity purchase costs. Taking building prosumer P2 as an example, its electricity purchase cost in scenario 5 reached a staggering 65,574.26 yuan, the highest among all scenarios. Furthermore, carbon emission levels increased significantly in both scenarios, indicating that while the fixed-price mechanism boosted aggregator revenue in the short term, it suppressed users' flexible scheduling capabilities, harming the system's economic efficiency and low-carbon collaborative efficiency.

[0105] Scenario 4 focuses on the impact of stripping away the building's thermal storage and regulation capabilities. In this scenario, both the total cost to building producers and consumers (TPCs) and carbon emissions increase compared to Scenario 1, indicating that the increased rigidity of HVAC equipment regulation necessitates continuous high-power operation, thereby raising carbon emission levels. It is noteworthy that the total carbon emissions in Scenario 4 and Scenario 5 are identical. This is fundamentally because both scenarios maintain constant room temperature, resulting in equal power consumption for HVAC equipment operation. Furthermore, the building load settings are consistent, leading to no significant difference in electricity demand across different time periods, ultimately resulting in the same carbon emissions. However, unlike Scenario 5, Scenario 4 retains the electricity-carbon price optimization and CCER mechanism, allowing building producer and consumer P2 to still receive carbon trading revenue (-1380.18 yuan). The carbon costs for P1 and P3 are also significantly lower than in Scenario 5, demonstrating that even when building thermal storage flexibility is limited, price optimization and dynamic mutual recognition mechanisms still possess important economic regulatory functions.

[0106] In summary, the joint analysis in Tables 5 and 6 clearly demonstrates the profound impact of three core mechanisms on system and individual behavior: electricity-carbon price optimization can improve dispatch response efficiency and reduce energy costs; the dynamic mutual recognition mechanism for carbon emission reductions releases the value of green electricity emission reductions and alleviates compliance pressures; and the flexible adjustment capability of building thermal storage significantly enhances carbon emission flexibility and system emission reduction potential. Scenario 1, through the synergistic effect of these three mechanisms, achieves synergistic optimization in aggregator revenue, building producer-consumer costs, and carbon emission control, demonstrating that the operational mechanism design path for green and low-carbon building clusters has good adaptability and promotional value.

[0107] The application scenarios of this invention are as follows: In scenarios involving concentrated mandatory compliance buildings, such as urban commercial complexes and industrial park building clusters, this invention can help building producers and consumers balance compliance costs and energy needs through differentiated carbon compliance paths and dynamic CCER mutual recognition, achieving a win-win situation for both compliance and efficiency.

[0108] In scenarios dominated by residential areas, small and medium-sized office buildings, and other commercial and residential buildings, this invention can convert green electricity consumption into tradable CCERs, opening up low-carbon income channels for building producers and consumers and enhancing their initiative in proactive emission reduction.

[0109] In scenarios such as zero-carbon communities and green building demonstration projects, this invention can ensure the achievement of the goal of zero carbon emissions through the synergistic optimization of electricity and carbon and the utilization of thermal storage characteristics, while minimizing operation and maintenance costs.

[0110] In scenarios where electricity-carbon market prices fluctuate frequently, this invention helps aggregators and building producers and consumers quickly adapt to market changes and lock in the optimal trading timing and strategies through two-layer dynamic decision-making and efficient model solving.

[0111] In building scenarios where distributed photovoltaic, energy storage and HVAC systems are integrated on a large scale, this invention can coordinate multiple types of energy resources, achieve optimized energy allocation and efficient conversion of carbon value, and improve the overall energy efficiency and low-carbon level of buildings.

[0112] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.

[0113] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0114] Example 2

[0115] See Figure 6 Embodiment 2 of the present invention also provides a two-tier decision-making system for collaborative electricity-carbon trading among building producers and consumers, comprising: The Electricity-Carbon Collaborative Trading Two-Tier Optimization Framework Construction Module 001 is used to construct an electricity-carbon collaborative trading two-tier optimization framework based on the functional responsibilities of upper-level aggregators and the carbon trading positioning of lower-level building prosumers. The carbon emission reduction dynamic mutual recognition mechanism construction module 002 is used to classify building units according to carbon emission compliance requirements based on the aforementioned electricity-carbon collaborative trading two-layer optimization framework; based on the differentiated compliance needs of building units of a set type, according to the principle of emission reduction equivalence, and based on the green electricity consumption of each building unit in each scheduling period, calculate and obtain the mutual recognition amount of national certified voluntary emission reduction (CCER); the aggregator aggregates the CCER mutual recognition amount of each building unit by time period to form the CCER application amount and acts as an agent for the application; after the CCER certificate is approved, the CCER is allocated to the corresponding building unit according to the actual green electricity contribution of each building unit in the corresponding scheduling period, thus constructing a carbon emission reduction dynamic mutual recognition mechanism; The two-layer nonlinear optimization model construction module 003 is used to construct objective functions for the upper-layer aggregator and the lower-layer building prosumer based on the two-layer optimization framework of electricity-carbon collaborative trading and the dynamic mutual recognition mechanism of carbon emission reduction, respectively; based on the objective functions, combined with the upper-layer constraints and the lower-layer constraints considering building heat balance, a two-layer nonlinear optimization model is constructed; the two-layer nonlinear optimization model includes an upper-layer model and a lower-layer model; The single-layer mixed-integer linear programming model acquisition module 004 is used to perform Boolean variable constraint relaxation processing on the two-layer nonlinear optimization model to obtain a relaxed two-layer nonlinear optimization model; based on the relaxed two-layer nonlinear optimization model, a Lagrangian function of the lower-level producer-consumer is constructed; based on the Lagrangian function, the lower-level model is transformed into additional constraints through KKT conditions and embedded into the upper-level model to generate a two-layer associated model; the two-layer associated model is linearized through the strong duality principle and the Big M method to obtain a single-layer mixed-integer linear programming model. The single-layer mixed-integer linear programming model solving module 005 is used to solve the single-layer mixed-integer linear programming model by setting a commercial solver to obtain the decision result.

[0116] In this embodiment, in the carbon emission reduction dynamic mutual recognition mechanism construction module 002, individual buildings are classified into industrial buildings, commercial and residential buildings, and zero-carbon buildings according to carbon emission compliance requirements; among them, industrial buildings are building units with mandatory carbon emission compliance requirements, commercial and residential buildings are building units without mandatory carbon emission compliance requirements and whose mutual recognized CCERs can be used for sale for profit, and zero-carbon buildings are building units that need to offset all their carbon emissions through mutual recognition of CCERs and purchase of carbon quotas.

[0117] The formula for calculating the CCER mutual recognition amount is as follows: ; ; In the formula, The amount of CCER obtained through mutual recognition; Mutual recognition factor; This refers to the amount of green electricity consumed. t represents the time interval; i represents the consumer ID of the building product. Green electricity factor for electricity purchase; Photovoltaic power generation for building consumers; and These represent the electricity purchased and sold by building producers to aggregators, respectively.

[0118] In this embodiment, in the two-layer nonlinear optimization model construction module 003, the objective function expression of the upper-layer aggregator is: ; In the formula, The total number of consumers in the construction industry; The scheduling period; and These refer to the unit price of electricity purchased and sold by building producers and consumers from aggregators; and These refer to the unit price at which aggregators purchase and sell electricity from the upper-level power grid; and These refer to the aggregator's purchase and sale of electrical energy from the upstream power grid; , and , These refer to the unit price and quantity of carbon allowances purchased and sold by building producers and consumers from aggregators; , and , These refer to the unit price and quantity of carbon allowances that aggregators buy and sell from the carbon market; Cost coefficient for aggregators using energy storage equipment; and These are the charging and discharging power of the energy storage device;

[0119] The objective function expression for the lower-level prosumers is: ; In the formula, and These refer to the power consumption of building producers and consumers when purchasing and selling electricity to aggregators.

[0120] In this embodiment, the upper-level constraints in the two-layer nonlinear optimization model construction module 003 include: electricity purchase and sale price constraints, carbon quota purchase and sale incentive price constraints, grid electricity purchase and sale upper and lower limit constraints, carbon market carbon quota purchase and sale upper and lower limit constraints, energy storage device constraints, upper-level power balance and carbon quota balance constraints. The lower-level constraints include: building thermal balance constraints, indoor temperature constraints, HVAC cooling power constraints, upper and lower limits constraints for electricity purchase and sale, photovoltaic equipment output constraints, upper and lower limits constraints for carbon quota purchase and sale, lower-level power balance and carbon quota balance constraints. In the process of constraining building thermal balance, an RC network model is used to describe the thermal dynamic process of a specified area, and to quantitatively characterize the thermal balance state between the wall and the area. The area consists of two types of nodes: wall nodes and area nodes. They are connected by thermal resistance with heat transfer capability and grounded by thermal capacity with heat storage capability to simulate the building's heat storage characteristics.

[0121] In this embodiment, in the single-layer mixed integer linear programming model acquisition module 004, the two-layer nonlinear optimization model is subjected to Boolean variable constraint relaxation processing to obtain the relaxed two-layer nonlinear optimization model. In the process, the cost of purchasing and selling electricity is set in the lower-layer objective function, and the purchase price and the sales price of electricity are made inconsistent; building producers and consumers trade electricity with aggregators. The linearization process for the bilayer correlation model includes objective function linearization and complementary relaxation condition linearization. Objective function linearization is based on the strong duality principle. The dual objective function of the lower-level linear objective function is equivalent to the original objective function. Substituting the lower-level dual objective function into the upper-level objective function achieves the linearization of the upper-level objective function. Complementary relaxation conditional linearization is achieved by introducing Boolean variables and a sufficiently large constant M; In the single-layer mixed-integer linear programming model acquisition module 004, the objective function expression of the single-layer mixed-integer linear programming model is: ; In the formula, The objective function is the dual problem objective function of the lower-level objective function.

[0122] It should be noted that the information interaction and execution process between the modules of the above system are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.

[0123] Example 3

[0124] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium storing program code for a two-tier decision-making method for co-trading electricity and carbon for building producers and consumers. The program code includes instructions for executing the two-tier decision-making method for co-trading electricity and carbon for building producers and consumers as described in Embodiment 1 or any possible implementation thereof.

[0125] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0126] Example 4

[0127] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor; The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can execute a two-tier decision-making method for building producer-consumer electricity-carbon collaborative trading, as described in Embodiment 1 or any possible implementation thereof.

[0128] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.

[0129] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0130] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing systems. They can be centralized on a single computing system or distributed across a network of multiple computing systems. Optionally, they can be implemented using program code executable by a computing system, thereby storing them in a storage system for execution by the computing system. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0131] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A two-tier decision-making method for co-trading electricity and carbon among building producers and consumers, characterized in that, include: Based on the functional responsibilities of upper-level aggregators and the carbon trading positioning of lower-level prosumers, a two-layer optimization framework for electricity-carbon collaborative trading is constructed. Based on the aforementioned two-layer optimization framework for electricity-carbon collaborative trading, individual buildings are classified according to carbon emission compliance requirements. Based on the differentiated compliance needs of individual buildings of a given type, and in accordance with the principle of emission reduction equivalence, and based on the green electricity consumption of each individual building in each scheduling period, the mutual recognition amount of national certified voluntary emission reductions (CCERs) is calculated. Aggregators aggregate the mutual recognition amount of each individual building by time period to form the CCER application amount and act as agents for the application. After the CCER certificate is approved, the CCER is allocated to the corresponding individual building according to the actual green electricity contribution of each individual building in the corresponding scheduling period, thus constructing a dynamic mutual recognition mechanism for carbon emission reduction. Based on the aforementioned two-layer optimization framework for electricity-carbon collaborative trading and the aforementioned dynamic mutual recognition mechanism for carbon emission reduction, objective functions are constructed for the upper-layer aggregator and the lower-layer building prosumer, respectively. Based on the objective functions, combined with the upper-layer constraints and the lower-layer constraints considering building heat balance, a two-layer nonlinear optimization model is constructed. The two-layer nonlinear optimization model includes an upper-layer model and a lower-layer model. The two-layer nonlinear optimization model is subjected to Boolean variable constraint relaxation to obtain the relaxed two-layer nonlinear optimization model. Based on the relaxed bilayer nonlinear optimization model, a Lagrangian function for the lower-level building producers and consumers is constructed. Based on the Lagrangian function, the lower-level model is transformed into additional constraints through KKT conditions and embedded into the upper-level model to generate a bilayer correlation model. The bilayer correlation model is linearized using the strong duality principle and the Big M method to obtain a single-level mixed integer linear programming model. The decision results are obtained by solving the single-layer mixed integer linear programming model using a commercial solver.

2. The two-tier decision-making method for co-trading electricity and carbon for building producers and consumers according to claim 1, characterized in that, Buildings are classified into industrial buildings, commercial and residential buildings and zero-carbon buildings according to their carbon emission compliance requirements. Among them, industrial buildings are buildings with mandatory carbon emission compliance requirements, commercial and residential buildings are buildings without mandatory carbon emission compliance requirements and whose mutual recognized CCERs can be sold for profit, and zero-carbon buildings are buildings that need to offset all their carbon emissions through mutual recognition of CCERs and purchase of carbon quotas. The formula for calculating the CCER mutual recognition amount is as follows: ; ; In the formula, The amount of CCER obtained through mutual recognition; Mutual recognition factor; t represents the amount of green electricity consumed; t represents the time interval; i represents the building energy consumer number. Green electricity factor for electricity purchase; Photovoltaic power generation for building consumers; and These represent the electricity purchased and sold by building producers to aggregators, respectively.

3. The two-tier decision-making method for co-trading electricity and carbon for building producers and consumers according to claim 2, characterized in that, The objective function expression of the upper-level aggregator is: ; In the formula, The total number of consumers in the construction industry; The scheduling period; and These refer to the unit price of electricity purchased and sold by building producers and consumers from aggregators; and These refer to the unit price at which aggregators purchase and sell electricity from the upper-level power grid; and These refer to the aggregator's purchase and sale of electrical energy from the upstream power grid; , and , These refer to the unit price and quantity of carbon allowances purchased and sold by building producers and consumers from aggregators; , and , These refer to the unit price and quantity of carbon allowances that aggregators buy and sell from the carbon market; Cost coefficient for aggregators using energy storage equipment; and These are the charging and discharging power of the energy storage device; The objective function expression for the lower-level prosumers is: ; In the formula, and These refer to the power consumption of building producers and consumers when purchasing and selling electricity to aggregators.

4. The two-tier decision-making method for co-trading electricity and carbon for building producers and consumers according to claim 3, characterized in that, The upper-level constraints include: electricity purchase and sale price constraints, carbon quota purchase and sale incentive price constraints, grid electricity purchase and sale upper and lower limit constraints, carbon market carbon quota purchase and sale upper and lower limit constraints, energy storage device constraints, upper-level power balance and carbon quota balance constraints. The lower-level constraints include: building thermal balance constraints, indoor temperature constraints, HVAC cooling power constraints, upper and lower limits constraints for electricity purchase and sale, photovoltaic equipment output constraints, upper and lower limits constraints for carbon quota purchase and sale, lower-level power balance and carbon quota balance constraints. In the process of constraining building thermal balance, an RC network model is used to describe the thermal dynamic process of a specified area, and to quantitatively characterize the thermal balance state between the wall and the area. The area consists of two types of nodes: wall nodes and area nodes. They are connected by thermal resistance with heat transfer capability and grounded by thermal capacity with heat storage capability to simulate the building's heat storage characteristics.

5. The two-tier decision-making method for co-trading electricity and carbon for building producers and consumers according to claim 4, characterized in that, The two-layer nonlinear optimization model is subjected to Boolean variable constraint relaxation to obtain the relaxed two-layer nonlinear optimization model. In the process, the cost of purchasing and selling electricity is set in the lower-level objective function, and the purchase price and the sales price are made inconsistent. Building consumers trade electricity with aggregators; The linearization process for the bilayer correlation model includes objective function linearization and complementary relaxation condition linearization. Objective function linearization is based on the strong duality principle. The dual objective function of the lower-level linear objective function is equivalent to the original objective function. Substituting the lower-level dual objective function into the upper-level objective function achieves the linearization of the upper-level objective function. Complementary relaxation conditional linearization is achieved by introducing Boolean variables and a sufficiently large constant M; The objective function expression for the single-layer mixed-integer linear programming model is: ; In the formula, The objective function is the dual problem objective function of the lower-level objective function.

6. A two-tier decision-making system for co-trading electricity and carbon for building producers and consumers, employing the two-tier decision-making method for co-trading electricity and carbon for building producers and consumers as described in any one of claims 1-5, characterized in that, include: The module for constructing a two-tier optimization framework for electricity-carbon collaborative trading is used to build a two-tier optimization framework for electricity-carbon collaborative trading based on the functional responsibilities of upper-level aggregators and the carbon trading positioning of lower-level building prosumers. The carbon emission reduction dynamic mutual recognition mechanism construction module is used to classify individual buildings according to carbon emission compliance requirements based on the aforementioned electricity-carbon collaborative trading two-layer optimization framework; based on the differentiated compliance needs of individual buildings of a set type, according to the principle of emission reduction equivalence, and based on the green electricity consumption of each individual building in each scheduling period, calculate and obtain the mutual recognition amount of national certified voluntary emission reduction (CCER); the aggregator aggregates the mutual recognition amount of each individual building in each time period to form the CCER application amount and acts as an agent for the application; after the CCER certificate is approved, the CCER is allocated to the corresponding individual building according to the actual green electricity contribution of each individual building in the corresponding scheduling period, thus constructing a dynamic carbon emission reduction mutual recognition mechanism; A two-layer nonlinear optimization model construction module is used to construct objective functions for the upper-layer aggregator and the lower-layer building prosumer based on the two-layer optimization framework for electricity-carbon collaborative trading and the dynamic mutual recognition mechanism for carbon emission reduction, respectively; based on the objective functions, combined with the upper-layer constraints and the lower-layer constraints considering building heat balance, a two-layer nonlinear optimization model is constructed; the two-layer nonlinear optimization model includes an upper-layer model and a lower-layer model; A single-layer mixed-integer linear programming model acquisition module is used to perform Boolean variable constraint relaxation processing on the two-layer nonlinear optimization model to obtain a relaxed two-layer nonlinear optimization model. Based on the relaxed bilayer nonlinear optimization model, a Lagrangian function for the lower-level building producers and consumers is constructed. Based on the Lagrangian function, the lower-level model is transformed into additional constraints through KKT conditions and embedded into the upper-level model to generate a bilayer correlation model. The bilayer correlation model is linearized using the strong duality principle and the Big M method to obtain a single-level mixed integer linear programming model. The single-layer mixed-integer linear programming model solution module is used to solve the single-layer mixed-integer linear programming model by setting a commercial solver to obtain the decision results.

7. A two-tier decision-making system for collaborative electricity-carbon trading among building producers and consumers according to claim 6, characterized in that, In the aforementioned carbon emission reduction dynamic mutual recognition mechanism construction module, individual buildings are classified into industrial buildings, commercial and residential buildings, and zero-carbon buildings according to their carbon emission compliance requirements. Among them, industrial buildings are building units with mandatory carbon emission compliance requirements, commercial and residential buildings are building units without mandatory carbon emission compliance requirements and whose mutual recognized CCERs can be sold for profit, and zero-carbon buildings are building units that need to offset all their carbon emissions through mutual recognition of CCERs and the purchase of carbon quotas. The formula for calculating the CCER mutual recognition amount is as follows: ; ; In the formula, The amount of CCER obtained through mutual recognition; Mutual recognition factor; t represents the amount of green electricity consumed; t represents the time interval; i represents the building energy consumer number. Green electricity factor for electricity purchase; Photovoltaic power generation for building consumers; and These represent the electricity purchased and sold by building producers to aggregators, respectively.

8. A two-tier decision-making system for collaborative electricity-carbon trading among building producers and consumers according to claim 7, characterized in that, In the two-layer nonlinear optimization model construction module, the objective function expression of the upper-layer aggregator is: ; In the formula, The total number of consumers in the construction industry; The scheduling period; and These refer to the unit price of electricity purchased and sold by building producers and consumers from aggregators; and These refer to the unit price at which aggregators purchase and sell electricity from the upper-level power grid; and These refer to the aggregator's purchase and sale of electrical energy from the upstream power grid; , and , These refer to the unit price and quantity of carbon allowances purchased and sold by building producers and consumers from aggregators; , and , These refer to the unit price and quantity of carbon allowances that aggregators buy and sell from the carbon market; Cost coefficient for aggregators using energy storage equipment; and These are the charging and discharging power of the energy storage device; The objective function expression for the lower-level prosumers is: ; In the formula, and These refer to the power consumption of building producers and consumers when purchasing and selling electricity to aggregators.

9. A two-tier decision-making system for collaborative electricity-carbon trading among building producers and consumers according to claim 8, characterized in that, In the two-layer nonlinear optimization model construction module, the upper-layer constraints include: electricity purchase and sale price constraints, carbon quota purchase and sale incentive price constraints, grid electricity purchase and sale upper and lower limit constraints, carbon market carbon quota purchase and sale upper and lower limit constraints, energy storage device constraints, upper-layer power balance and carbon quota balance constraints. The lower-level constraints include: building thermal balance constraints, indoor temperature constraints, HVAC cooling power constraints, upper and lower limits constraints for electricity purchase and sale, photovoltaic equipment output constraints, upper and lower limits constraints for carbon quota purchase and sale, lower-level power balance and carbon quota balance constraints. In the process of constraining building thermal balance, an RC network model is used to describe the thermal dynamic process of a specified area, and to quantitatively characterize the thermal balance state between the wall and the area. The area consists of two types of nodes: wall nodes and area nodes. They are connected by thermal resistance with heat transfer capability and grounded by thermal capacity with heat storage capability to simulate the building's heat storage characteristics.

10. A two-tier decision-making system for collaborative electricity-carbon trading among building producers and consumers according to claim 9, characterized in that, In the single-layer mixed integer linear programming model acquisition module, the two-layer nonlinear optimization model is subjected to Boolean variable constraint relaxation processing to obtain the relaxed two-layer nonlinear optimization model. In the process, the cost of purchasing and selling electricity is set in the lower-layer objective function, and the purchase price and the sales price are made inconsistent. Building consumers trade electricity with aggregators; The linearization process for the bilayer correlation model includes objective function linearization and complementary relaxation condition linearization. Objective function linearization is based on the strong duality principle. The dual objective function of the lower-level linear objective function is equivalent to the original objective function. Substituting the lower-level dual objective function into the upper-level objective function achieves the linearization of the upper-level objective function. Complementary relaxation conditional linearization is achieved by introducing Boolean variables and a sufficiently large constant M; In the single-layer mixed-integer linear programming model acquisition module, the objective function expression of the single-layer mixed-integer linear programming model is: ; In the formula, The objective function is the dual problem objective function of the lower-level objective function.