A method for data security protection in electricity trading

By combining multi-factor authentication and dynamic key management with blockchain notarization and zero-knowledge proofs, the security issues of identity authentication and key management in the power trading system have been resolved, achieving data confidentiality, integrity, and traceability, and improving the security and regulatory compliance of the trading system.

CN120689049BActive Publication Date: 2026-03-13SHANDONG ENERGY POWER SALES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing power trading systems, identity authentication relies on a single method that is easily stolen, static key management leads to a high risk of key leakage, transaction data lacks integrity verification during transmission and storage, and audit logs are difficult to trace, making it difficult for regulators to hold people accountable.

Method used

It employs multiple security authentication methods (physical token, biometric identification, dynamic password) to generate a unique identity code, dynamically generates a dedicated key and transmits it through a peer-to-peer encrypted channel, combines local encryption with two-layer integrity verification, and utilizes blockchain notarization and zero-knowledge proofs to ensure data confidentiality and traceability.

Benefits of technology

It enhances identity security, reduces the risk of key leakage, ensures the confidentiality and integrity of transaction data, achieves traceability and regulatory compliance of the transaction process, and improves transaction efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689049B_ABST
    Figure CN120689049B_ABST
Patent Text Reader

Abstract

This invention relates to the field of power trading security, and more particularly to a data security protection method for power trading. It includes: a registration and authentication phase, where identity registration is completed through triple authentication of physical tokens, biometric recognition, and dynamic passwords, as well as GPS location whitelist verification; a key initialization phase, where SM2 asymmetric key pairs and SM4 symmetric communication keys are dynamically generated based on the transaction time window and subject attributes, and distributed and updated in a timely manner via a point-to-point encrypted channel; a data encryption and binding phase, where transaction instructions are encrypted, signed, and subjected to double-layer integrity verification; a matching and on-chain registration phase, where matching is executed after signature verification, the result is encrypted and written to the blockchain, and a zero-knowledge proof is generated; and a settlement and supervision phase, where settlement or alarm and accountability are initiated after decryption and verification. This invention solves the problems of single identity authentication, static keys, and easy data tampering in existing technologies, achieving full-process security protection for power trading and improving data confidentiality, integrity, and traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power transaction security, and more particularly to a data security protection method for power transactions. Background Technology

[0002] With the deepening of power market reform, the participants in power trading have expanded from the traditional vertically integrated model to include multiple power generators, power retailers, and neutral trading platforms, accompanied by frequent exchanges of large amounts of real-time data and trading instructions. Most existing power trading systems adopt a centralized architecture, relying on a single authentication method and long-term statically configured encryption keys, which severely restricts the confidentiality, integrity, and traceability of data in power trading systems. Summary of the Invention

[0003] In view of the technical problems existing in the background art described above, the present invention proposes a data security protection method for power trading.

[0004] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:

[0005] During the registration and authentication phase, power trading participants complete identity registration through multiple security authentication methods, including physical token authentication, biometric recognition, and time-based dynamic password challenge. After successful authentication, the system generates a unique identification code for the trading entity and submits it to the key service management node.

[0006] During the key initialization phase, after receiving the identity identifier, the key service management node dynamically generates a set of dedicated keys based on the current transaction time window and the subject's identity attributes. The set of dedicated keys includes a pair of asymmetric key pairs for signing and verification, used for digital signature and verification, and a set of communication encryption keys based on a symmetric algorithm, used for transaction data encryption. The key set is sent to the transaction subject and the matching server respectively through a point-to-point encrypted channel.

[0007] During the data encryption and binding phase, the power trading entity generates trading instructions locally and encrypts the content of the trading instructions based on the allocated symmetric encryption key to generate ciphertext instructions. At the same time, it calculates the digest value of the trading instructions and signs them using its asymmetric key to obtain signature information. Finally, a trading data packet integrating the following information is formed, including ciphertext instructions, signature information, identity identification code, and instruction timestamp.

[0008] During the matching and on-chain registration phase, after receiving the transaction data packet, the matching server uses the public key of the power trading entity to verify the signature; after successful verification, it decrypts the ciphertext instruction and executes the transaction matching logic to obtain the matching result; the matching result, together with the original ciphertext, timestamp, and execution hash fingerprint information, is combined to form a complete data block and written to the blockchain;

