Green electricity supply and demand intelligent matching method and system

CN122887113APending Publication Date: 2026-10-09STATE GRID ANHUI ELECTRIC POWER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611377693.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

用户需求和新能源出力均具有明显时间相关性,如果仅采用静态画像、固定权重或历史平均值进行撮合,难以适应绿电出力波动和用户需求快速变化

Benefits of technology

[0045]有益效果:在满足电网硬约束和绿码有效性约束的前提下,构建多目标优化模型,综合提升用户偏好满足度、用户绿电匹配潜力、绿码权益适配度、绿电消纳率和交易执行效率,同时降低交易成本、传输网损和电网运行风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122887113A_ABST
    Figure CN122887113A_ABST
Patent Text Reader

Abstract

The application provides a green electricity supply and demand intelligent matching method and system, belongs to the field of energy data intelligent calculation, encodes a user historical behavior sequence to obtain a user green electricity behavior expression matrix; a user inter-topology overlapping distance matrix is constructed, the user inter-topology overlapping distance matrix is mapped into a green electricity preference module label of each user, and a central behavior feature is extracted; a user green electricity matching potential is calculated, a user preference prediction vector is calculated and corrected; an interest adaptation degree is calculated, a candidate matching priority of a user and a green code resource is calculated, a green code resource with an interest adaptation degree reaching an interest matching threshold and a candidate matching priority reaching a potential matching threshold is added to a candidate matching set of the user; a power grid constraint check is performed on the candidate matching set, a multi-objective optimization model is constructed, a solution is solved, and a matching scheme is output; execution is performed, and it is judged whether the execution result is consistent with the plan; user satisfaction, power grid safety, green code credibility, user preference module interpretability and business closed loop are considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent energy data computing technology, and in particular to a method and system for intelligent matching of green electricity supply and demand. Background Technology

[0002] As the construction of new power systems deepens and the installed capacity of renewable energy sources such as wind power and photovoltaics continues to expand, green electricity trading, green certificate collaboration, green electricity consumption certification, and per-kilowatt-hour coding are gradually moving from the policy guidance stage to a stage of refined management. Green electricity is no longer just a clean energy product statistically measured by electricity volume in the traditional sense, but is gradually evolving into a composite energy commodity with electrical value, environmental value, time value, spatial value, and rights certification value. Against this backdrop, how to accurately match green electricity resources to users with differentiated needs, while taking into account the safe operation of the power grid, the validity of green code rights, and the credibility of transaction performance during the matching process, has become an important issue faced by green electricity trading platforms, electricity sales companies, park energy management systems, and power grid companies.

[0003] From the power supply side, green electricity such as wind and solar power exhibits significant randomness, volatility, and intermittency. Existing research indicates that the integration of a high proportion of renewable energy sources increases the uncertainty of power system flexibility requirements and alters traditional dispatch methods, posing challenges to maintaining power balance in the new power system. Furthermore, the time scale and volatility characteristics of wind and solar power output differ from load demand, necessitating the matching of appropriate flexibility resources and dispatch time scales based on supply and demand fluctuations. Other studies show that wind and solar power generation is significantly affected by weather conditions, exhibiting strong volatility, intermittency, and randomness. Large-scale grid integration can easily lead to regional energy supply and demand imbalances and constrain the capacity for renewable energy absorption. Therefore, in the process of matching green electricity supply and demand, static matching based solely on contracted or declared electricity volumes without predicting future green electricity supply capacity can easily result in problems such as unfulfilled matching schemes, insufficient green code benefits, idle green electricity resources, or low absorption efficiency.

[0004] From the load side, user electricity consumption behavior and green electricity consumption demand also exhibit significant differences and dynamism. Different types of users differ considerably in terms of production cycles, energy consumption structures, price sensitivity, green electricity ratio requirements, carbon accounting needs, and green brand requirements. Existing research on green electricity pricing mechanisms indicates that, under the renewable energy quota system, electricity retailers need to meet user electricity demand while fulfilling quota targets. Different types of users have differentiated needs for electricity product combinations; therefore, it is necessary to construct user utility and benefit functions and design differentiated green electricity pricing mechanisms such as tiered, time-of-use, and fixed-rate pricing to improve user acceptance and promote renewable energy consumption. This suggests that green electricity supply and demand matching should not only aim at electricity balance but also incorporate user preferences for green electricity products, price affordability, green attribute requirements, and electricity consumption behavior characteristics into the decision-making process.

[0005] Existing methods typically describe user preferences using static user profiles, fixed preference weights, or historical average behavior. While these methods are simple to implement, they struggle to reflect the temporal patterns of user preferences and are ill-suited for situations with insufficient historical data, significant behavioral fluctuations, or incomplete expression of preferences.

[0006] Furthermore, user preferences are not static but constantly changing with time, price, production plans, holidays, carbon accounting cycles, and historical trading experiences. Research in the demand response field indicates that, in the context of new power system construction, the exploration and utilization of flexible resources on the residential side has become a crucial issue for grid regulation. User electricity consumption behavior is characterized by randomness, variability, and rapid change, necessitating analysis and pattern recognition using historical load data. Related research utilizes LSTM to time-series encode users' 24-hour load curves, extracting deep temporal features from user load behavior and applying them to user electricity consumption pattern clustering and response potential assessment, providing data support for differentiated resource allocation and response strategy formulation. Therefore, in the scenario of intelligent matching of green electricity supply and demand, introducing time-series neural networks such as LSTM to model users' historical load, historical green electricity procurement behavior, price response, and performance feedback can more accurately predict users' future green electricity preferences and demand changes. While ordinary LSTM models can capture the temporal characteristics of user load and purchasing behavior, if only a single user is modeled independently, there are still problems such as insufficient utilization of commonalities among users, weak interpretability of preference identification, and significant impact of abnormal user behavior on prediction results.

[0007] Users with similar industry attributes, electricity consumption patterns, green electricity procurement behaviors, price sensitivities, and fulfillment feedback often exhibit similar green electricity consumption preferences and matching response capabilities. If this covariation can be identified at the user group level, and users are divided into several green electricity preference modules, then when historical samples of individual users are insufficient or their behavior fluctuates significantly, their preferences can be corrected using the central characteristics of similar user modules, thereby improving the stability and interpretability of user preference identification.

[0008] From the grid perspective, matching green electricity supply and demand is not simply a market-driven issue; it must meet the operational constraints of the real power grid or equivalent grid. A high proportion of renewable energy integration exacerbates source-load uncertainty, making economic dispatch and safe operation more complex. Existing research indicates that renewable energy output is affected by meteorological factors, exhibiting intermittency and uncontrollability, increasing the difficulty of system power balance. The spatiotemporal mismatch between renewable energy output and load demand necessitates the allocation of more flexible resources, while economic dispatch needs to optimize resource allocation and improve renewable energy absorption efficiency while ensuring system safety and stability. Furthermore, deep learning dispatch research shows that the increasingly complex structure of modern power grids makes traditional dispatch methods insufficient for management needs; deep learning algorithms can be used to improve the operational efficiency and stability of power systems. However, dispatch models still need to consider fundamental physical constraints such as generation constraints, load balance constraints, and energy storage operation constraints. Therefore, the green electricity supply and demand matching results must be verified by constraints such as line capacity, node voltage, power balance, network loss level, regional accessibility, and safety risks; otherwise, it is easy to create matching schemes that are tradable in the market but unenforceable in the grid.

[0009] From the perspective of green code rights management, the value of assigning codes to each unit of electricity lies not only in establishing source identification for green electricity, but also in connecting data from the generation side, trading side, grid side, user side, and certification side, enabling each green right to be identified, tracked, verified, and updated. In existing green electricity trading or green certificate coordination methods, green codes or certificates often appear as proof materials after the transaction is completed, mainly used to demonstrate that a certain amount of electricity has green attributes, but rarely participate in pre-transaction resource screening, user preference adaptation, grid constraint verification, and dynamic updates of matching results. This can easily lead to a disconnect between green electricity resources, user demand, grid physical constraints, and green rights: on the one hand, the green electricity purchased by users may meet the contracted electricity volume requirements, but may not fully meet their preferences for power source type, generation time, regional source, and certification attributes; on the other hand, the green electricity rights confirmed by the trading system may not fully reflect the grid constraint verification results and actual performance deviations.

[0010] In summary, although existing technologies have conducted research in areas such as user load behavior identification, green electricity pricing mechanism design, renewable energy dispatch optimization, supply and demand matching evaluation, and deep learning dispatch, they still have at least the following shortcomings: (1) Existing methods do not adequately consider the temporal changes in user preferences and green electricity supply. Both user demand and renewable energy output have significant time correlations. If only static profiles, fixed weights, or historical averages are used for matching, it is difficult to adapt to fluctuations in green electricity output and rapid changes in user demand.

[0011] (2) Existing LSTM-based preference identification methods usually only focus on the time-series prediction of a single user and lack modeling of the covariation relationship of green electricity consumption behavior among users. It is difficult to identify user preference modules at the group level, resulting in insufficient structurality and interpretability of preference identification.

[0012] (3) The existing green electricity trading matching is not closely integrated with the physical constraints of the power grid. Some methods focus on market transactions and price mechanisms, but do not take line capacity, node voltage, power flow accessibility, network loss threshold and operation risk as hard constraints or penalty items in the matching process, resulting in insufficient engineering feasibility of the matching results.

[0013] (4) The existing green code benefits are more of a result proof than fully embedded in the entire supply and demand matching process. Information such as power source type, power generation time, power generation area, certification status, available power and environmental attributes of the green code have not been fully used for candidate resource screening, suitability evaluation and multi-objective optimization decision making.

[0014] (5) The existing matching mechanism lacks execution feedback and self-learning closed loop. After the matching scheme is executed, the user confirmation results, actual metered electricity, actual green power output, power flow deviation and green code status changes fail to correct the user preference model, green power supply prediction model and power grid risk assessment model in a timely manner, making it difficult for the system to continuously improve the matching accuracy as operating data accumulates.

[0015] Therefore, it is necessary to propose a smart matching method for green electricity supply and demand that integrates user preferences and grid constraints to address the problems of "insufficient user preferences, insufficient grid constraints, insufficient green code participation, and insufficient feedback loop" in the existing green electricity trading matching, and to provide technical support for the refined matching of green electricity supply and demand and the implementation of the electricity code assignment business. Summary of the Invention

[0016] The technical problem to be solved by this invention is: how to establish a smart matching method for green electricity supply and demand that takes into account user satisfaction, grid security, green code credibility, interpretability of user preference modules, and business closed loop under the conditions of fluctuating green electricity supply, differentiated user demand, dynamic changes in grid operation status, and the need for accurate verification of green rights.

[0017] This invention solves the above-mentioned technical problems through the following technical solution: a smart matching method for green electricity supply and demand, comprising: The user's historical behavior sequence is encoded to obtain the user's green electricity behavior expression matrix. Based on the user's green electricity behavior expression matrix, a topological overlap distance matrix between users is constructed. The topological overlap distance matrix between users is mapped to the green electricity preference module label of each user, and the central behavioral features of each green electricity preference module are extracted. The user's green electricity matching potential is calculated based on the normalized deviation and correlation between the user's green electricity demand prediction curve and the green electricity matching baseline. Based on the user's green electricity behavior expression matrix, the central behavioral features of each green electricity preference module, and the user's green electricity matching potential, the user preference prediction vector is calculated and corrected. The rights and interests matching degree between users and green code resources is calculated based on the corrected user preference prediction vector. The candidate matching priority between users and green code resources is calculated based on the rights and interests matching degree and the user's green electricity matching potential. Green code resources that have reached the rights and interests matching threshold and the candidate matching priority have reached the potential matching threshold are added to the user's candidate matching set. The candidate matching set is verified by power grid constraints. Based on the verified candidate matching set, a multi-objective optimization model is constructed, and the multi-objective function is solved until the optimization results converge. The matching scheme is then output. Execute the matching scheme and determine whether the execution result is consistent with the plan. If yes, generate a green code write-back field; otherwise, analyze the deviation between the execution result and the plan and generate a green code write-back field.

[0018] Beneficial Effects: This invention encodes users' historical behavior sequences to extract deep temporal features of users' green electricity consumption behavior. Based on the user green electricity behavior expression matrix, it constructs a topological overlap distance matrix between users and maps this matrix to green electricity preference module labels for each user. This enables the identification of user preference modules and the determination of users' green electricity matching potential. Through grid constraint verification and solving a multi-objective optimization model, the output matching scheme achieves a comprehensive balance among user satisfaction, green code compatibility, green electricity consumption rate, transaction costs, transmission network losses, and operational risks. Finally, through execution feedback and kilowatt-hour code writing back, it achieves consistent linkage between green electricity matching results, rights status, and business systems, thus addressing the problems of "insufficient user preferences, insufficient grid constraints, insufficient green code participation, and insufficient feedback loop" in existing green electricity transaction matching.

[0019] Preferably, the process of encoding user historical behavior sequences to obtain a user green electricity behavior expression matrix includes: Input the user's historical behavior sequence into the Long Short-Term Memory network to obtain the hidden state at each historical moment; The hidden state at each historical moment is input into the attention weighting layer, and the attention score at each historical moment is output. The attention weight for each historical moment is calculated based on the attention score at each historical moment. Calculate the attention weight and the weighted sum of the hidden states at each historical moment to obtain the user's attention-enhanced temporal behavior features. Construct a user green electricity behavior expression matrix based on the attention-enhanced temporal behavior features of all users.

