Safe electric vehicle energy transaction method
Through the combination of distributed identity recognition technology and Merkel tree, a complex and diverse distributed identity is built for electric vehicles, solving the problems of high cost and limited development of centralized energy transaction solutions, and realizing the security, reliability and decentralized characteristics of electric vehicle energy transactions.
Patent Information
- Application Number
- CN202510021308.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-06-06
AI Technical Summary
The existing centralized electric vehicle energy trading scheme has led to the energy of electric vehicles coming from traditional thermal power, increasing the cost of charging piles and limiting the development of electric vehicles.
Using distributed identity recognition technology and the existence proof characteristics of Merkel tree, we build complex and diverse distributed identities for electric vehicles, realize secure transaction communication, and use energy transfer stations held by trusted third parties as the core node of the transaction closed loop.
It realizes identity verification and traceability of multiple users across regions and multiple transit stations in electric vehicle energy transactions, ensures the security, reliability and decentralized characteristics of transactions, and meets the needs of cross-regional transactions and diversified identity management in the electric vehicle energy market.
Smart Images

Figure CN120106847A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power facility network security, and in particular to a secure electric vehicle energy trading method. Background Art
[0002] With the continuous development of new energy technologies, various energy management technologies continue to emerge. As a scenario widely used by users in the development of new energy, electric vehicles, the charging and discharging energy trading technology for electric vehicles is constantly developing. Most of the existing work has carried out centralized energy trading solutions, but electric vehicles are constantly moving, and centralized energy trading solutions will cause the energy of electric vehicles to come from traditional energy sources such as thermal power. At the same time, the cost of building charging piles is high, which to a certain extent promotes the development and promotion of electric vehicles. The present invention proposes an energy trading solution for electric vehicles in distributed scenarios, which converts traditional charging stations into transfer stations for energy trading. Through distributed identity recognition and multi-identity integrity protection, users can switch identities between different third-party transfer stations, and realize power energy transactions between users with network security guarantees.
[0003] In view of the current situation that electric vehicles are restricted by centralized trading solutions, the present invention designs a safe energy trading solution for electric vehicles, which mainly includes the following two key technical points:
[0004] Through distributed identity identification technology, complex and diverse distributed identities are built for different electric vehicles, and cryptography technology is used to achieve secure transaction communications.
[0005] By utilizing the Merkle tree's existence proof feature, the same electric car can have multiple distributed identities, allowing users to conduct secure transactions at different third-party energy trading stations without changing transaction plans. Summary of the invention
[0006] A first aspect of the present disclosure provides a secure electric vehicle energy trading method for implementing energy trading in a distributed environment, comprising:
[0007] Generate asymmetric public and private key pairs and hash functions for each participant, and generate their own distributed identity;
[0008] Based on the distributed identity, the seller generates a bid for the buyer to select and verify the validity of the bid;
[0009] The buyer selects the seller’s bid and sends a reservation message to complete the energy reservation;
[0010] Buyers and sellers complete the transfer of energy at the transfer station based on a predetermined contract.
[0011] In combination with the first aspect, the generating of asymmetric cryptographic public-private key pairs and hash functions for each participant, and generating respective distributed identity identifiers includes:
[0012] Generate asymmetric public and private key pairs and hash functions for each participant;
[0013] Based on the public-private key pair and the hash function and according to the regions of the transfer stations with different spatial layouts, multiple distributed identity identifiers are assigned to sellers and buyers, and these distributed identity identifiers are stored using a Merkle tree. The distributed identity identifiers include did, method-name, and method-specific-id, where did is an instance protocol, method-name is a user-defined instance method name, and method-specific-id is a specific identifier of the user identity;
[0014] The Merkle proof of distributed identity is generated through the Merkle tree and used to verify the identity information to the transfer station.
[0015] In combination with the first aspect, based on the distributed identity, the seller generates a bid for the buyer to select and verifies the validity of the bid, including:
[0016] The seller generates a bid, including the amount of energy to be traded, the price, the validity period of the transaction, and the distributed identity;
[0017] The seller uses the private key to digitally sign the bid and publish it over a private network;
[0018] The buyer uses the distributed identity in the bid to retrieve the seller’s public key and Merkle proof on the blockchain to verify the validity of the bid;
[0019] The buyer selects the bid that meets the requirements from the verified bids.
[0020] In combination with the first aspect, the buyer selects the seller's bid and sends a reservation message to complete the energy reservation, including:
[0021] The buyer generates a session key and uses the private key to generate a signature for the session key to form a predetermined message, which is sent to the seller;
[0022] The seller retrieves the public key from the blockchain through the buyer’s distributed identity and verifies the buyer’s signature to decrypt the session key;
[0023] The seller and buyer share the session key and stored energy information and determine the location of the transfer station for the transaction.
[0024] In combination with the first aspect, the buyer and the seller complete the transfer of energy at the transfer station according to the predetermined contract, including:
[0025] The seller sends the energy storage signal and Merkle root to the designated transfer station according to the contract content;
[0026] The transfer station verifies the seller’s identity information, receives energy storage signals and stores electrical energy;
[0027] After arriving at the transfer station, the buyer sends a release signal and provides identity verification information;
[0028] After verifying the buyer's identity and energy release signal, the transfer station releases the energy stored by the seller to the buyer.
[0029] According to a second aspect of the present disclosure, there is provided an electronic device, comprising:
[0030] one or more processors;
[0031] A storage unit is used to store one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement the secure electric vehicle energy trading method.
[0032] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the secure electric vehicle energy trading method can be implemented.
[0033] Beneficial effects: The secure electric vehicle energy trading method provided by the present invention realizes the identity authentication and traceability of multiple users across regions and multiple transfer stations in electric vehicle energy trading by establishing a distributed identity identification system and managing identity information using a Merkle tree structure. The method uses energy transfer stations held by a trusted third party as the core node of the closed-loop transaction, so that transaction participants can effectively register and verify their identities at transfer stations in different regions, thereby ensuring the security, reliability and decentralization of the transaction, and meeting the needs of cross-regional transactions and diversified identity management in the electric vehicle energy market. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of a process flow of a secure electric vehicle energy trading method according to an embodiment of the present disclosure;
[0035] Figure 2 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the embodiments of the present disclosure.
[0037] The terms used in the disclosed embodiments are only for the purpose of describing specific embodiments and are not intended to limit the disclosed embodiments. The singular forms of "a", "said" and "the" used in the disclosed embodiments and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0038] like Figure 1 FIG. 1 is a flow chart of a safe electric vehicle energy trading method according to an embodiment of the present disclosure, including:
[0039] S101: Generate asymmetric public and private key pairs and hash functions for each participant, and generate their respective distributed identities;
[0040] S102: Based on the distributed identity, the seller generates a bid for the buyer to select and verify the validity of the bid;
[0041] S103: The buyer selects the seller's bid and sends a reservation message to complete the energy reservation;
[0042] S104: Screening according to the accuracy and coverage of the high-order decision rules to obtain target decision rules;
[0043] S105: Buyers and sellers complete the transfer of energy at the transfer station according to the predetermined contract.
[0044] Specifically, S101: Generate a public-private key pair and a distributed identity.
[0045] First, asymmetric public-private key pairs and hash functions are generated for each transaction participant (seller S and buyer P), which are used for data encryption and identity authentication. Each participant uses a distributed identity (DID) mechanism to generate their own identity, allowing participants to manage their own identity information without third-party authentication. DID contains the protocol, method name, and unique identification string. It has the characteristics of decentralization, can be recorded on a distributed ledger, and provides an identity authentication basis for subsequent transaction processes.
[0046] S102: The seller generates a bid.
[0047] Based on the previously generated distributed identity, the seller S creates a bid for the buyer P to choose. The bid includes key information such as the amount of energy traded, price, validity period, and the seller's distributed identity. The seller signs the bid with a private key to ensure the authenticity and uniqueness of the bid. The buyer can obtain the seller's public key from the distributed ledger, verify the signature of the bid, and confirm the legitimacy of the bid.
[0048] S103: Buyer reserves energy.
[0049] After selecting the bid, the buyer P sends a reservation message to the seller S to formally confirm the purchase intention and complete the energy reservation. The reservation message is encrypted and contains the session key and reservation information to ensure that the information can be transmitted securely in the subsequent energy transaction. After both parties complete the confirmation of the reservation contract, the relevant information for energy storage and release is generated for the subsequent energy transfer operation.
[0050] S104: Screening according to high-order decision rules.
[0051] The system screens transaction records by the accuracy and coverage of high-order decision rules and finally determines the target decision rules. The main function of this step is to optimize and ensure the accuracy of transaction rules to ensure the transparency and efficiency of energy transactions. Through this screening, the system selects rules that are suitable for current transaction needs, thereby reducing redundant information and decision conflicts.
[0052] S105: The transfer station completes energy transfer.
[0053] In this step, the two parties complete the actual energy transfer at the transfer station MS according to the predetermined contract. After the seller S stores the electric energy at the transfer station, the buyer P can extract the energy at this location. The transfer station records and verifies each step of the transaction and updates the database to ensure that the entire transaction process is traceable and tamper-proof.
[0054] Beneficial effects: The process is designed to provide an efficient, secure, and decentralized solution for cross-regional energy trading of electric vehicles, ensuring the identity authentication of transaction participants and the security of transaction information, and ensuring the transparency and traceability of records through a trusted distributed ledger.
[0055] Furthermore, the generation of asymmetric public and private key pairs and hash functions for each participant, and the generation of respective distributed identities include:
[0056] Generate asymmetric public and private key pairs and hash functions for each participant;
[0057] Based on the public-private key pair and the hash function and according to the regions of the transfer stations with different spatial layouts, multiple distributed identity identifiers are assigned to sellers and buyers, and these distributed identity identifiers are stored using a Merkle tree. The distributed identity identifiers include did, method-name, and method-specific-id, where did is an instance protocol, method-name is a user-defined instance method name, and method-specific-id is a specific identifier of the user identity;
[0058] The Merkle proof of distributed identity is generated through the Merkle tree and used to verify the identity information to the transfer station.
[0059] Specifically, the system first generates an asymmetric public-private key pair for each participant (seller and buyer). Asymmetric encryption of public-private key pairs is a widely used security method that uses a public key and a private key to achieve secure identity authentication and information encryption. The private key is kept confidential by the participant, while the public key can be made public on the blockchain or other secure networks for other participants to verify their identity.
[0060] Each participant is assigned a hash function to generate a data summary. This hash function will be used to build the participant's distributed identity and ensure the consistency and tamper-proofness of the identity data through the Merkle tree structure.
[0061] Generate a distributed identity based on the key pair, hash function and relay station layout. Distributed identity (DID): The generated DID structure contains three parts: did, method-name and method-specific-id.
[0062] DID: Instance protocol, used to define the basic structure of DID and ensure the standardization of DID. DID usually contains the format of "did:method-name".
[0063] method-name: User-defined instance method name, identifying the specific application scenario or usage method of the DID. It can be a unique method name for each transfer station, used to distinguish different regions and identities managed by the transfer station.
[0064] method-specific-id: It is an identifier for a specific user, which is assigned to sellers or buyers based on the spatial layout and location of the transfer station. Because the same user may have different DIDs in different transfer stations, method-specific-id can uniquely identify each identity.
[0065] Assign multiple DIDs: Each participant can have multiple DIDs depending on the region where the transfer station belongs. For example, if a seller trades energy at multiple transfer stations, the seller will have multiple DIDs corresponding to these transfer stations so that independent identities can be used in transactions in different regions. This process ensures cross-regional identity authentication and privacy protection.
[0066] Among them, the Merkle tree is used to store the distributed identity set.
[0067] Merkle tree construction: All DIDs will first generate a unique hash value through a hash function and store it as a leaf node at the bottom of the Merkle tree. The Merkle tree is generated recursively layer by layer by combining the hash values of adjacent leaf nodes and hashing them again, and finally forms a unique hash value at the root node, namely the Merkle root.
[0068] Tree structure advantage: The Merkle tree structure facilitates quick verification of identity information. Any change in a DID will result in a change in the Merkle root, giving it strong data integrity and tamper-proof properties. At the same time, the Merkle tree structure also makes the storage and verification of identity sets more efficient.
[0069] Then generate and use Merkle proof to verify identity. Merkle proof is based on the position of user DID in Merkle tree, extracts key nodes on the path (called Merklepath), and forms a proof of identity existence. Specifically, if a transfer station MS needs to verify the DID of a buyer or seller, the user can provide Merkle proof.
[0070] Authentication of the transfer station: The transfer station can reconstruct the Merkle tree layer by layer from the bottom node through the received Merkle proof and leaf node (i.e. the hash value of the DID) and generate a Merkle root. If the Merkle root is consistent with the root hash value stored in the distributed ledger, it means that the DID is valid and has not been tampered with. In this way, the transfer station can reliably verify the user's identity without accessing or storing the user's entire identity data.
[0071] Beneficial effects: By generating public-private key pairs and distributed identity identifiers for transaction participants and using Merkle trees for storage and verification, the present invention provides a secure and efficient identity authentication scheme. This design not only protects the privacy of users, but also simplifies the cross-regional identity management process and realizes reliable identity authentication and energy trading between different transfer stations.
[0072] Furthermore, based on the distributed identity, the seller generates a bid for the buyer to select and verifies the validity of the bid, including:
[0073] The seller generates a bid, including the amount of energy to be traded, the price, the validity period of the transaction, and the distributed identity;
[0074] The seller uses the private key to digitally sign the bid and publish it over a private network;
[0075] The buyer uses the distributed identity in the bid to retrieve the seller’s public key and Merkle proof on the blockchain to verify the validity of the bid;
[0076] The buyer selects the bid that meets the requirements from the verified bids.
[0077] Specifically, the seller creates a bid document, which contains the following key information:
[0078] Energy quantity: This is the amount of energy the seller is willing to sell, which may be expressed in units such as kilowatt-hours (kWh).
[0079] Price: The transaction price, which is what buyers pay for each unit of energy.
[0080] Transaction validity period: The time frame during which a bid is valid. Buyers can select the bid and complete the transaction within this validity period.
[0081] Distributed Identity (DID): As the seller’s identity, DID allows buyers to verify the seller’s identity on the blockchain, ensuring that the bid comes from a real, verified seller.
[0082] Through this information, the seller provides the buyer with a clear transaction condition and a basis for verifying the transaction identity information.
[0083] After generating the bid, the seller digitally signs the bid using their private key and publishes it over the private network:
[0084] Digital signature: Use the seller's private key to generate a unique signature on the bid content. This signature is proof of the seller's identity, and the buyer can verify whether the signature is valid through the seller's public key.
[0085] The digital signature process encrypts the content of the bid and generates a signature hash value. This hash value can only be generated by the seller's private key, and the buyer can verify it using the corresponding public key.
[0086] Publishing through a private network: To ensure the privacy and security of tender information, the tender is published on a private network (such as a VPN or a private blockchain network). This network restricts access by unauthorized users and reduces the risk of information leakage or tampering.
[0087] The buyer uses the distributed identity (DID) in the bid to retrieve the seller's public key and Merkle proof on the blockchain to verify the validity of the bid. This process ensures that the bid information selected by the buyer is credible and the seller's identity has been verified:
[0088] Retrieve the seller's public key: The buyer uses the DID in the bid to find the seller's public key on the blockchain. This public key is paired with the private key created by the seller and can decrypt and verify the authenticity of the seller's signature.
[0089] Verify digital signature: The buyer uses the public key to verify the seller's signature to ensure that the bid content has not been tampered with and is indeed issued by the seller.
[0090] Merkle proof: Buyers use the Merkle proof in the DID to confirm whether the seller's identity is valid. The Merkle proof provides an identity chain verified by the blockchain, which buyers can use to verify whether the DID exists on the blockchain and has not been tampered with.
[0091] This process ensures that the seller’s identity is verified by the blockchain network, and the blockchain records corresponding to the DID and the seller’s identity are consistent, further enhancing the buyer’s trust in the bid.
[0092] After confirming the validity of the tender, the buyer can select the tender that meets their needs from multiple tenders and complete the reservation:
[0093] Requirements matching: Buyers filter through validated bids based on their requirements, such as the amount of energy required, acceptable price and time frame.
[0094] Selecting a Bid: Once a qualified bid is identified, the buyer selects the bid for reservation, thus starting the subsequent process of the transaction.
[0095] Beneficial effects: The present invention constructs a safe and transparent energy trading process through the seller generating bids, digital signatures, private network publishing, buyer identity verification and validity, and bid screening. This process effectively solves the problems of transaction identity authentication, preventing bid tampering and information security, making the electric vehicle energy trading process more efficient and reliable.
[0096] Furthermore, the buyer selects the seller's bid and sends a reservation message to complete the energy reservation, including:
[0097] The buyer generates a session key and uses the private key to generate a signature for the session key to form a predetermined message, which is sent to the seller;
[0098] The seller retrieves the public key from the blockchain through the buyer’s distributed identity and verifies the buyer’s signature to decrypt the session key;
[0099] The seller and buyer share the session key and stored energy information and determine the location of the transfer station for the transaction.
[0100] Specifically, after the buyer decides to select a seller's bid, he needs to send a reservation message to the seller to indicate the official reservation of the bid. This process includes:
[0101] Generate session key: The buyer generates a session key, which is used to encrypt and decrypt data in this transaction. The generation of session key can adopt asymmetric encryption algorithm, such as RSA, ECC, to ensure that the information cannot be decrypted by a third party during transmission.
[0102] Signing the session key: The buyer uses his own private key to generate a signature for the session key. This signature has two purposes: one is to verify the source of the message, proving that the scheduled message is indeed from the buyer; the other is to ensure the integrity of the message content and prevent the session key from being tampered with during transmission.
[0103] Forming a reservation message: The buyer packages the signed session key with information related to the bid (such as transaction ID, transaction terms, etc.) to form a reservation message. The message includes the buyer's formal reservation request for the energy and is transmitted to the seller through a secure network.
[0104] After receiving the reservation message, the seller first needs to verify the buyer's identity and decrypt the session key to ensure the authenticity and security of the transaction:
[0105] Retrieve the buyer's public key: The seller retrieves the buyer's public key on the blockchain through the distributed identity (DID) that the buyer attached in the reservation message. Since the blockchain records the buyer's public key information when the DID is generated, the seller can confirm the buyer's identity.
[0106] Verify the buyer's signature: The seller uses the retrieved public key to verify the buyer's signature. If the signature verification is successful, it means that the reservation message is indeed sent by the buyer and the session key has not been tampered with.
[0107] Decrypting the session key: After verifying the buyer's signature, the seller uses the signature content transmitted by the buyer to decrypt the session key. The session key is an asymmetric key that will be used to encrypt and decrypt data transmission in subsequent transactions, thereby protecting the security of transaction data.
[0108] When the seller successfully decrypts the session key, the buyer and seller can use this session key to encrypt and decrypt the transaction information. At this point, the two parties exchange detailed information about the transaction, including storage and release energy (the process of storing and releasing energy) data, to ensure that both parties agree on the transaction quantity, price, term and other details:
[0109] Shared energy storage and release information: Energy storage and release information involves the charging and discharging status of electric vehicle batteries, the amount of energy transactions, and the status of energy transmission. Both parties can reach an agreement on the transaction details by sharing energy storage and release information to ensure that the status of the transaction energy meets the contract conditions.
[0110] Determine the scope of use of the session key: The session key is used to encrypt and decrypt information for this transaction, not only for scheduled messages, but also for the transmission of key data such as subsequent transaction status updates and energy transfer confirmations. Through the session key, all transaction data of both parties will be transmitted in an encrypted form to prevent external attacks and data leaks.
[0111] After confirming the session key and stored energy information, the buyer and seller need to jointly select a transfer station for energy transmission. The selection of a transfer station involves many considerations, including geographical location, security, and transaction requirements:
[0112] Choose a suitable transfer station: The transfer station is the actual delivery node of energy transactions, which is managed by a trusted third party to ensure the safe transfer of energy from sellers to buyers. The geographical location of the transfer station should meet the needs of both parties to the transaction, and is usually selected in an area close to the buyer or seller to reduce the loss and cost of energy transmission.
[0113] Transaction closed loop: As a third party, the transfer station ensures the safe transmission of energy and the rights and interests of both parties. Once the energy arrives at the transfer station, the transfer station will encrypt the confirmation information through the session key to ensure that the identity of the energy recipient is authentic, thus forming a complete transaction closed loop.
[0114] Beneficial effects: By generating session keys, signing reservation messages, verifying signatures, decrypting session keys, sharing energy storage and release information, and selecting transfer stations, the present invention provides a safe, reliable and transparent electric vehicle energy transaction reservation mechanism.
[0115] Furthermore, the buyer and the seller complete the transfer of energy at the transfer station according to the predetermined contract, including:
[0116] The seller sends the energy storage signal and Merkle root to the designated transfer station according to the contract content;
[0117] The transfer station verifies the seller’s identity information, receives energy storage signals and stores electrical energy;
[0118] After arriving at the transfer station, the buyer sends a release signal and provides identity verification information;
[0119] After verifying the buyer's identity and energy release signal, the transfer station releases the energy stored by the seller to the buyer.
[0120] Specifically, after confirming the buyer's reservation, the seller sends a series of energy storage signals and Merkle roots to the designated transfer station according to the contract content to complete the initial energy storage:
[0121] Generation of energy storage signal: The energy storage signal is the seller's instruction to transfer energy to the transfer station. It contains relevant information about the transaction, such as the amount of energy, the storage period agreed in the contract, etc. This signal ensures that the transfer station can verify the accuracy of the information when receiving the energy.
[0122] Transmission of Merkle root: Merkle root is a root hash value used to prove data integrity. The seller hashes his or her identity information and contract details to build a Merkle tree, and sends its root node (Merkle root) to the transfer station. In this way, the transfer station can verify the seller's identity and the integrity of the contract content through this Merkle root.
[0123] Encryption and signing of data: To ensure the security of the energy storage signal and Merkle root, the seller uses his own private key to digitally sign and encrypt the data, so that even if the data is intercepted during transmission, third parties cannot decrypt or tamper with the information.
[0124] After receiving the energy storage signal and Merkle root transmitted by the seller, the transfer station ensures the authenticity of the seller's identity through a series of verification measures and completes the safe storage of energy:
[0125] Verify the seller's identity information: The transfer station first decrypts the signed information sent by the seller and looks up the seller's public key on the blockchain to verify the legitimacy of the signature. In this way, the transfer station can determine that the information is indeed sent by the seller.
[0126] Verify the integrity of the Merkle root: The transfer station uses the Merkle root and related verification information to build the Merkle tree structure sent by the seller, and uses hash verification to ensure the integrity and consistency of the data. If the verification is successful, the transfer station can be sure that the seller’s identity is authentic and the contract content has not been tampered with.
[0127] Storing electric energy: After identity verification is completed, the transfer station stores the energy in the energy storage facility it manages according to the storage instructions agreed in the contract. The facility ensures that the energy can be safely stored and meets the buyer's subsequent energy acquisition needs.
[0128] When the buyer arrives at the transfer station, he / she issues a request for energy extraction by sending a release signal and providing identity verification information:
[0129] Sending of energy release signal: The energy release signal is an instruction for the buyer to extract the energy stored in the transfer station. The signal contains key information of the contract, including the identifier of the transaction, the amount of energy, etc. This information ensures that the transfer station can correctly match the energy transaction request.
[0130] Providing authentication information: The buyer also proves his identity through his distributed identity (DID) and provides a signed energy release signal. The energy release signal and authentication information are sent to the transfer station together to ensure that the buyer has the right to extract energy.
[0131] Use private key to sign the energy release signal: To ensure the authenticity of the signal, the buyer uses his own private key to digitally sign the energy release signal to ensure that the transfer station can confirm that the message does come from the buyer and the content has not been tampered with by a third party.
[0132] After receiving the energy release signal and identity verification information from the buyer, the transfer station performs the following steps to complete the energy release:
[0133] Identity verification and signature verification: The transfer station first retrieves the buyer's public key on the blockchain and uses the public key to verify the signature sent by the buyer. If the signature verification is successful, the transfer station can confirm the authenticity of the energy release signal and the legitimacy of the buyer's identity.
[0134] Verify the energy release signal and contract information: The transfer station compares the energy release signal sent by the buyer with the energy storage signal previously provided by the seller to ensure that the amount of energy obtained by the buyer, the contract identifier and other information are consistent with the transaction record. This two-way verification ensures the consistency of the transaction.
[0135] Release of stored energy: Once verification is complete, the transfer station releases the stored energy to the buyer according to the amount of energy stored in the contract, completing the transaction loop. The transfer station encrypts the confirmation information through the session key shared in this transaction to ensure that the buyer receives the agreed amount and quality of energy.
[0136] Beneficial effects: The electric vehicle energy trading system of the present invention realizes the safe storage and orderly release of energy at the transfer station. During the entire transaction process, identity information, energy storage and release signals, and energy transmission are strictly verified and protected, ensuring the security, integrity and transparency of the transaction.
[0137] The electronic device 200 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 200 may include, but is not limited to, a processor 201 and a memory 202. Those skilled in the art will appreciate that Figure 2 It is only an example of the electronic device 200 and does not constitute a limitation of the electronic device 200. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0138] The processor 201 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0139] The memory 202 may be an internal storage unit of the electronic device 200, for example, a hard disk or memory of the electronic device 200. The memory 202 may also be an external storage device of the electronic device 200, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 200. Further, the memory 202 may also include both an internal storage unit of the electronic device 200 and an external storage device. The memory 202 is used to store the computer program 203 and other programs and data required by the electronic device. The memory 202 may also be used to temporarily store data that has been output or is to be output.
[0140] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
[0141] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0142] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0143] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0144] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.
Claims
1. A secure electric vehicle energy trading method for realizing energy trading in a distributed environment, characterized in that: include: Generate asymmetric public and private key pairs and hash functions for each participant, and generate their own distributed identity; Based on the distributed identity, the seller generates a bid for the buyer to select and verify the validity of the bid; The buyer selects the seller’s bid and sends a reservation message to complete the energy reservation; Buyers and sellers complete the transfer of energy at the transfer station based on a predetermined contract.
2. The safe electric vehicle energy trading method according to claim 1, characterized in that: The generation of asymmetric public and private key pairs and hash functions for each participant and the generation of their respective distributed identities include: Generate asymmetric public and private key pairs and hash functions for each participant; Based on the public-private key pair and the hash function and according to the regions of the transfer stations with different spatial layouts, multiple distributed identity identifiers are assigned to sellers and buyers, and these distributed identity identifiers are stored using a Merkle tree. The distributed identity identifier includes did, method-name, and method-spec ifi ci d, where did is an instance protocol, method-name is a user-defined instance method name, and method-spec ifi ci d is a specific identifier of the user identity; The Merkle proof of distributed identity is generated through the Merkle tree and used to verify the identity information to the transfer station.
3. The safe electric vehicle energy trading method according to claim 1, characterized in that: Based on the distributed identity, the seller generates a bid for the buyer to select and verifies the validity of the bid, including: The seller generates a bid, including the amount of energy to be traded, the price, the validity period of the transaction, and the distributed identity; The seller uses the private key to digitally sign the bid and publish it over a private network; The buyer uses the distributed identity in the bid to retrieve the seller’s public key and Merkle proof on the blockchain to verify the validity of the bid; The buyer selects the bid that meets the requirements from the verified bids.
4. The safe electric vehicle energy trading method according to claim 1, characterized in that: The buyer selects the seller's bid and sends a reservation message to complete the energy reservation, including: The buyer generates a session key and uses the private key to generate a signature for the session key to form a predetermined message, which is sent to the seller; The seller retrieves the public key from the blockchain through the buyer’s distributed identity and verifies the buyer’s signature to decrypt the session key; The seller and buyer share the session key and stored energy information and determine the location of the transfer station for the transaction.
5. The safe electric vehicle energy trading method according to claim 1, characterized in that: The buyer and seller complete the energy transfer at the transfer station according to the predetermined contract, including: The seller sends the energy storage signal and Merkle root to the designated transfer station according to the contract content; The transfer station verifies the seller’s identity information, receives energy storage signals and stores electrical energy; After arriving at the transfer station, the buyer sends a release signal and provides identity verification information; After verifying the buyer's identity and energy release signal, the transfer station releases the energy stored by the seller to the buyer.
6. An electronic device, characterized in that: include: one or more processors; A storage unit for storing one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement the safe electric vehicle energy trading method according to any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it can implement the secure electric vehicle energy trading method according to any one of claims 1 to 5.