[0009] During the settlement and supervision phase, the supervisory node decrypts the matching results using a symmetric key based on the transaction hash fingerprint information, the unique identification code of the transaction entity, and the timestamp information recorded on the blockchain. Then, it verifies the correctness of the attached zero-knowledge certificate. If the verification passes, the accounting settlement process is initiated. If the verification fails, the relevant on-chain records are frozen and a security alarm and accountability process is initiated.

[0010] Preferably, in the registration and authentication stage, the authentication methods of physical token authentication, biometric recognition, and time-based dynamic password challenge are as follows: physical token authentication uses a hardware token based on the national cryptographic SM4 algorithm; biometric recognition includes two-factor fusion of iris scanning and fingerprint features; and dynamic password challenge uses the HOTP algorithm to generate a 6-digit dynamic password, with the effective time window of the dynamic password set to 60 seconds.

[0011] Preferably, before the physical token authentication, biometric identification, and time-based dynamic password challenge authentication, the transaction participant's terminal must upload GPS location information for each authentication, compare the location information with a pre-registered security whitelist area, and only allow subsequent authentication operations if the match is successful.

[0012] Preferably, the set of private keys generated during the key initialization phase specifically includes:

[0013] A pair of asymmetric keys based on the Chinese national cryptographic algorithm SM2, wherein the private key is used to perform digital signature operations on plaintext digests, and the public key is used for signature verification;

[0014] A symmetric communication key based on the Chinese national cryptographic SM4 algorithm is used for the encryption and decryption of transaction data. The symmetric key adopts the CBC working mode.

[0015] The symmetric communication key is dynamically updated according to each transaction time window. The update strategy is as follows: before each transaction, the key service management node generates a new symmetric key based on the current timestamp and the subject's identity attributes, and distributes it through a point-to-point encrypted channel; after the key is updated, the old key immediately becomes invalid and is removed from the secure storage area of ​​the subject and the matching server.

[0016] The asymmetric key pair and the symmetric communication key are sent to the transaction entity and the matching server through independent peer-to-peer secure channels, respectively.

[0017] Preferably, in the data encryption and binding stage, after the transaction data packet is formed, an integrity verification operation is also required for the transaction data packet, specifically including:

[0018] Random number coupling: After the data packet is assembled, the transaction entity generates a one-time coupled random number using a pseudo-random function (PRF) based on the timestamp of this transaction and the pre-negotiated time window identifier.

[0019] Reconstruct the validation input: Concatenate the original data packet with random numbers to form a validation input stream;

[0020] Dual-algorithm joint calculation: First, the national cryptographic SM4 algorithm is used to calculate the first-layer message authentication code on the verification input stream, and then the national cryptographic SM3 algorithm is used to perform a secondary digest on the first-layer message authentication code and the time window identifier to generate the second-layer verification code;

[0021] Dynamic encapsulation: The generated random number is appended to the end of the data packet along with a double-layer checksum to form an integrity check field;

[0022] Secure isolated transmission: The complete transaction data packet is sent to the matching server through an independent encrypted channel, and the same time window identifier and the timestamp of the reception are used to re-execute the steps on the server side. The locally calculated second-level check code is compared with the attached second-level check code to confirm that the data packet has not been tampered with during transmission and storage.

[0023] Preferably, in the matching and on-chain registration phase, after verification, the encrypted instructions are decrypted and the transaction matching logic is executed; the matching result, together with the original encrypted text, timestamp, and execution hash fingerprint information, forms a complete data block and is written into the blockchain. Specifically, this implementation includes:

[0024] First, decrypt the ciphertext instructions to obtain the plaintext instruction set;

[0025] A priority vector is constructed based on the transaction type, price, quantity, and timestamp of each instruction, and then inserted into the buy queue and sell queue respectively. The buy queue is sorted by price from high to low, and in case of the same price, by time. The sell queue is sorted by price from low to high, and in case of the same price, by time.

[0026] When the best bid price is greater than or equal to the best ask price, a batch greedy matching algorithm is used to sequentially retrieve the first bid and sell orders in the queue, generate a transaction record according to the minimum matching quantity, and update the remaining pending orders until the matching conditions are no longer met.