[0020] Beneficial effects: By using a multi-task attention-enhanced LSTM model to learn changes in user green electricity demand, user electricity consumption behavior, green electricity resource output, and grid constraint risks, deep temporal features of user green electricity consumption behavior are extracted, and key historical periods and key influencing factors that have a significant impact on future green electricity matching decisions are identified.

[0021] Preferably, the process of constructing a topological overlap distance matrix between users based on the user green electricity behavior expression matrix, and mapping the topological overlap distance matrix between users to the green electricity preference module labels of each user includes: The user green electricity behavior expression matrix includes the attention-enhancing time-series behavioral characteristics of all users, based on user... and users Attention enhancement temporal behavior characteristics, calculating user and users The correlation coefficient; Build a user using a soft threshold function and users The weighted adjacency matrix; Calculate users separately and users In the user green electricity preference co-transformation network, the connectivity is used to construct a topological overlap matrix based on the connectivity and weighted adjacency matrix. ; based on Build users and users The user topological overlap distance matrix; Hierarchical clustering or dynamic shearing methods are used to identify the green electricity preference module tags for each user.

[0022] Beneficial effects: The WGCNA method is used to construct a user green electricity preference covariation network to identify user preference modules with similar green electricity consumption preferences, similar price sensitivity, similar authentication requirements, and similar performance response capabilities.

[0023] Preferably, the process of calculating the user's green energy matching potential based on the normalized deviation and correlation between the user's green energy demand forecast curve and the green energy matching baseline includes: A green electricity matching benchmark is constructed based on the predicted supply level of green electricity, the predicted value of grid risk, the level of available rights and interests of green codes, and the price of green electricity. Calculate the normalized deviation between the user green electricity demand forecast curve and the green electricity matching baseline. Correlation ; Calculate the user's green electricity matching potential based on the degree of normalization deviation and correlation:

[0024] in, Indicates user The potential for green electricity matching for users These are the weighting coefficients.

[0025] Beneficial effects: By constructing a green electricity matching baseline, the system can characterize the expected green electricity consumption ratio, green electricity confirmation intensity, or transferable green electricity demand level within the target period. The user's green electricity matching potential can be calculated based on the degree of deviation and correlation between the user's green electricity demand forecast curve and the green electricity matching baseline.

[0026] Preferably, the process of revising the user preference prediction vector includes: The user preference prediction vector and the central behavioral features of the green electricity preference module to which the user belongs are respectively transformed into structured individual preference vectors and module preference center vectors; The corrected implicit preferences are calculated based on the individual preference vector and the module preference center vector:

[0027] in, For users The revised implicit preferences. For users Individual preference vectors, For users Green electricity preference module The module preference center vector, For individual preference confidence coefficients; Determine whether the user has explicit declared preferences. If so, merge the explicit declared preferences and the corrected implicit preferences to obtain the corrected user preference prediction vector; otherwise, use the corrected implicit preferences as the corrected user preference prediction vector.

[0028] Beneficial effects: Correcting individual user preference vectors based on module central features improves the stability and interpretability of user preference recognition.

[0029] Preferably, the process of calculating the matching degree of rights and interests between users and green code resources based on the corrected user preference prediction vector includes: Green code rights labels are constructed based on valid green code rights that have available power, are not locked, and are not repeatedly occupied, and mutual exclusion constraints for green codes are set. Calculate users With green code resources The compatibility of rights and interests between them :

[0030] in, This represents the first element in the corrected user preference prediction vector. The weighted components corresponding to class preference attributes Indicates green code resources With users In the One-to-one matching score on class attributes A set of preference attributes; The set of preferred attributes includes power source type, generation time, regional source, price, certification validity, low-carbon attributes, and compliance stability. The power source type matching score is as follows:

[0031] Power type Indicates user Acceptable set of green electricity types; The time period matching score is:

[0032] Indicates user The target electricity consumption period or the green electricity demand period; Indicates green code resources The corresponding power generation period; This represents the time-period difference attenuation coefficient, and ; The region matching score is:

[0033] Indicates the regional distance attenuation coefficient; Indicates user With green electricity resources The normalized geographical distance, electrical distance, or equivalent path distance between them; Price matching score:

[0034] Indicates green electricity resources During the period The quoted price, the reference price for the transaction, or the unit price including the green electricity premium; Indicates user The highest acceptable unit price for green electricity; This indicates a very small positive number that prevents the denominator from being zero; The certification validity score is:

[0035] In authentication status; The performance stability score is:

[0036] Provide confidence in green electricity This represents the historical performance deviation rate.

[0037] Beneficial effects: It transforms users' subjective preferences and the characteristics of the user's preference module into calculable preference weights, and breaks down green code rights into standardized labels such as power type, power generation time, power generation area, certification status, green attributes, available power, and performance reliability, thereby constructing a method for evaluating the fit between users and green electricity resources.

[0038] Preferably, the process of performing power grid constraint verification on the candidate matching set includes: Constructing a candidate matching set of users Load nodes and green energy resources Candidate matching power of the power generation node :

[0039] in, Indicates user Forecasted green electricity demand Indicates green electricity resources The projected supply quantity The green code indicates the amount of electricity you can use. Indicates the maximum pre-calibrated core energy quantity allowed for the candidate relationship; Based on candidate matching power For users Load nodes and green energy resources The power of the generating nodes is updated to obtain the net node injection after candidate matching is added. :

[0040]

[0041] in, This represents the net injection of the baseline node before the addition of candidate matches. Inject changes into nodes. Indicates that the grid connection node is The equivalent incremental injection brought by the candidate green energy resources. Indicates the power receiving node is The equivalent load increment brought by candidate users; Net node injection after adding candidate matches Input the power flow model or power flow sensitivity model to calculate the line power flow, node voltage, network loss and operational risk, and verify the power balance constraints, line capacity constraints, node voltage constraints and regional accessibility constraints; Based on the characteristics of power grid operation status and the external meteorological and equipment status characteristics of green electricity resources, the predicted value of power grid constraint risk is calculated, the predicted value of power grid constraint risk is mapped to matching risk, and the power grid risk constraint is verified based on the matching risk. Calculate users Load nodes and green energy resources The transmission loss of the power generation node is calculated, the path loss coefficient is calculated based on the transmission loss, and the network loss threshold constraint is verified based on the path loss coefficient. Candidate matching relationships that simultaneously satisfy power balance constraints, line capacity constraints, node voltage constraints, regional accessibility constraints, grid risk constraints, and grid loss threshold constraints are placed into the candidate matching set.

[0042] Beneficial effects: After the green electricity candidate matching relationship is generated, the power grid physical constraint verification is further embedded to ensure that the matching scheme meets constraints such as power balance, line capacity, node voltage, regional accessibility, network loss threshold, safety risk, and trading rules. Here, the regional accessibility and source-load path are not limited to the only actual path of physical power flow, but refer to the verifiable source-load relationship formed based on power grid topology, power flow calculation, power flow sensitivity, equivalent transmission path, or virtual tracking path recognized by trading rules.

[0043] Preferably, the multi-objective optimization model includes a comprehensive objective function and constraints, wherein the comprehensive objective function is:

[0044] in, Indicates user With green electricity resources During the period Matching power, For users With green code resources The degree of alignment of rights and interests between them Indicates user green electricity resources During the period Preference satisfaction Indicates user During the period The potential for green electricity matching for users This represents the transaction cost per unit of matched electricity. Indicates user and green electricity resources Path loss coefficient, Indicates user and green electricity resources Matching risk, , , , , , , These represent the weighting coefficients for green code compatibility benefits, user preference satisfaction benefits, green electricity consumption benefits, user green electricity matching potential benefits, transaction costs, transmission network losses, and grid risk penalties, respectively. The constraints include: user demand constraints, green electricity resource forecast availability constraints, green code rights availability constraints, green electricity ratio constraints, green code unique matching constraints, minimum transaction volume constraints, and grid feasible region constraints.

[0045] Beneficial effects: Under the premise of meeting the hard constraints of the power grid and the validity constraints of the green code, a multi-objective optimization model is constructed to comprehensively improve the satisfaction of user preferences, the potential of users to match green electricity, the adaptability of green code rights, the green electricity consumption rate and the efficiency of transaction execution, while reducing transaction costs, transmission network losses and power grid operation risks.

[0046] Preferably, the process of analyzing the deviation between the execution results and the plan includes: Deviations between the execution results and the plan include: user demand deviation, green electricity supply deviation, grid constraint deviation, user module deviation, green electricity matching potential deviation, and grid loss estimation deviation. Different update strategies are implemented for different types of deviations: For user demand deviations, user preference weights are updated; for green electricity supply deviations, actual output results are added to the training samples, and the parameters of the green electricity resource temporal coding layer, attention layer, and green electricity supply prediction output layer are updated; for grid constraint deviations, risk penalty weights are increased; for user module deviations, the correlation of user behavior features, weighted adjacency matrix, and topological overlap matrix are recalculated based on the latest execution feedback, and the green electricity preference module to which the user belongs is updated; for green electricity matching potential deviations, the green electricity matching baseline is updated based on actual green electricity supply, actual user confirmed electricity volume, grid verification results, and green code write-back results; for grid loss estimation deviations, path loss coefficients are updated.

[0047] Beneficial effects: After the matching scheme is executed, the LSTM model parameters, attention weights, user preference modules, green electricity matching guideline, supply confidence, risk penalty coefficient and grid constraint threshold are updated based on user confirmation results, actual metered electricity, actual green electricity output, power flow verification deviation, user module deviation degree and performance status.

[0048] Preferred, green code write-back field for:

[0049]

[0050] in, For matching numbers, Number the user. Assign a number to the user's green electricity preference module. Number the main power generation unit. The green code number To match time periods, To match the battery level, For effective green electricity generation, To score the fit, Matching users with the potential of green electricity For power grid verification number, To predict the network loss coefficient, Risk level, The health code is green. For timestamps, For evidence summary; The rules for updating green health code status are as follows:

[0051] This indicates the updated green health code status. This indicates the green code number or the number participating in this match. A green health code resource identifier.

[0052] Beneficial effects: The final matching result is written into the extended field of the electricity code, so that the green code not only records the source of power generation, but also the user preference module, the user's green electricity matching potential, the source-load matching relationship, the effective green electricity volume, the suitability score, the grid constraint verification result, the risk level, the execution status and the audit evidence summary, thereby achieving data consistency between green electricity transaction settlement, consumption certification, green certificate collaboration, write-off and audit evidence storage.

[0053] This invention also provides a smart matching system for green electricity supply and demand, comprising: The user preference module identification unit is used to encode the user's historical behavior sequence to obtain the user's green electricity behavior expression matrix; based on the user's green electricity behavior expression matrix, a topological overlap distance matrix between users is constructed, and the topological overlap distance matrix between users is mapped to the green electricity preference module label of each user, and the central behavioral features of each green electricity preference module are extracted; the user's green electricity matching potential is calculated according to the normalized deviation and correlation between the user's green electricity demand prediction curve and the green electricity matching baseline; based on the user's green electricity behavior expression matrix, the central behavioral features of each green electricity preference module, and the user's green electricity matching potential, the user preference prediction vector is calculated and corrected. The green code rights and interests matching unit is used to calculate the rights and interests matching degree between users and green code resources based on the corrected user preference prediction vector, calculate the candidate matching priority between users and green code resources based on the rights and interests matching degree and the user's green electricity matching potential, and add green code resources with rights and interests matching degree reaching the rights and interests matching threshold and candidate matching priority reaching the potential matching threshold to the user's candidate matching set. The power grid constraint verification unit is used to perform power grid constraint verification on the candidate matching set. The multi-objective optimization matching unit is used to construct a multi-objective optimization model based on the verified candidate matching set, solve the multi-objective function until the optimization result converges, and output the matching scheme. The code writing-back unit is used to execute the matching scheme and determine whether the execution result is consistent with the plan. If so, a green code writing-back field is generated; otherwise, the deviation between the execution result and the plan is analyzed and a green code writing-back field is generated. Attached Figure Description

[0054] Figure 1 This is a schematic diagram of the intelligent matching method for green electricity supply and demand provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of data preprocessing and supply-demand matching sample construction in the intelligent matching method for green electricity supply and demand provided in Embodiment 1 of the present invention; Figure 3 This is a flowchart of the LSTM-based user preference and green electricity supply time-series prediction method for intelligent matching of green electricity supply and demand provided in Embodiment 1 of the present invention. Figure 4 This is a flowchart of the power grid constraint verification and multi-objective optimization matching of green electricity supply and demand in the intelligent matching method for green electricity supply and demand provided in Embodiment 1 of the present invention; Figure 5 This is a flowchart of the matching execution feedback, model update, and green code assignment and write-back process in the intelligent matching method for green electricity supply and demand provided in Embodiment 1 of the present invention. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0056] Example 1 like Figure 1 As shown, this embodiment provides a smart matching method for green electricity supply and demand, including the following steps: Step 1: Encode the user's historical behavior sequence to obtain the user's green electricity behavior expression matrix; construct the user topological overlap distance matrix based on the user's green electricity behavior expression matrix, map the user's topological overlap distance matrix to the green electricity preference module label of each user, and extract the central behavioral features of each green electricity preference module; calculate the user's green electricity matching potential based on the normalized deviation and correlation between the user's green electricity demand prediction curve and the green electricity matching baseline; calculate the user preference prediction vector based on the user's green electricity behavior expression matrix, the central behavioral features of each green electricity preference module, and the user's green electricity matching potential, and correct the user preference prediction vector.

