A system and method for new energy power transaction considering blockchain
By dynamically adjusting the node matching order and determining the power transmission error using blockchain technology, the problems of fixed matching order and power calculation deviation in the new energy power trading system have been solved, thereby improving the fairness and stability of the transaction and providing refined monitoring and evaluation throughout the entire process.
Patent Information
- Application Number
- CN202511205038.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-27
AI Technical Summary
The existing new energy power trading system relies on a central platform, which makes it impossible to flexibly adjust the matching order, has deviations in power calculation, makes it difficult to identify trading anomalies, and affects the fairness of trading and the stability of the system. The problems are more pronounced in high-frequency trading scenarios.
By employing blockchain technology, through a node matching order adjustment module, a power transmission error judgment module, and an on-chain record verification module, the activity of nodes is dynamically identified, the matching order is adjusted, bidirectional comparison of power transmission errors and marking and caching of abnormal transactions are achieved, and a full-chain operation statistics table is constructed.
It achieves a balanced allocation of matching opportunities, improves the accuracy of power transmission and data consistency, enhances the fairness and system stability in the transaction process, provides refined monitoring and evaluation, and improves the rationality of resource allocation and the transparency of data processing.
Smart Images

Figure CN120707292B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy management technology, and in particular to a system and method for trading new energy power that incorporates blockchain. Background Technology
[0002] The field of new energy power trading systems involves energy management throughout the entire process of acquiring, allocating, metering, dispatching, and trading renewable energy power resources. It utilizes information technology to optimize the allocation and orderly trading of power resources, systematically combining energy supply and demand forecasting, user-side response mechanisms, and market-based pricing methods to promote the efficient utilization of high-proportion renewable energy grid connections. Specifically, a new energy power trading system refers to a system based on a centralized database structure, using a unified trading platform established by the power grid company to achieve power trading matching and settlement. It typically employs a manual review mechanism based on user electricity metering data to determine the trading volume and uses a static pricing strategy for matching. Data storage and transaction confirmation are completed through a central server to achieve market circulation and resource matching of energy.
[0003] In existing new energy power trading processes, the over-reliance on centralized matching models of central platforms makes it impossible to flexibly adjust the matching order according to changes in the frequency of transactions at trading nodes in actual trading. Furthermore, the use of one-way data for power calculation may lead to the omission of transmission deviations. Under a mechanism mainly based on manual review, it is difficult to efficiently identify power deviations and anomalies in on-chain records. When errors or inconsistencies occur in trading data, there is a lack of effective means of identification and traceability. For example, in high-frequency trading scenarios with large differences in node activity and frequent power fluctuations, traditional systems are prone to problems such as uneven matching opportunities, abnormal data backlog, and transaction failures, thereby affecting the fairness of trading and the stability of system operation. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a system and method for new energy power trading that incorporates blockchain technology.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: A system for new energy power trading considering blockchain includes:
[0006] The node matching order adjustment module obtains the identity identifiers of all power generators and power consumers in the current matching pool, calculates the cumulative number of transactions for each node, swaps the order of nodes with a cumulative number of transactions higher than the transaction frequency benchmark value with nodes with a cumulative number of transactions lower than the transaction frequency benchmark value, records the node identifier sequence, and generates a node matching priority order list.
[0007] The power transmission error determination module calculates the error rate based on the node matching priority list and the power output of the power generator and the power received by the power consumer in each transaction. If the error rate is greater than the power transmission error threshold, it is marked as exceeding the limit and a power transmission error determination record is obtained.
[0008] Based on the power transmission error determination record, the on-chain record verification module reads the identification code of each transaction, retrieves the corresponding matching, power generation and receiving records in the blockchain ledger, determines whether the data is consistent within the range of the transaction identification code, marks inconsistent transactions as record anomalies, and generates an on-chain record consistency list.
[0009] The abnormal transaction caching module, based on the on-chain record consistency list, filters transactions marked as abnormal, stores the corresponding transaction data in the cache area according to the transaction identification code, generates an abnormal reason label, and generates abnormal transaction cache data.
[0010] As a further embodiment of the present invention, the node matching priority list includes a node identity sorting list, an exchange order record sequence, and a priority identifier label; the power transmission error determination record includes an error value label, an error exceeding limit marker, and a threshold comparison result; the on-chain record consistency list includes a transaction identification code mapping table, a data consistency marker, and a data verification status; and the abnormal transaction cache data includes an abnormal identification code list, a cache data structure, and an abnormal reason label.
[0011] As a further aspect of the present invention, the node matching order adjustment module includes:
[0012] The node identity recognition submodule extracts and records the node identifier in the identity information table of each node based on all the power generation nodes and power consumption nodes registered in the current matching pool. Combined with the historical transaction data recorded in the blockchain ledger, the node identity identifier is matched with the buyer and seller information in the transaction record. Nodes with transaction records are selected as active nodes, and an active node identifier sequence is generated.
[0013] The matching frequency calculation submodule reads the number of times the corresponding node appears in all transaction records in the blockchain ledger based on the unique identifier of each node in the active node identifier sequence, takes the cumulative number of transactions of each node as the transaction frequency value, and calculates the frequency deviation value of each node in combination with the transaction frequency benchmark value, and sorts and establishes a node frequency deviation list.
[0014] The priority queue generation submodule compares the frequency deviation value of each node in the node frequency deviation list with the original queue position, performs node order swapping and updates the positions of all nodes after adjustment, and records the adjusted node order in the blockchain ledger to obtain the node matching priority order list.
[0015] As a further aspect of the present invention, the power transmission error determination module includes:
[0016] The power record extraction submodule reads each completed matching transaction data in the blockchain ledger based on the node matching priority list, extracts the power generation node number and power consumption node number of the record, retrieves the power output record of the power generation node at the transaction time point and the power reception record of the power consumption node at the same time point in each transaction, and identifies each valid transaction with a number to generate a matching transaction power dataset.
[0017] The error difference calculation submodule calculates the relative error percentage of electricity transmission in each transaction based on the electricity output value of the power generator and the electricity received value of the power consumer recorded centrally in the matched transaction electricity data set, and obtains a list of transaction electricity error rates.
[0018] The error result determination submodule compares the error rates of all transactions with the power transmission error threshold based on the error rate of each transaction record in the power error rate list. It identifies the transaction numbers whose error rates are greater than the power transmission error threshold and marks them as exceeding the limit. The rest are marked as normal, and the power transmission error determination records are integrated.
[0019] As a further aspect of the present invention, the on-chain record verification module includes:
[0020] The identification code parsing submodule extracts a unique transaction identification code based on each transaction data attached to the power transmission error determination record, and deconstructs the identification code into a structure. It parses the timestamp field into a time format and constructs a unique transaction request index. It then sequentially retrieves the matching record, the power generation node data record, and the power consumption node data record. Finally, it collects the associated fields according to the node number, time, power value, and transaction number to generate a transaction binding field set.
[0021] The ledger record comparison submodule compares the three record segments of each transaction in the transaction binding field set to check for mismatches in the time field of the records, determines whether there is an offset between the matching time and the node-side recording time, and cross-identifies the transaction number field and the node number field one by one to confirm whether the three records belong to the same transaction and obtains the field consistency offset information.
[0022] The record consistency judgment submodule determines whether the on-chain record consistency matching criteria are met based on the field conflict type and time offset identified in the field consistency offset information. If the node number, power field and time field are all consistent, the transaction is marked as a normal record. If any field cannot be matched in the corresponding three records, the corresponding transaction is marked as an abnormal record, and the on-chain record consistency list is obtained.
[0023] As a further aspect of the present invention, the abnormal transaction caching module includes:
[0024] The abnormal record filtering submodule filters the transaction numbers marked as abnormal based on each record in the on-chain record consistency list. It uses the power generation record, power consumption record and matching record corresponding to each abnormal transaction number as the data source to construct an abnormal transaction data unit and obtain abnormal transaction filtering data.
[0025] The identification code cache writing submodule organizes the transaction field information bound in the same record according to the field classification for each transaction record in the abnormal transaction screening data, sets a unified field order structure, performs format conversion according to node number, power value and timestamp order, and organizes and writes it into the cache area according to the field classification method. At the same time, it marks the differences between the fields and obtains the cache writing field difference marking results.
[0026] The exception tag generation submodule converts various difference types into text tags based on the field difference record content in the cached field difference marking result. If there are multiple field differences in a record, the multiple tags are concatenated to form tag content, and the transaction number is used as the index field to associate and store it with each cached data record to generate exception transaction cache data.
[0027] As a further aspect of the present invention, the system further includes:
[0028] The transaction full-link statistics module, based on the abnormal transaction cache data and the node matching priority list, counts the number of matching order adjustments and abnormal transaction cache occurrences of all nodes during the transaction process, forming full-link statistics information and obtaining the blockchain new energy power transaction full-link operation statistics table.
[0029] The blockchain-based new energy power trading full-chain operation statistics table includes the frequency of matching order adjustments, the number of abnormal transaction caches, and node operation status indicators.
[0030] As a further aspect of the present invention, the transaction end-to-end statistics module includes:
[0031] The matching order adjustment statistics submodule extracts and compares the sorting position of each node in different rounds based on each matching transaction record in the node matching priority list. It compares the priority positions of the same node in adjacent rounds by number difference to determine whether the position in the time series has changed. If the position is different, it is recorded as an order adjustment event. The event is bound to the node identifier and classified by node number. The number of times the node's order changes during the whole matching process is recorded to obtain the matching order adjustment count value.
[0032] The abnormal cache statistics submodule reads the transaction number recorded in the abnormal transaction cache data, extracts the power generation node number and the power consumption node number, counts the number of times each node is marked as an abnormal transaction in the cache data, records the cumulative frequency of occurrence, archives the two dimensions of data at the node level, establishes abnormal feature data items under the node dimension, and obtains node abnormal interference records.
[0033] The link data aggregation submodule maps each node field recorded in the node abnormal interference record and the matching order adjustment number value to the node field, and uniformly includes them in the statistical summary table according to the node number. The node number is used as the main index field, and the corresponding matching order adjustment number, abnormal cache number, and node abnormal interference index are respectively used as data fields for structured registration, and the summary obtains the full-link operation statistics table of blockchain new energy power trading.
[0034] A method for trading renewable energy power using blockchain technology includes the following steps:
[0035] S1: Obtain the identity identifiers of all power generators and power consumers in the current matching pool, calculate the cumulative number of transactions for each node, exchange the order of nodes with a cumulative number of transactions higher than the transaction frequency benchmark value with nodes with a cumulative number of transactions lower than the transaction frequency benchmark value, record the node identifier sequence, and generate a node matching priority list.
[0036] S2: Based on the node matching priority list, calculate the error rate between the power output of the power generator and the power reception of the power consumer in each transaction. If the error rate is greater than the power transmission error threshold, mark it as exceeding the limit and obtain the power transmission error judgment record.
[0037] S3: Based on the power transmission error determination record, read the identification code of each transaction, retrieve the corresponding matching, power generation and receiving records in the blockchain ledger, determine whether the data is consistent within the range of the transaction identification code, mark inconsistent transactions as record anomalies, and generate an on-chain record consistency list.
[0038] S4: Based on the on-chain record consistency list, filter transactions marked as record anomalies, store the corresponding transaction data in the cache area according to the transaction identification code, generate anomaly reason tags, and generate abnormal transaction cache data;
[0039] S5: Based on the abnormal transaction cache data and the node matching priority list, count the number of matching order adjustments and abnormal transaction cache occurrences of all nodes during the transaction process to form full-link statistical information and obtain the full-link operation statistics table of blockchain new energy power trading.
[0040] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0041] In this invention, the actual activity of each node is dynamically identified and the matching order is adjusted accordingly to achieve a balanced distribution of matching opportunities. Combined with a two-way comparison mechanism of power transmission data, the actual deviation of energy transmission is clarified. A traceable consistency verification process is formed by retrieving and verifying multi-source records through a unified identification code. For transactions with inconsistent records, abnormal data is cached and tagged. Thus, the fairness of matching, the accuracy of power transmission, the consistency of on-chain data, and the accuracy of anomaly identification are synergistically improved throughout the entire transaction process. A quantifiable, diagnosable, and optimizable new energy power trading status perception system is comprehensively constructed, enabling refined monitoring and systematic operation evaluation during the transaction process, and enhancing the rationality of resource allocation and the transparency of data processing in new energy power trading. Attached Figure Description
[0042] Figure 1 This is a system flowchart of the present invention;
[0043] Figure 2 This is a flowchart of the node matching order adjustment module of the present invention;
[0044] Figure 3 This is a flowchart of the power transmission error determination module of the present invention;
[0045] Figure 4 This is a flowchart of the on-chain record verification module of the present invention;
[0046] Figure 5 This is a flowchart of the abnormal transaction caching module of the present invention;
[0047] Figure 6 This is a flowchart of the transaction end-to-end statistics module of the present invention. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0049] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0050] Please see Figure 1 A system for trading new energy power that incorporates blockchain technology includes:
[0051] The node matching order adjustment module obtains the identity identifiers of all power generation and power consumption nodes in the current matching pool, combines them with the historical transaction records in the blockchain ledger, calculates the cumulative number of transactions for each node, compares it with the transaction frequency benchmark value (the benchmark value defined by the distributed energy trading standard: ≥5 times / day for small and medium-sized power generation units), swaps the order of nodes with a cumulative number of transactions higher than the benchmark value with nodes in the queue with a number of transactions lower than the benchmark value, records the node identifier sequence of this swap position in the blockchain ledger, and generates a node matching priority order list.
[0052] The power transmission error determination module obtains the power output record of the power generator and the power reception record of the power consumer in each transaction based on the node matching priority list, calculates the error rate, and compares it with the set power transmission error threshold (the metering allowable deviation specified in the new energy grid connection communication standard: ±0.5% of rated capacity). If it is greater than the error threshold, it is marked as exceeding the limit, and the power transmission error determination record is obtained.
[0053] The on-chain record verification module, based on the power transmission error judgment record, reads the unique transaction identification code bound to each transaction (using a 64-bit unique transaction identifier: the first 8 bits of the institution code + 16 bits of timestamp + 40 bits of hash), retrieves the corresponding matching, power generation and receiving records in the blockchain ledger, and judges whether the data is consistent within the range of the transaction identification code. Inconsistent transactions are marked as record anomalies, and consistent transactions are marked as record normal, generating an on-chain record consistency list.
[0054] The abnormal transaction cache module uses the on-chain record consistency list to filter transactions marked as abnormal, stores the corresponding transaction data in the cache area according to the transaction identification code, and generates an abnormal reason label for each cache record, thus generating abnormal transaction cache data.
[0055] The transaction end-to-end statistics module, based on abnormal transaction cache data and node matching priority list, counts the number of matching order adjustments and abnormal transaction cache occurrences of all nodes during the transaction process, forming end-to-end statistics information and obtaining the blockchain new energy power transaction end-to-end operation statistics table.
[0056] The node matching priority list includes a node identity ranking list, an exchange order record sequence, and a priority identification label. The power transmission error determination record includes an error value label, an error overrun mark, and a threshold comparison result. The on-chain record consistency list includes a transaction identification code mapping table, a data consistency mark, and a data verification state. The abnormal transaction cache data includes an abnormal identification code list, a cache data structure, and an abnormal reason label. The blockchain new energy power transaction full-link operation statistics table includes matching order adjustment frequency, abnormal transaction cache times, and node operation state indicators.
[0057] Referring to Figure 2 The node matching order adjustment module includes:
[0058] The node identity identification submodule extracts and records the node identification in each node identity information table based on all registered power generation side nodes and power consumption side nodes in the current matching pool. The node identity identification submodule matches the node identity identification with the buyer / seller information in the transaction record in combination with the historical transaction data recorded in the blockchain ledger. The node identity identification submodule filters the nodes with transaction records as active nodes and generates an active node identification sequence.
[0059] Based on all registered power generation side nodes and power consumption side nodes in the current matching pool, the latest transaction snapshot data about the matching pool structure in the blockchain ledger needs to be read first. The registration information field of the nodes is extracted, which records the registration type and active state of each node and uses the node unique identification number as the subsequent tracking index. In the extraction process, the nodes are classified into two groups of "power generation side" and "power consumption side" according to the registration type field. For example, node numbers N001 and N003 are power generation sides, and N002, N004, and N005 are power consumption sides. Further judgment is made on whether the nodes are in the current period active state. The node activity state field in the ledger can be used for screening. A value of 1 indicates that the current period is active, and a value of 0 indicates that the state is not active. In this example, the state field values of N001, N002, N003, and N005 are all 1, so they are listed as candidate nodes that can enter the matching system. Then the historical transaction table in the ledger is accessed, and whether the node has occurred effective transaction in the past n days is read one by one. The "transaction timestamp" and "buyer / seller node ID" are used as key fields for comparison and matching. For example, node N001 appears three times in the transaction record, with times "2024-08-05", "2024-08-06", and "2024-08-07". It can be confirmed as a transaction active node. Conversely, if the node never appears in the transaction table, it is not considered. For example, node N004 has no transaction record and is not included in the active node list. Through the above process, the active node list in the current matching period can be gradually established, and the following active node preliminary selection table is formed:
[0060] Table 1 Active node screening result table
[0061] Node number Node type Current state Number of historical transactions Whether an active node N001 Power generation side Active 3 Yes N002 Power consumption side Active 2 Yes N003 Power generation side Active 3 Yes N004 Power consumption side Inactive 0 No N005 Power consumption side Active 2 Yes
[0062] As shown in Table 1, the system finally screens the active nodes N001, N002, N003, and N005, and the identification numbers of the four nodes are arranged in the order of numbering to form a preliminary active node identification sequence.
[0063] The matching frequency calculation submodule reads the number of occurrences of each node in all transaction records in the blockchain ledger according to the unique identification of each node in the active node identification sequence, and accumulates the transaction frequency of each node as the transaction frequency value, combined with the transaction frequency reference value, using the formula:
[0064] ;
[0065] The frequency deviation value of each node is obtained by operation, and a node frequency deviation list is established by sorting, wherein, represents the frequency deviation value (unit: times) of node , represents the cumulative transaction frequency (unit: times) of node on the th day, represents the average transaction frequency of nodes in the whole system on the th day (unit: times), represents the transaction frequency reference value of node , which is set to 5 times (unit: times), represents the total number of days in the statistical period;
[0066] According to the above active node identification sequence, enter the next stage of matching frequency calculation process, call the daily transaction record table in the blockchain ledger, extract and summarize the transaction frequency of each node in the past continuous n days, and specifically set n = 3 days, and calculate the matching average transaction frequency of the system for each day. The sample data is as follows:
[0067] Table 2 Node Daily Transaction Frequency and System Average Transaction Frequency Table
[0068] Node number Number of transactions on the first day Number of transactions on the second day Number of transactions on the third day System average on the first day System average on the second day System average on the third day N001 6 7 8 5 5 5 N002 3 4 2 5 5 5 N003 5 6 5 5 5 5 N005 4 5 6 5 5 5
[0069] Referring to Table 2, taking N001 as an example, the transaction frequency is 6, 7, and 8 times, and the average value of the three days is 5 times, which is substituted into the formula as follows:
[0070] ;
[0071] ;
[0072] Similarly, the transaction frequency of N003 is 5, 6, and 5 times:
[0073] ;
[0074] ;
[0075] After obtaining the frequency deviation values of all active nodes, construct a frequency deviation value sequence:
[0076] Table 3 Frequency Deviation Value Sequence Table
[0077] Node number Frequency deviation value (times) N001 3.6 N002 4.47 N003 3.93 N005 3.8
[0078] Finally, based on this numerical sequence, a list of node frequency deviations is generated by sorting.
[0079] Frequency deviation refers to the absolute degree of deviation of a specific node's daily average matching frequency from the system's benchmark matching frequency within a specified statistical period. It measures the consistency between the node's matching activity and the system standard. Specifically, this value is calculated by dividing the node's daily matching frequency by the system's average matching frequency for that day, then averaging this over the period and comparing it to the benchmark value, ultimately expressing the difference as an absolute value. A smaller frequency deviation indicates more stable matching behavior of the node within the period and closer to the target benchmark; conversely, a larger deviation indicates greater fluctuations in the node's matching frequency or a long-term deviation from the target standard. Therefore, this indicator can be used to optimize the subsequent matching order, reflecting the node's activity consistency and participation quality within the trading system.
[0080] The core calculation logic of the formula revolves around quantifying the stability of the matching frequency of nodes over multiple days, using the "average ratio difference" method. Among these, Indicates a node In continuous The frequency of all transactions within a day is statistically aggregated; fractional part In order to calculate the node at the th The ratio of the daily matching frequency to the system average frequency for that day reflects the deviation of the node's activity level from the overall system. This is achieved by averaging the ratios over multiple days (i.e., multiplying by ). This can smooth out the impact of daily fluctuations, thereby establishing a stability index; subtracting A pre-defined "baseline value" for the system to assess the frequency deviation of the node in the overall context; the outer absolute value sign. This is to eliminate directional influences and ensure that whether a node deviates from the target by too much or too little, it is considered a deviation and included in the result value. Overall, it reflects the absolute deviation between the node and the system's baseline frequency within the statistical period. The smaller the value, the more stable its matching frequency is and the closer it is to the target standard.
[0081] The priority queue generation submodule compares the frequency deviation value of each node in the node frequency deviation list with the original queue position, performs node order swapping and updates the adjusted node positions, records the adjusted node order in the blockchain ledger, and obtains the node matching priority order list.
[0082] Based on the sorting results of the node deviation values in the aforementioned frequency deviation list, position comparison and queue swapping operations are performed from the minimum deviation value to the maximum value. First, the original node order list is read, such as {N001, N002, N003, N005}, with corresponding frequency deviations of 3.6, 4.47, 3.93, and 3.8 times respectively. It is found that N001, although having a smaller deviation, is at the head of the queue and requires no adjustment. However, N002, with the largest deviation value, is located second, indicating an incorrect order. The judgment logic is then executed; if the preceding node is... If a node's deviation value is significantly greater than that of its successor node (a threshold of 0.5 deviations can be set), a position swap logic is triggered. For example, if the deviation between N002 and N005 is 0.67 deviations, which is greater than the set threshold, their positions in the queue are swapped, and the queue is updated to {N001, N005, N003, N002}. After the swap, the timestamp of the current adjustment action and the node ID swap sequence are recorded and stored in the "Matching and Sorting Adjustment Record Field" of the blockchain ledger. The record format is: Time 2024-08-07 14:00, Adjustment Action: N002 N005 is recorded in the log field for subsequent blockchain audit calls, and finally the node matching priority list generated in this stage is output.
[0083] Please see Figure 3 The power transmission error determination module includes:
[0084] The power record extraction submodule reads each completed matching transaction data in the blockchain ledger based on the node matching priority list, extracts the power generation node number and power consumption node number of the record, retrieves the power output record of the power generation node at the transaction time point and the power reception record of the power consumption node at the same time point in each transaction, and identifies each valid transaction with a number to generate a matching transaction power dataset.
[0085] Based on the node matching priority list, the transaction number and node pair information marked as "completed" are obtained, the "power generation node number" and "power consumption node number" fields are extracted from the blockchain ledger transaction record table, and the "output power value" recorded by the power generation node and the "received power value" recorded by the power consumption node at the matching completion time point are extracted from the node power monitoring record table indexed by transaction timestamp. For example, the power generation node of transaction number TX001 outputs 1000 kWh at 08:00:15, and the power consumption node receives 995 kWh. If the system detects that a transaction has missing energy records within a specified time period, the record status is "invalid" or "abnormal", etc. The transaction data is excluded, for example, transaction number TX006 is excluded from subsequent analysis due to the "invalid" status field. For all valid transactions that meet the conditions, the transaction number is numbered in ascending order and three fields are extracted: "transaction number", "power generation power (kWh)", and "power consumption power (kWh)", forming a structured data set as shown in the following table:
[0086] Table 4: Matching transaction power record table
[0087] Transaction number Power generation side power (kWh) Power consumption side power (kWh) TX001 1000 995 TX002 950 940 TX003 1020 1015 TX004 980 950 TX005 970 965
[0088] As shown in Table 4, this dataset serves as the original basis for subsequent error judgment calculations, resulting in a matching transaction power dataset.
[0089] The error difference calculation submodule calculates the relative error percentage of power transmission in each transaction using the formula:
[0090] ;
[0091] The relative error percentage of power transmission in each transaction is calculated, resulting in a transaction power error rate list, where, represents the power error rate (percentage) of the transaction, represents the output power (kWh) of the power generation node in the transaction, represents the received power (kWh) of the power consumption node;
[0092] According to each set of power generation power and received power in the matching transaction power dataset, the error calculation formula is used to calculate each transaction:
[0093] TX001: ;
[0094] TX002: ;
[0095] TX003: ;
[0096] TX004: ;
[0097] TX005: ;
[0098] The calculation results are recorded in a structured format as follows:
[0099] Table 5 Calculation of Transaction Volume Error Rate
[0100] Transaction number Error rate (%) TX001 0.2506 TX002 0.5291 TX003 0.2457 TX004 1.5544 TX005 0.2584
[0101] As shown in Table 5, the percentage of power transmission error for each transaction is calculated, forming a list of transaction power error rates.
[0102] The normalized power error rate (NER) refers to the absolute deviation between the power output of a generator node and the power received by a consumer node in a single power transaction, expressed as a percentage relative to their total power volume. It reflects the relative degree of power loss during transmission. This indicator not only measures the numerical difference in power data from both sides but also eliminates the influence of factors such as different node sizes and load capacities by normalizing the deviation to the total power volume of both parties. This provides a unified reference standard for error assessment across high-power and low-power transactions. A higher NER indicates greater power loss under the same supply and receiving capacity. This indicator is suitable for monitoring transmission deviations in multi-node, multi-cycle power transactions and serves as an important quantitative basis for evaluating the reliability of transaction data and the stability of network transmission.
[0103] The formula's operational logic is based on a relatively symmetrical ratio expression of power deviation. Its goal is to quantify the degree of deviation between the power output of the generator and the power received by the consumer, and to eliminate the misleading absolute error caused by power level variations. In the formula, This represents the absolute loss of electricity during transmission. Using absolute values eliminates the positive or negative directionality when the generated output is higher or lower than the received output, thus uniformly reflecting the "degree of deviation." The denominator... The sum of the bilateral power quantities is used as a normalization benchmark, which enables the comparison and comparability of errors at different energy levels, avoiding the error amplification or compression effect caused by different system scales. Finally, it is expressed as a standardized error rate by percentage conversion × 100%, which is convenient for comparison and judgment with a set threshold (such as 0.5%).
[0104] The error result determination submodule compares the error rate of each transaction record in the transaction power error rate list with the power transmission error threshold of ±0.5%, identifies the transaction number with an error rate greater than the power transmission error threshold of 0.5%, marks it as out of limit, and marks the rest as normal, and integrates them to obtain the power transmission error determination record.
[0105] According to the error rate of each transaction recorded in the transaction electricity error rate list The upper limit of the power deviation threshold specified in the new energy grid connection standard is set at 0.5%. The error rate of each transaction is judged item by item. If the error rate is greater than 0.5%, the judgment result is "out of limit"; otherwise, it is "normal". For example, the error of TX002 is 0.5291%, and that of TX004 is 1.5544%, both exceeding the specified error standard, so they are marked as "out of limit". TX001, TX003, and TX005 are all below this threshold and are marked as "normal". The records are integrated according to transaction number, error value, and error judgment result, as follows:
[0106] Table 6. Results of Power Error Judgment
[0107] Transaction number Error rate (%) Determination result TX001 0.2506 Normal TX002 0.5291 Over limit TX003 0.2457 Normal TX004 1.5544 Over limit TX005 0.2584 Normal
[0108] As shown in Table 6, the error judgment results clearly indicate which transactions have exceeded the error tolerance range, and obtain the power transmission error judgment record.
[0109] Please see Figure 4 The on-chain record verification module includes:
[0110] The identification code parsing submodule extracts a unique transaction identification code from each transaction data attached to the power transmission error judgment record, deconstructs the structure of the identification code, parses the timestamp field into a time format, and constructs a unique transaction request index. It then sequentially retrieves the matching record, the power generation node data record, and the power consumption node data record, and uniformly collects the associated fields according to the node number, time, power value, and transaction number to generate a transaction binding field set.
[0111] Based on the power transmission error determination record attached to each transaction data, the 64-bit unique identification code bound in the transaction field is extracted, and the identification code is divided into the first 8-bit agency identification segment, the middle 16-bit timestamp segment and the last 40-bit hash check segment. The character segmentation function is called to obtain the contents of each part in turn. The agency code "B202" is correspondingly mapped to the sub-node number registered in the business management table. The timestamp "20240807102000" is converted to the system unified format "2024-08-07 10:20:00", and is standardized to the timestamp index "1020" through the time format analysis function. The unique transaction request key value "B202-1020" is generated by splicing the agency code and the standard timestamp. In the blockchain account book structure, the key value is used as the retrieval path to locate the corresponding three types of data tables - matching data table, power generation node data table and power consumption node data table. The contents of the fields with field names "TxID", "GenNode", "LoadNode", "TimeStamp" and "PowerVolume" are extracted according to the field index, and are uniformly named as "transaction number", "power generation side number", "power consumption side number", "transaction time" and "power value" through field mapping operation. The corresponding collection of three types of records is completed with the transaction number as the unique identifier, and is organized into a structured set in the form of a table and stored in the intermediate cache queue, as shown in Table 7, to finally obtain the transaction binding field set.
[0112] Table 7: Blockchain transaction record field comparison table
[0113] Transaction number Institution code Timestamp Matching time Power generation record time Power consumption record time Node number consistent Power field consistent TX1001 A101 20240807101530 1015 1015 1016 True True TX1002 B202 20240807102000 1020 1021 1020 True False TX1003 A101 20240807102545 1026 1026 1025 False False TX1004 C303 20240807103030 1030 1033 1030 True True TX1005 B202 20240807103515 1035 1035 1034 True True
[0114] As shown in Table 7, the transaction number field is the basic index field, and the remaining fields are associated and compared based on this field to ensure that the field mapping relationship of different data tables is consistent.
[0115] The account book record comparison submodule compares the time fields recorded in each transaction of the transaction binding field set in turn to determine whether there is a mismatch between the matching time and the node side record time, and whether there is a deviation between the transaction number field and the node number field. The three records are identified one by one to confirm whether they belong to the same transaction, and the field consistency deviation information is obtained.
[0116] According to each transaction structure in the transaction binding field set, the time fields in the matching record, the power generation record and the power consumption record are compared one by one, and whether the three are within the allowed time offset range is judged by calculating the difference between the "power generation record time" and the "matching time" and the difference between the "power consumption record time" and the "matching time", respectively. The offset tolerance is set to ±2 minutes, that is, if the difference in the time field exceeds 2 minutes, it is marked as inconsistent in time, for example, the matching time of record TX1004 is 1030, the power generation record time is 1033, and the difference between the two is 3 minutes, which exceeds the set interval and is identified as a time field offset. At the same time, the node number fields in the three records are cross-judged, if the power generation side number and the source node number in the matching record, the power consumption side number and the target node number in the matching record have differences in the field content, the field is marked as "node number inconsistency", for example, TX1003, the source node in the matching record is A1G9, and the power generation record is A1H1. The record field is marked as inconsistent. Then judge whether the power field exists offset, if the power value in the power generation record is 1000kWh, and the power value in the power consumption record is 997kWh, the record is inconsistent in the power field. The three fields are compared independently, and the results are recorded as "time field offset", "node field mismatch" and "power field inconsistency" respectively, forming the offset structure of the transaction at the field level, and finally output as the field consistency offset information.
[0117] The record consistency judgment submodule judges whether the matching standard of on-chain record consistency is met according to the field conflict type and time offset situation identified in the field consistency offset information. If the node number, power field and time field are consistent, the transaction is marked as normal record. If any field cannot be matched in the corresponding three records, the corresponding transaction is marked as abnormal record, and the on-chain record consistency list is obtained.
[0118] According to the field comparison situation recorded in the field consistency offset information, the comparison items of each transaction are judged. If any one of "time field offset", "node field mismatch" or "power field inconsistency" is marked as False, the state of the transaction is marked as "record abnormal", otherwise it is marked as "record normal". The marking basis is saved in the data record structure, "transaction number" is used as the unique index field, "offset field identification" is used as the data additional item, and the three-field data list of "transaction number-consistency state-offset type" is structured and generated. For example, transaction TX1003 is determined to be abnormal because the node field and the power field are both False. All field comparisons in transaction TX1005 are True, which is determined to be normal. Finally, all transaction judgment results are summarized and output as the on-chain record consistency list.
[0119] Please refer to Figure 5The abnormal transaction caching module includes:
[0120] The abnormal record filtering submodule filters the transaction numbers marked as abnormal based on each record in the on-chain record consistency list. It uses the power generation record, power consumption record and matching record corresponding to each abnormal transaction number as the data source to construct abnormal transaction data units and obtain abnormal transaction filtering data.
[0121] Based on the record set in the on-chain record consistency list, the "Record Status" field is read sequentially. During the traversal, it is determined whether the record is "Abnormal". If it is abnormal, the corresponding transaction number field "TXID" is immediately extracted and recorded. At the same time, the node information, power data and time information corresponding to the number are extracted from the transaction mapping table. The fields "Generation Node Number", "Consumer Node Number", "Generation Power", "Consumer Power", "Matching Time", "Generation Time" and "Consumer Time" are written into the buffer record set. Then, for each successfully extracted abnormal record, field deduplication, format correction and time standardization operations are performed. For example, if the status of transaction number TX1002 is abnormal, after extraction, it is found that the generation power is 1000kWh and the consumption power is 960kWh, with a power difference of more than 40kWh. Moreover, the matching time and the generation record time are 1 minute apart. The time field marker is offset. The node number is a valid structure. The transaction marker is written into the abnormal buffer structure set, and the number and original identification code are recorded synchronously. The standard transaction cache entry parameters are constructed, as shown in Table 8. Finally, the abnormal transaction filtering data is obtained.
[0122] Table 8 Abnormal Transaction Cache Data Table
[0123] Transaction number Power generation node number Power consumption node number Matching time Power generation time Power consumption time Power generation power (kWh) Power consumption power (kWh) Identification code Abnormal label TX1002 G-A102 L-B202 1020 1021 1020 1000 960 B20220250807102000… Power field offset + time field offset TX1003 G-A101 L-C202 1026 1026 1025 990 970 A10120250807102545… Power field offset + node field offset
[0124] As shown in Table 8, all transactions marked as abnormal are uniformly classified into the cache preparation set according to the transaction number and corresponding fields, and the field classification and identification code parsing processes are completed.
[0125] The identification code cache writing submodule sorts out the transaction field information bound in the same record according to the field classification for each transaction record in the abnormal transaction screening data, sets a unified field order structure, performs format conversion according to node number, power value and timestamp order, and sorts and writes it into the cache area according to the field classification method. At the same time, it marks the differences between the fields and obtains the cache writing field difference marking results.
[0126] Call each transaction number in the exception transaction screening data, and locate the corresponding 64-bit identification code field. Perform structural analysis on the identification code, and split it into three parts: the organization code field, the timestamp field, and the hash field. Set the organization code as the cache namespace prefix, and use the timestamp field to generate the cache key suffix. Then, rearrange the power field, the node field, and the time field according to the field standard template. Map the power generation node and the power consumption node number to the standardized short code format, such as "GA01" and "LB02". Keep two decimal places for the power field. Use the 24-hour format for the time field. Then, construct the field item value pair data structure. Before writing data to the cache area, compare the original record and the matching record in the node field, the time field, and the power field. If there is a character inconsistency or a numerical difference, set it as an identification field. Write all identification results to the marker field of the cache data, bind them with the unique transaction identification code, and finally obtain the cache write field difference marker.
[0127] The exception label generation submodule converts various types of field difference records in the cache write field difference marker results into text labels. If there are multiple field differences in a record, the labels are concatenated to form the label content. Store the label content in association with each cache data record using the transaction number as the index field, and generate the exception transaction cache data.
[0128] According to the identification content recorded in the cache write field difference marker, read the difference items of each record in sequence, and judge whether the node number is inconsistent. If the character encoding of the power generation node number is different from that of the source node number of the matching record, it is identified as "node field offset". If the difference between the power generation and power consumption exceeds 30kWh, it is classified as "power field offset". If the difference between the matching time and the power generation time or the power consumption time is greater than 1 minute, it is set as "time field offset". Each type of offset label is generated independently, and when there are multiple offsets, the labels are concatenated in the order of "power + time + node" to form a label combination. For example, in transaction TX1002, the power difference is 40kWh, and the time difference is 1 minute. The concatenated label is "power field offset + time field offset". The generated label content and the transaction number are written into the label record table together to establish the exception transaction cache data.
[0129] Please refer to Figure 6 The transaction full-link statistical module includes:
[0130] The matching order adjustment statistics submodule extracts and compares the sorting position of each node in different rounds based on each matching transaction record in the node matching priority list. It compares the priority positions of the same node in adjacent rounds by number difference to determine whether the position in the time series has changed. If the position is different, it is recorded as an order adjustment event. The event is bound to the node identifier and classified by node number. The number of times the node's order changes during the whole matching process is recorded to obtain the matching order adjustment count value.
[0131] Based on each matching transaction record in the node matching priority list, the matching round number and participating node number fields are extracted from each record. All transaction rounds are then summarized according to the node number to form a sequence of matching ranking positions for each node in different time periods. Next, the ranking positions of two adjacent rounds in each node's ranking sequence are compared to determine the correct ranking position. Round number minus the first If the difference between the sorting numbers of the rounds is not zero, it means that the priority of the node has changed in the two rounds of matching, which is determined as a sequence adjustment event. Then, the number of times the sequence adjustment event occurs is counted by indexing the node number, forming a record of the number of matching sequence adjustments for each node. For example, node N001 has changed forward 2 times and backward 1 time in 3 consecutive matching rounds, which is recorded as 3 adjustment events. The sorting of node N002 has not changed in any round, so the count is 0. The number of all nodes and their corresponding sequence adjustment counts are formed into a structured table entry to obtain the number of matching sequence adjustments.
[0132] The abnormal cache statistics submodule reads the transaction number recorded in the abnormal transaction cache data, extracts the power generation node number and the power consumption node number, counts the number of times each node is marked as an abnormal transaction in the cache data, records the cumulative frequency of occurrence, archives the two dimensions of data at the node level, establishes abnormal feature data items under the node dimension, and obtains node abnormal interference records.
[0133] The system retrieves the complete set of transaction IDs recorded as abnormal transactions from the cache. It then extracts the generator node ID and consumer node ID fields from each transaction, independently calculating the frequency of each field. This frequency is used as an event associated with the abnormal transaction for that node. The system records the frequency of abnormal transactions for all nodes in the entire abnormal cache. For example, in transaction EX002, the generator node is N003 and the consumer node is N004. The record shows that N003 triggered 3 abnormal transactions and N004 triggered 2. Next, the system retrieves the node order adjustment count record generated in the previous section and matches each node ID as the key, forming a node-level field pair structure. It combines the "order adjustment count" and "abnormal transaction count" for each node into a binary field and constructs a unified abnormal behavior feature matrix to obtain the node abnormal interference record.
[0134] The link data aggregation submodule records each node field in the node abnormal interference record and the number of times the matching order is adjusted, and maps them one by one according to the node number. It then uniformly includes them in the statistical table. The node number is the main index field, and the corresponding number of times the matching order is adjusted, the number of times the abnormal cache is used, and the node abnormal interference index are respectively used as data fields for structured registration. The module then aggregates and obtains the full-link operation statistics table of blockchain new energy power trading.
[0135] Based on the node abnormal interference records and the number of times the matching order was adjusted, the node number field was extracted as the main index field. The "number of times the order was adjusted" and "number of times the abnormal transaction was adjusted" fields were directly concatenated to form a master table structure. For nodes with missing data, zeros were added to complete the data before being included in the full statistics list. On this basis, the nodes were sorted in ascending order by node number, and the node number, number of times the order was adjusted, and number of times the abnormal transaction was adjusted were integrated and recorded to form a structured data matrix with a unique node index field and statistical attribute fields. This matrix serves as the basic item for summarizing the monitoring results of the entire power trading process. An example is shown below:
[0136] Table 9. Examples of Node Order Adjustment and Anomaly Statistics
[0137] Node number Sequence adjustment times Abnormal transaction times N001 3 1 N002 0 0 N003 2 3 N004 1 2 N005 4 1
[0138] As shown in Table 9, this data matrix can directly reflect the total number of times each node participates in sorting adjustments and abnormal transactions during multiple rounds of matching transactions, and obtain the full-chain operation statistics table of blockchain new energy power transactions.
[0139] A method for trading renewable energy power using blockchain technology includes the following steps:
[0140] S1: Obtain the identities of all transaction power generation and power consumption nodes in the current matching pool, calculate the cumulative transaction frequency of each node, exchange the order of nodes with cumulative transaction frequency higher than the transaction frequency benchmark value and nodes with cumulative transaction frequency lower than the transaction frequency benchmark value, record the node identification sequence, and generate a node matching priority order list;
[0141] S2: Based on the node matching priority order list, calculate the absolute difference between the power output of each transaction power generation and the power reception of each transaction power consumption, and if it is greater than the power transmission error threshold, mark it as out of limit, and obtain the power transmission error judgment record;
[0142] S3: Based on the power transmission error judgment record, read each transaction identification code, search the corresponding matching, power generation record and receiving record in the blockchain account book, judge whether the data is consistent within the transaction identification code range, mark the inconsistent transaction as record exception, and generate a chain record consistency list;
[0143] S4: Based on the chain record consistency list, filter the transactions marked as record exceptions, store the corresponding transaction data in the cache area according to the transaction identification code, generate an abnormal reason label, and generate an abnormal transaction cache data;
[0144] S5: Based on the abnormal transaction cache data and the node matching priority order list, count the number of matching order adjustments and the number of abnormal transaction caches of all nodes in the transaction process, form a full link statistical information, and obtain a blockchain new energy power transaction full link operation statistical table.
[0145] The above is only a preferred embodiment of the present application, and does not limit the form of the present application, any skilled person in the art can use the disclosed technical content to make changes or modifications as equivalent embodiments applied to other fields, but any simple modification, equivalent change and modification made according to the technical essence of the present application to the above embodiments without departing from the technical solution content of the present application, still belongs to the protection scope of the technical solution of the present application.
Claims
1.A system for new energy power transaction considering blockchain, characterized in that, The system includes: The node matching order adjustment module obtains the identity identifiers of all power generators and power consumers in the current matching pool, calculates the cumulative number of transactions for each node, swaps the order of nodes with a cumulative number of transactions higher than the transaction frequency benchmark value with nodes with a cumulative number of transactions lower than the transaction frequency benchmark value, records the node identifier sequence, and generates a node matching priority order list. The power transmission error determination module calculates the error rate based on the node matching priority list and the power output of the power generator and the power received by the power consumer in each transaction. If the error rate is greater than the power transmission error threshold, it is marked as exceeding the limit and a power transmission error determination record is obtained. Based on the power transmission error determination record, the on-chain record verification module reads the identification code of each transaction, retrieves the corresponding matching, power generation and receiving records in the blockchain ledger, determines whether the data is consistent within the range of the transaction identification code, marks inconsistent transactions as record anomalies, and generates an on-chain record consistency list. The abnormal transaction caching module, based on the on-chain record consistency list, filters transactions marked as abnormal, stores the corresponding transaction data in the cache area according to the transaction identification code, generates an abnormal reason label, and generates abnormal transaction cache data. The node matching order adjustment module includes: The node identity recognition submodule extracts and records the node identifier in the identity information table of each node based on all the power generation nodes and power consumption nodes registered in the current matching pool. Combined with the historical transaction data recorded in the blockchain ledger, the node identity identifier is matched with the buyer and seller information in the transaction record. Nodes with transaction records are selected as active nodes, and an active node identifier sequence is generated. The matching frequency calculation submodule reads the number of times the corresponding node appears in all transaction records in the blockchain ledger based on the unique identifier of each node in the active node identifier sequence, takes the cumulative number of transactions of each node as the transaction frequency value, and calculates the frequency deviation value of each node in combination with the transaction frequency benchmark value, and sorts and establishes a node frequency deviation list. The priority queue generation submodule compares the frequency deviation value of each node in the node frequency deviation list with the original queue position, performs node order swapping and updates the positions of all nodes after adjustment, and records the adjusted node order in the blockchain ledger to obtain the node matching priority order list. 2.The system for new energy power transaction considering blockchain according to claim 1, wherein, The node matching priority list includes a node identity sorting list, an exchange order record sequence, and a priority identifier label. The power transmission error judgment record includes an error value label, an error exceeding the limit marker, and a threshold comparison result. The on-chain record consistency list includes a transaction identification code mapping table, a data consistency marker, and a data verification status. The abnormal transaction cache data includes an abnormal identification code list, a cache data structure, and an abnormal reason label. 3.The system for new energy power transaction considering blockchain according to claim 1, wherein, The power transmission error determination module includes: The power record extraction submodule reads each completed matching transaction data in the blockchain ledger based on the node matching priority list, extracts the power generation node number and power consumption node number of the record, retrieves the power output record of the power generation node at the transaction time point and the power reception record of the power consumption node at the same time point in each transaction, and identifies each valid transaction with a number to generate a matching transaction power dataset. The error difference calculation submodule calculates the relative error percentage of electricity transmission in each transaction based on the electricity output value of the power generator and the electricity received value of the power consumer recorded centrally in the matched transaction electricity data set, and obtains a list of transaction electricity error rates. The error result determination submodule compares the error rates of all transactions with the power transmission error threshold based on the error rate of each transaction record in the power error rate list. It identifies the transaction numbers whose error rates are greater than the power transmission error threshold and marks them as exceeding the limit. The rest are marked as normal, and the power transmission error determination records are integrated. 4.The system for new energy power transaction considering blockchain according to claim 1, wherein, The on-chain record verification module includes: The identification code parsing submodule extracts a unique transaction identification code based on each transaction data attached to the power transmission error determination record, and deconstructs the identification code into a structure. It parses the timestamp field into a time format and constructs a unique transaction request index. It then sequentially retrieves the matching record, the power generation node data record, and the power consumption node data record. Finally, it collects the associated fields according to the node number, time, power value, and transaction number to generate a transaction binding field set. The ledger record comparison submodule compares the three record segments of each transaction in the transaction binding field set to check for mismatches in the time field of the records, determines whether there is an offset between the matching time and the node-side recording time, and cross-identifies the transaction number field and the node number field one by one to confirm whether the three records belong to the same transaction and obtains the field consistency offset information. The record consistency judgment submodule determines whether the on-chain record consistency matching criteria are met based on the field conflict type and time offset identified in the field consistency offset information. If the node number, power field and time field are all consistent, the transaction is marked as a normal record. If any field cannot be matched in the corresponding three records, the corresponding transaction is marked as an abnormal record, and the on-chain record consistency list is obtained. 5.The system for new energy power transaction considering blockchain according to claim 1, wherein, The abnormal transaction caching module includes: The abnormal record filtering submodule filters the transaction numbers marked as abnormal based on each record in the on-chain record consistency list. It uses the power generation record, power consumption record and matching record corresponding to each abnormal transaction number as the data source to construct an abnormal transaction data unit and obtain abnormal transaction filtering data. The identification code cache writing submodule organizes the transaction field information bound in the same record according to the field classification for each transaction record in the abnormal transaction screening data, sets a unified field order structure, performs format conversion according to node number, power value and timestamp order, and organizes and writes it into the cache area according to the field classification method. At the same time, it marks the differences between the fields and obtains the cache writing field difference marking results. The exception tag generation submodule converts various difference types into text tags based on the field difference record content in the cached field difference marking result. If there are multiple field differences in a record, the multiple tags are concatenated to form tag content, and the transaction number is used as the index field to associate and store it with each cached data record to generate exception transaction cache data. 6.The system for new energy power transaction considering blockchain according to claim 1, wherein, The system also includes: The transaction full-link statistics module, based on the abnormal transaction cache data and the node matching priority list, counts the number of matching order adjustments and abnormal transaction cache occurrences of all nodes during the transaction process, forming full-link statistics information and obtaining the blockchain new energy power transaction full-link operation statistics table. The blockchain-based new energy power trading full-chain operation statistics table includes the frequency of matching order adjustments, the number of abnormal transaction caches, and node operation status indicators. 7.The system for new energy power transaction considering blockchain according to claim 6, wherein, The transaction end-to-end statistics module includes: The matching order adjustment statistics submodule extracts and compares the sorting position of each node in different rounds based on each matching transaction record in the node matching priority list. It compares the priority positions of the same node in adjacent rounds by number difference to determine whether the position in the time series has changed. If the position is different, it is recorded as an order adjustment event. The event is bound to the node identifier and classified by node number. The number of times the node's order changes during the whole matching process is recorded to obtain the matching order adjustment count value. The abnormal cache statistics submodule reads the transaction number recorded in the abnormal transaction cache data, extracts the power generation node number and the power consumption node number, counts the number of times each node is marked as an abnormal transaction in the cache data, records the cumulative frequency of occurrence, archives the two dimensions of data at the node level, establishes abnormal feature data items under the node dimension, and obtains node abnormal interference records. The link data aggregation submodule maps each node field recorded in the node abnormal interference record and the matching order adjustment number value to the node field, and uniformly includes them in the statistical summary table according to the node number. The node number is used as the main index field, and the corresponding matching order adjustment number, abnormal cache number, and node abnormal interference index are respectively used as data fields for structured registration, and the summary obtains the full-link operation statistics table of blockchain new energy power trading. 8.A method for new energy power transaction considering a blockchain, characterized in that, The method is used to implement the blockchain-integrated new energy power trading system according to any one of claims 1-7, comprising the following steps: S1: Obtain the identity identifiers of all power generators and power consumers in the current matching pool, calculate the cumulative number of transactions for each node, exchange the order of nodes with a cumulative number of transactions higher than the transaction frequency benchmark value with nodes with a cumulative number of transactions lower than the transaction frequency benchmark value, record the node identifier sequence, and generate a node matching priority list. S2: Based on the node matching priority list, calculate the error rate between the power output of the power generator and the power reception of the power consumer in each transaction. If the error rate is greater than the power transmission error threshold, mark it as exceeding the limit and obtain the power transmission error judgment record. S3: Based on the power transmission error determination record, read the identification code of each transaction, retrieve the corresponding matching, power generation and receiving records in the blockchain ledger, determine whether the data is consistent within the range of the transaction identification code, mark inconsistent transactions as record anomalies, and generate an on-chain record consistency list. S4: Based on the on-chain record consistency list, filter transactions marked as record anomalies, store the corresponding transaction data in the cache area according to the transaction identification code, generate anomaly reason tags, and generate abnormal transaction cache data; S5: Based on the abnormal transaction cache data and the node matching priority list, count the number of matching order adjustments and abnormal transaction cache occurrences of all nodes during the transaction process to form full-link statistical information and obtain the full-link operation statistics table of blockchain new energy power trading.
Citation Information
Patent Citations
Power transaction matching method and system based on asynchronous consensus
CN113362067A
Distributed new energy settlement and control system based on block chain
CN119359489A