[0027] Collect all transaction records in the matching order to generate a result list. Calculate the hash fingerprint for each transaction record, attach the original ciphertext index and execution timestamp, and encapsulate it into the data block field to be written on the final chain.

[0028] As a preferred approach, before combining the matching result with the original ciphertext, timestamp, and execution hash fingerprint information to form a complete data block and writing it into the blockchain, the matching result needs to be encrypted according to the symmetric communication key allocated during the key initialization phase.

[0029] As a preferred option, after the matching and on-chain registration phase, the matching server re-executes the same matching algorithm in a trusted execution environment and masks the key fields.

[0030] The intermediate states and results generated during the execution of the matching logic are transformed into zero-knowledge proofs and output as credentials for verifying the credibility of the transaction.

[0031] Compared with existing technologies, the advantages and positive effects of this invention are as follows: This invention ensures identity security by combining geographical whitelist verification with physical tokens, biometrics, and dynamic passwords for triple authentication; it ensures forward security of keys by adopting the SM2 / SM4 dynamic key point-to-point distribution and instant expiration mechanism; and it achieves data confidentiality, integrity, and traceability by utilizing local encryption, double-layer verification, blockchain notarization, and zero-knowledge proof, thereby improving transaction efficiency and regulatory compliance. Attached Figure Description

[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is a flowchart illustrating the structure of a data security protection method for electricity trading. Detailed Implementation

[0034] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0035] Numerous specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways than those described herein, and therefore the invention is not limited to the specific embodiments disclosed in the following specification.

[0036] In recent years, with the deepening of power market reform, the traditional vertically integrated power grid model has gradually shifted to a multi-participant, decentralized trading model. The frequency of real-time data interaction between power generation companies, power sales companies, and power trading platforms has increased significantly, and the trading volume has continued to rise. However, the safety of power grid operation and the fairness of trading have placed higher demands on data security. Existing power trading systems mostly adopt a centralized architecture and a single static key management method. Firstly, identity authentication relies heavily on usernames, passwords, or hardware tokens, which pose a risk of theft or internal misuse. Secondly, encryption keys are used statically for extended periods, making timely replacement difficult after leakage. Thirdly, the transmission and storage of trading instructions and matching results lack end-to-end integrity verification, making them susceptible to undetected tampering. Fourthly, audit logs are stored in traditional databases, lacking immutable traceability mechanisms, making it difficult for regulatory authorities to conduct post-event verification and accountability. Based on this, this invention proposes a data security protection method for power trading, specifically implemented as follows: Figure 1 As shown.

[0037] Firstly, during the registration and authentication phase, a multi-layered security authentication scheme is adopted to prevent the theft or misuse of identity credentials. Power trading participants complete identity registration through multiple security authentication methods, including physical token authentication, biometric recognition, and time-based dynamic password challenges. Upon successful authentication, the system generates a unique identification code for the trading entity and submits it to the key service management node. In the registration and authentication phase, the physical token authentication uses a hardware token based on the national cryptographic algorithm SM4; the biometric recognition includes a two-factor fusion of iris scanning and fingerprint features; and the dynamic password challenge uses the HOTP algorithm to generate a 6-digit dynamic password, with a valid time window of 60 seconds. Specifically, during the registration and authentication phase, the power trading participant first inserts a hardware token based on the national cryptographic algorithm SM4 into a trusted terminal, triggering a one-time password generation request. The token integrates a security chip that receives a random challenge code from the system, calculates and returns a 6-digit dynamic password using the SM4 algorithm. Simultaneously, the terminal camera and fingerprint scanner are activated in parallel: the iris scanning module acquires the user's binocular feature maps and extracts feature points using a pre-set iris encoding algorithm; the fingerprint acquisition module uses a high-resolution optical sensor to capture fingerprint ridges, and generates a fingerprint template after secondary enhancement and segmented comparison. The biometric recognition system compares the iris and fingerprint templates with registered templates in the database for similarity, and merges their scores to ensure successful two-factor authentication. Subsequently, the client uses the HOTP algorithm to generate a second 6-digit dynamic password locally based on the current timestamp and pre-shared key. This password is only valid within a 60-second window. The authentication server verifies the three credentials separately. After all verifications pass, a globally unique identifier (UID) is generated for the entity and submitted to the key service management node through a secure channel to complete the registration and authentication process. Before the physical token authentication, biometric recognition, and time-based dynamic password challenge authentication, the transaction participant's terminal must upload GPS location information for each authentication. This location information is compared with a pre-registered security whitelist area, and only when a match is found is subsequent authentication allowed. Specifically, before physical token authentication, biometric identification, and time-based dynamic password challenges are initiated, the power trading participant's terminal first uses its built-in GPS module to obtain real-time latitude and longitude information, and then reports this location data along with a timestamp to the authentication server via a TLS encrypted channel. The authentication server compares the received latitude and longitude with the coordinates of the pre-registered security whitelist area, using the nearest neighbor distance method to confirm whether the terminal is located within a legitimate geographical area.If the location result matches any whitelisted area and the timestamp is within the allowed operating time window, a location verification pass signal is returned, allowing subsequent SM4 hardware token authentication, iris and fingerprint two-factor fusion recognition, and HOTP dynamic password verification to proceed. If the location verification fails, the authentication process is immediately interrupted, and an access denial command is sent to the client. This step effectively prevents unauthorized access across regions or outside the controlled environment, further enhancing the geographical security protection capabilities of the power trading system.