[0057] This invention obtains user historical behavior sequences by collecting multi-source data, preprocessing the data, and constructing samples. The following sections first introduce the multi-source data, the data preprocessing process, and the sample construction process: The multi-source data of this invention includes six categories. The first category is user-side data, including user number, user type, industry type, historical load curve, current metered electricity consumption, historical green electricity procurement records, historical green electricity confirmation results, user price sensitivity, user green electricity ratio requirements, user carbon accounting cycle, user acceptable power source type, user acceptable area range, user performance deviation records, user matching acceptance rate, user preference declaration information, etc.

[0058] The second category is generation-side data, including generation entity number, generation node, energy type, historical output, predicted output, tradable electricity volume, grid connection area, equipment status, generation time, number of available green codes, status of available green certificates, historical performance deviations, and supply confidence.

[0059] The third category is green code rights data, including green code number, power generation entity, power generation time, energy type, power generation area, corresponding electricity volume, green certificate status, validity period, whether it has been matched, whether it has been cancelled, whether it has been locked, environmental attributes, evidence hash, divisible status, and smallest code unit, etc.

[0060] The fourth category is power grid operation data, including power grid topology, node voltage, node phase angle, node injected power, branch power flow, line capacity, line impedance, transformer status, switch status, cross-sectional limits, network loss level, power flow calculation results, and safety verification results.

[0061] The fifth category is market transaction data, including transaction periods, transaction prices, user quotations, generator-side quotations, transaction rules, contracted electricity volume, deviation assessment rules, settlement types, transaction priorities, green electricity premiums, and ancillary service prices.

[0062] The sixth category is external auxiliary data, including weather, temperature, wind speed, light intensity, holidays, production plans, industry load characteristics, carbon market prices, and regional energy supply and demand status.

[0063] The above multi-source data in the target time period It can be uniformly represented as:

[0064] in, This represents user-side data. This represents the data from the power generation side. This indicates green code rights data. This represents power grid operation data. Represents market transaction data. This indicates external auxiliary data.

[0065] The system further organizes various types of data into state vectors for matching calculations:

[0066] in, Represents the user demand state vector. Represents the state vector of green electricity supply. This represents the green code status vector. Represents the power grid operating state vector. Represents the market transaction state vector. This represents the external environment state vector.

[0067] During implementation, the system can divide time windows into 15-minute, 30-minute, or 1-hour periods. For intraday transactions with high real-time requirements, a 15-minute or 30-minute time window is preferred; for monthly green electricity settlement or green certificate collaborative authentication, a 1-hour or daily aggregated time window is preferred.

[0068] See Figure 2 Because data from different sources have differences in sampling frequency, units of measurement, numbering system and data quality, unified preprocessing must be performed before entering the multi-task attention-enhanced LSTM-WGCNA model and the optimization model.

[0069] First, align the multi-source data according to a unified time window. Let the set of unified time windows be:

[0070] For any data source Its original sampling time is The system maps it to a unified time window. :

[0071] in, At the starting time, To standardize the time window length, This indicates rounding down to the nearest integer.

[0072] If a data point exists at multiple sampling points within a target time window, it can be aggregated using the average, maximum, minimum, or end values. For continuous variables such as load, electricity price, and output, the average value is preferred.

[0073] in, Indicates falling within the time window The set of sampling points. For state variables such as line over-limit, green code status, and transaction status, terminal values ​​or logical state values ​​are preferred.

[0074] The system then determines whether the data is missing or abnormal. For any feature... Set a binary validity mask:

[0075] When the data missing rate does not exceed the threshold In this case, the system uses interpolation for completion:

[0076] in, For interpolation weights, These are the completed eigenvalues.

[0077] For data with a clear daily or weekly cycle, weighted completion can be used:

[0078] in:

[0079] In the formula, This indicates the number of sampling points per day. This indicates the number of sampling points for one week.

[0080] For data that clearly exceeds physical boundaries, the system performs anomaly removal. For example, node voltages must meet the following requirements:

[0081] The line load rate must meet the following requirements:

[0082] To be included in the candidate resource pool with a green health code, the following conditions must be met:

[0083] And satisfy:

[0084] If the green code status is locked, verified, or expired, it will not be included in the candidate matching calculation.

[0085] After anomaly handling, the system standardizes the data. For features with clearly defined value ranges, max-min normalization is used:

[0086] in, To prevent extremely small positive numbers with a denominator of zero.

[0087] For features with large fluctuations such as load, electricity price, and power flow, standard deviation is used for standardization:

[0088] in, For the first The sample mean of class features, Standard deviation To prevent extremely small positive numbers with a denominator of zero.

[0089] To eliminate differences in electricity consumption among different users, the system employs shape normalization for the user's daily load curve:

[0090] in, This represents the set of sampling points within a day. The normalized user load pattern characteristics To prevent extremely small positive numbers with a denominator of zero.

[0091] Furthermore, to support the identification of user green electricity preferences, the system constructs a user green electricity behavior expression matrix. This matrix is ​​organized by user as the row and features such as historical load patterns, green electricity procurement ratio, green electricity confirmation results, price response strength, performance deviation, green code certification preference, low-carbon attribute preference, and transaction acceptance rate as the columns. These features are used for subsequent LSTM time-series coding and the construction of the WGCNA user preference covariation network.

[0092] For users Its standardized behavioral sequence within the historical window is represented as follows:

[0093] in, The length of the history input window. For users During the period The comprehensive state vector includes information such as load, transactions, price, green code confirmation, performance feedback, and external environment.

[0094] After standardization, the system constructs a sliding time window sample. The system uses the historical input window length... and prediction step size Generate input and output samples:

[0095]

[0096] in, For all users in time periods The comprehensive state vector includes user-side state, green electricity supply-side state, green code rights state, grid operation state, market transaction state, and external auxiliary state. User preference tags, This refers to the future supply of green electricity resources. As a label for future power grid constraints and risks, Match users with potential labels for green electricity. Grid constraint risk labels can be constructed from historical safety verification results, line load rate, cross-sectional margin, node voltage deviation, grid loss level, number of over-limit occurrences, or operational risk level.

[0097] If the sample missing rate is below a threshold, the outlier rate is below a threshold, and the temporal continuity requirement is met, then the sample is added to the training set, validation set, or test set; otherwise, it is returned to the previous set. Figure 2 The data correction process needs to be reprocessed.

[0098] See Figure 3 , Figure 3 This is a flowchart of step 1 in the intelligent matching method for green electricity supply and demand provided by the present invention. The system will... Figure 2 The standardized time window samples output are input into the multi-task attention-enhanced LSTM-WGCNA model to complete user temporal behavior encoding, key period attention weighting, user green electricity preference module identification, and dynamic parameter prediction, respectively.

[0099] Unlike conventional LSTM, which only performs time-series predictions for individual users, this invention first utilizes LSTM to extract deep time-series features of users' green electricity consumption behavior. Then, it uses WGCNA to construct a co-variation network of green electricity preferences among users, identifying user preference modules with similar green electricity consumption behaviors, similar price response characteristics, and similar fulfillment stability. Based on this, the system combines individual user characteristics and module group characteristics to output user preference vectors, green electricity supply forecasts, grid constraint risk coefficients, and user green electricity matching potential.

[0100] The process of encoding user historical behavior sequences to obtain a user green electricity behavior expression matrix includes: Step 1.1.1: Input the user's historical behavior sequence into a Long Short-Term Memory (LSTM) network to obtain the hidden state at each historical moment.

[0101] For users Its historical behavior input sequence is:

[0102] in, Indicates the length of the history input window. Indicates user During the period The comprehensive state vector.

[0103] The system first uses LSTM to encode the user's historical behavior sequence. The core calculation process is as follows:

[0104]

[0105]

[0106]

[0107]

[0108]

[0109] In the formula, The "Forgotten Gate" determines the degree to which historical information is preserved. , These are the weight matrix and bias vector of the forget gate, respectively; This is the input gate, which determines the current level of information being written. , These are the weight matrix and bias vector of the input gate, respectively; Candidate memory states, , Calculate the corresponding weight matrix and bias vector for each candidate memory state; This is the unit state; For output gate, , These are the weight matrix and bias vector of the output gate, respectively; It is in a hidden state; This is the hidden state from the previous moment. This refers to the cell state at the previous time step. This is the user's overall state vector input at the current moment; Use the Sigmoid activation function; This indicates element-wise multiplication.

[0110] Step 1.1.2: Input the hidden state of each historical moment into the attention weighting layer and output the attention score of each historical moment.

[0111] To enhance the model's ability to identify key historical periods, an attention-weighted layer is added after the LSTM hidden state sequence. Let the hidden state sequence within the historical window be:

[0112] Then historical moment The attention score is:

[0113] in, Representing historical moments The corresponding attention score; Indicates LSTM at historical moments The hidden state of the output; This represents the weight matrix of the attention-weighted layer; This represents the bias vector of the attention-weighted layer; Represents the attention score mapping vector; This represents the hyperbolic tangent activation function.

[0114] Step 1.1.3: Calculate the attention weight for each historical moment based on the attention score for each historical moment.

[0115] Attention weights are:

[0116] in, Representing historical moments The corresponding attention weights; Representing historical moments The corresponding attention score; Index of the summation time within the historical input window; Representing historical moments The corresponding attention score; to This represents all historical moments covered by the historical input window. The denominator represents the sum of the attention score index values ​​for all historical moments within this historical input window, used to evaluate the current moment. The attention scores were normalized.

[0117] Step 1.14: Calculate the attention weight and the weighted sum of the hidden states at each historical moment to obtain the user's attention-enhanced temporal behavior features, and construct the user green electricity behavior expression matrix based on the attention-enhanced temporal behavior features of all users.

[0118] Attention-weighted user temporal behavior characteristics are as follows:

[0119] in, Representing historical moments The weight of the impact on the current prediction task. Indicates user Attention-enhancing temporal behavioral characteristics.

[0120] After applying the same encoding to all users, a user green electricity behavior expression matrix is ​​formed:

[0121] in, This represents the number of users participating in the matching process. This matrix is ​​used to construct a user green electricity preference co-variation network.

[0122] The process of constructing a topological overlap distance matrix between users based on the user green electricity behavior expression matrix, and mapping the topological overlap distance matrix between users to the green electricity preference module labels of each user includes: Step 1.2.1: The user green electricity behavior expression matrix includes the attention-enhancing temporal behavior characteristics of all users, based on user... and users Attention enhancement temporal behavior characteristics, calculating user and users Correlation coefficient:

[0123] in, Indicates user During the period Attention-enhancing temporal behavioral characteristics Indicates user During the period Attention-enhancing temporal behavioral characteristics This represents the function for calculating the correlation coefficient.

[0124] Step 1.2.2: Construct user data using a soft threshold function. and users The weighted adjacency matrix.

[0125]

[0126] in, Indicates user and users The weighted adjacency matrix, This is a soft threshold parameter used to strengthen connections between strongly related users and weaken weakly related connections.

[0127] Step 1.2.3: To improve the robustness of the network structure and the continuity of module partitioning, the system further constructs a topological overlap matrix and calculates the user... and users In the user green electricity preference co-transformation network, the connectivity is used to construct a topological overlap matrix based on the connectivity and weighted adjacency matrix. :

[0128] in: Indicates user With users During the period Topological overlap is used to measure the similarity and degree of common connectivity between two users in the user green electricity preference co-transformation network; and Both represent user indexes, corresponding to users respectively. and users ; This represents the intermediate user index in the co-generation network representing users' green electricity preferences, used to traverse the network excluding users. and users Other users besides; Indicates user With users During the period The weighted adjacency value; Indicates user With users During the period The weighted adjacency value; Indicates user With users During the period The weighted adjacency value; and Representing users respectively and users Connectivity in user green electricity preference co-generation networks; Indicates user With users The smaller value in the connectivity score. A higher topological overlap indicates a larger number of users. With users Those with more similar green electricity consumption behaviors, price response characteristics, certification preferences, and performance stability are more likely to be classified into the same green electricity preference module.

[0129]

[0130] Indicates user Connectivity in user green electricity preference co-transformation networks.

[0131] Step 1.2.4, based on Build users and users User topological overlap distance matrix:

[0132] in, Indicates the target time period The user topological overlap distance matrix, its th Line 1 Column elements are .

[0133] Step 1.2.5: Identify the green electricity preference module tags for each user using hierarchical clustering or dynamic shearing methods.

[0134]

[0135] in, This represents a user preference module identification function, used to map the topological overlap distance matrix between users to module labels for each user. It is not a regular algebraic function or a neural network function that needs to be trained through backpropagation, but a module partitioning process consisting of hierarchical clustering and dynamic tree cutting; This indicates that the module's identification process is for the user. The output module number is denoted as .

[0136] For each user's green electricity preference module The system extracts the central features of the module:

[0137] in, Indicates belonging to a module The user set, This represents the core behavioral characteristics of the module. The core characteristics of the module are used to describe the typical green electricity consumption preferences, price response characteristics, authentication preferences, and performance stability of this type of user.

