Source-load many-to-many matching method and system based on dynamic preference matrix, electronic equipment and medium
By acquiring and standardizing multidimensional source and load information, generating a dynamic preference matrix, and performing many-to-many matching, the problem of insufficient matching effect and long-term benefits of source and load transactions in existing technologies is solved. This enables in-depth mining and dynamic fusion of multidimensional features of source and load nodes, improving matching accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-04-03
AI Technical Summary
Existing source-load transaction technologies based on matching theory have difficulty improving matching performance and long-term benefits in many-to-many scenarios. This is mainly because the preference expression is singular and fixed, unable to adapt to the dynamic changes of source-load nodes, the matching structure is limited, and there is a lack of closed-loop learning mechanism.
By acquiring multidimensional information from the source and load sides, and after standardization, a dynamic preference matrix is generated by multidimensional feature extraction and weighted fusion. Combined with an improved many-to-many matching algorithm, iterative matching is performed until a stable state is met, thereby realizing in-depth mining and dynamic fusion of multidimensional features of source and load nodes.
It improves the accuracy and stability of matching results, enhances the long-term economic benefits of the system, increases the matching success rate by about 30%, and maintains stable performance in highly volatile scenarios.
Smart Images

Figure CN121786495A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system operation and control technology, and in particular to a source-load many-to-many matching method, system, electronic equipment and medium based on dynamic preference matrix. Background Technology
[0002] With the continuous increase in the proportion of new energy grid connection, the power system is gradually evolving into a distributed, two-way interactive energy internet. In distributed energy systems, there are numerous and dispersed source-side nodes (such as distributed generation units such as photovoltaic and wind power) and load-side nodes (such as user loads, energy storage devices, or adjustable loads). Both source-side power generation and load-side demand are volatile, time-varying, and uncertain, making the matching of power supply and demand and trading decisions increasingly complex.
[0003] To improve system energy efficiency and market activity, researchers have proposed various distributed energy trading and matching mechanisms in recent years, mainly including centralized optimization methods, game theory and mechanism design methods, and matching theory methods. Centralized optimization methods achieve source-load matching and power allocation by establishing a unified optimization model. While theoretically clear, these methods are difficult to extend to multi-node environments. Game theory and mechanism design methods use auction or game models to achieve price competition and market clearing, offering flexibility but struggling to guarantee stable matching and optimal global benefits in many-to-many trading scenarios. Matching theory methods, inspired by social networks and marriage matching models, employ the stable matching concept of the Gale-Shapley algorithm (a classic algorithm for solving stable matching problems) to achieve supply and demand matching. This approach can achieve relatively good stability and fairness with limited information, but traditional methods are often limited to one-to-one or one-to-many structures, and preferences are usually fixed, making them unable to adapt to dynamically changing multidimensional supply and demand differences.
[0004] Prior art document 1 (application publication number CN117076949A) discloses a method and system for optimizing coal supply and demand matching based on the Gale-Shapley algorithm. This method calculates the matching degree between supply and demand parties and ranks their preferences, achieving one-to-one matching using the traditional Gale-Shapley algorithm. While this method can solve simple supply and demand matching problems, it does not fully consider the many-to-many matching needs of source and load nodes in distributed energy scenarios. Preference generation is based solely on a static demand list, lacking the ability to dynamically integrate multi-dimensional information such as spatiotemporal, economic, and reputational factors, and it does not introduce a transaction feedback mechanism to achieve adaptive preference adjustment. Specifically, existing technologies generally suffer from three prominent problems: firstly, preference expression is singular and fixed, making it difficult to capture complex dynamic differences between source and load; secondly, the matching structure is limited, failing to effectively handle quota constraints and overall benefit optimization in many-to-many scenarios; and thirdly, the lack of a closed-loop learning mechanism prevents the matching strategy from dynamically evolving with transaction results. These problems overlap, making it difficult for existing methods to simultaneously achieve matching stability, global benefits, and adaptive capabilities in distributed energy transactions. Therefore, existing source-load trading technologies based on matching theory face technical challenges in improving matching effectiveness and long-term benefits in many-to-many scenarios. Summary of the Invention
[0005] To address the aforementioned shortcomings or drawbacks, this invention provides a source-load many-to-many matching method, system, electronic device, and medium based on a dynamic preference matrix. This invention can solve the technical problem that existing source-load trading technologies based on matching theory struggle to improve matching effectiveness and long-term benefits in many-to-many scenarios.
[0006] This invention provides a source-load many-to-many matching method based on a dynamic preference matrix, comprising: The first multidimensional information of the source-side node and the second multidimensional information of the load-side node are obtained respectively, and the first and second multidimensional information are standardized.
[0007] Based on the standardized first and second multidimensional information, source-side fusion features and load-side fusion features are generated through multidimensional feature extraction and weighted fusion processing.
[0008] Based on the source-side fusion features and the load-side fusion features, a source-side preference matrix and a load-side preference matrix are generated through similarity calculation. The row vectors of the source-side preference matrix represent the preference order of the source-side nodes to all load-side nodes, and the row vectors of the load-side preference matrix represent the preference order of the load-side nodes to all source-side nodes.
[0009] Based on the source-side preference matrix and the load-side preference matrix, iterative matching is performed using a many-to-many matching algorithm until the preset stable matching state conditions are met, thereby obtaining the target matching relationship and generating the matching result.
[0010] According to a second aspect, this invention provides a source-load many-to-many matching system based on a dynamic preference matrix, comprising: The source-load multidimensional data acquisition module is used to acquire the first multidimensional information of the source-side node and the second multidimensional information of the load-side node respectively, and to perform standardization processing on the first multidimensional information and the second multidimensional information.
[0011] The fusion feature generation module is used to generate source-side fusion features and load-side fusion features respectively based on the standardized first and second multidimensional information through multidimensional feature extraction and weighted fusion processing.
[0012] The dynamic preference matrix generation module is used to generate source-side preference matrices and load-side preference matrices based on source-side fusion features and load-side fusion features through similarity calculation. The row vectors of the source-side preference matrix represent the preference order of source-side nodes to all load-side nodes, and the row vectors of the load-side preference matrix represent the preference order of load-side nodes to all source-side nodes.
[0013] The many-to-many matching result generation module is used to perform iterative matching based on the source-side preference matrix and the load-side preference matrix using a many-to-many matching algorithm until the preset stable matching state conditions are met, so as to obtain the target matching relationship and generate the matching result.
[0014] According to a third aspect, the present invention provides an electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to execute any of the source-load many-to-many matching methods based on dynamic preference matrix in the embodiments of the present invention.
[0015] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute any of the source-load many-to-many matching methods based on dynamic preference matrix in the embodiments of the present invention.
[0016] The present invention provides a source-load many-to-many matching method based on a dynamic preference matrix. This method acquires the first multidimensional information of the source-side node and the second multidimensional information of the load-side node, and sequentially performs standardization processing, multidimensional feature extraction and weighted fusion, similarity calculation, and many-to-many matching iterations to finally generate a stable matching result.
[0017] In the overall technical solution, this invention addresses the static preference expression problem mentioned in the background technology by generating dynamic fusion features through multi-dimensional feature extraction and weighted fusion processing, and constructing a preference matrix based on similarity calculation. This solves the shortcomings of traditional methods where the preference list is fixed and cannot reflect the dynamic characteristics of the source and load. Regarding the problem of a simplistic matching structure, it introduces an iterative algorithm that supports many-to-many matching, realizing complex matching relationships between each source node and multiple load nodes, and between each load node and multiple source nodes, overcoming the limitations of one-to-one or one-to-many matching models in distributed energy trading scenarios. Addressing the lack of an adaptive optimization mechanism, it provides a dynamic data foundation for the subsequent integrated feedback learning mechanism through a progressive calculation process from standardized information to fusion features and then to the preference matrix, enabling the matching strategy to have continuous optimization capabilities.
[0018] Therefore, the technical solution of this invention solves the technical problem that existing source-load transaction technology based on matching theory is difficult to improve matching effect and long-term benefits in many-to-many scenarios. It realizes in-depth mining and dynamic fusion of multi-dimensional features of source-load nodes, and improves the accuracy, stability and long-term economic benefits of matching results. Attached Figure Description
[0019] Figure 1 This is a flowchart of a source-load many-to-many matching method based on a dynamic preference matrix according to an embodiment of the present invention; Figure 2 This diagram illustrates the steps of a source-load many-to-many matching method based on a dynamic preference matrix, according to another embodiment of the present invention. Figure 3 This is a schematic diagram of the structure of a source-load many-to-many matching system based on a dynamic preference matrix according to an embodiment of the present invention; Figure 4 This is a block diagram of an electronic device used to implement embodiments of the present invention. Detailed Implementation
[0020] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0021] During the development of this invention, the inventors, through extensive experiments and data analysis, revealed the intrinsic relationship between the spatiotemporal dynamic characteristics, economic behavior patterns, and matching stability of source and load nodes. Traditional matching methods based on fixed preferences or single dimensions not only struggle to accurately characterize the real-time state differences between source and load nodes, but also suffer from incomplete preference representation, leading to deviations from optimal matching results and limited overall system benefits. Based on this relationship, the inventors innovatively proposed this technical solution. Utilizing a multi-dimensional feature extraction and weighted fusion mechanism, a dynamic preference matrix is constructed to characterize the bilateral selection relationship. Combined with an improved many-to-many stable matching algorithm, this achieves stable matching and optimizes global benefits while satisfying quota constraints, embodying the core concepts of "data-driven, dynamic optimization, and closed-loop feedback."
[0022] Specifically, through comparative experiments, the invention team discovered three major technical bottlenecks in traditional static matching algorithms and single-preference models: first, the preference expression is rigid and cannot adapt to dynamic changes in node states; second, the information dimension is singular, making it difficult to comprehensively consider multi-dimensional factors such as time, space, economy, and reputation; and third, the matching structure is limited, failing to support complex many-to-many transaction scenarios. These technical defects lead to low matching efficiency, limited market participation, and difficulty in improving long-term operational benefits. However, the dynamic preference matrix generation method and many-to-many matching optimization mechanism proposed in this invention can improve the accuracy and stability of matching results, achieving continuous optimization of system benefits. Experimental data shows that this method can improve the efficiency of traditional methods by approximately 30% in terms of matching success rate, maintaining stable matching performance even in highly volatile scenarios.
[0023] Therefore, according to the first aspect, the present invention provides a source-load many-to-many matching method based on a dynamic preference matrix, which can be applied to a distributed energy trading and management system (hereinafter referred to as the "system"). The system can be deployed locally or run on a power market operation platform or a virtual power plant control center via cloud services to complete the fully automated processing of many-to-many source-load matching decisions, trading optimization, and dynamic scheduling.
[0024] Specifically, this system can be deployed in various hardware environments, including but not limited to centralized server clusters, edge computing nodes, and hybrid cloud-edge architectures. This flexible deployment architecture enables the system to meet the high-concurrency processing needs of regional distributed energy markets while also adapting to the real-time control requirements of park-level microgrids. In terms of operation, the system achieves decoupling and coordination of data processing, feature fusion, matching decision-making, and feedback optimization through modular design. The data acquisition and processing module receives heterogeneous data streams from smart meters, Supervisory Control and Data Acquisition (SCADA) systems, and environmental sensors. After cleaning, alignment, and normalization, the data is sent to the feature extraction and weighted fusion module for multi-dimensional feature vector generation. Finally, a dynamic preference matrix drives a many-to-many matching algorithm to complete transaction decisions.
[0025] like Figure 1 As shown, the method may include: Step S110: Obtain the first multidimensional information of the source-side node and the second multidimensional information of the load-side node respectively, and perform standardization processing on the first multidimensional information and the second multidimensional information.
[0026] The first multidimensional information refers to the set of multiple attribute data of source-side nodes (such as photovoltaic power generation units, wind turbine generators, and other distributed power sources), including information such as power generation capacity, power generation cost, availability time, geographical location, and historical reputation; the second multidimensional information refers to the set of multiple attribute data of load-side nodes (such as industrial load, commercial load, energy storage devices, etc.), including information such as demand capacity, acceptable price, load response characteristics, historical reputation, and geographical location; standardization processing refers to the sequence of operations to preprocess the raw data to eliminate dimensional differences and noise, including steps such as data cleaning, data alignment, and normalization.
[0027] Specifically, the system can collect first-dimensional and second-dimensional information in real time through metering devices (such as smart meters), data acquisition and monitoring control systems (SCADA), and equipment management platforms. It can also perform data cleaning (removing invalid and abnormal data points), data alignment (synchronizing source and load data in timestamps and spatial coordinates), and normalization (linearly scaling the data to the [0,1] interval) operations on the collected data.
[0028] For example, the system collects data from 20 source nodes and 30 load nodes in a regional distributed energy network. The power generation capacity of the source nodes ranges from 10 kW to 500 kW, and the demand capacity of the load nodes ranges from 5 kW to 200 kW. The system removes null data points (approximately 0.5% of the total) caused by communication interruptions through data cleaning, and aligns the data to a uniform time granularity (15-minute interval), ultimately generating a standardized data file (approximately 50 megabytes, or 50 MB).
[0029] Step S120: Based on the standardized first and second multidimensional information, multidimensional feature extraction and weighted fusion processing are used to generate source-side fusion features and load-side fusion features respectively.
[0030] Among them, multidimensional feature extraction and weighted fusion processing refers to the process of extracting time-series features, spatial features, economic features, and reputation features from standardized data, and then performing linear weighted combination by assigning weights; source-side fusion features refer to the comprehensive feature vector obtained after feature fusion of source-side nodes, which is used to characterize the multidimensional state of the nodes; load-side fusion features refer to the low-dimensional real vector generated for each load-side node (i.e., energy consumption-side node, such as user load, energy storage device, adjustable load) in the source-load many-to-many matching method based on dynamic preference matrix, through a specific feature extraction and fusion process, which can comprehensively characterize its multidimensional state.
[0031] Specifically, the system can perform feature extraction through a set of preset feature extraction models: using a time-series feature extraction model (such as Long Short-Term Memory, or LSTM) to extract time-series features (such as power generation fluctuation patterns) from time-series data; using a spatial feature extraction model (such as Graph Neural Network, or GNN) to extract spatial features (such as electrical distance between nodes) from geographic location data; and using a dimensionality reduction algorithm (such as Principal Component Analysis, or PCA) to extract economic features (such as cost-benefit ratio) and credit features (such as performance rate) from economic indicators and credit history. Then, a fused feature is generated through weighted fusion calculation (such as linear weighted summation).
[0032] For example, the system extracts temporal features (32 dimensions), spatial features (16 dimensions), economic features (8 dimensions), and reputation features (8 dimensions) from the aforementioned 20 source nodes, and assigns weights (e.g., temporal weight 0.4, spatial weight 0.3, economic weight 0.2, and reputation weight 0.1), ultimately generating a source-side fusion feature vector with a dimension of 64. For load-side processing, a symmetrical but weight-differentiated feature fusion strategy is adopted. Specifically, the system performs the same feature extraction process on 30 load-side nodes, but adjusts the weight allocation according to the business characteristics of the load-side nodes. For example, temporal features (32 dimensions, reflecting load change patterns), spatial features (16 dimensions, representing access location), economic features (8 dimensions, reflecting price sensitivity), and reputation features (8 dimensions, representing contract fulfillment reliability) are extracted for the load-side nodes. In the weighted fusion stage, the system assigns differentiated weights to the load-side nodes: temporal weight 0.35, spatial weight 0.25, economic weight 0.30, and reputation weight 0.10. This weighting configuration emphasizes the load side's sensitivity to economic factors (price acceptance), while slightly reducing the weights of temporal and spatial factors. Through weighted calculation (element-wise multiplication of the feature vector with the weights followed by concatenation), the system ultimately generates a load-side fused feature vector with dimensions 32+16+8+8=64. For example, for a load node in a commercial center, the temporal feature vector extracted by LSTM is multiplied with a weight of 0.35, the spatial feature extracted by GNN is multiplied with a weight of 0.25, economic features (such as acceptable price range) are multiplied with a weight of 0.30, and reputation features are multiplied with a weight of 0.10, ultimately fusing into a 64-dimensional feature vector. This differentiated weighting design makes the load-side fused features more aligned with its decision-making characteristics as an energy receiver (such as a greater focus on cost-effectiveness), complementing the source-side features and laying the foundation for the subsequent construction of a bidirectional preference matrix. The system ensures that source and load features can be similarly calculated within the same vector space by aligning feature dimensions (all 64-dimensional).
[0033] Step S130: Based on the source-side fusion features and the load-side fusion features, generate the source-side preference matrix and the load-side preference matrix by calculating similarity.
[0034] The row vectors of the source-side preference matrix represent the preference order of the source-side nodes to all load-side nodes, while the row vectors of the load-side preference matrix represent the preference order of the load-side nodes to all source-side nodes.
[0035] Similarity calculation refers to the mathematical operation that quantifies the degree of matching association between two feature vectors, such as using cosine similarity or Euclidean distance. The source-side preference matrix is a matrix with the number of rows equal to the number of source-side nodes and the number of columns equal to the number of load-side nodes, where each element represents the preference score of a source-side node for a load-side node. Conversely, the load-side preference matrix is a matrix with the number of rows equal to the number of load-side nodes and the number of columns equal to the number of source-side nodes, where each element represents the preference score of a load-side node for a source-side node. This symmetric matrix structure ensures the bidirectionality and fairness of the matching process, providing the core input for subsequent many-to-many stable matching algorithms.
[0036] Specifically, the system can calculate the similarity between source-side fused features and load-side fused features using a similarity function (such as cosine similarity): for each source-side node, calculate its similarity score with all load-side nodes, and arrange them in descending order of score to generate a source-side preference matrix; while for the load-side preference matrix, calculate the similarity score between each load-side node and all source-side nodes using the same or different similarity functions, and arrange them in descending order of score to generate a preference matrix with row and column dimensions that are transposed to the source-side preference matrix.
[0037] For example, the system uses the cosine similarity function to calculate the fusion feature similarity between source-side node A and load-side node X, with a score of 0.85 (range 0~1). Finally, a 20×30 source-side preference matrix is generated, where the first row represents the preference order of source node 1 to 30 load nodes (e.g., the highest preference score is 0.92, corresponding to load node 5).
[0038] Step S140: Based on the source-side preference matrix and the load-side preference matrix, perform iterative matching using a many-to-many matching algorithm until the preset stable matching state conditions are met, and obtain the target matching relationship to generate the matching result.
[0039] Among them, the many-to-many matching algorithm refers to the algorithm that supports each source node to match with multiple load nodes and each load node to match with multiple source nodes (such as the improved Gale-Shapley algorithm); the stable matching state condition refers to the convergence state in which there are no blocking pairs in the matching results (i.e., no situation where both parties prefer each other to the current matching object); the target matching relationship refers to the final determined set of source-load node matching pairs and their associated transaction constraints.
[0040] Specifically, the system can perform iterative matching through a many-to-many matching algorithm: initialize all nodes to an unmatched state and set quota constraints (such as the maximum number of matching nodes on the source side being limited by power generation capacity), then enter the proposal phase (the source side nodes send transaction proposals to the load side nodes in the order of preference), the acceptance and rejection phase (the load side nodes accept or reject proposals according to preferences and remaining quotas), and the state update phase (update the matching state and quotas), repeating the iteration until no new proposals are generated and all proposals are processed, reaching a stable matching state.
[0041] For example, the system reaches stability after 10 rounds of iteration. The matching results include transactions between source node 1 and load nodes 3 and 7 (the number of matches is constrained by the quota, such as each source node can match a maximum of 3 load nodes). Finally, a matching result file is generated (containing matching pairs, transaction power suggestions, and price suggestions).
[0042] Alternatively, in some embodiments, the many-to-many matching algorithm employs a modified Gale-Shapley algorithm. During iterative matching, the system first initializes all source-side and load-side nodes to an unmatched state and sets quota constraints. Let the set of source-side nodes be: The set of load-side nodes is as follows: Each source node quota Determined based on its power generation capacity (e.g.) ), each load node quota Determined based on its demand capacity (e.g.) The preference matrix has been generated through similarity calculation: Source-side preference matrix. It is Matrix, elements Indicates the source node Load nodes The preference score is calculated using cosine similarity: ; in, and These are the source-side and load-side fused feature vectors, respectively; the load-side preference matrix. It is an n×m matrix with elements Represents the load node For the source node The preference score is calculated as the reciprocal of the normalized Euclidean distance: .
[0043] The iterative matching process involves multiple rounds, each round comprising a proposal phase, an acceptance / rejection phase, and a state update phase. During the proposal phase, each source node... According to their preference order (i.e., by) A list of payload nodes in descending order is used to send transaction proposals to payload nodes whose quotas are not yet full; during the accept and reject phase, each payload node... According to their preference order (by) The system generates a list of source nodes in descending order and the currently available quota. It temporarily accepts the highest-ranking proposal and rejects the rest. During the state update phase, the system updates the matching state and quota, and adds the rejected source nodes back to the matching queue. This iteration continues until no new proposals are generated and all proposals have been processed, reaching a stable matching state. For example, assuming a simplified scenario with m=2, n=3, and the quota is set to... =2, =1, =1, =2, =1, and the preference matrix is assumed to be: , ; First round of proposals: Source node To the highest preference (Score 0.9) Send proposal, source node To the highest preference (Score 0.9) Send proposal; Accept phase: Charge node Only received The proposal is temporarily accepted (occupying 1 / 1 of the quota), for the node. Only received The proposal is temporarily accepted (occupying 1 / 2 of the quota); Status update: Matching pair is and Second round of proposals: Source node Quota remaining 1, towards secondary preference (Score 0.8) Send proposal; Accept phase: Charge node Comparing the proposals, their preference order is as follows: (Score 0.9) (Score 0.6), therefore accepted. And refused ,at the same time Quota updated to 2 / 2; Status updated: Matching pairs updated to , , After being rejected, it enters the matching queue. Third round of proposals: Source node Sub-preference (Score 0.5) Send proposal; Accept phase: Charge node Temporarily accept (Quota 1 / 1). The final matching result is: The algorithm achieves a stable state with no blocking pairs. This process intuitively demonstrates the iterative logic of many-to-many matching through mathematical examples, ensuring the fairness and convergence of the algorithm under quota constraints.
[0044] Therefore, according to the above implementation method, the system obtains the first multidimensional information of the source-side node and the second multidimensional information of the load-side node respectively, and performs standardization processing, multidimensional feature extraction and weighted fusion, similarity calculation and many-to-many matching iteration in sequence, and finally generates a stable matching result.
[0045] Specifically, in this implementation, the technical solution addresses the static preference expression problem mentioned in the background technology by generating dynamic fusion features through multi-dimensional feature extraction and weighted fusion processing, and constructing a preference matrix based on similarity calculation. This solves the shortcomings of traditional methods where the preference list is fixed and cannot reflect the dynamic characteristics of source and load. Regarding the issue of a simplistic matching structure, an iterative algorithm supporting many-to-many matching is introduced, realizing complex matching relationships between each source node and multiple load nodes, and between each load node and multiple source nodes. This overcomes the limitations of one-to-one or one-to-many matching models in distributed energy trading scenarios. Addressing the lack of an adaptive optimization mechanism, a progressive calculation process from standardized information to fusion features and then to the preference matrix provides a dynamic data foundation for subsequent integrated feedback learning mechanisms, enabling the matching strategy to continuously optimize. Therefore, this implementation solves the technical problem of existing source-load trading technologies based on matching theory struggling to improve matching effectiveness and long-term benefits in many-to-many scenarios. It achieves in-depth mining and dynamic fusion of multi-dimensional features of source and load nodes, improving the accuracy, stability, and long-term economic benefits of the matching results.
[0046] In other embodiments, such as Figure 2The diagram illustrates the steps of a source-load many-to-many matching method based on a dynamic preference matrix. The execution flow of this technical solution will now be illustrated using a specific regional energy internet application scenario. Assume a regional energy internet includes 15 source-side nodes (5 photovoltaic power plants, 5 wind farms, and 5 small gas-fired power plants) and 25 load-side nodes (10 industrial loads, 10 commercial loads, and 5 electric vehicle charging stations). The system executes a complete matching process once every predetermined period (e.g., every 30 minutes). In the data preprocessing stage, the system collects source-load data from smart meters, power generation monitoring systems, and load management systems. For example, it collects real-time power generation capacity of photovoltaic power plant A as 800 kW, power generation cost as 0.28 yuan / kWh, and available time as 06:00-18:00; simultaneously, it collects demand capacity of industrial load B as 300 kW, with an acceptable price of 0.65 yuan / kWh. These heterogeneous data are then standardized to generate input data with unified dimensions. In the feature extraction and fusion stage, the system processes standardized data using a set of feature extraction models. For example, the temporal feature extraction model (LSTM) is used to analyze the power fluctuations of photovoltaic power station A over the past 24 hours, extracting 32-dimensional temporal features; the spatial feature extraction model (GNN) is used to calculate electrical distances based on node geographical locations, generating 16-dimensional spatial features; and PCA is used to reduce dimensionality and extract 8-dimensional economic features and 4-dimensional credit features from economic indicators and credit history, respectively. Finally, weighted fusion is performed according to the weight vector [0.35, 0.25, 0.25, 0.15] to generate a 60-dimensional fused feature vector. In the preference matrix calculation stage, the system uses a cosine similarity function to calculate the feature similarity between nodes. For example, the preference score of source node A for load node B is calculated to be 0.87, while the preference score for load node C is 0.72, thus forming the preference ranking [B, C, ...] for node A in the source-side preference matrix. At the same time, the preference score of load node B for source node A is calculated to be 0.91, forming the load-side preference matrix. During the matching execution phase, the system executes an improved Gale-Shapley algorithm. The matching quota for source node A is set to 3 (based on its 800 kW generating capacity and minimum trading power of 200 kW), and the matching quota for load node B is set to 2. After five rounds of iterative matching, the system forms a stable matching result, including matching pairs between source node A and load nodes B and D, and suggests trading volumes of 400 kWh and 300 kWh respectively, with trading prices of RMB 0.58 / kWh and RMB 0.61 / kWh respectively. In the benefit optimization phase, the system establishes a single-objective constrained optimization function, aiming to maximize overall benefit, comprehensively considering trading revenue, line losses, and fairness indicators, and solves the optimal power allocation scheme using a genetic algorithm. In the feedback update phase, the system calculates the comprehensive benefit index based on the matching results of this round (e.g., the total trading revenue of this round is 12% higher than the previous round) and updates the feature weights according to predetermined rules.For example, the weight of economic characteristics is adjusted from 0.25 to 0.28, and the weight of time-series characteristics is slightly adjusted from 0.35 to 0.33, making subsequent matching more focused on economic benefits. The updated weights will be applied to the next matching cycle, forming a continuously optimized closed-loop system. This embodiment demonstrates that the technical solution can effectively handle the complex matching needs in actual energy internet, continuously improving system performance through a dynamic optimization mechanism.
[0047] In some embodiments, the system can calculate the optimization function value aimed at maximizing overall benefits using the following formula (a): (a) Formula (a) is a single-objective constrained optimization function used to optimize the transaction volume and price based on the matching results. This represents the transaction volume between source node i and load node j, in kilowatt-hours (kWh). This indicates the electricity price for the corresponding transaction, expressed in yuan per kilowatt-hour (yuan / kWh). This represents the power generation cost of source node i; λ represents the acceptable reference electricity price for load-side node j; λ is the price deviation penalty coefficient, used to balance economic benefits and fairness, and its value can be adaptively adjusted within the range of [0.1, 0.5] based on historical data. Represents transaction profits, This is a fairness penalty measure to ensure that electricity prices do not deviate excessively from the load-side affordability.
[0048] In some embodiments, the system can achieve a joint optimization solution for the trading volume and trading price using the following formula (b): (b) Formula (b) is a single-objective constrained optimization function used to solve for the trading volume that maximizes the objective function F (such as total system benefit, social welfare, etc.) under the condition of satisfying system constraints. With transaction price The optimal combination; This indicates an optimization operation. This represents the transaction volume between source node i and load node j. This indicates the corresponding transaction price; next, In this embodiment, the system also ensures that the optimization results meet the actual physical and operational constraints through the following constraint formula (C): (c) Wherein, formula (c) is a set of inequality constraints: This means that the total amount of electricity transmitted from source node i to all load nodes must not exceed its maximum generating capacity. ; This indicates that the total amount of electricity received by load node j from all source nodes must at least meet its minimum requirement. ; Ensure that the transaction volume is non-negative; furthermore, in this embodiment, the system also dynamically adjusts the feature weights through the following feedback update formula (d): (d) Wherein, formula (d) is the weight adaptive update rule: This represents the feature weight combination (including temporal, spatial, economic, and reputation weights) of the k-th node in round t of matching. The updated weights; The learning rate (usually 0.1~0.2) is used to control the adjustment step size; This represents the actual transaction revenue or comprehensive benefit index of source node i and load node j after the t-th round of matching; For the normalization function, Map to the [0,1] interval to quantify the quality of matching.
[0049] Therefore, by combining the above formulas (b) to (d), the system can achieve joint optimization allocation of transaction volume and price, strictly meet the system operation constraints, and dynamically adjust the feature weights based on historical transaction benefits, so that the matching strategy has the ability to continuously self-optimize, thereby improving the long-term economic efficiency and adaptability.
[0050] In some embodiments, the first multidimensional information includes generation capacity information, generation cost information, availability time information, geographic location information, and historical credit information; the second multidimensional information includes demand capacity information, acceptable price information, load response characteristics information, historical credit information, and geographic location information. The first multidimensional information of the source-side node and the second multidimensional information of the load-side node are obtained respectively, and the first and second multidimensional information are standardized, including: The first multidimensional information of the source-side node and the second multidimensional information of the load-side node are collected from metering equipment, data acquisition and monitoring systems, and equipment management platforms.
[0051] Among them, metering equipment refers to special devices used to measure electrical energy parameters, such as smart meters; Supervisory Control and Data Acquisition (SCADA) system refers to a computer system used to monitor and control the operation of the power system in real time; and equipment management platform refers to a software platform for registering, managing and monitoring the status of distributed energy equipment.
[0052] Specifically, the system can periodically and asynchronously collect structured data from the above three types of data sources through an Application Programming Interface (API) or a Message Queuing Telemetry Transport (MQTT) protocol, and store it in a time-series database for temporary storage.
[0053] For example, the system performs a data acquisition task every 15 minutes, reading power generation and voltage data from smart meters deployed at 50 source nodes (such as photovoltaic inverters), obtaining load data from 30 load nodes (such as smart buildings) from the SCADA system, and obtaining the geographical coordinates and equipment health status data of all nodes from the equipment management platform. The amount of data collected in a single session is approximately 2 megabytes (MB).
[0054] Data cleaning operations are performed on the collected first and second multidimensional information. The data cleaning operations include removing invalid data points and abnormal data points.
[0055] Invalid data points refer to data records with empty values, garbled characters, or incorrect formats caused by communication interruptions, equipment failures, etc.; abnormal data points refer to values that clearly exceed reasonable physical ranges or statistical laws, such as negative power generation or load demand exceeding 200% of the transformer's rated capacity.
[0056] Specifically, the system can perform data cleaning by combining a rule engine and a statistical outlier detection algorithm: first, predefined business rules (such as non-negative values and upper and lower thresholds) are applied to filter invalid data, and then an outlier detection method based on the interquartile range (IQR) is used to identify and remove abnormal data.
[0057] For example, the system detected that a photovoltaic node reported a power generation of 15 kilowatts (kW) at night. This value exceeded its rated capacity (10kW) and violated the laws of physics. It was marked as an abnormal data point and removed from the dataset. This cleaning process removed approximately 0.5% of invalid and abnormal data.
[0058] Perform data alignment operations on the first and second multidimensional information after data cleaning.
[0059] Data alignment refers to the process of converting data from different sources with different timestamps and spatial reference systems to the same time and space reference.
[0060] Specifically, the system can achieve data alignment through time window aggregation and spatial coordinate transformation: for the time dimension, a fixed time interval (such as 15 minutes) is used as the window, and linear interpolation or average aggregation is performed on the data within the window; for the spatial dimension, the geographical locations of all nodes are uniformly transformed to the same coordinate system (such as WGS-84 geographic coordinate system or UTM projected coordinate system).
[0061] For example, the system aligns the data from source node A (sampling interval of 5 minutes) and payload node B (sampling interval of 1 minute) within the time window of 10:00 to 10:15 on January 1, 2024, to four equally spaced timestamps of 10:00, 10:05, 10:10, and 10:15 through linear interpolation, and uniformly converts the latitude and longitude coordinates of all nodes to UTM Zone 50N coordinates. UTM Zone 50N coordinates are a plane rectangular coordinate system applicable to a specific region of the Northern Hemisphere (114° to 120° east longitude), and are part of the Universal Transverse Mercator (UTM) projection zoning system. Its core advantage lies in its ability to convert the Earth's ellipsoidal coordinates into two-dimensional plane coordinates, thereby greatly simplifying spatial calculations such as distance and area, and effectively controlling projection distortion. In this system, "Zone 50N" specifically refers to the 50th projection zone in the Northern Hemisphere, with its central meridian at 117 degrees east longitude. The covered area mainly includes parts of North China (such as Beijing and Tianjin). This coordinate system is widely used in the spatial analysis of power systems, ensuring that the geographical location information of source and load nodes has a unified and measurable spatial reference benchmark in matching calculations.
[0062] Normalization is performed on the first and second multidimensional information after data alignment to obtain the standardized first and second multidimensional information.
[0063] Normalization is a data processing method that uses mathematical transformations to scale feature data of different dimensions and magnitudes to the same numerical range, aiming to eliminate the impact of differences in dimensions between features on model training.
[0064] Specifically, the system can be processed using a minimum-maximum normalization algorithm: for each feature dimension, its value is linearly transformed to the [0,1] interval, and the transformation formula is as follows: ; Where X is the original value, and These are the minimum and maximum values of the feature on the training set, respectively.
[0065] For example, the actual range of the generation capacity characteristic is 50 kW to 500 kW, and the system normalizes it: for a source node with a capacity of 200 kW, the normalized value is... After all features are normalized, standardized data with a uniform numerical range are formed.
[0066] Therefore, according to the above implementation method, the system can reliably obtain high-quality standardized data from heterogeneous data sources, providing a consistent and standardized data foundation for subsequent feature fusion and matching calculations.
[0067] In some embodiments, based on the standardized first and second multidimensional information, source-side fusion features and load-side fusion features are generated respectively through multidimensional feature extraction and weighted fusion processing, including: By performing feature extraction operations on the standardized first and second multidimensional information using a pre-defined feature extraction model set, temporal features, spatial features, economic features, and reputation features are obtained.
[0068] The feature extraction model group refers to an integrated feature processing unit composed of multiple specialized models. Each sub-model is optimized for a specific type of data pattern to achieve efficient and accurate feature extraction.
[0069] Specifically, the system adopts a divide-and-conquer strategy, distributing heterogeneous multidimensional information to corresponding specialized feature extraction models according to data type: using time-series feature extraction models (such as LSTM) to process time-series data (such as historical power generation series) and extracting time-series features (such as fluctuation period and trend); using spatial feature extraction models (such as GNN) to process geographical location and network topology data and extracting spatial features (such as electrical distance and node centrality); and using attribute feature extraction models (such as PCA) to process static attribute data (such as cost and reputation) and extract economic and reputation features (such as cost-benefit principal components and reputation score principal components).
[0070] For example, the system processes the power generation sequence of a source node over the past 24 hours with a sampling interval of 15 minutes (a total of 96 time points). Using an LSTM network with 32 hidden units, a 128-dimensional time-series feature vector is extracted. Simultaneously, based on the node's position in the distribution network topology, a 64-dimensional spatial feature vector is extracted using a 2-layer GNN model. Furthermore, PCA dimensionality reduction is applied to five economic indicators for the node, including generation cost and historical bidding, retaining the top three principal components with a variance contribution rate exceeding 85% as economic features (3-dimensional). Similar processing is applied to four reputation indicators, including historical performance rate and number of complaints, to obtain reputation features (3-dimensional).
[0071] Assign corresponding feature weights to time-series features, spatial features, economic features, and credit features respectively.
[0072] Feature weights refer to a set of adjustable parameters used to quantify the relative importance of different feature categories in the final fusion result. Their values are initialized using domain knowledge and can be dynamically optimized through a feedback mechanism.
[0073] Specifically, the system assigns weights to four types of features through a weight management module: this module maintains a weight vector. ,in The weight coefficients represent the time series, spatial, economic, and reputational characteristics, respectively, and satisfy the following conditions: The normalization constraint applies. The initial values of the weights can be set based on correlation analysis of historical matching data or expert experience.
[0074] For example, in an application scenario that focuses on short-term power balance, the initial weights can be set as: time-series feature weights. Spatial feature weights Economic characteristic weights Reputation feature weight These weights are stored as floating-point numbers in the system configuration file.
[0075] The time-series features, spatial features, economic features, and reputation features, which have been assigned corresponding weights, are weighted and fused to generate source-side fused features and load-side fused features, respectively.
[0076] Weighted fusion calculation refers to a linear or nonlinear combination operation that multiplies each feature vector by its corresponding weight and then concatenates or sums them to form a unified feature representation that can comprehensively reflect the node state.
[0077] Specifically, the system employs a feature-weighted concatenation method: first, each type of feature vector is multiplied by its respective weight coefficient (e.g., time-series feature vectors are multiplied by...). Then, the weighted feature vectors are concatenated along their feature dimensions to form the final high-dimensional fused feature vector. This process is performed independently for source-side nodes and load-side nodes, but they share the same weight allocation logic.
[0078] For example, for a given source node, its weighted temporal features are a 128-dimensional vector multiplied by 0.35, spatial features are a 64-dimensional vector multiplied by 0.25, economic features are a 3-dimensional vector multiplied by 0.25, and reputation features are a 3-dimensional vector multiplied by 0.15. Subsequently, the system concatenates these weighted vectors into a single... The source-side fused feature vector is dimensional. The load-side fused features are generated using the same logic.
[0079] Therefore, according to the above implementation method, the system can transform the multidimensional heterogeneous information of source and load nodes into a unified, comparable fusion feature vector that can reflect key differences through structured feature extraction and adaptive weighted fusion, laying the foundation for subsequent accurate calculation of the preference matrix.
[0080] In some embodiments, a source-side preference matrix and a load-side preference matrix are generated by similarity calculation based on source-side fusion features and load-side fusion features, including: Based on the source-side fusion features and the load-side fusion features, the preference scores of the source-side nodes to the load-side nodes are calculated using the first similarity function to generate the source-side preference matrix.
[0081] The first similarity function is a mathematical function specifically used to quantify the degree of similarity between the fused features of the source-side nodes and the fused features of the load-side nodes. The larger its output value, the higher the degree of matching association. The preference score is a numerical result obtained through similarity calculation, used to characterize the preference strength of the source-side node for a specific load-side node. The source-side preference matrix is a two-dimensional matrix with the number of rows equal to the number of source-side nodes and the number of columns equal to the number of load-side nodes. Its element values store the preference scores, and each row vector represents the preference order of a source-side node for all load-side nodes.
[0082] Specifically, the system can perform calculations by traversing each source-side node: for each source-side node, the similarity value between its fused feature and the fused feature of each load-side node is calculated in parallel using the first similarity function, and the results are organized into a matrix according to the source-side node index and the load-side node index, where the row index corresponds to the source-side node number and the column index corresponds to the load-side node number.
[0083] For example, the system processes a scenario containing 20 source nodes and 30 payload nodes, with each node having a fusion feature dimension of 198. The system uses cosine similarity as the first similarity function to calculate the fusion feature of source node 1 and the fusion feature of payload node 1, obtaining a preference score of 0.85 (range 0~1). The system then calculates the scores of source node 1 with all 30 payload nodes in turn, finally generating a 20-row, 30-column source-side preference matrix. The first row represents the preference score sequence of source node 1 with the 30 payload nodes (e.g., the highest score of 0.92 corresponds to payload node 5, and the lowest score of 0.45 corresponds to payload node 12).
[0084] Based on the load-side fusion features and the source-side fusion features, the preference scores of the load-side nodes to the source-side nodes are calculated using the second similarity function to generate the load-side preference matrix.
[0085] The second similarity function is a mathematical function specifically used to quantify the degree of similarity between the fused features of the load-side nodes and the fused features of the source-side nodes. Its configuration logic is independent of the first similarity function to adapt to the asymmetry of bidirectional preference calculation. The load-side preference matrix is a two-dimensional matrix with the number of rows equal to the number of load-side nodes and the number of columns equal to the number of source-side nodes. Its structure is similar to the source-side preference matrix, but the roles of rows and columns are reversed.
[0086] Specifically, the system adopts a computational process that is symmetrical to but opposite in direction to the generation of the source-side preference matrix: for each load-side node, the similarity value between its fused feature and the fused feature of each source-side node is calculated in parallel using the second similarity function, and a matrix is constructed according to the load-side node index and the source-side node index.
[0087] For example, in the same scenario, the system uses the reciprocal of the Euclidean distance (normalized to the range of 0 to 1) as the second similarity function to calculate the fusion features of load node 1 and source node 1, obtaining a preference score of 0.78. Then, the system calculates the scores of load node 1 with all 20 source nodes in turn, and finally generates a 30-row, 20-column load-side preference matrix, where the first row represents the preference score sequence of load node 1 with respect to the 20 source nodes (e.g., the highest score of 0.88 corresponds to source node 3).
[0088] The first similarity function is configured to quantify the degree of matching association between the fusion features of any source-side node and the fusion features of any load-side node, and the second similarity function is configured to quantify the degree of matching association between the fusion features of any load-side node and the fusion features of any source-side node.
[0089] Specifically, the system allows for flexible definition of similarity functions through a function configuration module: the first similarity function can be cosine similarity (emphasizing consistency in feature vector direction) or Pearson correlation coefficient (emphasizing linear correlation), and the second similarity function can be the reciprocal of Euclidean distance (emphasizing spatial proximity) or other customized functions to adapt to different scenario requirements; function parameters (such as the norm order in distance metrics) can be adjusted through configuration files. For example, in the default configuration, the system sets the first similarity function to cosine similarity, and the calculation formula is... Where A and B are the source-side and load-side fused feature vectors, respectively; the second similarity function is set as the reciprocal of the normalized Euclidean distance, calculated using the following formula: To ensure that the score range is between 0 and 1; the system uses single-precision floating-point numbers (32 bits) to store the score values, and the memory usage of each preference matrix is 20×30×4 bytes = 2.4 kilobytes (KB).
[0090] Therefore, according to the above implementation method, the system can automatically and efficiently generate a bidirectional preference matrix, accurately capture the multidimensional matching association between source and load nodes, provide reliable input for subsequent many-to-many stable matching algorithms, thereby improving the overall efficiency and fairness of distributed energy trading.
[0091] In some embodiments, based on the source-side preference matrix and the load-side preference matrix, iterative matching is performed using a many-to-many matching algorithm until a preset stable matching state condition is met, thereby obtaining the target matching relationship and generating a matching result, including: Set the source-side nodes and load-side nodes to an unmatched state, and set quota constraints for each source-side node and each load-side node.
[0092] Among them, the unmatched state refers to the initial state in which a node has not yet formed a formal matching relationship with any other node, and is usually marked by a state flag bit at the beginning of the algorithm; the quota constraint refers to the rules that limit the maximum number of matches that a single node can establish during the matching process, including source-side quota constraints (based on power generation capacity) and load-side quota constraints (based on demand capacity).
[0093] Specifically, the system marks the matching status of all source-side nodes and load-side nodes as "unmatched" through the initialization module. At the same time, it assigns a quota value to each node based on its physical characteristics or business rules. This quota value determines the maximum number of counterpart nodes that the node can match in a single matching round.
[0094] For example, the system initializes 20 source nodes and 30 load nodes, all with the status set to "unmatched". A source node A with a maximum generating capacity of 500 kW is set to a source-side quota constraint of 3 (meaning it can supply power to a maximum of 3 load nodes); a load node B with a demand capacity of 200 kW is set to a load-side quota constraint of 2 (meaning it can accept power from a maximum of 2 source nodes).
[0095] Once the proposal phase begins, each source node sends a transaction proposal to the load node that meets the quota constraint, according to the preference order in the source preference matrix.
[0096] Among them, the proposal stage refers to the algorithm steps in which the source node actively sends a matching invitation to the load node; the preference order refers to the list of load nodes arranged from high to low according to the preference score; and the quota constraint condition is met when the number of proposals currently accepted by the target load node has not reached its quota limit, and the remaining number of proposals that the source node can propose is greater than zero.
[0097] Specifically, the system schedules source-side nodes by round: In each proposal round, each source-side node that has not yet reached its matching quota sends a transaction proposal to the next load-side node that has not yet made a proposal and still has quota space, according to the order in its preference matrix.
[0098] For example, source node A ( According to their preference order ( First, the proposal is sent to the first-ranked payload node 5. If the number of proposals accepted by payload node 5 (let's say 1) has not reached its quota (let's say 2), then the proposal is validly entered into the waiting queue.
[0099] During the acceptance and rejection phase, each load node accepts or rejects the received transaction proposals based on the preference order in the load preference matrix and the currently available quota.
[0100] The acceptance and rejection phase refers to the decision-making process of the load node in processing the received proposals; the current available quota refers to the remaining acceptable quota of the load node after deducting the number of currently accepted proposals from the upper limit of the quota.
[0101] Specifically, the system maintains a proposal queue for each load node. In each decision cycle, the load node sorts all received proposals according to its preference order, temporarily accepts the highest-ranked proposal that has not exceeded the quota, and rejects other proposals or proposals with lower rankings (if higher-ranked proposals have been accepted, resulting in the quota being exhausted).
[0102] For example, load node 5 (quota = 2) currently receives proposals from source node A (preference score 0.92), source node C (0.85), and source node F (0.78). In order of preference (source node C > source node A > source node F), it first accepts the proposal from source node C (using the first quota), then accepts the proposal from source node A (using the second quota), and rejects the proposal from source node F.
[0103] During the status update phase, the matching status and available quota of each node are updated according to the proposal acceptance results, and the rejected source-side nodes are re-added to the matching queue.
[0104] Among them, the status update phase refers to the step of refreshing the system status based on the acceptance results of this round of proposals; the matching status update includes recording newly formed matching relationships; the available quota update refers to reducing the available quota of nodes that have accepted proposals; and the source-side nodes that have been rejected need to be given the opportunity to resubmit their proposals.
[0105] Specifically, the system records successfully matched source-load pairs into the matching result set based on the acceptance results and reduces the available quota count of the corresponding node. Rejected source-side nodes are marked as "can propose again," and their preference pointers are moved to the next candidate load-side node for proposal in the next round.
[0106] For example, after source node A is accepted by payload node 5, the system records the matching pair. The remaining matchable quota for A is reduced from 3 to 2, and the remaining acceptable quota for payload node 5 is reduced from 2 to 1. The rejected source node F is then remarked as "active," and its next proposal target will be adjusted to a node after payload node 5 in the preference list (such as payload node 3).
[0107] Repeat the proposal phase, the accept and reject phase, and the state update phase until there are no unaccepted proposals and no new proposals are generated. At this point, the stable matching state condition is determined, and the target matching relationship is output.
[0108] Among them, the stable matching state condition refers to the state where there are no blocking pairs, that is, there is no source-load pair where they both prefer each other to their current matching object, and both have quota space to form a new match; the target matching relationship is the set of all matching pairs that are eventually formed, as well as the related transaction constraint information.
[0109] Specifically, the system iteratively executes the above stages through a loop controller, and checks the termination condition at the end of each round: whether all source-side nodes have reached their quotas, or whether all unaccepted source-side nodes have proposed to all possible load-side nodes. The algorithm terminates when no new proposals can be issued and all pending proposals have been processed.
[0110] For example, after 8 rounds of iteration, the system detects that: 20 source nodes have formed a total of 45 matching pairs (not exceeding the total quota limit), and the remaining 5 unaccepted source nodes have completed their proposals to all 30 payload nodes. At this point, the algorithm terminates and outputs a list of target matching relationships containing 45 matching pairs. Each matching pair contains information such as the source node ID (identifier), payload node ID, suggested transaction volume, and price.
[0111] Therefore, according to the above implementation method, the system can efficiently calculate stable many-to-many matching results under the premise of satisfying complex quota constraints through a structured multi-round iterative mechanism, providing a reliable and fair matching scheme for distributed energy transactions.
[0112] In some embodiments, the source-side node and the load-side node are set to an unmatched state, and quota constraints are set for each source-side node and each load-side node, including: The initial matching state of each source-side node and each load-side node is marked as an unmatched state.
[0113] The initial matching state refers to the baseline state of all nodes when the algorithm starts executing, which indicates that a node has not yet established a matching relationship with any other node.
[0114] Specifically, the system assigns a status identifier to each node through the status management module. This identifier can be stored in a memory data structure, and its initial value is uniformly set to a specific numerical value or Boolean value (such as the Boolean value False or the integer value 0) that represents "not matched".
[0115] For example, the system creates status records for 20 source nodes and 30 payload nodes, initializes the status field of all nodes to 0 (0 represents an unmatched status), and stores them in a hash table for fast querying and updating.
[0116] Set source-side quota constraints for each source-side node. The source-side quota constraints include a matching quantity upper limit constraint determined based on power generation capacity.
[0117] Among them, the source-side quota constraint refers to the business rule that limits the maximum number of load-side nodes that a single source-side node can connect to during the matching process; the upper limit constraint for the number of matching nodes refers to the specific quota value calculated based on the physical characteristics of the nodes, such as their power generation capacity.
[0118] Specifically, the system dynamically determines the quota value based on the node's rated generating capacity and system operating parameters (such as minimum trading power) through the quota calculation module: The formula for calculating the quota ceiling is: ,in This is a floor function that ensures the quota is an integer.
[0119] For example, for a source node with a rated generating capacity of 500 kilowatts (kW), under a scenario where the system's minimum trading power is set to 50 kilowatts, the upper limit constraint on the number of matches is calculated as follows: This means that the source node can establish a matching relationship with a maximum of 10 load-side nodes at the same time.
[0120] Set load-side quota constraints for each load-side node. The load-side quota constraints include an upper limit constraint on the number of matches determined based on the demand capacity.
[0121] Among them, the load-side quota constraint refers to the business rule that limits the maximum number of source-side nodes that a single load-side node can accept during the matching process; the determination logic of the upper limit constraint for the number of matches adopts the same calculation principle as the source-side nodes, that is, it is also based on... This formula is used for calculation, but the "node capacity parameter" is specifically replaced with the "demand capacity" of the load-side node, thereby ensuring that the quota setting matches the actual power demand of the node.
[0122] Specifically, the system employs similar dynamic calculation logic: ; Ensure that the total power supply received by the load-side node does not exceed its required capacity.
[0123] For example, for a load-side node with a demand capacity of 200 kW, under the same minimum trading power setting of 50 kW, the upper limit constraint on its matching quantity is calculated as follows: This means that the load node can receive power from up to 4 source-side nodes at the same time.
[0124] Therefore, according to the above implementation method, the system can establish a clear initial state and a reasonable business constraint framework for distributed energy trading matching through a standardized initialization process, providing the necessary basic guarantee for the stable operation of the subsequent many-to-many matching algorithm.
[0125] In some embodiments, after generating the matching results, the above method further includes: Transaction data is obtained based on the matching results. The transaction data includes the transaction volume and the transaction price.
[0126] Among them, transaction data refers to the set of transaction records actually reached between source and load nodes after successful matching, including electricity data that quantifies the transaction scale and price data that reflects the transaction value; transaction electricity refers to the electrical energy that a specific matching pair plans to transmit within a specified time period, usually in kilowatt-hours (kWh); transaction price refers to the transaction consideration per unit of electrical energy, usually in yuan / kilowatt-hour (yuan / kWh).
[0127] Specifically, the system obtains confirmed transaction records from the transaction execution module or smart contract platform through a data interface, parses the electricity and price fields in each record, and organizes and stores them according to matching pairs (source node ID, load node ID).
[0128] For example, the system obtains the transaction data of a matching pair (source node A, load node X): the transaction electricity is 500 kWh, the transaction price is 0.65 yuan / kWh, and stores it in a designated table in the transaction database, with the timestamp marking the effective time of the transaction.
[0129] A weight adjustment signal is generated based on the transaction data, and the feature weights in the multidimensional feature extraction and weighted fusion processing are updated based on the weight adjustment signal.
[0130] Among them, the weight adjustment signal refers to the control signal generated based on the quantitative indicators of transaction performance, used to guide the optimization of feature weights; the feature weights refer to the coefficients assigned to the four types of features—time series, spatial, economic, and reputation—during the feature extraction and weighted fusion process, with initial values as follows: .
[0131] Specifically, the system can achieve this through a feedback control module: first, it calculates the overall transaction benefit index (such as a weighted combination of transaction revenue and fairness), then normalizes it and performs a linear combination with the current weights. Finally, the weights are normalized to ensure that the sum is 1.
[0132] For example, suppose the system has a set learning rate. Calculate matching pairs The overall transaction benefit is 0.75 (range 0~1), and the current weights are [0.4, 0.3, 0.2, 0.1]. Therefore, the weight adjustment signal is: The new weights are calculated as follows: After normalization, we get [0.36, 0.28, 0.21, 0.15].
[0133] The updated feature weights are then applied to the feature extraction and weighted fusion steps in the next matching process.
[0134] The next matching process refers to a new round of matching calculation cycle initiated by the system according to a predetermined period (such as every 15 minutes) or a triggering condition (such as the addition of a new node).
[0135] Specifically, the system persists the updated weight vector through the weight management module and calls the weight value in the feature fusion stage of the new matching process to replace the old weight used in the previous round.
[0136] For example, in a new round of matching that starts at 9:00 the next day, the system reads the updated weights [0.36, 0.28, 0.21, 0.15]. When performing feature fusion on all nodes, the temporal features are multiplied by 0.36, the spatial features by 0.28, the economic features by 0.21, and the reputation features by 0.15, and then a weighted sum is performed to generate the fused features.
[0137] Therefore, according to the above implementation method, the system can dynamically optimize feature weights through transaction feedback, enabling the matching strategy to have continuous learning capabilities and gradually improve the matching accuracy and overall system efficiency in complex scenarios.
[0138] Figure 3 This is a structural block diagram of a source-load many-to-many matching system based on a dynamic preference matrix according to an embodiment of the present invention.
[0139] like Figure 3 As shown, this source-load many-to-many matching system based on a dynamic preference matrix includes: The source-load multidimensional data acquisition module 210 is used to acquire the first multidimensional information of the source-side node and the second multidimensional information of the load-side node respectively, and to perform standardization processing on the first multidimensional information and the second multidimensional information. The fusion feature generation module 220 is used to generate source-side fusion features and load-side fusion features respectively based on the standardized first multidimensional information and second multidimensional information through multidimensional feature extraction and weighted fusion processing; The dynamic preference matrix generation module 230 is used to generate a source-side preference matrix and a load-side preference matrix by similarity calculation based on the source-side fusion features and the load-side fusion features. The row vectors of the source-side preference matrix represent the preference order of the source-side nodes to all load-side nodes, and the row vectors of the load-side preference matrix represent the preference order of the load-side nodes to all source-side nodes. The many-to-many matching result generation module 240 is used to perform iterative matching based on the source-side preference matrix and the load-side preference matrix using a many-to-many matching algorithm until the preset stable matching state conditions are met, so as to obtain the target matching relationship and generate the matching result.
[0140] The specific functions and examples of each module and submodule of the device in this embodiment of the invention can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.
[0141] According to embodiments of the present invention, the above-described method of the present invention can be applied to an electronic device and a readable storage medium.
[0142] Figure 4 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0143] like Figure 4 As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the electronic device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0144] Multiple components in electronic device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of displays, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows electronic device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0145] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as a dynamic preference matrix source-load many-to-many matching method. For example, in some embodiments, a dynamic preference matrix source-load many-to-many matching method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of a dynamic preference matrix source-load many-to-many matching method described above can be performed. Alternatively, in other embodiments, the computing unit 601 may be configured, by any other suitable means (e.g., by means of firmware), to perform a source-load many-to-many matching method based on a dynamic preference matrix.
[0146] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0147] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0148] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0149] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0150] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0151] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0152] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.
[0153] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this invention should be included within the scope of protection of this invention.
Claims
1. A source-load many-to-many matching method based on dynamic preference matrix, characterized in that, include: The first multidimensional information of the source-side node and the second multidimensional information of the load-side node are obtained respectively, and the first multidimensional information and the second multidimensional information are standardized. Based on the standardized first and second multidimensional information, source-side fusion features and load-side fusion features are generated through multidimensional feature extraction and weighted fusion processing, respectively. Based on the source-side fusion features and load-side fusion features, a source-side preference matrix and a load-side preference matrix are generated through similarity calculation. The row vectors of the source-side preference matrix represent the preference order of the source-side nodes to all load-side nodes, and the row vectors of the load-side preference matrix represent the preference order of the load-side nodes to all source-side nodes. Based on the source-side preference matrix and the load-side preference matrix, iterative matching is performed using a many-to-many matching algorithm until the preset stable matching state conditions are met, thereby obtaining the target matching relationship and generating the matching result.
2. The method according to claim 1, characterized in that, The first multidimensional information includes power generation capacity information, power generation cost information, availability time information, geographic location information, and historical credit information; the second multidimensional information includes demand capacity information, acceptable price information, load response characteristics information, historical credit information, and geographic location information. The process of acquiring the first multidimensional information of the source-side node and the second multidimensional information of the load-side node, and then standardizing the first and second multidimensional information, includes: Collect the first multidimensional information of the source-side nodes and the second multidimensional information of the load-side nodes from the metering equipment, data acquisition and monitoring system, and equipment management platform; Perform data cleaning operations on the collected first and second multidimensional information, including removing invalid and abnormal data points; Perform data alignment operations on the first and second multidimensional information after data cleaning; Normalization is performed on the first and second multidimensional information after data alignment to obtain the standardized first and second multidimensional information.
3. The method according to claim 1, characterized in that, The first and second multidimensional information, after standardization, are used to generate source-side fusion features and load-side fusion features through multidimensional feature extraction and weighted fusion processing, respectively, including: By performing feature extraction operations on the standardized first and second multidimensional information using a preset feature extraction model group, time-series features, spatial features, economic features, and reputation features are obtained. Assign corresponding feature weights to the time-series features, spatial features, economic features, and reputation features respectively; The time-series features, spatial features, economic features, and reputation features, which have been assigned corresponding weights, are weighted and fused to generate the source-side fused features and the load-side fused features, respectively.
4. The method according to claim 1, characterized in that, The step of generating a source-side preference matrix and a load-side preference matrix by calculating similarity based on the source-side fusion features and load-side fusion features includes: Based on the source-side fusion features and load-side fusion features, the preference scores of the source-side nodes to the load-side nodes are calculated using the first similarity function to generate the source-side preference matrix. Based on the load-side fusion features and source-side fusion features, the preference score of the load-side node to the source-side node is calculated by the second similarity function to generate the load-side preference matrix; The first similarity function is configured to quantify the degree of matching association between the fusion features of any source-side node and the fusion features of any load-side node, and the second similarity function is configured to quantify the degree of matching association between the fusion features of any load-side node and the fusion features of any source-side node.
5. The method according to claim 1, characterized in that, The process of iteratively matching based on the source-side preference matrix and the load-side preference matrix using a many-to-many matching algorithm until a preset stable matching state condition is met, to obtain the target matching relationship and generate the matching result, includes: Set the source-side node and the load-side node to an unmatched state, and set quota constraints for each source-side node and each load-side node. Upon entering the proposal phase, each of the aforementioned source-side nodes sends a transaction proposal to the load-side node that satisfies the quota constraint condition, according to the preference order in the source-side preference matrix. During the acceptance and rejection phase, each load-side node accepts or rejects the received transaction proposal based on the preference order in the load-side preference matrix and the current available quota. During the status update phase, the matching status and available quota of each node are updated according to the proposal acceptance results, and the rejected source-side nodes are re-added to the matching queue. Repeat the proposal phase, acceptance and rejection phase, and state update phase until there are no unaccepted proposals and no new proposals are generated. At this point, the stable matching state condition is determined to be met, and the target matching relationship is output.
6. The method according to claim 5, characterized in that, The step of setting the source-side node and the load-side node to an unmatched state, and setting quota constraints for each source-side node and each load-side node, includes: The initial matching state of each source-side node and each load-side node is marked as an unmatched state; Set source-side quota constraints for each of the source-side nodes, including a matching quantity upper limit constraint determined based on power generation capacity; Set load-side quota constraints for each load-side node, including a matching quantity upper limit constraint determined based on demand capacity.
7. The method according to claim 1, characterized in that, After generating the matching results, the method further includes: Based on the matching results, transaction data is obtained, including the transaction volume and transaction price. A weight adjustment signal is generated based on the transaction data, and the feature weights in the multidimensional feature extraction and weighted fusion processing are updated based on the weight adjustment signal. The updated feature weights are then applied to the feature extraction and weighted fusion steps in the next matching process.
8. A source-load many-to-many matching system based on a dynamic preference matrix, characterized in that, include: The source-load multidimensional data acquisition module is used to acquire the first multidimensional information of the source-side node and the second multidimensional information of the load-side node respectively, and to perform standardization processing on the first multidimensional information and the second multidimensional information. The fusion feature generation module is used to generate source-side fusion features and load-side fusion features respectively based on the standardized first and second multidimensional information through multidimensional feature extraction and weighted fusion processing. The dynamic preference matrix generation module is used to generate a source-side preference matrix and a load-side preference matrix by similarity calculation based on the source-side fusion features and the load-side fusion features. The row vectors of the source-side preference matrix represent the preference order of the source-side nodes to all load-side nodes, and the row vectors of the load-side preference matrix represent the preference order of the load-side nodes to all source-side nodes. The many-to-many matching result generation module is used to perform iterative matching based on the source-side preference matrix and the load-side preference matrix using a many-to-many matching algorithm until the preset stable matching state conditions are met, so as to obtain the target matching relationship and generate the matching result.
9. An electronic device, characterized in that, include: At least one processor; and a memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, Computer instructions are used to cause a computer to perform the method according to any one of claims 1-7.
Citation Information
Patent Citations
Coal supply and demand enterprise matching optimization method and system based on Gal-Shapley algorithm
CN117076949A