[0038] To enhance key security and ensure flexible updates, a dynamic generation and peer-to-peer distribution scheme is adopted to guarantee that a dedicated key is used for every transaction. During the key initialization phase, upon receiving the identity identifier, the key service management node dynamically generates a set of dedicated keys based on the current transaction time window and the entity's identity attributes. This set of dedicated keys includes an asymmetric key pair for signing and verification (for digital signatures and verification) and a set of communication encryption keys based on a symmetric algorithm (for encrypting transaction data). This key set is sent to both the transaction entity and the matching server via a peer-to-peer encrypted channel. The dedicated key set specifically includes: a pair of asymmetric keys based on the Chinese national cryptographic algorithm SM2, where the private key is used to perform digital signature operations on plaintext digests and the public key is used for signature verification; and a symmetric communication key based on the Chinese national cryptographic algorithm SM4, used for encryption and decryption of transaction data, wherein the symmetric key adopts CBC working mode; the symmetric communication key is dynamically updated according to each transaction time window, and the update strategy is as follows: before each transaction, the key service management node generates a new symmetric key based on the current timestamp and the subject's identity attributes, and distributes it through a peer-to-peer encrypted channel; after the key is updated, the old key immediately becomes invalid and is cleared from the secure storage area of ​​the subject and the matching server; the asymmetric key pair and the symmetric communication key are respectively sent to the transaction subject and the matching server through independent peer-to-peer secure channels. This ensures that each transaction uses a dedicated, time-limited key, minimizing the risk of key leakage.

[0039] To ensure the confidentiality and integrity of transaction instructions during transmission, a local encryption and two-layer integrity verification scheme is employed to prevent data eavesdropping or tampering. During the data encryption and binding phase, the power trading entity generates transaction instructions locally and encrypts the content of these instructions using an allocated symmetric encryption key, generating ciphertext instructions. Simultaneously, it calculates the digest value of the transaction instructions and signs it using its asymmetric key, obtaining signature information. This ultimately forms a transaction data packet integrating the following information: ciphertext instructions, signature information, identification code, and instruction timestamp. Specifically, during the data encryption and binding phase, the trading entity first uses the SM4 symmetric key stored in its Trusted Execution Environment (TEE) to encrypt the plaintext transaction instructions in CBC mode, generating a fixed-length ciphertext instruction field. After encryption, the system calculates the message digest of the original plaintext instructions using the SM3 hash algorithm. Subsequently, it uses the SM2 private key in the TEE to digitally sign the digest value, outputting DER-encoded signature information. Finally, the transaction data packet, including the ciphertext instructions, signature information, identification code, and instruction timestamp, is sequentially encapsulated into a transaction data packet.