[0138] The process of calculating the user's green energy matching potential based on the normalized deviation and correlation between the user's green energy demand forecast curve and the green energy matching baseline includes: Step 1.3.1: Construct a green electricity matching baseline based on the green electricity forecast supply level, grid risk forecast value, green code available rights level and green electricity price; the green electricity matching baseline is used to characterize the system's expected green electricity consumption ratio, green electricity confirmation intensity or transferable green electricity demand level within the target period.

[0139]

[0140] in, Indicates time period Green electricity matching standards; This represents the normalized system-level green energy forecast supply level, which is the forecast supplyable quantity of each green energy resource output by the green energy supply forecasting task. The result is obtained by aggregation and normalization; This represents the normalized system-level or regional-level power grid risk prediction value, which is the line, node, or regional risk prediction value output by the power grid risk prediction task. The result is obtained by aggregation and normalization; This represents the normalized level of available rights and benefits for the green code, calculated from the green code rights and benefits database. This indicates the normalized green electricity price or green electricity premium status, obtained from the market trading system. , , , These are the weighting coefficients, and the sum of the four is 1; This indicates that the results will be restricted to... Interval.

[0141] Step 1.3.2: Calculate the normalized deviation between the user green electricity demand forecast curve and the green electricity matching baseline. Correlation :

[0142] in, Indicates user Forecasted green electricity demand This represents a preset minimum positive number to prevent the denominator from being zero.

[0143] The correlation between the user's green electricity demand curve and the green electricity matching baseline is:

[0144] Step 1.3.3: Calculate the user's green electricity matching potential based on the degree of normalization deviation and correlation:

[0145] in, Indicates user The potential for users to match green electricity This is a weighting coefficient. The larger this index is, the more consistent the user's future demand curve is with the system's green electricity matching target, and the more suitable they are as priority matching users.

[0146] It should be noted that the present invention trains the multi-task attention-enhanced LSTM-WGCNA model using the samples constructed in step 1, and can obtain the trained multi-task attention-enhanced LSTM-WGCNA model. The trained multi-task attention-enhanced LSTM-WGCNA model is then used to predict the output user preference prediction vector, the future supply of green electricity resources, the grid constraint risk prediction value, and the user's green electricity matching potential (the user's future green electricity matching potential prediction value).

[0147] The system is based on individual user time-series characteristics User's module center features Potential for matching users with green electricity Construct a multi-task output layer:

[0148]

[0149]

[0150]

[0151] in, For user preference prediction vectors, Forecasting the future supply of green electricity resources This represents the predicted value of power grid constraint risk. For users, the predicted potential value of matching green electricity in the future, Historical characteristics of green energy resources This refers to the external meteorological and equipment status characteristics of green electricity resources. This refers to the characteristics of the power grid's operating status.

[0152] In the above multi-task output layer:

[0153]

[0154]

[0155]

[0156] in, This represents the user preference task output mapping, outputting the normalized multidimensional preference weights; This represents the output mapping of the green electricity supply forecasting task, outputting a non-negative forecast of the available green electricity supply. This represents the output mapping of power grid risk tasks, with the output located at... Risk value of the range; This represents the output mapping of the green electricity matching potential task, with the output located at... The matching potential value of the interval. (In each function) and These represent the weight matrix and bias vector of the corresponding task's output layer, respectively.

[0157] The training loss function can be set as follows:

[0158] in, Predicting loss based on user preferences Forecasting losses for green electricity supply For predicting losses due to power grid risks, Predict losses for users' green electricity matching potential. For user preference module consistency loss, to Weights are assigned to the losses of each task.

[0159] Specifically:

[0160]

[0161]

[0162]

[0163]

[0164] Through the above methods, the present invention can not only predict the future green electricity preferences of individual users, but also identify the covariation structure of green electricity preferences at the user group level, making user preference modeling more structural, interpretable and generalizable.

[0165] To prevent prediction results from directly impacting matching decisions due to localized outliers, the system can set confidence levels for the prediction results. Taking green electricity supply prediction as an example, the confidence level used to optimize decisions before trading is:

[0166] in, This represents the uncertainty in model predictions, or the standard deviation calculated from historical prediction errors. In the denominator... This indicates the projected supply of green electricity resources. This represents the smallest positive number that prevents the denominator from being zero due to a predicted value of zero. The post-hoc confidence level used for feedback correction after execution is:

[0167] Pre-trade optimization model adopts The execution feedback phase adopts .when When the level falls below a set threshold, the system reduces the priority of the green energy resource in the optimization model or requires it to enter the backup resource pool, thereby improving the reliability of the matching scheme.

[0168] The process of revising the user preference prediction vector includes: Step 1.4.1: Convert the user preference prediction vector and the central behavioral features of the green electricity preference module to which the user belongs into structured individual preference vectors and module preference center vectors, respectively.

[0169] The user preference predictions output by the multi-task attention-enhanced LSTM-WGCNA model are transformed into structured preference vectors. For users... Its individual preference vector is represented as:

[0170] in, Weighting for power type preference, For the preference weight of power generation period, For regional source preference weights, As a price preference weight, Weighting of green certificate or green code authentication preferences. Weighting of low-carbon attribute preferences, Weights for performance stability preferences.

[0171] Each preference weight satisfies:

[0172] in, This is a set of preference attributes.

[0173] Step 1.4.2: Calculate the corrected implicit preferences based on the individual preference vector and the module preference center vector:

[0174] in, For users The revised implicit preferences. For users Individual preference vectors, For users Green electricity preference module The module preference center vector, This represents the confidence coefficient for individual preferences. When historical user data is sufficient and preference stability is high... Take the larger value; when there is little historical data for users or their behavior fluctuates greatly, the system increases the weight of the module preference center, thereby enhancing the stability of preference recognition.

[0175] Step 1.4.3: Determine whether the user has explicit declared preferences. If so, merge the explicit declared preferences and the modified implicit preferences to obtain the modified user preference prediction vector; otherwise, use the modified implicit preferences as the modified user preference prediction vector.

[0176]

[0177] in, This is the corrected user preference prediction vector. Explicitly declare user preferences. These are implicit preferences that have been modified by the module. Let be the fusion coefficient, and .

[0178] Corrected user preference vector This is used for subsequent calculation of green code benefit compatibility, multi-objective optimization matching, and generation of backup matching schemes. By introducing a user preference module, the system can avoid preference identification bias caused by relying solely on the historical data of a single user, and can supplement and correct user preferences based on the behavior of similar user groups.

[0179] Step 2: Calculate the benefit fit between users and green code resources based on the corrected user preference prediction vector. Calculate the candidate matching priority between users and green code resources based on the benefit fit and the user's green code matching potential. Add green code resources whose benefit fit reaches the benefit matching threshold and whose candidate matching priority reaches the potential matching threshold to the user's candidate matching set. The process of calculating the matching degree between users and green code resources based on the corrected user preference prediction vector includes: Step 2.1: Construct green code benefit labels based on valid green code benefits that have available power, are not locked, and are not repeatedly occupied, and set green code mutual exclusion constraints.

[0180] For each green code benefit that can be used for matching, a label vector is created:

[0181] in, Power type For power generation area, During the power generation period, In the authentication status, For low-carbon or environmental attributes, For the sake of contract performance reliability, For price attributes, For matching battery capacity.

[0182] Only those green code holders who meet the following conditions can be included in the candidate resource pool:

[0183]

[0184]

[0185]

[0186] In other words, the green code must be valid, have available power, not be locked, and not be used repeatedly.

[0187] To further ensure the uniqueness of green code rights, the system can set mutual exclusion constraints for green codes:

[0188] in, Indicates green code resources Is it during the time period? Assigned to user When the green code benefits are represented by an indivisible minimum coded unit, the above uniqueness constraint is applied; when the green code benefits are allowed to be split by electricity, the green code resources can be split into multiple sub-green code units (when the electricity benefit corresponding to a green code is allowed to be split, it is split into multiple sub-green code units with independent sub-numbers and determined electricity benefits according to the minimum coded granularity), or the uniqueness constraint can be adjusted to the available electricity constraint.

[0189] After outputting the user preference vector, user preference module, user green electricity matching potential, and green electricity supply forecast, the system calculates the benefit-fit degree between users and green code resources. Let the final user preference vector, formed by integrating explicit user declaration preferences, implicit individual preferences, and the central features of the user's preference module, be:

[0190] in, Represents the end-user preference vector The Middle The weighted components corresponding to class preference attributes.

[0191] Step 2.2, Calculate users With green code resources The compatibility of rights and interests between them :

[0192] in, This represents the first element in the corrected user preference prediction vector. The weighted components corresponding to class preference attributes Indicates green code resources With users In the Individual match scores on class attributes, with each individual match score normalized to... This improves the overall adaptability. satisfy , This is a set of preference attributes.

[0193]

[0194]

[0195] in, Indicates the power type matching score. This indicates the matching score for the power generation period. Indicates the regional source matching score. This indicates the price matching score. Indicates the certification validity score. This indicates the score for low-carbon attributes. This indicates the score for contract performance stability.

[0196] The set of preferred attributes includes power source type, generation time, regional source, price, certification validity, low-carbon attributes, and compliance stability. The power source type matching score is as follows:

[0197] Indicates user Acceptable set of green electricity types; The time period matching score is:

[0198] Indicates user The target electricity consumption period or the green electricity demand period; Indicates green code resources The corresponding power generation period; This represents the time-period difference attenuation coefficient, and The closer the user's demand period is to the green electricity generation period, the closer the time period matching score is to 1.

[0199] The region matching score is:

[0200] Indicates the regional distance attenuation coefficient; Indicates user With green electricity resources The normalized geographical distance, electrical distance, or equivalent path distance between them.

[0201] Price matching score:

[0202] Indicates green electricity resources During the period The quoted price, the reference price for the transaction, or the unit price including the green electricity premium; Indicates user The highest acceptable unit price for green electricity; This indicates an extremely small positive number that prevents the denominator from being zero; when the resource price is not higher than the user's acceptable price, the price matching score is 1; when the resource price exceeds the user's acceptable price, the matching score decreases with the excess ratio, but is not less than 0.

[0203] The certification validity score is:

[0204] In authentication status; The performance stability score is:

[0205] Provide confidence in green electricity This represents the historical performance deviation rate.

[0206] After calculating the benefit-fitness ratio, this invention calculates the candidate matching priority between the user and green code resources based on the benefit-fitness ratio and the user's green electricity matching potential. Green code resources whose benefit-fitness ratio reaches the benefit-matching threshold and whose candidate matching priority reaches the potential matching threshold are added to the user's candidate matching set. With green code resources Candidate matching priority The calculation method is as follows:

[0207] in, For users Green electricity matching potential For users With green code resources The degree of alignment of rights and interests between them , These are the weighting coefficients.

[0208] when and At that time, the system will use the green code resource. Add users Candidate matching set:

[0209] in, Indicates user The candidate matching set, Indicates user The corresponding rights matching threshold or the minimum rights compatibility threshold uniformly set by the platform; Indicates user The corresponding candidate matching priority threshold or the lowest priority threshold uniformly set by the platform; when green code resources When both of the above threshold conditions are met, the user is allowed to enter. The candidate matching set.

[0210] Step 2 achieves the transformation from "matchable power" to "matchable preferences, matchable benefits, and matchable potential".

[0211] See Figure 4 , Figure 4 This is a flowchart illustrating the power grid constraint verification of the candidate matching set according to the present invention. The basic idea of ​​the verification is that the candidate matching relationship must simultaneously satisfy market feasibility, green code validity, and power grid physical feasibility.

[0212] Step 3: Perform power grid constraint verification on the candidate matching set. The specific process includes: Step 3.1: Construct the user candidate matching set. Load nodes and green energy resources Candidate matching power of the power generation node :

[0213]

[0214] in, This indicates the known screening power quantities used in the preliminary verification of candidate relationships in the power grid. Indicates user Load nodes and green energy resources Candidate matching edges for the power generation nodes, Indicates user Forecasted green electricity demand Indicates green electricity resources The projected supply quantity The green code indicates the amount of electricity you can use. This indicates the maximum pre-calibrated electricity amount allowed for the candidate relationship.

[0215] In the power grid constraint verification, the system uses candidate matching quantities... For power generation nodes and load nodes The equivalent injected power is updated, and the impact of the matching relationship on branch power flow, node voltage, network loss and operational risk is calculated based on AC power flow, DC power flow, linearized power flow, distribution network power flow or power flow sensitivity model.

[0216] Step 3.2: Based on the candidate matching power level For users Load nodes and green energy resources The power of the generating nodes is updated to obtain the net node injection after candidate matching is added. :

[0217]

[0218] in, This represents the net injection of the baseline node before the addition of candidate matches. Inject changes into nodes. Indicates that the grid connection node is The equivalent incremental injection brought by candidate green energy resources. Indicates the power receiving node is The equivalent load increment brought by candidate users; Step 3.3: Net injection of nodes after adding candidate matches Input the power flow model or power flow sensitivity model to calculate the line power flow, node voltage, network loss and operational risk, and verify the power balance constraints, line capacity constraints, node voltage constraints and regional accessibility constraints.

[0219] Verify power balance constraints:

