Green electricity transaction allocation optimization method and system
Patent Information
- Application Number
- CN202611400579.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-10
- Publication Date
- 2026-10-09
AI Technical Summary
1、难以同时表达绿电供给侧、用户侧和交易线路约束
1、融合多源数据,提高分配结果一致性;本发明同时利用用户电量曲线、用户绿电比例参数、线路可分配用户关系和绿电单元供给曲线,使分配结果能够同时反映绿电供给侧、需求侧和交易关系约束,通过将多源异构数据统一转换为按时段排列的数据结构,避免了数据格式不一致导致的分配偏差,为后续优化求解提供了统一的数据基础;
Smart Images

Figure CN122887594A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power trading and energy management technology, specifically to a method and system for optimizing green electricity trading allocation based on virtual aggregation nodes and proportional allocation constraints, and more particularly to a method and system for optimizing green electricity trading allocation. Background Technology
[0002] As the scale of green electricity trading continues to expand, electricity retailers need to allocate green electricity among various green electricity trading lines, multiple seller trading units, and a large number of electricity users. In practice, the green electricity supply side typically has a supply curve that varies hourly, while the user side has constraints such as total electricity load curves, green electricity ratio requirements, green electricity grades, contracted electricity prices, thermal power prices, and acceptable green electricity trading relationships. Therefore, how to rationally allocate green electricity supply to users while satisfying the allocability of trading lines and user demand constraints is a crucial issue in green electricity trading settlement, performance management, and scheme review.
[0003] Existing green electricity allocation methods typically rely on human experience, simple proportional allocation, or single-rule matching, and have the following main shortcomings: 1. It is difficult to simultaneously represent the constraints of the green electricity supply side, user side, and trading lines. Existing methods often allocate electricity based solely on the user's total electricity consumption, contracted electricity consumption, or a uniform ratio, without fully considering the allocatable whitelist relationship between the trading lines and users. This can easily lead to inconsistencies between the allocation results and the trading relationship, agency relationship, or settlement boundary. When the number of users represented by the electricity sales company is large and the trading lines are complex, manual verification is costly and prone to errors, making it difficult to guarantee the consistency of the allocation results with the business boundary.
[0004] 2. Difficulty in distinguishing the allocation characteristics of different trading lines. In actual green electricity trading, centralized bidding and other trading lines may have different business implications and allocation rules. Centralized bidding usually allows flexible time-sharing allocation within a whitelist of users, while ordinary trading lines require allocation according to a preset ratio. If a unified allocation method is adopted, it is difficult to simultaneously take into account the flexible allocation capabilities of centralized bidding and the proportional allocation requirements of ordinary trading lines, resulting in the inaccurate expression of the business rules of some trading lines.
[0005] 3. Difficulty in balancing user green energy ratio requirements and overall allocation effectiveness. Different users have different minimum green energy ratios, maximum green energy ratios, green energy grades, and price parameters. Traditional manual allocation or simple ratio allocation cannot simultaneously control user ratio deviations, revenue targets, and user priorities. When user green energy ratio requirements are strict, hard constraint models are prone to infeasibility issues, while completely relaxing constraints will cause the allocation results to deviate from user needs, affecting the quality of performance.
[0006] 4. Lack of a reviewable allocation quality evaluation mechanism. Existing methods typically only output the allocated electricity volume, lacking a unified evaluation of dimensions such as total supply, allocated electricity volume, user ratio deviation, remaining green electricity, revenue indicators, and allocation sparsity. This hinders subsequent business review and parameter adjustment. After allocation, electricity sales companies find it difficult to quickly determine the rationality of the allocation plan and cannot iteratively optimize model parameters based on the evaluation results.
[0007] Therefore, there is a need for an automated green electricity allocation method that can integrate green electricity supply curves, user load curves, trading line whitelists, user green electricity ratio constraints, and result evaluation indicators to improve allocation efficiency, constraint consistency, and result interpretability. Summary of the Invention
[0008] To address the shortcomings of existing technologies, this invention provides a method and system for optimizing green electricity trading and allocation.
[0009] According to the present invention, a method and system for optimizing green electricity trading allocation are provided, the scheme of which is as follows: Firstly, a method for optimizing green electricity trading allocation is provided, the method comprising: Step S1: Read green electricity supply-side data, user electricity consumption-side data, and transaction line constraint data; Step S2: Construct a mapping relationship between transaction lines, seller transaction units, and users based on the read data; Step S3: Identify the allocation type of each trading line, wherein the allocation type includes at least free allocation and proportional allocation; Step S4: For freely allocated trading lines, abstract them as virtual aggregated supply nodes and flexibly allocate them within the corresponding allocable user range; for proportionally allocated trading lines, establish line-level proportional allocation constraints and allocate green electricity supply to the allocable users corresponding to the line according to the user allocation ratio. Step S5: Combining the upper limit constraint of user electricity demand and the user green electricity ratio requirement constraint, establish and solve the optimization model to obtain the green electricity allocation optimization scheme; Step S6: Output the time-of-use green electricity allocation results from the seller's trading unit to the user.
[0010] Preferably, the green electricity supply-side data, user electricity consumption-side data, and transaction line constraint data include: User electricity consumption curve data is used to represent the total electricity demand of each user in each time period; User green electricity ratio data is used to represent the upper and lower limits of each user's green electricity ratio, green electricity level, contracted electricity price and thermal power price parameters; The lines can be assigned user data to represent the whitelist relationship between each transaction line and the user; Green electricity unit curve data is used to represent the green electricity supply of each seller's trading unit under each trading line at each time period.
[0011] Preferably, the construction of the mapping relationship in step S2 includes: For each seller's transaction unit, record its transaction line, the whitelist of users that can be assigned to that transaction line, and the assignment type of that transaction line; A unique supply unit identifier is generated by using the combination of the transaction line name and the seller's transaction unit name to avoid identifier conflicts between sellers with the same name on different transaction lines. Only users who simultaneously possess valid supply lines, user electricity demand, and user green electricity ratio parameters are considered eligible to participate in optimized allocation.
[0012] Preferably, identifying the transaction line allocation type in step S3 includes: Identify the route allocation type based on the transaction route name or route attribute; If the transaction line name contains preset keywords, the line will be identified as a freely allocated line; otherwise, the line will be identified as a proportionally allocated line.
[0013] Preferably, the optimization model in step S5 further includes at least one of the following constraints: Supply allocation constraints: For freely allocated lines, the supply of seller transaction units in each time period is allocated to the range of users they are allowed to allocate; for proportionally allocated lines, the sum of the allocation ratios of users under the line meets the normalization requirement. User total demand upper limit constraint: The total green electricity obtained by any user shall not exceed its total electricity demand; User green electricity ratio constraint: The amount of green electricity obtained by any user falls within the interval corresponding to the lower limit and upper limit of its green electricity ratio, and the upper and lower limit deviation variables are introduced to penalize the ratio deviation; Assign sparsity constraints or penalties: Reduce unnecessary scattered assignments by assigning relational variables or sparsity penalty terms.
[0014] Preferably, in step S5, the optimization direction is to maximize the comprehensive objective or minimize the comprehensive cost. The comprehensive objective includes at least one of the following factors: green thermal power price difference revenue, user ratio deviation penalty, user level weight, and allocation sparsity penalty.
[0015] Preferably, in step S6, for freely allocated lines, the green electricity allocated by each seller's trading unit to each user in each time period is output; for proportionally allocated lines, the system generates corresponding time-sharing allocation results based on the line-level allocation ratio and the supply curve of the seller's trading unit.
[0016] Preferably, the result output in step S6 further includes at least one of the following evaluation information: The allocation details are used to record the transaction lines, seller transaction units, users, and the electricity allocated for each time period; The user's green electricity ratio verification results are used to record the user's total electricity consumption, allocated green electricity, actual green electricity ratio, and upper and lower limit deviations. The results of the analysis of remaining green electricity in the lines and units are used to check whether there is any surplus on the green electricity supply side. The user hourly consumption ratio result is used to check the user's green electricity consumption in different time periods; The evaluation indicators include total green electricity supply, total green electricity allocated, total green electricity demand, comprehensive benefits, proportion deviation, and allocation logarithm.
[0017] Secondly, a green electricity trading and allocation optimization system is provided, the system comprising: The data reading module is used to read green electricity supply-side data, user electricity consumption-side data, and transaction line constraint data; The mapping relationship construction module is used to construct the mapping relationship between transaction lines, seller transaction units and users based on the read data; A line type identification module is used to identify the allocation type of each transaction line, wherein the allocation type includes at least free allocation type and proportional allocation type; The optimization solution module is used to abstract the freely allocated transaction lines into virtual aggregated supply nodes and perform time-sharing flexible allocation within their corresponding allocable user range. For the proportional allocation transaction lines, line-level proportional allocation constraints are established, and green electricity allocation optimization schemes are solved by combining user electricity demand upper limit constraints and user green electricity ratio requirements. The results output module is used to output the time-of-use green electricity allocation results from the seller's trading unit to the user.
[0018] Preferably, the optimization solution module uses a solver that supports mixed integer linear programming to solve the green electricity allocation optimization scheme. The comprehensive objective includes at least one of the following: green-thermal power price difference revenue, user ratio deviation penalty, user level weight, and allocation sparsity penalty. Furthermore, the result output module also outputs at least one of the following: allocation details, user green electricity ratio verification results, line and unit remaining green electricity analysis results, user hourly consumption ratio results, and summary evaluation indicators.
[0019] Compared with the prior art, the advantages of the present invention are as follows: 1. Integrating multi-source data to improve the consistency of allocation results: This invention simultaneously utilizes user electricity consumption curves, user green electricity ratio parameters, line-allocable user relationships, and green electricity unit supply curves, enabling the allocation results to simultaneously reflect the constraints of green electricity supply, demand, and transaction relationships. By uniformly converting multi-source heterogeneous data into a data structure arranged by time period, allocation deviations caused by inconsistent data formats are avoided, providing a unified data foundation for subsequent optimization solutions. 2. Improve the consistency of line constraints; This invention restricts green electricity to be allocated only to users who meet the transaction relationship through the whitelist relationship between the transaction line and the user, reducing the risk of inconsistency between the allocation result and the business boundary. The whitelist mechanism strictly limits the range of users that can be allocated to each transaction line, avoiding the allocation of green electricity to users without transaction relationship, thereby ensuring the compliance of the allocation result in settlement verification and performance management. 3. Forming a modeling framework that combines virtual aggregation nodes with proportional allocation constraints; This invention models transaction lines with aggregation and allocation characteristics, such as centralized bidding transactions, as virtual aggregation nodes, and other transaction lines as proportional allocation lines, so that the same model can take into account both time-sharing flexible allocation and line-level proportional allocation rules. This dual-mode modeling framework can accurately express the business meaning of different transaction lines and avoid the problem of business rule distortion caused by a unified allocation method. 4. Balancing user green electricity ratio requirements and model feasibility: This invention uses upper and lower limits for user green electricity ratio constraints and a deviation penalty mechanism to ensure that the allocation results meet user green electricity ratio requirements as much as possible, while reducing the risk of model infeasibility due to the inability to fully meet the ratio requirements. The introduction of upper and lower limit deviation variables allows the model to still provide a suboptimal solution when the ratio constraints cannot be fully met, and the penalty term guides the solver to minimize deviations, thus balancing the strictness of constraints and the feasibility of the model. 5. Improve the interpretability of allocation results: This invention outputs evaluation indicators such as allocation details, user ratio deviation, supply surplus, comprehensive benefits, and allocation sparsity, which facilitates power sales companies to verify results, review plans, and adjust parameters. The multi-dimensional evaluation information enables business personnel to quickly locate anomalies in the allocation plan, such as excessive deviation in the user ratio or excessive surplus green electricity on a certain line, so as to adjust model parameters or business rules in a targeted manner and form a closed-loop optimization.
[0020] Other beneficial effects of the present invention will be explained in detail through the introduction of specific technical features and technical solutions in specific embodiments. Those skilled in the art should be able to understand the beneficial technical effects brought about by the technical features and technical solutions through the introduction of these technical features and technical solutions. Attached Figure Description
[0021] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart of the green electricity trading allocation optimization method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the relationship between multi-source input data provided in an embodiment of the present invention; Figure 3 A schematic diagram of virtual aggregation nodes and proportional allocation constraints provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the soft constraint on the user's green electricity ratio provided in an embodiment of the present invention; Figure 5 A diagram illustrating the evaluation index system for allocation results provided in this embodiment of the invention. Detailed Implementation
[0022] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0023] This invention provides a method for optimizing green electricity trading and allocation. By reading green electricity supply-side data, user electricity consumption-side data, and trading line constraint data, a mapping relationship is constructed between trading lines, seller trading units, and users. Trading lines that meet preset aggregation conditions are abstracted as virtual aggregation nodes, and time-sharing flexible allocation is performed within their allocable user range. Line-level proportional allocation constraints are established for other trading lines to ensure that green electricity supply is proportionally allocated to eligible users. Finally, by combining user electricity demand ceilings, user green electricity ratio requirements, and evaluation indicators, an optimized green electricity allocation scheme is solved. (Refer to...) Figure 1 As shown, this method demonstrates the complete process from input data reading, data standardization, mapping relationship construction, line type identification, optimization model solving to result output. Specifically, this method includes: Step S1: Read green electricity supply-side data, user electricity consumption-side data, and transaction line constraint data; Reference Figure 2 As shown, this illustrates how user electricity consumption curves, user green electricity ratios, and the curves of allocable users and green electricity units on power lines collectively form the supply, demand, and constraint basis of the optimization model. Specifically, the green electricity supply-side data, user electricity consumption-side data, and trading line constraint data include: User electricity consumption curve data is used to represent the total electricity demand of each user in each time period. This data is usually recorded in hours, showing the electricity load curve of each user in 24 hours, and is the basis for user-side demand constraints.
[0024] User green electricity ratio data is used to represent the upper and lower limits of each user's green electricity ratio, green electricity level, contracted electricity price, and thermal power price parameters; the lower limit of the green electricity ratio represents the minimum green electricity consumption ratio that the user requires to achieve, the upper limit of the green electricity ratio represents the highest green electricity consumption ratio that the user can accept, and the green electricity level and price parameters are used to calculate the comprehensive benefits.
[0025] The data on allocable users for each trading line represents the whitelist relationship between each trading line and its users. This data defines which users can be allocated the green electricity supply of each trading line, and is the core of the trading relationship constraints.
[0026] Green electricity unit curve data is used to represent the green electricity supply of each seller trading unit under each trading line at each time period. This data is recorded in hourly increments, showing the green electricity supply curve of each seller trading unit over 24 hours, and forms the basis for green electricity supply-side constraints.
[0027] The system standardizes the aforementioned data, converting the supply and consumption curves into a unified data structure arranged by time period, and matching transaction lines, seller transaction units, and user names. This standardization process ensures consistency in time granularity, naming conventions, and data format across different sources, laying the foundation for subsequent mapping relationship construction and optimization.
[0028] Step S2: Construct a mapping relationship between transaction lines, seller transaction units, and users based on the read data; For each seller's transaction unit, record its associated transaction line, the whitelist of users that can be assigned to that transaction line, and the assignment type of that transaction line.
[0029] To avoid identifier conflicts between seller trading units with the same name under different trading lines, the system generates unique supply unit identifiers using the format "trading line name + seller trading unit name". For example, the unique identifier for seller trading unit "Wind Farm A" under the trading line "Centralized Competitive Bidding" is "Centralized Competitive Bidding_Wind Farm A", while the unique identifier for seller trading units with the same name under the trading line "Bilateral Negotiation Trading" is "Bilateral Negotiation Trading_Wind Farm A", and the two do not conflict with each other.
[0030] During allocation, only users who simultaneously possess valid supply lines, user electricity demand, and green electricity ratio parameters are considered eligible for optimized allocation. If a trading line does not have a corresponding green electricity supply curve, that line is not considered a valid supply line for this optimization. This screening mechanism ensures that the optimization model only processes users and lines with complete data foundations, avoiding model infeasibility or distorted allocation results due to missing data.
[0031] Step S3: Identify the allocation type for each trading line. The allocation type must include at least two types: free allocation and proportional allocation. (Refer to...) Figure 3 As shown, this demonstrates a modeling approach where centralized bidding transactions are used as virtual aggregation nodes and non-centralized bidding transactions are used as proportional allocation transaction lines.
[0032] Step S4: For freely allocated trading lines, abstract them as virtual aggregated supply nodes and flexibly allocate them within the corresponding allocable user range; for proportionally allocated trading lines, establish line-level proportional allocation constraints and allocate green electricity supply to the allocable users corresponding to the line according to the user allocation ratio.
[0033] In one implementation, if the trading line name contains "centralized competitive bidding", the line is identified as a freely allocated line; otherwise, the line is identified as a proportionally allocated line.
[0034] For freely allocated lines, they can be understood as a freely allocated virtual aggregation supply node. The green electricity supply under this type of line can be flexibly allocated according to time period within its whitelist of users.
[0035] For proportional allocation lines, the system adopts a line-level proportional allocation method, that is, the supply under the same trading line is allocated to users in the line whitelist according to the user allocation ratio.
[0036] Through the above dual-mode modeling, this invention can express both the flexible allocation characteristics of centralized bidding transactions and the business rules of proportional allocation of other trading lines.
[0037] It should be noted that the proportional allocation constraint referred to in this invention mainly refers to the line-level user allocation ratio constraint under the proportional allocation type transaction line, including the proportional normalization constraint and the constraint of forming the time-sharing allocation result according to the supply curve of the seller's transaction unit; the upper and lower limits of the user green electricity ratio constraint are established separately as demand-side constraints.
[0038] Step S5: Combining the upper limit constraint of user electricity demand and the user's green electricity ratio requirement constraint, establish and solve the optimization model to obtain the optimal green electricity allocation scheme. (Refer to...) Figure 4 As shown, this illustrates the relationship between a user's total electricity demand, the lower limit of green electricity, the upper limit of green electricity, the actual allocated amount of green electricity, and the deviation between the upper and lower limits.
[0039] Specifically, when constructing the optimization model, the system considers at least the following constraints: 1. Supply Allocation Constraints. For freely allocated lines, the supply of each seller's trading unit in each time period should be allocated to the users it is allowed to allocate to; for proportionally allocated lines, the sum of the allocation ratios of users under the line should meet the normalization requirement. This constraint ensures that green electricity supply is allocated only to whitelisted users, and that the total supply of proportionally allocated lines is fully allocated.
[0040] 2. Maximum Constraint on Total User Demand. The total amount of green electricity received by any user should not exceed their total electricity demand to avoid the allocation exceeding the user's absorption capacity. This constraint ensures that the allocation result is physically feasible and that no user receives more green electricity than their actual electricity demand.
[0041] 3. User Green Electricity Ratio Constraints. The amount of green electricity obtained by any user should, as far as possible, fall within the interval corresponding to the lower and upper limits of its green electricity ratio. To reduce the risk of the model becoming infeasible due to the inability to fully meet the ratio constraints, the system can introduce upper and lower limit deviation variables to penalize ratio deviations. Specifically, when a user's actual green electricity ratio is lower than the lower limit, the lower limit deviation variable records the deviation amount below the lower limit; when a user's actual green electricity ratio is higher than the upper limit, the upper limit deviation variable records the deviation amount exceeding the upper limit. The deviation variables are assigned a penalty coefficient in the objective function to guide the solver to minimize deviations.
[0042] 4. Assign sparsity constraints or penalties. The system can reduce unnecessary decentralized allocation by assigning relational variables or sparsity penalty terms, thereby reducing subsequent settlement, verification, and manual interpretation costs. Sparsity penalties encourage the centralized allocation of green electricity to a small number of users, rather than decentralized allocation to a large number of users, making the allocation results easier for business interpretation and verification.
[0043] The system aims to maximize the overall objective or minimize the overall cost. This overall objective may include factors such as the green-to-thermal power price difference revenue, user proportion deviation penalty, user level weights, and allocation sparsity penalty. The green-to-thermal power price difference revenue reflects the price difference revenue a user receives from using green electricity relative to thermal power; the user proportion deviation penalty reflects the degree to which a user's green electricity proportion deviates from the upper or lower limits; the user level weights reflect the priority of different users; and the allocation sparsity penalty controls the dispersion of the allocation results.
[0044] The solver can be Gurobi, SCIP, OR-Tools, or other solvers that support mixed-integer linear programming. All of these solvers can handle optimization models containing continuous variables, integer variables, and linear constraints, providing optimal or near-optimal solutions within a reasonable timeframe.
[0045] Step S6: After the solution is completed, the system outputs the time-of-use green electricity allocation results from the seller's trading unit to the user. (Refer to...) Figure 5As shown, this illustrates the relationship between green electricity supply-side indicators, user-side indicators, economic indicators, deviation indicators, and sparsity indicators.
[0046] For freely allocated lines, the system outputs the green electricity allocated to each user by each seller's trading unit in each time period. For proportionally allocated lines, the system generates corresponding time-sharing allocation results based on the line-level allocation ratio and the supply curve of the seller's trading unit. The allocation results are output in the form of tables or data files, recording the green electricity allocated to each user by each seller's trading unit in each time period, which facilitates subsequent settlement verification and performance management.
[0047] The system can also output the following result evaluation information: 1. Allocation Details: This section records the electricity allocated to transaction lines, seller transaction units, users, and time periods. The allocation details provide a complete record of the allocation results and support querying and statistics by transaction line, seller transaction unit, or user.
[0048] 2. User green electricity ratio verification results are used to record the user's total electricity consumption, allocated green electricity, actual green electricity ratio, and upper and lower limit deviations. These results help business personnel determine whether each user's green electricity ratio requirements are met and whether the deviation is within an acceptable range.
[0049] 3. The analysis results of remaining green electricity for lines and units are used to check whether there is a surplus of green electricity supply. If the green electricity supply of a certain line or a certain seller's trading unit has not been fully allocated, the remaining green electricity analysis results will indicate the remaining amount, prompting business personnel to adjust the whitelist or supply plan.
[0050] 4. User hourly consumption ratio results are used to check the green energy consumption of users in different time periods. This result displays the green energy consumption ratio of each user at the hourly level, helping business personnel identify periods of uneven consumption.
[0051] 5. Summary evaluation indicators, including total green electricity supply, total green electricity already allocated, total green electricity demand, comprehensive benefits, proportion deviation, and allocation logarithm, etc. Summary evaluation indicators reflect the quality of the allocation plan at an overall level, facilitating power sales companies to compare plans and optimize parameters.
[0052] Explanation of relevant formulas and variables: Let the user set be The transaction route set is The seller's transaction unit set is The time period set is .user During the period Total electricity demand is Seller's transaction unit During the period Green electricity supply for .user The total electricity demand during the cycle is ,user The total green electricity obtained over the period is .
[0053] Total electricity demand for the user's cycle
[0054] User total demand upper limit constraint
[0055] Soft constraint on the lower limit of user green electricity ratio
[0056] Soft constraint on the upper limit of user green electricity ratio
[0057] in, and Representing users respectively The lower limit and upper limit of green electricity ratio; This indicates the deviation amount below the lower limit; This indicates the deviation exceeding the upper limit.
[0058] An example of a comprehensive objective function:
[0059] in, Indicates user Green electricity prices Indicates user The price of thermal power, Indicates user level weight. This represents the proportional deviation penalty coefficient. and This represents the sparsity penalty coefficient for allocation. and This represents auxiliary variables related to the allocation relationship.
[0060] The above formula illustrates one feasible modeling method of the present invention. In actual implementation, the objective function and parameter weights can be adjusted according to the business requirements.
[0061] This invention also provides a green electricity trading and allocation optimization system. This system can be implemented by executing the steps of the green electricity trading and allocation optimization method. That is, those skilled in the art can understand the green electricity trading and allocation optimization method as a preferred embodiment of the green electricity trading and allocation optimization system. The system specifically includes: The data reading module is used to read green electricity supply-side data, user electricity consumption-side data, and transaction line constraint data. The data read by this module includes at least user electricity consumption curve data, user green electricity ratio data, line-allocated user data, and green electricity unit curve data. The module also standardizes the read data, converting the supply curve and consumption curve into a unified data structure arranged by time period.
[0062] The mapping relationship construction module is used to construct the mapping relationship between transaction lines, seller transaction units, and users based on the read data. This module records the transaction line to which each seller transaction unit belongs, the whitelist of assignable users, and the allocation type, and generates a unique supply unit identifier.
[0063] The line type identification module is used to identify the allocation type of each trading line, which includes at least free allocation and proportional allocation. This module identifies the line based on its name or attributes; if the line name contains preset keywords, it is identified as free allocation; otherwise, it is identified as proportional allocation.
[0064] The optimization solution module abstracts freely allocable trading lines into virtual aggregated supply nodes and performs time-sharing flexible allocation within their corresponding allocable user ranges. For proportionally allocated trading lines, it establishes line-level proportional allocation constraints and solves for green electricity allocation optimization schemes by combining user electricity demand ceiling constraints and user green electricity ratio requirements. This module uses a solver supporting mixed-integer linear programming to solve the green electricity allocation optimization scheme. The comprehensive objective includes at least one of the following: green-thermal power price difference revenue, user ratio deviation penalty, user level weight, and allocation sparsity penalty.
[0065] The results output module is used to output the time-of-use green electricity allocation results from the seller's trading unit to the user. This module also outputs at least one of the following: allocation details, user green electricity ratio verification results, line and unit remaining green electricity analysis results, user hourly consumption ratio results, and summary evaluation indicators.
[0066] Next, we will provide a more detailed explanation of this specific implementation method using a green electricity distribution business scenario of an electricity sales company.
[0067] In a specific application scenario, an electricity sales company acts as an agent for multiple users to participate in green electricity trading, involving multiple trading lines and multiple seller trading units. The system first reads four types of data: user electricity consumption curves, user green electricity ratios, curves of users and green electricity units that can be allocated to a line, and then performs data standardization processing.
[0068] Subsequently, the system determines the effective supply lines based on the green electricity unit curve, establishes a user whitelist for each line based on the available user data for each line, and constructs a mapping relationship between trading lines, seller trading units, and users. For seller trading units with the same name, the system generates a unique identifier using the format "trading line name + seller trading unit name" to avoid conflicts.
[0069] Then, the system identifies the type of transaction line allocation. For centralized bidding transaction lines, the system treats them as freely allocable virtual aggregation supply nodes and allocates them in a time-sharing manner within their allocable user range; for other transaction lines, the system adopts a line-level proportional allocation method.
[0070] Based on this, the system establishes an optimization model and calls a solver to solve it, taking into account factors such as the upper limit of total user electricity demand, the upper and lower limits of user green electricity ratio, the price difference between green and thermal power, user level weights, and allocation sparsity. The solver uses a mixed-integer linear programming algorithm to maximize the comprehensive objective function while satisfying all constraints.
[0071] After the solution is completed, the system generates the 24-hour green electricity allocation results from the seller's trading unit to the user, and outputs allocation details, user ratio verification results, remaining green electricity supply results, and summary evaluation indicators. The above output results can be used for green electricity settlement verification, performance analysis, allocation scheme review, and subsequent parameter optimization.
[0072] In one specific embodiment, the system optimizes the allocation based on input data from multiple users, multiple trading lines, and multiple seller trading units, obtaining evaluation results such as total supply, allocated green electricity, user ratio deviation, comprehensive revenue, and allocation logarithm. This embodiment demonstrates that the present invention can automatically generate interpretable green electricity allocation schemes under the constraints of trading line whitelists and user green electricity ratio requirements, significantly improving allocation efficiency, constraint consistency, and result interpretability.
[0073] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, enabling the system and its various devices, modules, and units provided in this specific embodiment to be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided in this specific embodiment can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0074] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A method for optimizing the allocation of green electricity trading, characterized in that, include: Step S1: Read green electricity supply-side data, user electricity consumption-side data, and transaction line constraint data; Step S2: Construct a mapping relationship between transaction lines, seller transaction units, and users based on the read data; Step S3: Identify the allocation type of each trading line, wherein the allocation type includes at least free allocation and proportional allocation; Step S4: For freely allocated trading lines, abstract them as virtual aggregated supply nodes and flexibly allocate them within the corresponding allocable user range; for proportionally allocated trading lines, establish line-level proportional allocation constraints and allocate green electricity supply to the allocable users corresponding to the line according to the user allocation ratio. Step S5: Combining the upper limit constraint of user electricity demand and the user green electricity ratio requirement constraint, establish and solve the optimization model to obtain the green electricity allocation optimization scheme; Step S6: Output the time-of-use green electricity allocation results from the seller's trading unit to the user.
2. The green electricity trading allocation optimization method according to claim 1, characterized in that, The green electricity supply-side data, user electricity consumption-side data, and transaction line constraint data include: User electricity consumption curve data is used to represent the total electricity demand of each user in each time period; User green electricity ratio data is used to represent the upper and lower limits of each user's green electricity ratio, green electricity level, contracted electricity price and thermal power price parameters; The lines can be assigned user data to represent the whitelist relationship between each transaction line and the user; Green electricity unit curve data is used to represent the green electricity supply of each seller's trading unit under each trading line at each time period.
3. The green electricity trading allocation optimization method according to claim 1, characterized in that, The step S2 of constructing the mapping relationship includes: For each seller's transaction unit, record its transaction line, the whitelist of users that can be assigned to that transaction line, and the assignment type of that transaction line; A unique supply unit identifier is generated by using the combination of the transaction line name and the seller's transaction unit name to avoid identifier conflicts between sellers with the same name on different transaction lines. Only users who simultaneously possess valid supply lines, user electricity demand, and user green electricity ratio parameters are considered eligible to participate in optimized allocation.
4. The green electricity trading and allocation optimization method according to claim 1, characterized in that, The identification of transaction line allocation type in step S3 includes: Identify the route allocation type based on the transaction route name or route attribute; If the transaction line name contains preset keywords, the line will be identified as a freely allocated line; otherwise, the line will be identified as a proportionally allocated line.
5. The green electricity trading allocation optimization method according to claim 1, characterized in that, The optimization model in step S5 also includes at least one of the following constraints: Supply allocation constraints: For freely allocated lines, the supply of seller transaction units in each time period is allocated to the range of users they are allowed to allocate; for proportionally allocated lines, the sum of the allocation ratios of users under the line meets the normalization requirement. User total demand upper limit constraint: The total green electricity obtained by any user shall not exceed its total electricity demand; User green electricity ratio constraint: The amount of green electricity obtained by any user falls within the interval corresponding to the lower limit and upper limit of its green electricity ratio, and the upper and lower limit deviation variables are introduced to penalize the ratio deviation; Assign sparsity constraints or penalties: Reduce unnecessary scattered assignments by assigning relational variables or sparsity penalty terms.
6. The green electricity trading allocation optimization method according to any one of claims 1-5, characterized in that, In step S5, the optimization direction is to maximize the comprehensive objective or minimize the comprehensive cost. The comprehensive objective includes at least one of the following factors: green thermal power price difference revenue, user ratio deviation penalty, user level weight, and allocation sparsity penalty.
7. The green electricity trading allocation optimization method according to claim 6, characterized in that, In step S6, for freely allocated lines, the green electricity allocated by each seller's trading unit to each user in each time period is output; for proportionally allocated lines, the system generates corresponding time-sharing allocation results based on the line-level allocation ratio and the supply curve of the seller's trading unit.
8. The green electricity trading allocation optimization method according to claim 7, characterized in that, The output of step S6 also includes at least one of the following evaluation information: The allocation details are used to record the transaction lines, seller transaction units, users, and the electricity allocated for each time period; The user's green electricity ratio verification results are used to record the user's total electricity consumption, allocated green electricity, actual green electricity ratio, and upper and lower limit deviations. The results of the analysis of remaining green electricity in the lines and units are used to check whether there is any surplus on the green electricity supply side. The user hourly consumption ratio result is used to check the user's green electricity consumption in different time periods; The evaluation indicators include total green electricity supply, total green electricity allocated, total green electricity demand, comprehensive benefits, proportion deviation, and allocation logarithm.
9. A green electricity trading and allocation optimization system, based on the green electricity trading and allocation optimization method of claim 8, characterized in that, include: The data reading module is used to read green electricity supply-side data, user electricity consumption-side data, and transaction line constraint data; The mapping relationship construction module is used to construct the mapping relationship between transaction lines, seller transaction units and users based on the read data; A line type identification module is used to identify the allocation type of each transaction line, wherein the allocation type includes at least free allocation type and proportional allocation type; The optimization solution module is used to abstract the freely allocated transaction lines into virtual aggregated supply nodes and perform time-sharing flexible allocation within their corresponding allocable user range. For the proportional allocation transaction lines, line-level proportional allocation constraints are established, and green electricity allocation optimization schemes are solved by combining user electricity demand upper limit constraints and user green electricity ratio requirements. The results output module is used to output the time-of-use green electricity allocation results from the seller's trading unit to the user.
10. The green electricity trading and allocation optimization system according to claim 9, characterized in that, The optimization solution module uses a solver that supports mixed integer linear programming to solve the green electricity allocation optimization scheme. The comprehensive objective includes at least one of the following: green-thermal power price difference revenue, user ratio deviation penalty, user level weight, and allocation sparsity penalty. The result output module also outputs at least one of the following: allocation details, user green electricity ratio verification results, line and unit remaining green electricity analysis results, user hourly consumption ratio results, and summary evaluation indicators.