[0040] In addition, during the data encryption and binding phase, after the transaction data packet is formed, an integrity verification operation is required. This includes: random number coupling: after the data packet is assembled, the transaction entity generates a one-time coupled random number using a pseudo-random function (PRF) based on the timestamp of the transaction and the pre-negotiated time window identifier; reconstructing the verification input: concatenating the original data packet with the random number to form a verification input stream; dual-algorithm joint calculation: first, the national cryptographic SM4 algorithm is used to calculate the first-layer message authentication code on the verification input stream, and then the national cryptographic SM3 algorithm is used to perform a secondary digest on the first-layer message authentication code and the time window identifier to generate the second-layer verification code; dynamic encapsulation: the generated random number and the dual-layer verification code are appended to the end of the data packet to form an integrity verification field; secure isolated transmission: the complete transaction data packet is sent to the matching server through an independent encrypted channel, and the steps are re-executed on the server side using the same time window identifier and the timestamp at the time of receipt, comparing the locally calculated second-layer verification code with the appended second-layer verification code to confirm that the data packet has not been tampered with during transmission and storage.

[0041] To ensure the immutability and full traceability of the transaction matching results, a blockchain-based notarization scheme is adopted, thereby achieving openness, transparency, and reliable auditing of the transaction process. During the matching and on-chain registration phase, after receiving the transaction data packet, the matching server verifies the signature using the public key of the electricity trading entity. Upon successful verification, the encrypted instructions are decrypted, and the transaction matching logic is executed to obtain the matching result. The matching result, along with the original encrypted text, timestamp, and execution hash fingerprint information, is combined to form a complete data block and written to the blockchain. The implementation steps are as follows: First, decrypt the ciphertext instructions to obtain a set of plaintext instructions; construct a priority vector based on the transaction type, price, quantity, and timestamp of each instruction, and insert them into the buy queue and sell queue respectively; the buy queue is sorted by price from high to low, and in case of the same price, by time order; the sell queue is sorted by price from low to high, and in case of the same price, by time order; when the optimal buy price is greater than or equal to the optimal sell price, a batch greedy matching algorithm is used to sequentially retrieve the buy and sell orders at the head of the queue, generate a transaction record according to the minimum matchable quantity, and update the remaining pending orders until the matching conditions are no longer met; collect all transaction records in matching order to generate a result list, calculate the hash fingerprint for each transaction record, attach the original ciphertext index and execution timestamp, and encapsulate it as the data block field to be written on the blockchain. Before combining the matching result with the original ciphertext, timestamp, and execution hash fingerprint information to form a complete data block and writing it to the blockchain, the symmetric communication key allocated during the key initialization phase of the matching result needs to be encrypted. Finally, after the matching and on-chain registration phase, the matching server must re-execute the same matching algorithm in a trusted execution environment and mask key fields; the intermediate states and results generated during the matching logic execution process are converted into zero-knowledge proofs and output as transaction credibility verification credentials.

[0042] Specifically, the matching and on-chain registration phase begins when the matching server receives the transaction data packets transmitted through the encrypted channel. The server first extracts the signature information from the packet within the trusted execution environment (TEE), and performs a signature verification operation using the public key of the transaction entity to confirm that the data packet has not been tampered with and was indeed signed by its private key. After successful verification, the server extracts the encrypted ciphertext instructions and decrypts them using the symmetric communication key issued during the key initialization phase and stored in the TEE, recovering the plaintext set of transaction instructions. Next, the system sequentially parses the transaction type, price, quantity, and timestamp from each plaintext instruction, inserting buy orders into a buy queue sorted by price from high to low, and by time chronological order when prices are the same, and inserting sell orders into a sell queue sorted by price from low to high, and by time chronological order when prices are the same. Then, when the first price in the buy queue is greater than or equal to the first price in the sell queue, the system retrieves the first order from each queue, calculates the minimum matchable quantity between them, generates a transaction record based on the seller's price, and updates the remaining quantity of the original order. If the remaining quantity is still greater than zero, it is re-inserted into the queue. The auction process repeats until the matching conditions are no longer met or any queue is empty. After all transaction records are aggregated in the TEE, the matching results are first encrypted once using a symmetric communication key. Then, for each transaction record, the record number, execution timestamp, and record digest are concatenated, and an SM3 hash fingerprint is calculated. The server packages the encrypted matching results, the original ciphertext instruction index list, each hash fingerprint, and the matching execution timestamp into a block to be uploaded to the blockchain. This block is then submitted and written to the immutable distributed ledger via the blockchain consensus protocol. After the on-chain write is complete, the system replays the same matching logic within the TEE, masking key fields (such as UID and specific quantity), retaining only the intermediate digest of the sorting and matching process. A proof is generated using a zero-knowledge proof framework to demonstrate the correct execution of the matching logic without leaking private data. This proof, along with the block hash, is stored as a transaction credibility verification credential.