[0220] in, Indicates access node A collection of power generation resources Indicates power generation resources During the period The injected power or equivalent output, Represents a node During the period The load demand, Indicates that by node The collection of outflowing branch paths, Indicates the inflow node The set of branch paths, Values ​​are taken in the positive direction according to the branch.

[0221] The system further calculates the line load rate and node voltage deviation. (Line) During the period The load rate is:

[0222] in, Indicates the line During the period The meritorious trend, Indicates the maximum allowable transmission power of the line. This indicates a very small positive number that prevents the denominator from being zero. When When this occurs, it indicates that the line has exceeded its capacity limit.

[0223] node During the period The voltage deviation is:

[0224] in, This represents the calculated value of the node voltage. This represents the node reference voltage. The larger the node voltage deviation, the more significant the impact of the candidate matching relationship on node voltage safety.

[0225] The line capacity constraint is:

[0226] The node voltage constraint is:

[0227] The regional accessibility constraint is:

[0228] in, Indicates green electricity resources With users There is a physically reachable path, a power flow reachable relationship, or an equivalent virtual path recognized by the transaction rules during the target time period.

[0229] Step 3.4: Based on the characteristics of power grid operation status and the external meteorological and equipment status characteristics of green electricity resources, calculate the predicted value of power grid constraint risk, map the predicted value of power grid constraint risk to matching risk, and verify the power grid risk constraint based on the matching risk.

[0230] For candidate matching relationships The system can map the power grid risk coefficient output by the model to a matching risk based on the risks of the affected lines, nodes, or regions.

[0231] in, Indicates matching relationship The set of lines, nodes, or areas that may be affected. This indicates that the matching relationship applies to the object. The influence weight.

[0232] The power grid risk constraints are:

[0233] in, Indicates user With green electricity resources During the period The power grid matching risk value corresponding to the establishment of candidate matching relationships can be obtained by weighting the risks of relevant lines, nodes or regions. Indicates user The maximum grid risk threshold allowed by its region or trading rules. At that time, the candidate matching relationship satisfies the power grid risk constraint.

[0234] Step 3.5, Calculate users Load nodes and green energy resources The transmission loss of the power generation node is calculated, the path loss coefficient is calculated based on the transmission loss, and the network loss threshold constraint is verified based on the path loss coefficient.

[0235] To reflect the correlation between grid physical constraints and the matching of green electricity rights, the system can further calculate the transmission loss of candidate paths or equivalent paths. For source-load matching paths or equivalent paths... The side road Its branch loss can be expressed as:

[0236] The path loss coefficient corresponding to the candidate source-load relationship can be expressed as:

[0237] in, For matching relationships On the side road The loss sharing coefficient on the surface, To prevent extremely small positive numbers with a denominator of zero, it should be noted that... It refers to the source-load matching path or equivalent path determined based on the grid topology, power flow calculation, power flow sensitivity, equivalent impedance, or the trading rules, and does not limit the actual flow of electrical energy in the grid to a single path.

[0238] The network loss threshold constraint is:

[0239] in, Indicates user With green electricity resources During the period The path loss coefficient or equivalent loss coefficient; Indicates user The maximum path loss threshold allowed by its region or transaction rules. When the network loss level of the candidate matching relationship meets the preset requirements, it indicates that the network loss level of the candidate matching relationship meets the preset requirements.

[0240] Step 3.6: Add the candidate matching relationships that simultaneously satisfy the power balance constraint, line capacity constraint, node voltage constraint, regional accessibility constraint, power grid risk constraint, and power loss threshold constraint to the candidate matching set.

[0241] If a candidate relationship does not meet constraints such as line capacity, voltage, reachability, network loss threshold, or grid risk, the system will not allow it to directly enter the optimization model, but will instead enter the infeasibility processing branch. Infeasibility processing includes deleting the candidate relationship, reducing the matching amount, replacing green electricity resources, activating the backup green code, or adjusting the flexibility preference. This mechanism ensures that the final matching scheme will not exceed the grid safety boundary simply because of high user preference or high matching potential.

[0242] Step 4: Construct a multi-objective optimization model based on the verified candidate matching set, solve the multi-objective function until the optimization results converge, and output the matching scheme.

[0243] set up Indicates user With green electricity resources During the period Matching power, To indicate whether to establish a matching relationship, then:

[0244]

[0245] in, It is a sufficiently large positive number.

[0246] The multi-objective optimization model determines the source-load matching relationship, matching power, and execution order within the feasible region, including the comprehensive objective function and constraints. The comprehensive objective function is:

[0247] In the formula for the comprehensive objective function, the first term represents the revenue from green code adaptation, the second term represents the revenue from satisfying user preferences, the third term represents the revenue from green electricity consumption, the fourth term represents the revenue from user green electricity matching potential, the fifth term represents transaction costs, the sixth term represents transmission network losses, and the seventh term represents grid risk penalties. Indicates user With green electricity resources During the period Matching power, For users With green code resources The degree of alignment of rights and interests between them Indicates user green electricity resources During the period The degree of preference satisfaction can be calculated from the matching results of user preference vector and resource attributes. Indicates user During the period The potential for users to match green electricity The transaction cost per unit of matched electricity can be determined by a combination of green electricity quotes, market prices, settlement rules, and deviation assessment costs. Indicates user and green electricity resources Path loss coefficient, Indicates user and green electricity resources Matching risk, , , , , , , These represent the weighting coefficients for the green code compatibility benefit, user preference satisfaction benefit, green electricity consumption benefit, user green electricity matching potential benefit, transaction costs, transmission network losses, and grid risk penalties, respectively. Each objective term can be dimensionless before entering the comprehensive objective function, or it can be represented by weighting coefficients. to Convert them to a unified revenue or cost scale to avoid optimization bias caused by the direct superposition of different dimensions.

[0248] The constraints include: user demand constraints, green electricity resource forecast availability constraints, green code rights availability constraints, green electricity ratio constraints, green code unique matching constraints, minimum transaction volume constraints, and grid feasible region constraints.

[0249] User requirements are constrained as follows:

[0250] in, The user determined by the optimization model With green electricity resources During the period Matching power, , Indicates user During the period The demand for green electricity may be able to match the upper limit of demand.

[0251] The predicted availability of green electricity resources is constrained as follows:

[0252] in, The user determined by the optimization model With green electricity resources During the period Matching power, Indicates green electricity resources During the period The projected supply.

[0253] The available amount of green code benefits is subject to the following constraints:

[0254] in, The user determined by the optimization model With green electricity resources During the period Matching power, Indicates green electricity resources During the period Available electricity rights.

[0255] The green electricity ratio constraint is:

[0256] when When this happens, the system will not enforce the green electricity ratio constraint on that user during that time period.

[0257] The unique matching constraint for the green code is:

[0258] in, , A binary variable indicating whether a matching relationship is established. This indicates the establishment of a matching relationship. This indicates that no matching relationship will be established.

[0259] The minimum transaction volume constraint is:

[0260] in, This indicates the minimum transaction volume.

[0261] The feasible region constraint of the power grid is:

[0262] in, for Figure 4 The feasible matching set after power grid constraint verification.

[0263] To further reflect the concept of effective electricity consumption certification, the system can calculate the effective green electricity after deducting transmission losses:

[0264] in, For users Valid green electricity that can be used for consumption authentication or green code rewriting. The path loss coefficient or equivalent loss coefficient satisfies:

[0265] Regarding the solution method, when the user and resource scale is small, the system can use mixed-integer linear programming or mixed-integer quadratic programming; when the scale is large, the system can use heuristic algorithms, decomposition coordination algorithms, genetic algorithms, particle swarm optimization, or rolling optimization strategies. Figure 4 If the judgment of "whether the optimization result converges and is feasible" is negative, the system will adjust the target weight, relax the flexible preference, increase the number of iterations, or regenerate the candidate set.

[0266] Step 5: Execute the matching scheme and determine whether the execution result is consistent with the plan. If yes, generate a green code write-back field; otherwise, analyze the deviation between the execution result and the plan and generate a green code write-back field.

[0267] After optimization, the system outputs a matching solution:

[0268] Each matching record includes the user ID, the user's preferred module, the power generation entity ID, the green code ID, the matched electricity volume, the effective green electricity volume, the matching time period, the suitability score, the user's green electricity matching potential, the user's preference satisfaction, the grid verification result, the estimated grid loss, the estimated cost, the risk level, the execution priority, and the backup matching scheme.

[0269] A matched record can be represented as:

[0270] in, This includes statuses such as pending confirmation, confirmed, in progress, completed, deviation pending, and failure.

[0271] While outputting the primary matching scheme, the system can also generate a backup matching scheme. When the primary matching scheme cannot be executed due to insufficient actual green power output, changes in user demand, changes in grid constraints, or changes in green code status, the system can quickly switch to the backup matching scheme, thereby improving the continuity and stability of green power supply and demand matching.

[0272] like Figure 5 As shown, after the matching scheme is executed, the system collects actual execution data. Execution feedback includes user confirmation results, actual user electricity consumption, actual green electricity output, actual availability of the green code, actual line power flow value, actual node voltage value, transaction settlement status, consumption authentication status, deviation degree of user's preferred module, and green electricity matching potential deviation.

[0273] The process of analyzing the deviation between the execution results and the plan includes: Deviations between the execution results and the plan include: user demand deviation, green electricity supply deviation, grid constraint deviation, user module deviation, green electricity matching potential deviation, and grid loss estimation deviation. The user demand deviation is:

[0274] in, Indicates user During the period The actual metered electricity consumption or the actual confirmed green electricity demand; This indicates that the matching scheme is for the user. The planned electricity consumption or planned green electricity demand; This indicates that actual demand is higher than planned demand. This indicates that actual demand is lower than planned demand.

[0275] The green electricity supply deficit is:

[0276] Indicates green electricity resources During the period The actual measured output or the actual settleable green electricity; This represents the predicted available supply output by the green electricity supply forecasting task before the matching decision is made. This indicates that actual supply is higher than predicted supply. This indicates that the actual supply is lower than the predicted supply.

[0277] The power grid constraint deviation is:

[0278] in, Due to power flow deviation in the line, For node voltage deviation, This refers to network loss deviation.

[0279] The degree of deviation of the user module can be expressed as:

[0280] in, To obtain user behavior features by recoding based on actual execution data, For users The central feature of the current preference module.

[0281] The green electricity matching potential deviation is:

[0282] System settings for user demand deviation thresholds Green electricity supply deviation threshold Power grid operation deviation threshold User module deviates from threshold Deviation threshold for matching potential with green electricity When the following conditions are met:

[0283]

[0284]

[0285]

[0286]

[0287] The system determines that the actual execution result is consistent with the planned result within the allowable error range; when any deviation exceeds the corresponding threshold, the system enters the deviation analysis and model update process.

[0288] like Figure 5 As shown, if all execution deviations are within the allowable threshold range, the system proceeds to green code write-back; if any deviation exceeds the corresponding threshold, the system enters the deviation analysis process. The system categorizes deviations based on their source into user preference deviations, user module deviations, supply forecast deviations, grid constraint deviations, green electricity matching potential deviations, and transaction execution deviations. Different deviation types correspond to different update strategies.

[0289] Different update strategies are implemented for different types of deviations: For user demand deviations, user preference weights are updated; for green electricity supply deviations, actual output results are added to the training samples, and the parameters of the green electricity resource temporal coding layer, attention layer, and green electricity supply prediction output layer are updated; for grid constraint deviations, risk penalty weights are increased; for user module deviations, the correlation of user behavior features, weighted adjacency matrix, and topological overlap matrix are recalculated based on the latest execution feedback, and the green electricity preference module to which the user belongs is updated; for green electricity matching potential deviations, the green electricity matching baseline is updated based on actual green electricity supply, actual user confirmed electricity volume, grid verification results, and green code write-back results; for grid loss estimation deviations, path loss coefficients are updated.

[0290] For user preference biases, the system updates the user preference weights:

[0291] in, To provide feedback on the updated coefficients, The feedback preference weights are determined based on the user's actual acceptance, rejection, confirmation, or adjustment behavior.

[0292] After the update, the preference weights are normalized to satisfy:

[0293] For deviations in green electricity supply, the system adds the actual output results to the training samples and updates the model parameters:

[0294] in, This indicates the updated parameters of the multi-task attention-enhanced LSTM-WGCNA model. This indicates the model parameters before the feedback update; This indicates the learning rate used to update the model parameters. This represents the feedback loss function constructed based on green electricity supply deviation, user preference deviation, grid constraint deviation, and matching potential deviation. Represents the feedback loss function For model parameters The gradient.

[0295] For deviations in the user preference module, the system recalculates the correlation of user behavior features, the weighted adjacency matrix, and the topological overlap matrix based on the latest execution feedback, and updates the user's green electricity preference module accordingly.

[0296] When a user's actual green electricity confirmation behavior, price response behavior, or performance feedback behavior deviates significantly from the current module central characteristics, the system can adjust the user's module affiliation or reduce the weight of the module central characteristics in correcting their preference vector.

[0297] For deviations in the green electricity matching baseline, the system updates the green electricity matching baseline based on actual green electricity supply, actual user-confirmed electricity volume, grid verification results, and green code write-back results:

[0298] For grid constraint deviations, the system increases the risk penalty weight:

[0299] in, This is the risk adjustment coefficient. This is a risk deviation indicator.

[0300] For network loss estimation errors, the system can update the path loss coefficient:

[0301] in, This is the network loss correction factor. The actual path loss coefficient is calculated back from the actual power flow and measurement results.

[0302] Through the above methods, the system not only updates the LSTM model parameters, but also updates the attention weights, user preference modules, module center features, green electricity matching guideline, supply confidence, risk penalty coefficient, and path loss coefficient, enabling user preference identification and matching potential assessment to have rolling self-learning capabilities.

[0303] like Figure 5 As shown, this invention generates a green code write-back field based on the matching results. Green code write-back field for:

[0304]

[0305] in, For matching numbers, Number the user. Assign a number to the user's green electricity preference module. Number the main power generation unit. The green code number is used. To match time periods, To match the battery level, For effective green electricity generation, To score the fit, Matching users with the potential of green electricity For power grid verification number, To predict the network loss coefficient, Risk level, The health code is green. For timestamps, For evidence summary; The rules for updating green health code status are as follows:

[0306] This indicates the updated green health code status. This indicates the green code number or the number participating in this match. A green health code resource identifier.

[0307] The evidence summary can be represented as:

[0308] in, For hash functions or other trusted proof functions.

[0309] If the write-back verification passes, the system will synchronize the results to the transaction settlement, consumption authentication, green certificate collaboration, write-off management, and audit evidence storage systems; if the write-back fails, it will proceed to... Figure 5 The process includes field correction, permission review, and regeneration of evidence summary.

[0310] Through this write-back mechanism, the green code is no longer just a source identifier on the power generation side, but further carries user preference modules, user matching potential, source-load matching relationship, effective green electricity, grid verification results, grid loss impact, risk status and execution results, thereby realizing dynamic linkage between green electricity supply and demand matching results and the electricity code system.

[0311] Working principle: This invention uses the temporal changes in user demand and green electricity supply as the prediction object, the user green electricity preference co-variation network as the group behavior identification tool, the green code rights label as the matching object, the power grid security constraints as the boundary conditions, multi-objective optimization as the decision-making means, and execution feedback and code writing back as closed-loop support, thereby realizing the transformation of green electricity supply and demand matching from "static matching" to "prediction-driven, module identification, constraint guarantee, trustworthy rights, and continuous self-learning".

[0312] (1) Overall working principle like Figure 1 As shown, this invention first obtains information such as users, green electricity resources, green code rights, and power grid operation status through multi-source data collection; then, through... Figure 2 The data preprocessing workflow shown transforms these heterogeneous data into time-series samples and user behavior representation matrices in a unified format; subsequently, through... Figure 3The multi-task attention-enhanced LSTM-WGCNA model shown extracts user temporal behavior features, identifies user preference modules, and predicts dynamic parameters; then through... Figure 4 The power grid constraint verification and multi-objective optimization process shown generates physically feasible matching solutions; finally, through... Figure 5 The feedback update and code assignment write-back process shown enables model adaptation and equity status synchronization.

[0313] The core of this working principle lies in the strict data dependencies between different stages. Figure 2 The output standardized samples are Figure 3 Input; Figure 3 The output includes the user preference module, user green energy matching potential, green energy supply forecast, and grid risk forecast. Figure 4 It serves as an important basis for calculating fitness and optimizing target weights; Figure 4 The output matching result is Figure 5 The objects that perform feedback and green code rewriting in the middle; Figure 5 The output feedback data is then re-entered. Figure 2 and Figure 3 These samples become new samples for the next round of training and matching, thus forming a complete closed loop.

[0314] From a mathematical perspective, this invention can be abstracted as a rolling closed-loop optimization process:

[0315] in, For the target time period The optimal matching scheme, To satisfy the feasible domain of green code validity, power grid physical constraints, and transaction rule constraints, For user preference prediction results, For a set of user preference modules, Matching users with the potential of green electricity For green electricity supply forecast results, For the results of power grid constraint risk prediction, For the green code rights adaptation matrix, It is a comprehensive cost parameter that includes transaction costs, network loss costs, and risk costs.

[0316] (2) The principle of data-driven and physical constraint synergy This invention does not rely solely on data models to generate matching schemes. The multi-task attention-enhanced LSTM-WGCNA model is responsible for learning the dynamic patterns of user preferences, user group modules, green electricity supply, and grid risks from historical data, but its output only serves as input parameters for matching optimization; the final matching scheme must undergo grid constraint verification and optimization. This avoids both the problem of pure rule-based models failing to capture dynamic user preferences and the problem of pure neural network models lacking physical security guarantees.

[0317] This collaborative relationship can be represented as:

[0318] in, For the physical feasible region of the power grid, For the set of constraints on the validity of green code rights, It is a set of market transaction rule constraints.

[0319] This formula indicates that the intelligent model outputs predictive variables, module variables, and risk variables, rather than the final decision result; the final matching result must simultaneously fall within the grid feasible domain, the green code usable domain, and the market executable domain. Therefore, this invention achieves synergy between data-driven prediction and physical constraint verification.

[0320] (3) User preference time-series recognition principle User preference for green electricity is essentially a behavioral characteristic that changes over time. User demand for green electricity varies depending on the season, time of day, price conditions, and carbon accounting cycle. Figure 3 The LSTM model in the text retains historical behavioral information through memory cells and filters key temporal features through gating structures, thereby identifying users' potential preferences in future time periods.

[0321] User preference identification can be represented as:

[0322] in, For users' historical load sequences, This is a sequence of users' historical green electricity procurement and confirmation behaviors. For market prices and trading rules sequence, Confirm the user's historical green health code status. For external environment sequence, The predicted results of user preferences for the target period in the future.

[0323] Through the attention mechanism, the model can identify which historical periods have a greater impact on current green electricity matching decisions. For example, when a user repeatedly rejects matching results during periods of high electricity prices, the attention weight will increase the impact of such periods on price preference prediction; when a user consistently chooses green code resources with certification status, the system will increase the certification preference weight; and when a user increases the proportion of green electricity procurement as the carbon accounting cycle approaches, the system will increase the weight of their green electricity proportion demand.

[0324] (4) User green electricity preference module identification principle The user preference identification in this invention is not limited to predicting the historical behavior of a single user, but further identifies the covariant structure of green electricity consumption behavior at the user group level. The system first uses LSTM to perform time-series encoding on the user's historical load, green electricity procurement, price response, green code confirmation, and performance feedback sequences to extract deep user behavioral features; then, it uses WGCNA to construct a weighted correlation network among users, and identifies user preference modules with highly similar behavioral features through a topological overlap matrix.

[0325] Each user preference module represents a group of users with similar green electricity consumption needs, similar price sensitivity, similar authentication preferences, and similar fulfillment stability. The system can modify the user preference vector based on the module's central features and calculate the user's green electricity matching potential by combining it with the green electricity matching baseline. Thus, this invention can extend user preference modeling from "individual prediction" to "a combination of individual prediction and group module identification," improving the stability and interpretability of preference identification.

[0326] The identification process of this module can be represented as follows:

[0327] in, For users The preference module, For users With users Topological overlap during the target time period. If two users have highly similar historical load patterns, green electricity procurement behavior, price response behavior, and performance feedback, their topological overlap is high, and they are more likely to be classified into the same preference module.

[0328] (5) Green electricity supply forecasting principle Green energy resources are volatile, especially wind and solar power resources. Figure 3 The multi-task model in this system not only takes historical green electricity output as input, but also auxiliary features such as weather, solar irradiance, wind speed, season, and equipment status as input, thereby predicting the available green electricity supply in future periods. This prediction result is not directly used as the final traded electricity volume, but rather serves as the basis for the upper limit of resource availability and the supply confidence level in the optimization model.

[0329] Green electricity supply forecasts can be expressed as:

[0330] in, For green electricity resources Historical output sequence , , These represent external auxiliary feature sequences such as weather, wind speed, light intensity, and equipment status.

[0331] Supply confidence can be expressed as:

[0332] The system prioritizes green energy resources with high supply confidence and strong performance stability during the matching process, thereby reducing the risk of matching failure.

[0333] (6) Principles of Green Energy Matching Potential Assessment This invention introduces a green electricity matching benchmark to describe the proportion of green electricity consumption, green electricity confirmation strength, or transferable green electricity demand level that the system expects to generate on the user side within a target period. The green electricity matching benchmark is jointly determined by the predicted green electricity supply, the predicted grid risk value, the availability status of green code rights, and the market price status.

[0334] The green electricity matching standard can be expressed as:

[0335] For users The closer the predicted green electricity demand curve is to the green electricity matching baseline, the more suitable the user is as a priority matching target for the target period. A user's green electricity matching potential considers both the degree of deviation and correlation.

[0336] in, This indicates the normalized deviation between the user's green electricity demand curve and the green electricity matching baseline. This indicates the correlation between the two. The higher the indicator, the more coordinated the changes in users' green electricity demand are with the system's green electricity supply, grid constraints, and market conditions.

[0337] (7) Green code rights adaptation principle The core of green code benefit matching lies in transforming "what users want" and "what green energy resources offer" into a unified evaluation space. User preference vectors describe the demand side, while green code labels describe the supply side. The two are weighted and scored to form a matching degree. The higher the matching degree, the more the green energy resources meet users' comprehensive needs regarding power type, time, region, certification, price, and carbon attributes.

[0338] Fit can be calculated as follows:

[0339] in, For the corrected user number Class preference weights For user needs attributes, It is a green code resource attribute. This is an attribute matching function.

[0340] However, fitness only addresses the question of "willingness to match," not "safety of matching." Therefore, this invention incorporates a power grid constraint check after fitness. This design ensures the logical rigor of the method: first, it determines whether the interests and preferences are suitable; then, it determines whether the power grid allows it; and finally, it optimizes within the feasible region.

[0341] (8) Power grid constraint protection principle Figure 4 The grid constraint verification shown is the key difference between this invention and ordinary transaction matching methods. Power flow in a power system follows physical laws, and green electricity trading and green code rights matching cannot exist independently of network conditions. Therefore, this invention incorporates line capacity, node voltage, regional accessibility, network loss threshold, and risk coefficient into the candidate relationship screening process.

[0342] It should be noted that the source-load matching path in this invention can be a physically reachable path based on the power grid topology, or an equivalent virtual path based on power flow calculation, power flow sensitivity, equivalent impedance, trading zoning rules, or the rules of the electricity level coding platform. This path is used to calculate the impact of matching relationships on power grid security, network losses, and equity accounting, without limiting the actual flow of electricity to a single path.

[0343] The feasible candidate set of power grids can be represented as:

[0344] in, The candidate set after filtering based on green code compatibility. This is the feasible set after passing the power grid constraint verification. For the first Each power grid constraint function.

[0345] (9) Multi-objective optimization principle Matching green electricity supply and demand is a typical multi-objective problem. Focusing solely on user satisfaction may lead to excessively high costs or grid constraints making it infeasible; focusing only on minimizing costs may result in unmet user preferences; and focusing solely on green electricity absorption rates may cause localized grid losses or congestion. Therefore, this invention employs a multi-objective optimization model that simultaneously incorporates preference satisfaction, equity matching, green electricity absorption, matching potential, transaction costs, transmission losses, and grid risks into the objective function.

[0346] The overall objective can be expressed as:

[0347] To elaborate further:

[0348] in, This indicates that user preferences satisfy the benefits. This indicates that the benefits associated with the green health code are matched with corresponding income. Indicates the revenue from green electricity consumption. This indicates the potential benefits of users matching green electricity. Indicates transaction costs, Indicates the cost of transmission network loss. This represents the risk cost of the power grid.

[0349] (10) Effective green electricity volume and the principle of rights writing back During green electricity transmission, line and equipment losses are unavoidable. If only the electricity matched on the generation side is directly used as the electricity certified on the consumption side, it can easily lead to deviations in green rights calculation. Therefore, this invention introduces the concept of effective green electricity in the matching results, incorporating the impact of path losses or equivalent losses into the green code write-back process.

[0350] For users With green electricity resources Matching power The effective green electricity after deducting path losses is:

[0351] in, This is the loss coefficient for the corresponding source load matching path or equivalent path.

[0352] Through this mechanism, what is ultimately written into the green code system is not simply the contracted electricity volume, but the effective green electricity volume after grid constraint verification and correction for grid loss impact, thereby improving the accuracy and credibility of green electricity consumption certification.

[0353] (11) Feedback self-learning principle like Figure 5 As shown, the actual execution results may deviate from the planned results. This invention uses a feedback mechanism to convert the deviations back into model learning samples. If a user rejects a certain type of green electricity matching, it indicates that the user preference model needs to be corrected; if the user's behavior deviates significantly from the current preference module center, it indicates that the user's module affiliation or module weight needs to be adjusted; if the actual output of green electricity is lower than the predicted value, it indicates that the supply prediction model needs to be corrected; if the actual power flow risk is higher than expected, it indicates that the risk penalty coefficient needs to be increased.

[0354] The system parameter set can be represented as:

[0355] in, For model parameters, For attention weights, For the user preferences module, Weighting based on user preferences To optimize the target weight, This is the path loss coefficient. To match the green electricity standard, This is the risk constraint threshold.

[0356] The feedback update process can be represented as:

[0357] in, This indicates a deviation in user needs. This indicates a mismatch in the supply of green electricity. Indicates the deviation in power grid execution. Indicates user module deviation, Indicates the potential deviation in matching. This indicates a deviation in the adaptation result.