[0043] In the final settlement and oversight phase, the oversight node decrypts the matching results using a symmetric key based on the transaction hash fingerprint information, unique identifiers (UIDs) of the transaction entities, and timestamp information recorded on the blockchain. It then verifies the correctness of the attached zero-knowledge certificate. If verification passes, the accounting settlement process is initiated; if verification fails, the relevant on-chain records are frozen, and security alerts and accountability procedures are activated. Specifically, in the settlement and oversight phase, the oversight node first retrieves the data block to be processed from the blockchain, extracting the encrypted matching results, the transaction hash fingerprint list, the unique identifiers (UIDs) of each transaction entity, and the original timestamp information. Then, in its trusted execution environment, it calls the SM4 symmetric communication key, consistent with the key initialization phase, to decrypt the encrypted block and restore all transaction records. Subsequently, the system recalculates the SM3 hash of each transaction record's hash fingerprint and the original transaction data according to the same concatenation rules, and compares the newly calculated hash value with the fingerprint stored on the blockchain to ensure data integrity has not been tampered with. Next, the supervisory node uses the zero-knowledge proof synchronously issued after the blockchain is written at the start of the transaction to call the verification module to verify the proof and confirm the compliance of the matching logic and the correctness of privacy protection. If both the hash comparison and the zero-knowledge proof verification pass, the system automatically triggers the next step of the accounting settlement process, including deduction, accounting, and generation of accounting vouchers; if any verification fails, the supervisory module immediately freezes the corresponding on-chain record state, writes the abnormal event and related UID and timestamp to the security audit log, sends an alarm notification to the security operations center, and initiates the incident response and accountability process to conduct in-depth investigation and handling of potential security threats or compliance risks.

[0044] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments for application in other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A data security protection method for electricity trading, characterized in that, Includes the following steps: During the registration and authentication phase, power trading participants complete identity registration through multiple security authentication methods, including physical token authentication, biometric recognition, and time-based dynamic password challenges. After successful authentication, the system generates a unique identification code for the power trading entity and submits it to the key service management node; During the key initialization phase, after receiving the identity identifier, the key service management node dynamically generates a set of dedicated keys based on the current transaction time window and the subject's identity attributes. The set of dedicated keys includes a pair of asymmetric key pairs for signing and verification, used for digital signature and verification, and a set of communication encryption keys based on a symmetric algorithm, used for transaction data encryption. The key pairs are sent to the transaction subject and the matching server respectively through a point-to-point encrypted channel. During the data encryption and binding phase, the power trading entity generates trading instructions locally and encrypts the content of the trading instructions based on the allocated symmetric encryption key to generate ciphertext instructions. At the same time, it calculates the digest value of the trading instructions and signs them using its asymmetric key to obtain signature information. Finally, a trading data packet integrating the following information is formed, including ciphertext instructions, signature information, identity identification code, and instruction timestamp. During the matching and on-chain registration phase, after receiving the transaction data packet, the matching server uses the public key of the power trading entity to verify the signature; after successful verification, it decrypts the ciphertext instruction and executes the transaction matching logic to obtain the matching result; the matching result, together with the original ciphertext, timestamp, and execution hash fingerprint information, is combined to form a complete data block and written to the blockchain; During the settlement and supervision phase, the supervision node uses a symmetric key to decrypt the matching results based on the transaction hash fingerprint information, the unique identification code of the transaction entity, and the timestamp information recorded on the blockchain, and then verifies the correctness of the attached zero-knowledge certificate. If the verification passes, the accounting settlement process will be initiated; if the verification fails, the relevant on-chain records will be frozen and a security alert and accountability process will be initiated. The set of dedicated keys generated during the key initialization phase specifically includes: A pair of asymmetric keys based on the Chinese national cryptographic algorithm SM2, wherein the private key is used to perform digital signature operations on plaintext digests, and the public key is used for signature verification; A symmetric communication key based on the Chinese national cryptographic SM4 algorithm is used for the encryption and decryption of transaction data. The symmetric key adopts the CBC working mode. The symmetric communication key is dynamically updated according to each transaction time window. The update strategy is as follows: before each transaction, the key service management node generates a new symmetric key based on the current timestamp and the subject's identity attributes, and distributes it through a point-to-point encrypted channel; after the key is updated, the old key immediately becomes invalid and is removed from the secure storage area of ​​the subject and the matching server. The asymmetric key pair and the symmetric communication key are sent to the transaction entity and the matching server through independent peer-to-peer secure channels, respectively.

2. The data security protection method for power trading according to claim 1, characterized in that, In the registration and authentication phase, the authentication methods are physical token authentication, biometric recognition, and time-based dynamic password challenge. Physical token authentication uses a hardware token based on the national cryptographic SM4 algorithm. Biometric recognition includes a two-factor fusion of iris scanning and fingerprint features. The dynamic password challenge uses the HOTP algorithm to generate a 6-digit dynamic password, and the effective time window of the dynamic password is set to 60 seconds.

3. The data security protection method for power trading according to claim 2, characterized in that, Before the physical token authentication, biometric recognition, and time-based dynamic password challenge authentication, the transaction participant's terminal must upload GPS location information for each authentication. This location information is then compared with a pre-registered security whitelist area. Only when the match is successful will subsequent authentication operations be allowed.

4. The data security protection method for power trading according to claim 1, characterized in that, In the data encryption and binding phase, after the transaction data packet is formed, an integrity verification operation is also required for the transaction data packet, specifically including: Random number coupling: After the data packet is assembled, the transaction entity generates a one-time coupled random number using a pseudo-random function (PRF) based on the timestamp of this transaction and the pre-negotiated time window identifier. Reconstruct the validation input: Concatenate the original data packet with random numbers to form a validation input stream; Dual-algorithm joint calculation: First, the national cryptographic SM4 algorithm is used to calculate the first-layer message authentication code on the verification input stream, and then the national cryptographic SM3 algorithm is used to perform a secondary digest on the first-layer message authentication code and the time window identifier to generate the second-layer verification code; Dynamic encapsulation: The generated random number is appended to the end of the data packet along with a double-layer checksum to form an integrity check field; Secure isolated transmission: The complete transaction data packet is sent to the matching server through an independent encrypted channel, and the same time window identifier and the timestamp of the reception are used to re-execute the steps on the server side. The locally calculated second-level check code is compared with the attached second-level check code to confirm that the data packet has not been tampered with during transmission and storage.

5. A data security protection method for power trading according to claim 1, characterized in that, In the matching and on-chain registration phase, after verification, the encrypted instructions are decrypted and the transaction matching logic is executed; the matching result, together with the original encrypted text, timestamp, and execution hash fingerprint information, forms a complete data block and is written into the blockchain. The specific implementation includes: First, decrypt the ciphertext instructions to obtain the plaintext instruction set; A priority vector is constructed based on the transaction type, price, quantity, and timestamp of each instruction, and then inserted into the buy queue and sell queue respectively. The buy queue is sorted by price from high to low, and in case of the same price, by time. The sell queue is sorted by price from low to high, and in case of the same price, by time. When the best bid price is greater than or equal to the best ask price, a batch greedy matching algorithm is used to sequentially retrieve the first bid and sell orders in the queue, generate a transaction record according to the minimum matching quantity, and update the remaining pending orders until the matching conditions are no longer met. Collect all transaction records in the matching order to generate a result list. Calculate the hash fingerprint for each transaction record, attach the original ciphertext index and execution timestamp, and encapsulate it into the data block field to be written on the final chain.

6. A data security protection method for power trading according to claim 5, characterized in that, Before combining the matching result with the original ciphertext, timestamp, and execution hash fingerprint information to form a complete data block and writing it into the blockchain, the matching result needs to be encrypted according to the symmetric communication key allocated during the key initialization phase.

7. A data security protection method for power trading according to claim 5, characterized in that, After the matching and on-chain registration phase, the matching server re-executes the same matching algorithm in a trusted execution environment and masks key fields. The intermediate states and results generated during the execution of the matching logic are transformed into zero-knowledge proofs and output as credentials for verifying the credibility of the transaction.

Citation Information

Patent Citations

  • Anonymous electric power bidding transaction method and system based on block chain technology

    CN113570372A

  • Method and apparatus for generating shared contract key

    WO2021184962A1