[0358] Through the above mechanism, the system is not a one-time static matching, but can continuously correct, learn, and optimize in multiple rounds of operation.

[0359] (12) Green code rewriting principle The purpose of green code write-back is to transform optimized matching results into a traceable, verifiable, and auditable record of green rights status. Traditional green codes are mostly used to record power generation source, power generation time, and green attributes. However, the extended fields of the green code in this invention further record user preference modules, user green electricity matching potential, matching objects, matched electricity volume, effective green electricity volume, green code suitability score, grid verification number, grid loss coefficient, risk level, execution status, and evidence summary. In this way, the green code is expanded from a single power generation source identifier to a data carrier that runs through the entire process of green electricity supply and demand matching, physical constraint verification, consumption authentication, and rights verification.

[0360] like Figure 5 As shown, the green code write-back process is not simply writing the matching result, but requires verification of field integrity, user permissions, green code status consistency, power grid verification result consistency, and evidence storage summary. Only when the matching relationship, valid green electricity volume, power grid verification result, green code status, and user confirmation result all meet the requirements will the system synchronize the write-back result to the transaction settlement, consumption authentication, green certificate collaboration, verification management, and audit evidence storage systems, thereby ensuring data consistency and the uniqueness of green rights among multiple business systems.

[0361] For the target time period Optimal matching scheme The system generates extended fields for the green code based on the matching results:

[0362]

[0363] in, Indicates user With green electricity resources During the period The corresponding extended fields for the green code; This represents the optimal matching scheme for the target time period; Indicates the user ID; Indicates the user's green electricity preference module; Indicates the generator unit number; Indicates the green code number; Indicates the matched battery level; This represents the effective green electricity after deducting path losses or equivalent losses. This indicates the score for the compatibility of green code benefits; This indicates the user's potential for green electricity matching; Indicates the power grid verification number; This represents the path loss coefficient or equivalent loss coefficient. This indicates the power grid risk value corresponding to the matching relationship; Indicates the execution status of the match.

[0364] The rules for updating the green health code status can be expressed as follows:

[0365] To ensure the write-back results are immutable and traceable, the system generates a storage summary for the extended fields of the green code:

[0366] in, For hash functions or other trusted proof functions, This is for writing back the timestamp.

[0367] When the write-back verification passes, the system will , and Synchronize with the green electricity trading system, consumption authentication system, green certificate collaboration system, verification management system, and audit and evidence storage system; when the write-back verification fails, the system enters the exception handling process to correct, review, or regenerate the evidence storage summary for situations such as missing fields, mismatched permissions, conflicting green code status, inconsistent verification numbers, abnormal valid green electricity volume, or failure to generate evidence storage summary.

[0368] Through this write-back mechanism, the green code no longer merely proves that "a certain amount of electricity comes from a certain green power source," but can further prove "when, based on which user preference module and matching potential, through what source-load matching relationship, after what grid verification, and after deducting what losses, this green right was allocated to which user." Thus, this invention achieves a closed-loop connection between green electricity supply and demand matching, user preference module identification, grid physical verification, effective green electricity calculation, green code right confirmation, and consumption authentication.

[0369] This invention, based on unified preprocessing of multi-source data, utilizes multi-task attention-enhanced LSTM to extract deep temporal features of user green electricity consumption behavior, and employs WGCNA to construct a user green electricity preference co-variation network and identify user preference modules. Through a green code rights adaptation model, it quantitatively matches user needs with the green attributes of green electricity resources. Grid constraint verification ensures that candidate matching relationships meet requirements for power balance, line capacity, node voltage, network loss threshold, and regional accessibility. A multi-objective optimization model achieves a comprehensive balance among user satisfaction, green code adaptation, green electricity consumption rate, transaction costs, transmission network loss, and operational risks. Finally, through execution feedback and power consumption code write-back, it achieves consistent linkage between green electricity matching results, rights status, and the business system. Compared with existing technologies, this invention has the following beneficial effects.

[0370] First, this invention solves the problem of fragmented user data, power generation data, green code data, power grid operation data, market transaction data, and external auxiliary data in green electricity trading by unifying the processing of multi-source data. Figure 2 The data preprocessing workflow shown can perform time alignment, anomaly identification, missing data completion, standardization, and sliding window sample construction on data from different sources, sampling frequencies, measurement units, and numbering systems. This enables user load, green electricity output, green code status, power flow, and trading rules to participate in calculations under a unified time scale and data structure, thereby improving the data foundation quality for model training, user preference module identification, green code adaptation calculation, and multi-objective optimization solutions.

[0371] Second, this invention enhances user preference recognition capabilities through multi-task attention-enhanced LSTM. The system can dynamically extract user preferences regarding power type, generation time, regional source, price level, certification status, low-carbon attributes, and performance stability based on historical load curves, historical green electricity procurement behavior, price response characteristics, green electricity confirmation results, performance feedback information, and similar user behavior characteristics. This allows for the prediction of users' green electricity demand preferences for future target periods.

[0372] Third, this invention improves the structure and interpretability of user preference modeling by introducing a WGCNA user green electricity preference module identification mechanism. The system not only utilizes LSTM to learn temporal patterns in user historical behavior but also identifies key historical periods through an attention mechanism. It constructs a user green electricity preference co-variation network using WGCNA and identifies user preference modules. This mechanism can discover similar green electricity consumption behaviors and similar matching response capabilities at the user group level, avoiding the instability in preference identification caused by insufficient historical data or behavioral fluctuations of a single user.

[0373] Fourth, this invention, through green electricity matching benchmarks and user green electricity matching potential assessment, ensures that matching decisions no longer rely solely on current user demand and resource suitability, but further consider the coordination between user demand curves and system green electricity supply, grid risks, green code availability, and market prices. This allows for priority matching with users more aligned with the system's green electricity consumption goals, improving the overall coordination and success rate of green electricity matching schemes.

[0374] Fifth, this invention improves the foresight and feasibility of matching schemes by jointly predicting green electricity supply and grid constraint risks through LSTM. Before transaction matching, the system can combine historical green electricity output, meteorological data, wind speed, solar intensity, equipment status, grid operation status, and power flow trends to predict the availability of green electricity resources in the future period, as well as potential grid constraint risks such as line congestion, voltage exceeding limits, increased grid losses, and insufficient regional accessibility.

[0375] Sixth, this invention, through the calculation of green code rights suitability, moves the green code from a proof material after the transaction is completed to a core decision-making element in the matching process. The system breaks down green code rights into standardized tags such as power type, power generation time, power generation area, certification status, environmental attributes, available power, performance reliability, and price attributes, and performs multi-dimensional weighted matching with user preference vectors. This makes green electricity matching no longer a simple correspondence of power volume, but rather reflects users' differentiated requirements for green electricity sources, quality, time periods, regions, and environmental rights.

[0376] Seventh, the present invention ensures the physical feasibility of the matching scheme through power grid constraint verification. Figure 4 The process shown incorporates power balance, line capacity, node voltage, regional accessibility, network loss threshold, and grid operation risk into the candidate matching relationship screening process. For candidate matching relationships with high suitability but which may lead to line over-limit, voltage over-limit, path inaccessibility, or excessive network loss, the system can eliminate, downgrade, replace with backup green energy resources, or re-verify them, avoiding the generation of matching schemes that can be matched in the market but are not executable in the grid.

[0377] Eighth, this invention improves the authenticity of green electricity consumption certification and green code rights calculation by introducing path loss coefficients and effective green electricity volume. The system does not simply use the matching electricity volume from the generation side as the verifiable green electricity volume from the user side. Instead, based on grid constraint verification and path loss calculation, it further calculates the effective green electricity volume after deducting transmission losses or equivalent losses. This effective green electricity volume can be written into the green code extension field and used for subsequent consumption certification, green certificate collaboration, verification management, and audit evidence storage.

[0378] Ninth, this invention achieves a balance of interests among multiple stakeholders through a multi-objective optimization model. Under the premise of satisfying the validity of the green code, power grid physical constraints, and market transaction rules, the system simultaneously considers user preference satisfaction, green code benefit matching, user green electricity matching potential, green electricity absorption rate, transaction costs, transmission losses, and power grid operation risks, enabling the matching result to achieve a comprehensive balance between user satisfaction, generation-side absorption benefits, power grid safe operation, and transaction economics.

[0379] Tenth, this invention improves the robustness and continuous operation capability of the system through an infeasible candidate matching correction mechanism. When a candidate matching relationship becomes infeasible due to grid constraints, green code status, insufficient green electricity supply, or changes in user demand, the system can perform processing procedures such as deleting the candidate relationship, reducing the matching electricity, activating the backup green code, replacing green electricity resources, adjusting flexible preferences, and re-verifying, avoiding direct system interruption after matching failure.

[0380] Eleventh, this invention achieves rolling optimization by performing feedback and model updates. Figure 5 The process shown can feed back user confirmation results, actual metered electricity, actual green electricity output, power flow execution deviation, node voltage deviation, network loss deviation, user preference module deviation, matching potential deviation, and green code status changes to the model, enabling the system to continuously correct user preference identification results, user preference module division results, green electricity supply prediction results, and grid risk assessment results.

[0381] Twelfth, this invention achieves a closed-loop business model for green electricity trading, consumption authentication, and rights management through green code assignment and write-back. The system writes the matching number, user number, user preference module number, power generation entity number, green code number, matched electricity volume, effective green electricity volume, fit score, user's green electricity matching potential, grid verification number, expected grid loss coefficient, risk level, matching status, timestamp, and evidence summary into the extended fields of the green code. This allows the green code to record not only the source of power generation but also the user preference module, source-load matching relationship, grid verification result, effective rights volume, and execution status.

[0382] Thirteenth, this invention avoids the problem of purely data-driven models lacking physical constraints by hierarchically coupling multi-task attention-enhanced LSTM, WGCNA user preference module identification, power grid physical verification, and multi-objective optimization. The intelligent model is only used to predict user preferences, green electricity supply, power grid risks, user modules, and matching potential; the final matching result must still be generated through power grid constraint verification and optimization model solving. Therefore, this invention combines intelligence, physical interpretability, and engineering feasibility.

[0383] Fourteenth, this invention forms a complete technical chain of "data—encoding—module identification—potential assessment—adaptation—constraints—optimization—feedback—coding". The steps in this chain are logically continuous, the data connections are clear, and the results are traceable. It can support the application needs of green electricity trading platforms, green electricity package design by electricity sales companies, green electricity consumption in industrial parks, green electricity consumption certification for enterprises, marketing service systems of power grid companies, and electricity coding business systems. This provides technical support for the transformation of green electricity from quantitative trading to refined, personalized, secure, executable, and traceable certification.

[0384] Example 2 The difference between this embodiment and Embodiment 1 is that this embodiment is a system embodiment and can be used to execute the method of Embodiment 1. For details not disclosed in the system embodiment of this invention, please refer to the method embodiment of this invention, which will not be repeated here. This embodiment provides a smart matching system for green electricity supply and demand, including: The user preference module identification unit is used to encode the user's historical behavior sequence to obtain the user's green electricity behavior expression matrix; based on the user's green electricity behavior expression matrix, a topological overlap distance matrix between users is constructed, and the topological overlap distance matrix between users is mapped to the green electricity preference module label of each user, and the central behavioral features of each green electricity preference module are extracted; the user's green electricity matching potential is calculated according to the normalized deviation and correlation between the user's green electricity demand prediction curve and the green electricity matching baseline; based on the user's green electricity behavior expression matrix, the central behavioral features of each green electricity preference module, and the user's green electricity matching potential, the user preference prediction vector is calculated and corrected.

[0385] The green code rights and interests matching unit is used to calculate the rights and interests matching degree between users and green code resources based on the corrected user preference prediction vector, calculate the candidate matching priority between users and green code resources based on the rights and interests matching degree and the user's green code matching potential, and add green code resources that have reached the rights and interests matching threshold and the candidate matching priority have reached the potential matching threshold to the user's candidate matching set.

[0386] The power grid constraint verification unit is used to perform power grid constraint verification on the candidate matching set.

[0387] The multi-objective optimization matching unit is used to construct a multi-objective optimization model based on the verified candidate matching set, solve the multi-objective function until the optimization result converges, and output the matching scheme.

[0388] The code writing-back unit is used to execute the matching scheme and determine whether the execution result is consistent with the plan. If so, a green code writing-back field is generated; otherwise, the deviation between the execution result and the plan is analyzed and a green code writing-back field is generated.

[0389] This invention is preferably implemented in the following order: "multi-source data acquisition—data preprocessing and sample construction—multi-task attention-enhanced LSTM-WGCNA user preference recognition—green electricity matching potential assessment—green code rights and interests adaptation calculation—grid constraint verification—multi-objective optimization matching—matching scheme output—execution feedback and green code write-back." This order reflects the basic logic of this invention: first, ensure data uniformity, then encode user temporal behavior; first, identify user preference modules and matching potential, then perform green code rights and interests adaptation; first, form candidate matches, then perform grid constraint verification; first, perform optimization solutions within the grid feasible domain, then execute feedback write-back. The output of each step serves as the input of the next step, thereby ensuring the continuity of system logic, clear calculation basis, and traceability of business results.

[0390] The system can be deployed on green electricity trading platforms, electricity code assignment platforms, power trading centers, electricity sales company business systems, industrial park energy management systems, or power grid enterprise marketing service systems. A modular architecture is preferred, including a data access module, a data processing module, an LSTM prediction module, a fit calculation module, a power grid constraint verification module, a multi-objective optimization module, a matching result management module, a feedback update module, and a green code write-back module. These modules are connected through a unified data interface and associated according to a unified time period number, user number, power generation entity number, green code number, and power grid node number.

[0391] The multi-task attention-enhanced LSTM-WGCNA user preference recognition module includes a time-series behavior encoding unit, an attention weighting unit, a user green electricity preference co-variation network construction unit, a user preference module recognition unit, and a multi-task dynamic parameter output unit. The time-series behavior encoding unit extracts deep time-series features from users' historical load, green electricity procurement, price response, green code confirmation, and performance feedback. The attention weighting unit identifies key historical periods that significantly influence future green electricity matching decisions. The user green electricity preference co-variation network construction unit characterizes the similarity of preferences and behavioral synergy among users. The user preference module recognition unit divides users into groups with similar green electricity consumption preferences and matching response capabilities. The multi-task dynamic parameter output unit outputs user preference vectors, green electricity supply forecasts, grid constraint risk coefficients, and user green electricity matching potential.

[0392] It should be noted that the source-load matching relationship in this invention is not equivalent to the unique physical flow path of electrical energy in the power grid, but rather refers to a traceable, verifiable, and write-back source-load rights association established under the conditions of green electricity trading rules, green code rights verification rules, and power grid security verification. Power grid constraint verification can be implemented using AC power flow, DC power flow, linearized power flow, distribution network power flow models, power flow sensitivity models, or rule-approved equivalent network models to ensure that the matching results meet the requirements of engineering feasibility.

[0393] In practical applications, data fields, model parameters, constraint thresholds, and optimization algorithms can be adaptively adjusted according to different power grid regions, different green electricity trading rules, different user types, and different electricity coding platform interfaces.

[0394] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A smart matching method for green electricity supply and demand, characterized by: include: The user's historical behavior sequence is encoded to obtain the user's green electricity behavior expression matrix; based on the user's green electricity behavior expression matrix, a topological overlap distance matrix between users is constructed, and the topological overlap distance matrix between users is mapped to the green electricity preference module label of each user, and the central behavioral features of each green electricity preference module are extracted. The user's green electricity matching potential is calculated based on the normalized deviation and correlation between the user's green electricity demand prediction curve and the green electricity matching baseline. Based on the user's green electricity behavior expression matrix, the central behavioral features of each green electricity preference module, and the user's green electricity matching potential, the user preference prediction vector is calculated and then corrected. The rights and interests matching degree between users and green code resources is calculated based on the corrected user preference prediction vector. The candidate matching priority between users and green code resources is calculated based on the rights and interests matching degree and the user's green electricity matching potential. Green code resources that have reached the rights and interests matching threshold and the candidate matching priority have reached the potential matching threshold are added to the user's candidate matching set. The candidate matching set is verified by power grid constraints. Based on the verified candidate matching set, a multi-objective optimization model is constructed, and the multi-objective function is solved until the optimization results converge. The matching scheme is then output. Execute the matching scheme and determine whether the execution result is consistent with the plan. If yes, generate a green code write-back field; otherwise, analyze the deviation between the execution result and the plan and generate a green code write-back field.

2. The intelligent matching method for green electricity supply and demand according to claim 1, characterized in that: The process of encoding user historical behavior sequences to obtain a user green electricity behavior expression matrix includes: Input the user's historical behavior sequence into the Long Short-Term Memory network to obtain the hidden state at each historical moment; The hidden state at each historical moment is input into the attention weighting layer, and the attention score at each historical moment is output. The attention weight for each historical moment is calculated based on the attention score at each historical moment. Calculate the attention weight and the weighted sum of the hidden states at each historical moment to obtain the user's attention-enhanced temporal behavior features. Construct a user green electricity behavior expression matrix based on the attention-enhanced temporal behavior features of all users.

3. The intelligent matching method for green electricity supply and demand according to claim 1, characterized in that: The process of constructing a topological overlap distance matrix between users based on the user green electricity behavior expression matrix, and mapping the topological overlap distance matrix between users to the green electricity preference module labels of each user includes: The user green electricity behavior expression matrix includes the attention-enhancing time-series behavioral characteristics of all users, based on user... and users Attention enhancement temporal behavior characteristics, calculating user and users The correlation coefficient; Build a user using a soft threshold function and users The weighted adjacency matrix; Calculate users separately and users In the user green electricity preference co-transformation network, the connectivity is used to construct a topological overlap matrix based on the connectivity and weighted adjacency matrix. ; based on Build users and users The user topological overlap distance matrix; Hierarchical clustering or dynamic shearing methods are used to identify the green electricity preference module tags for each user.

4. The intelligent matching method for green electricity supply and demand according to claim 1, characterized in that: The process of calculating the user's green energy matching potential based on the normalized deviation and correlation between the user's green energy demand forecast curve and the green energy matching baseline includes: A green electricity matching benchmark is constructed based on the predicted supply level of green electricity, the predicted value of grid risk, the level of available rights and interests of green codes, and the price of green electricity. Calculate the normalized deviation between the user green electricity demand forecast curve and the green electricity matching baseline. Correlation ; Calculate the user's green electricity matching potential based on the degree of normalization deviation and correlation: in, Indicates user The potential for green electricity matching for users These are the weighting coefficients.

5. The intelligent matching method for green electricity supply and demand according to claim 1, characterized in that: The process of revising the user preference prediction vector includes: The user preference prediction vector and the central behavioral features of the green electricity preference module to which the user belongs are respectively transformed into structured individual preference vectors and module preference center vectors; The corrected implicit preferences are calculated based on the individual preference vector and the module preference center vector: in, For users The revised implicit preferences. For users Individual preference vectors, For users Green electricity preference module The module preference center vector, For individual preference confidence coefficients; Determine whether the user has explicit declared preferences. If so, merge the explicit declared preferences and the corrected implicit preferences to obtain the corrected user preference prediction vector; otherwise, use the corrected implicit preferences as the corrected user preference prediction vector.

6. The intelligent matching method for green electricity supply and demand according to claim 1, characterized in that: The process of calculating the matching degree between users and green code resources based on the corrected user preference prediction vector includes: Green code rights labels are constructed based on valid green code rights that have available power, are not locked, and are not repeatedly occupied, and mutual exclusion constraints for green codes are set. Calculate users With green code resources The compatibility of rights and interests between them : in, This represents the first element in the corrected user preference prediction vector. The weighted components corresponding to class preference attributes Indicates green code resources With users In the One-to-one matching score on class attributes A set of preference attributes; The set of preferred attributes includes power source type, generation time, regional origin, price, certification validity, low-carbon attributes, and compliance stability. Among these, the power source type matching score... for: Power type Indicates user Acceptable set of green electricity types; Time period matching score for: Indicates user The target electricity consumption period or the green electricity demand period; Indicates green code resources The corresponding power generation period; This represents the time-period difference attenuation coefficient, and ; Region matching score for: Indicates the regional distance attenuation coefficient; Indicates user With green electricity resources The normalized geographical distance, electrical distance, or equivalent path distance between them; Price matching score for: Indicates green electricity resources During the period The quoted price, the reference price for the transaction, or the unit price including the green electricity premium; Indicates user The highest acceptable unit price for green electricity; This indicates an extremely small positive number that prevents the denominator from being zero; Certification validity score for: In authentication status; Performance stability score for: Provide confidence in green electricity This represents the historical performance deviation rate.

7. The intelligent matching method for green electricity supply and demand according to claim 1, characterized in that: The process of performing power grid constraint verification on the candidate matching set includes: Constructing a candidate matching set of users Load nodes and green energy resources Candidate matching power of the power generation node : in, Indicates user Forecasted green electricity demand Indicates green electricity resources The projected supply quantity The green code indicates the amount of electricity you can use. Indicates the maximum pre-calibrated core energy quantity allowed for the candidate relationship; Based on candidate matching power For users Load nodes and green energy resources The power of the generating nodes is updated to obtain the net node injection after candidate matching is added. : in, This represents the net injection of the baseline node before the addition of candidate matches. Inject changes into nodes. Indicates that the grid connection node is The equivalent incremental injection brought by the candidate green energy resources. Indicates the power receiving node is The equivalent load increment brought by candidate users; Net node injection after adding candidate matches Input the power flow model or power flow sensitivity model to calculate the line power flow, node voltage, network loss and operational risk, and verify the power balance constraints, line capacity constraints, node voltage constraints and regional accessibility constraints; Based on the characteristics of power grid operation status and the external meteorological and equipment status characteristics of green electricity resources, the predicted value of power grid constraint risk is calculated, the predicted value of power grid constraint risk is mapped to matching risk, and the power grid risk constraint is verified based on the matching risk. Calculate users Load nodes and green energy resources The transmission loss of the power generation node is calculated, the path loss coefficient is calculated based on the transmission loss, and the network loss threshold constraint is verified based on the path loss coefficient. Candidate matching relationships that simultaneously satisfy power balance constraints, line capacity constraints, node voltage constraints, regional accessibility constraints, grid risk constraints, and grid loss threshold constraints are placed into the candidate matching set.

8. The intelligent matching method for green electricity supply and demand according to claim 1, characterized in that: A multi-objective optimization model includes a comprehensive objective function and constraints, wherein the comprehensive objective function... for: in, Indicates user With green electricity resources During the period Matching power, For users With green code resources The degree of alignment of rights and interests between them Indicates user green electricity resources During the period Preference satisfaction Indicates user During the period The potential for green electricity matching for users This represents the transaction cost per unit of matched electricity. Indicates user and green electricity resources Path loss coefficient, Indicates user and green electricity resources Matching risk, , , , , , , These represent the weighting coefficients for green code compatibility benefits, user preference satisfaction benefits, green electricity consumption benefits, user green electricity matching potential benefits, transaction costs, transmission network losses, and grid risk penalties, respectively. The constraints include: user demand constraints, green electricity resource forecast availability constraints, green code rights availability constraints, green electricity ratio constraints, green code unique matching constraints, minimum transaction volume constraints, and grid feasible region constraints.

9. The intelligent matching method for green electricity supply and demand according to claim 1, characterized in that: The process of analyzing the deviation between the execution results and the plan includes: Deviations between the execution results and the plan include: user demand deviation, green electricity supply deviation, grid constraint deviation, user module deviation, green electricity matching potential deviation, and grid loss estimation deviation. Different update strategies are implemented for different types of deviations: For user demand deviations, user preference weights are updated; for green electricity supply deviations, actual output results are added to the training samples, and the parameters of the green electricity resource temporal coding layer, attention layer, and green electricity supply prediction output layer are updated; for grid constraint deviations, risk penalty weights are increased; for user module deviations, the correlation of user behavior features, weighted adjacency matrix, and topological overlap matrix are recalculated based on the latest execution feedback, and the green electricity preference module to which the user belongs is updated; for green electricity matching potential deviations, the green electricity matching baseline is updated based on actual green electricity supply, actual user confirmed electricity volume, grid verification results, and green code write-back results; for grid loss estimation deviations, path loss coefficients are updated.

10. The intelligent matching method for green electricity supply and demand according to claim 1, characterized in that: Green code write-back field for: in, For matching numbers, Number the user. Assign a number to the user's green electricity preference module. Number the main power generation unit. The green code number is used. To match time periods, To match the battery level, For effective green electricity generation, To score the fit, Matching users with the potential of green electricity For power grid verification number, To predict the network loss coefficient, Risk level, The health code is green. For timestamps, For evidence summary; The rules for updating green health code status are as follows: This indicates the updated green health code status. This indicates the green code number or the number participating in this match. A green health code resource identifier.

11. A smart matching system for green electricity supply and demand, characterized in that: include: The user preference module identification unit is used to encode the user's historical behavior sequence to obtain the user's green electricity behavior expression matrix; Based on the user green electricity behavior expression matrix, a topological overlap distance matrix between users is constructed. The topological overlap distance matrix between users is mapped to the green electricity preference module label of each user, and the central behavioral features of each green electricity preference module are extracted. The user's green electricity matching potential is calculated based on the normalized deviation and correlation between the user's green electricity demand prediction curve and the green electricity matching baseline. Based on the user's green electricity behavior expression matrix, the central behavioral features of each green electricity preference module, and the user's green electricity matching potential, the user preference prediction vector is calculated and then corrected. The green code rights and interests matching unit is used to calculate the rights and interests matching degree between users and green code resources based on the corrected user preference prediction vector, calculate the candidate matching priority between users and green code resources based on the rights and interests matching degree and the user's green electricity matching potential, and add green code resources with rights and interests matching degree reaching the rights and interests matching threshold and candidate matching priority reaching the potential matching threshold to the user's candidate matching set. The power grid constraint verification unit is used to perform power grid constraint verification on the candidate matching set. The multi-objective optimization matching unit is used to construct a multi-objective optimization model based on the verified candidate matching set, solve the multi-objective function until the optimization result converges, and output the matching scheme. The code writing-back unit is used to execute the matching scheme and determine whether the execution result is consistent with the plan. If so, a green code writing-back field is generated; otherwise, the deviation between the execution result and the plan is analyzed and a green code writing-back field is generated.