CN111768189B - Charging pile operation method, device and system based on block chain - Google Patents

Charging pile operation method, device and system based on block chain Download PDF

Info

Publication number
CN111768189B
CN111768189B CN202010588992.XA CN202010588992A CN111768189B CN 111768189 B CN111768189 B CN 111768189B CN 202010588992 A CN202010588992 A CN 202010588992A CN 111768189 B CN111768189 B CN 111768189B
Authority
CN
China
Prior art keywords
charging pile
information
node
bank
operator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010588992.XA
Other languages
Chinese (zh)
Other versions
CN111768189A (en
Inventor
李狄威
刘朝伟
庞齐章
徐植君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010588992.XA priority Critical patent/CN111768189B/en
Publication of CN111768189A publication Critical patent/CN111768189A/en
Application granted granted Critical
Publication of CN111768189B publication Critical patent/CN111768189B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/14Payment architectures specially adapted for billing systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F15/00Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity
    • G07F15/003Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity for electricity
    • G07F15/005Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity for electricity dispensed for the electrical charging of vehicles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/70Energy storage systems for electromobility, e.g. batteries
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/60Other road transportation technologies with climate change mitigation effect
    • Y02T10/7072Electromobility specific charging systems or methods for batteries, ultracapacitors, supercapacitors or double-layer capacitors
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T90/00Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02T90/10Technologies relating to charging of electric vehicles
    • Y02T90/12Electric charging stations

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Health & Medical Sciences (AREA)
  • Water Supply & Treatment (AREA)
  • Computer Security & Cryptography (AREA)
  • Public Health (AREA)
  • Development Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a charging pile operation method, device and system based on a block chain. The method is applied to the operator nodes, the charging pile node and at least one operator node form a blockchain network, and the method comprises the following steps: acquiring encrypted transaction information broadcast by a charging pile node through a block chain network; decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount and the user information obtained by decryption, and uploading the charging amount locking instruction to a bank corresponding to the bank information so that the bank locks the charging amount according to the charging amount locking instruction; broadcasting transaction information to consensus nodes in the blockchain network to perform transaction consensus; according to the consensus result from the consensus node, a charging amount transfer instruction is sent to the bank so that the bank can transfer the charging amount to a corresponding operator account according to the charging amount transfer instruction, a unified charging pile operation platform can be established, the service efficiency and user experience of the charging pile are improved, and the operation cost is reduced.

Description

Charging pile operation method, device and system based on block chain
Technical Field
The invention relates to the technical field of blockchains, in particular to a charging pile operation method, device and system based on blockchains.
Background
The charging pile is similar to an oiling machine in a gas station in function, the input end of the charging pile is connected with an alternating current power grid, and the output end of the charging pile charges an electric automobile battery through a charging plug. Public charging piles are installed in public buildings (public buildings, malls, public parking lots and the like) and residential parking lots, and private charging piles are generally installed in private parking spaces of the residential parking lots according to personal needs.
The disclosed statistical data show that the number of the charging piles of the Chinese electric automobile is in a year-by-year increasing trend from 2012 to 2018. The number of charging piles of the electric automobile in China reaches 1.8 ten thousand in 2012, the electric automobile enters an explosive type growth period after 2016, reaches 14.1 ten thousand, and reaches 2018, and the number of the charging piles in China is close to 30 ten thousand. In 2019, the number of public charging piles is approaching 40 ten thousand.
Although the number of charging piles is continuously increasing, the user charging experience is not correspondingly improved from the current situation. The utilization rate of the existing charging pile is very low, and great resource waste exists, namely ' no pile exists in places with vehicles ', and no vehicle exists in places with the piles '. The electric vehicles around are provided with the charging piles with large quantity and convenient geographic positions, so that a user can conveniently go to charge, and the charging user can often meet the problems of stack binding charging of the electric vehicles, conflict of charging time periods and the like; some charging piles are arranged in suburbs or other places far away from the moving range of the electric automobile for cost reasons, so that no people can use the charging piles, and the charging piles are almost completely idle and become so-called 'zombie charging piles'. On the other hand, the problem of difficulty in profit of the charging pile operators is solved. Because of the characteristics of large investment and long return period in the charging pile industry, the information layer related to the switching-off, the market return and the acquisition of the charging pile operation enterprises in recent years is endless, and the high sum of the thresholds and the difficulty of the profit of the whole industry are just reflected.
In addition, the number of the existing charging pile operators is large, and each operator usually establishes a payment platform of the operator; for operation consideration, each operator can establish different user systems and payment systems, so that great inconvenience is brought to the users of the electric automobile, and meanwhile, the situation that the operators are invested greatly and are profitable is caused.
Disclosure of Invention
The main purpose of the embodiment of the invention is to provide a charging pile operation method, device and system based on a block chain, so as to establish a unified charging pile operation platform, improve the service efficiency and user experience of a charging pile and reduce the operation cost.
In order to achieve the above object, an embodiment of the present invention provides a charging pile operation method based on a blockchain, the charging pile operation method being applied to operator nodes, the charging pile nodes and at least one operator node forming a blockchain network, the charging pile operation method including:
acquiring encrypted transaction information broadcast by a charging pile node through a block chain network; the transaction information comprises bank information, user information and charging amount;
decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount and the user information obtained by decryption, and uploading the charging amount locking instruction to a bank corresponding to the bank information so that the bank locks the charging amount according to the charging amount locking instruction;
Broadcasting transaction information to consensus nodes in the blockchain network to perform transaction consensus;
and sending a charging amount transfer instruction to the bank according to the consensus result from the consensus node, so that the bank transfers the charging amount to the corresponding operator account according to the charging amount transfer instruction.
The embodiment of the invention also provides a charging pile operation device based on the blockchain, the charging pile operation device is applied to the operator nodes, the charging pile nodes and at least one operator node form a blockchain network, and the charging pile operation device comprises:
the acquisition unit is used for acquiring encrypted transaction information broadcast by the charging pile node through a blockchain network; the transaction information comprises bank information, user information and charging amount;
the charging amount locking unit is used for decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount and the user information obtained by decryption, and uploading the charging amount locking instruction to a bank corresponding to the bank information so that the bank locks the charging amount according to the charging amount locking instruction;
the broadcasting unit is used for broadcasting transaction information to consensus nodes in the blockchain network to perform transaction consensus;
and the charging amount transfer unit is used for sending a charging amount transfer instruction to the bank according to the consensus result from the consensus node so that the bank transfers the charging amount to the corresponding operator account according to the charging amount transfer instruction.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor realizes the steps of the charging pile operation method based on the block chain when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, realizes the steps of the charging pile operation method based on the block chain.
The embodiment of the invention also provides a charging pile operation system based on the block chain, which comprises the following steps:
the charging pile node, the operator nodes and the banks, wherein the charging pile node and at least one operator node form a blockchain network;
the charging pile node encrypts transaction information and broadcasts the encrypted transaction information to a blockchain network; the transaction information comprises bank information, user information and charging amount;
the operator node obtains transaction information through a blockchain network, then decrypts the transaction information, generates a charging amount locking instruction according to the charging amount and user information obtained through decryption, and uploads the charging amount locking instruction to a bank corresponding to the bank information; broadcasting transaction information to consensus nodes in the blockchain network to perform transaction consensus; sending a charging amount transfer instruction to a bank according to a consensus result from a consensus node;
The bank locks the charging amount according to the received charging amount locking instruction; and transferring the charging amount to the corresponding operator account according to the received charging amount transfer instruction.
According to the charging pile operation method, device and system based on the blockchain, the encrypted transaction information is decrypted, the charging amount locking instruction is generated and uploaded to the bank corresponding to the bank information according to the charging amount and the user information so as to lock the charging amount, the transaction information is broadcasted to the consensus node in the blockchain network so as to conduct transaction consensus, and finally the charging amount transferring instruction is sent to the bank according to the consensus result from the consensus node so as to enable the bank to transfer the charging amount to the corresponding operator account, so that a unified charging pile operation platform can be established, the service efficiency and user experience of the charging pile are improved, and the operation cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a blockchain-based charging pile operation method in an embodiment of the invention;
FIG. 2 is a flow chart of generating a shared encryption key in an embodiment of the invention;
FIG. 3 is a flow chart of feedback of the state of a charging pile in an embodiment of the invention;
FIG. 4 is a schematic diagram of a block chain network in an embodiment of the invention;
FIG. 5 is a flow chart of a process of a charging pile node in an embodiment of the invention;
FIG. 6 is a flow chart of interaction of an operator node with other nodes in an embodiment of the invention;
FIG. 7 is a flow chart of a process of identifying nodes in an embodiment of the invention;
FIG. 8 is a flow chart of establishing a rights isolation area in an embodiment of the invention;
FIG. 9 is a flow chart of generating a shared encryption key in another embodiment of the invention;
FIG. 10 is a flow chart of feedback of the state of a charging pile according to another embodiment of the present invention;
fig. 11 is a block diagram of a charging pile operation device based on a blockchain in an embodiment of the present invention;
fig. 12 is a block diagram of a charging pile operation device based on a blockchain in another embodiment of the present invention;
FIG. 13 is a block diagram of a computer device in an embodiment of the invention;
FIG. 14 is a schematic diagram of a blockchain-based charging pile operating system in an embodiment of the invention;
fig. 15 is a block diagram of a charging pile node in an embodiment of the present invention;
Fig. 16 is a block diagram of a banking node in an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Those skilled in the art will appreciate that embodiments of the invention may be implemented as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In view of the low utilization rate and difficult operation of the existing charging pile, the embodiment of the invention provides a charging pile operation method based on a block chain, so as to establish a unified charging pile operation platform, improve the service efficiency and user experience of the charging pile and reduce the operation cost. The present invention will be described in detail with reference to the accompanying drawings.
Because the blockchain network is decentralised and trusted, the adoption of the blockchain technology to establish a unified charging pile operation platform is easier to be accepted by the public, and the charging pile facility resources can be fully utilized, so that operators participating in alliance can reduce investment risk of commonly sharing infrastructure investment, and share earnings.
Fig. 1 is a flowchart of a charging pile operation method based on a blockchain in an embodiment of the invention. Fig. 4 is a schematic diagram of a block chain network in an embodiment of the invention. Fig. 5 is a flowchart of a process of a charging pile node in an embodiment of the present invention. Fig. 6 is a flow chart of interaction of an operator node with other nodes in an embodiment of the invention. Fig. 7 is a flow chart of a process of identifying nodes in an embodiment of the invention. The processing flow diagrams of the nodes are shown in fig. 1 and fig. 4-7, and the blockchain network comprises an operator node 1, a bank node 2 and a charging pile node 3. The charging stake node 3 is connected with a timestamp server 4.
The operator node 1 and the bank node 2 are consensus nodes and accounting nodes and are responsible for processing transaction information broadcast by the charging pile node 3, and the operator node 1 is also responsible for packaging the encrypted transaction information to generate a block. The charging pile node 3 is used as a light node to be connected into the blockchain network, only provides functions of user interaction, transaction information generation, request time stamp and the like, does not participate in block packing and transaction consensus, and is designed to have relatively fewer consensus nodes, realize quick consensus of the blockchain network and facilitate quick transaction. The timestamp server 4 is deployed under the chain to provide the charging pile node 3 with a network-unique timestamp in a network communication manner.
The blockchain network of the embodiment of the invention further comprises a CA node (not shown in the figure), and when the newly added charging pile node is accessed into the blockchain network, the CA node is allocated with a unique charging pile public-private key pair and an operator public key of an operator node. The charging pile public-private key pair and the operator public key are stored in a newly accessed charging pile node and are used for encrypting and signing charging information. The charging pile operation method is applied to the operator nodes, the charging pile nodes and at least one operator node form a blockchain network, and the charging pile operation method based on the blockchain comprises the following steps:
s101: the encrypted transaction information broadcast by the charging pile node is obtained through a blockchain network.
The transaction information comprises bank information, charging amount determined according to a preset unified charging rule of the whole network, operator information, a transaction time stamp, a unique charging pile identifier of the whole network, charging duration and user information.
S101 includes: and acquiring a charging pile public key broadcasted by the charging pile node and transaction information digitally signed by an operator public key encryption and charging pile private key corresponding to the operator information through a block chain network.
As shown in fig. 5, in the implementation, the charging pile node interacts with the charging user to obtain the transaction information of the current charging transaction. And after the charging user successfully interacts with the charging pile node, the charging pile node initiates a request to the timestamp server 4 through a first communication unit preset in the charging pile node, and the unique transaction timestamp of the whole network of the charging transaction is obtained. After the charging behavior is finished, the charging pile node charges the charging behavior according to charging rules preset by an operator corresponding to the operator information, and the obtained charging amount is combined with a transaction time stamp, the operator information, the charging duration, the user information, bank information preset by a charging user and a unique charging pile identifier of the whole network to obtain transaction information. The corresponding operator public key is used for encrypting the transaction information, and then the charging pile private key is used for digitally signing the transaction information encrypted by the operator public key. And finally broadcasting the public key of the charging pile in the blockchain network, and encrypting the transaction information digitally signed by the private key of the charging pile through the public key of the operator corresponding to the operator information.
S102: decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount and the user information obtained through decryption, and uploading the charging amount locking instruction to a bank corresponding to the bank information, so that the bank locks the charging amount according to the charging amount locking instruction.
In one embodiment, before executing S102, the method further includes: verifying the transaction information which is encrypted by the public key of the operator and digitally signed by the private key of the charging pile according to the public key of the charging pile; and when the verification is passed, decrypting the encrypted transaction information based on an asymmetric encryption algorithm through a pre-acquired operator private key. And when the verification fails or the decryption fails, discarding the transaction information, and returning the transaction failure information to the user.
In one embodiment, the blockchain network further includes a banking node; after S102 is performed, further including: and determining a shared encryption key of the authority isolation area according to the bank node corresponding to the bank information so as to encrypt the transaction information.
In specific implementation, the transaction information is converted into a key value pair K, wherein K represents a key and V represents a value. The KEY K and the value V are encrypted by the EBC mode of the SM4 algorithm using the shared encryption KEY KEY to obtain encrypted transaction information (Kc: vc). Wherein K is C =SM4_EBC(K);V C =SM4_EBC(V)。
TABLE 1
Table 1 is a schematic representation of rights isolation areas. FIG. 8 is a flow chart of establishing a rights isolation area in an embodiment of the invention. As shown in table 1 and fig. 8, R is a read right, and W is a write right. The network administrator of the charging pile blockchain network presets the authority relation of different authority isolation areas in CA nodes of the blockchain network by taking the authority isolation areas & nodes & read/write authorities as authority granularity, and the authority relation is subjected to CA node signature authentication and is synchronized to each VP node (VP nodes comprise operator nodes and bank nodes) of the blockchain network. Based on a preset authority relation, the CA node of the blockchain network respectively issues certificates containing public and private key pairs for service authority isolation to the operator node and the bank node, the certificates are respectively stored by each VP node, and the public keys and the private keys in the certificates are used for asymmetrically encrypting and decrypting transaction information in charging pile blockchain transaction. And the CA node itself stores all certificates containing public and private key pairs of the preset service authority isolation region. If the account book data of a certain preset business authority isolation area needs to be read (e.g. encrypted transaction information is read after the transaction is finished) or written (e.g. encrypted transaction information is written into the authority isolation area), the VP node can judge whether the VP node has the read authority or the write authority of the business authority isolation area or not, if the VP node does not have the read authority or the write authority of the business authority isolation area, the VP node refuses to execute, and if the VP node does not have the read authority or the write authority, the VP node executes the read authority or the write authority.
S103: the transaction information is broadcast to consensus nodes in the blockchain network for transaction consensus.
In one embodiment, S103 includes: the encrypted transaction information is broadcast to consensus nodes in the blockchain network for transaction consensus.
In one embodiment, before executing S103, the method further includes: and carrying out operator digital signature on the encrypted transaction information according to the operator private key. At this time S103 includes: the transaction information digitally signed by the carrier and the carrier public key are broadcast to consensus nodes in the blockchain network for transaction consensus. Wherein the consensus nodes include banking nodes and remaining operator nodes in the blockchain network.
S104: and sending a charging amount transfer instruction to the bank according to the consensus result from the consensus node, so that the bank transfers the charging amount to the corresponding operator account according to the charging amount transfer instruction.
In one embodiment, before executing S104, the method further includes: and the obtaining consensus node verifies the consensus result obtained by the transaction information digitally signed by the operator according to the operator public key and the transaction timestamp.
In particular, the consensus node obtains the broadcasted transaction information digitally signed by the operator and the operator public key via the communication unit (second communication unit or third communication unit). Firstly, verifying transaction information digitally signed by an operator according to the public key of the operator; when the verification is passed, verifying whether the transaction information is valid or not by the transaction timestamp (the consensus node initiates a request to the timestamp server 4 to obtain the current timestamp, when the difference between the current timestamp and the transaction timestamp is smaller than a preset time threshold, the transaction information is valid). And when the verification is successful, returning a consensus result. And when the verification fails, discarding the transaction information, and returning transaction failure information to the user.
In one embodiment, S104 includes: and when f+1 consensus results are received, the consensus is successful, and a charging amount transfer instruction is sent to the bank. When the bank receives the charging amount transfer instruction, unlocking and transferring the charging amount in the bank account corresponding to the user information to the corresponding operator account according to the charging amount transfer instruction. Wherein there are a total of 3f+1 consensus nodes in the blockchain network. f is a positive integer greater than 1.
In one embodiment, after performing S104, further includes: writing the encrypted transaction information into the authority isolation area (namely (Kc: vc) on the authority isolation area of the blockchain network), calling the block generating unit to package the encrypted transaction information to generate a block, and calling the second communication unit to broadcast the block to accounting nodes (a bank node and other operator nodes in the blockchain network) in the blockchain network. The accounting node updates the local ledger data according to the blocks and the transaction is completed.
After the transaction is completedAfter that, the operator node or the bank node of the rights isolation area may also read the encrypted transaction information, for example, decrypt (Kc: vc) by using the shared encryption KEY through EBC mode of SM4 algorithm, to obtain decrypted transaction information K: V. Wherein k=sm4_ebc (K C );V=SM4_EBC(V C )。
The implementation main body of the charging pile operation method based on the blockchain shown in fig. 1 is an operator node corresponding to the operator information. As can be seen from the flow shown in fig. 1, the charging pile operation method based on the blockchain of the embodiment of the invention firstly decrypts the encrypted transaction information, generates and uploads a charging amount locking instruction to a bank corresponding to the bank information according to the charging amount and the user information so as to lock the charging amount by the bank, then broadcasts the transaction information to a consensus node in the blockchain network for transaction consensus, and finally sends a charging amount transfer instruction to the bank according to the consensus result from the consensus node so as to transfer the charging amount to a corresponding operator account by the bank.
FIG. 2 is a flow chart of generating a shared encryption key in an embodiment of the invention. FIG. 9 is a flow chart of generating a shared encryption key in another embodiment of the invention. As shown in fig. 2 and 9, the blockchain-based charging pile operation method further includes:
s201: and acquiring transmission information of the bank node from the authority isolation area.
The transmission information includes first bank node encryption information obtained by encrypting the second shared encryption key component by the bank node according to operation Shang Gongyao and second bank node encryption information obtained by encrypting the first bank node encryption information by the bank node according to a bank private key.
Before executing S201, further comprising: request bank public key Pub u YH And encrypting a preset first shared encryption Key component Key1 through an SM2 algorithm by using a bank public Key provided by a bank node to obtain first operator node encryption information Key_c1. Using the operator private key Pri u YYS For the first operator through SM2 algorithmThe node encryption information Key_c1 is encrypted to obtain second operator node encryption information Key_c1', and the first transmission information M1 is sent to a banking node.
The first transmission information M1 is:
M1=(Key_c1||Key_c1’||Pub_ YYS );Pub_ YYS for the operator public key, ||represents the connect operation.
The bank node receives the first transmission information M1 and uses the public key Pub/u of the operator YYS Decrypting the second operator node encryption information Key_c1' in M1 to obtain Key_d1, if Key_d1=Key_c1, proving that M1 is sent by the operator node, decrypting normally, and using a bank private Key Pri\u YH Decrypting the first operator node encryption information Key_c1 in the M1, and obtaining a first shared encryption Key component Key1 when decryption is normal.
The bank node uses the operator public key Pub u YYS And encrypting the second shared encryption Key component Key2 through an SM2 algorithm to obtain first bank node encryption information Key_c2. Using the private key Pri/u of the bank YH And encrypting the first bank node encryption information Key_c2 through an SM2 algorithm to obtain second bank node encryption information Key_c2', and sending second transmission information M2 to an operator node.
The second transmission information M2 is:
M2=(Key_c2||Key_c2’)。
in the implementation, the operator node acquires second transmission information from the bank node of the authority isolation region.
S202: and decrypting the encrypted information of the second bank node according to the pre-acquired bank public key.
In the specific implementation, according to the public key Pub/u of the bank YH And decrypting the second bank node encryption information Key_c2' in the M2 to obtain Key_d2.
S203: and when the decryption result is consistent with the encryption information of the first bank node, decrypting the encryption information of the first bank node according to the private key of the operator to obtain a second shared encryption key component.
In particular, if the decryption result key_d2=key_c2, thenThe certification M2 is sent by the bank node, decryption is normal, and an operator private key Pri\u is used YYS And decrypting the first bank node encryption information Key_c2 in the M2, and obtaining a second shared encryption Key component Key2 when decryption is normal.
S204: and generating the shared encryption key of the authority isolation area according to the first shared encryption key component and the second shared encryption key component which are obtained in advance.
In specific implementation, a cryptographic Key shared in the authority isolation area is generated by executing a cryptographic Key SM3 hash algorithm according to the first cryptographic Key component Key1 and the second cryptographic Key component Key 2:
C(0)=SM3_Hash(Key1);
C(n)=SM3_HMAC C(n-1) (SM3_Hash(Key2));
KEY=SM3_HMAC SM3_Hash(Key1||Key2) (C0+C1)。
where n is a positive integer greater than 0, sm3_hash is a Hash function using a Hash algorithm of the national secret SM3, sm3_hmac is a Hash operation using the SM3 algorithm related to the key, and i represents a join operation.
Fig. 3 is a flowchart of feedback charging pile status in an embodiment of the invention. Fig. 10 is a flowchart of feeding back the state of the charging pile according to another embodiment of the present invention. As shown in fig. 3 and 10, the blockchain-based charging pile operation method further includes:
s301: and acquiring charging pile state information broadcast by the charging pile node and subjected to encryption by an operator public key and digital signature by a charging pile private key.
In the implementation, a charging pile node initiates a request to a timestamp server 4 through a first communication unit preset in the charging pile node to acquire a unique public timestamp of the whole network; the charging pile state information is encrypted by using each operator public key, and then the charging pile state information encrypted by each operator public key is digitally signed by using the charging pile private key. And finally broadcasting the charging pile public key, the unique identifier of the operator and charging pile state information digitally signed by the private key of the charging pile after encryption of the public key of the operator in the blockchain network. Each operator node corresponds to one charging pile status information. The charging pile state information comprises a public time stamp, a charging pile identification unique to the whole network and a charging pile state.
S302: and verifying the charging pile state information which is encrypted by the operator public key and digitally signed by the charging pile private key according to the charging pile public key.
S303: and when the verification is passed, decrypting the charging pile state information through a pre-acquired operator private key.
In specific implementation, the charging pile state information is decrypted through an operator private key corresponding to the unique identifier of the operator.
S304: and verifying whether the decrypted charging pile state information is valid or not according to the public time stamp in the charging pile state information.
In the implementation, a request is initiated to the timestamp server 4 to acquire the current public timestamp. And when the difference value between the current public time stamp and the public time stamp is smaller than a preset threshold value, the state information of the charging pile is valid.
S305: when the charging pile state information is effective, the original charging pile state information is updated according to the decrypted charging pile state information, and the updated charging pile state information is pushed to the client.
In an embodiment, when verification fails or decryption fails, the charging pile status information is discarded, and status update is not performed. The charging user can log in the charging pile management system client, and inquire the latest charging pile state information on the charging pile blockchain network so as to freely select the charging pile in the latest idle state for charging.
In summary, the specific flow of the embodiment of the invention is as follows:
1. and the charging pile node interacts with the charging user to acquire the transaction information of the current charging transaction. And after the charging user successfully interacts with the charging pile node, the charging pile node initiates a request to the timestamp server 4 to acquire the unique transaction timestamp of the whole network of the charging transaction. After the charging behavior is finished, the charging pile node charges the charging behavior, and the obtained charging amount is combined with the transaction timestamp, the operator information, the charging duration, the user information, the bank information preset by the charging user and the unique charging pile identifier of the whole network to obtain the transaction information.
2. The charging pile node encrypts the transaction information by using the corresponding operator public key, digitally signs the transaction information encrypted by using the charging pile private key, and broadcasts the charging pile public key and the transaction information encrypted by the operator public key corresponding to the operator information and digitally signed by the charging pile private key in the blockchain network.
3. The operator node verifies the transaction information which is encrypted by the operator public key and digitally signed by the charging pile private key according to the charging pile public key; and when the verification is passed, decrypting the transaction information based on an asymmetric encryption algorithm through a pre-acquired operator private key. And when the verification fails or the decryption fails, discarding the transaction information, and returning the transaction failure information to the user.
4. And the operator node generates a charging amount locking instruction according to the charging amount and the user information, and then uploads the charging amount locking instruction to a bank corresponding to the bank information, and the bank locks the charging amount in a bank account corresponding to the user information according to the charging amount locking instruction.
5. And the operator node determines a shared encryption key of the authority isolation region according to the bank node corresponding to the bank information to encrypt the transaction information, and performs operator digital signature on the encrypted transaction information according to the operator private key.
6. The carrier node broadcasts the transaction information digitally signed by the carrier and the carrier public key to consensus nodes in the blockchain network for transaction consensus.
7. The consensus node verifies the transaction information digitally signed by the operator according to the operator public key; when the verification is passed, verifying whether the transaction information is valid or not through the transaction time stamp; when the transaction information is valid, returning a consensus result; and when the verification fails, discarding the transaction information, and returning transaction failure information to the user.
8. And the operator node sends a charging amount transfer instruction to the bank according to the consensus result from the consensus node, and the bank unlocks and transfers the charging amount in the bank account corresponding to the user information to the corresponding operator account according to the charging amount transfer instruction.
9. The operator node writes the encrypted transaction information into the authority isolation area, packages the encrypted transaction information to generate a block, and broadcasts the block to the accounting nodes in the blockchain network.
10. The accounting node updates the local ledger data according to the blocks.
In summary, the invention forms a block chain backbone network by the operator node and the bank node, and unifies charging standards; the charging pile node is used as a light node to be accessed into a blockchain backbone network, and the transaction information is encrypted and transmitted by an asymmetric encryption technology so as to ensure the communication safety. The blockchain network performs transaction verification on transaction information, the verification is carried out by packaging the transaction information in blocks and adding the transaction information into the blockchain, and the transaction is completed after a plurality of subsequent blocks are generated, so that the anti-tampering aim can be achieved, a charging vehicle can be charged on any charging pile positioned in the same blockchain network without being limited by a charging pile operator, the use limit of the charging pile is reduced, and the use efficiency of the charging pile is fully improved. Meanwhile, the direct addition of the bank node ensures that the fund requirements related to the charging transaction are fully ensured, a third party payment platform is not needed, the fund risk is effectively avoided, and the fund transfer flow is simplified to a certain extent; and transaction information of different operators and banks is only shared between the operators and the banks through a data isolation technology of the blockchain, so that the data security of the business account book is ensured.
The invention has the following advantages:
1. the transaction is trusted: the non-tamperable technology, the consensus mechanism and the synchronization mechanism of the blockchain technology ensure that each account book is kept consistent and safe, and the transaction can be audited and traced back, so that the legal compliance of the transaction is ensured.
2. Convenient and fast: the problem of current sharing fills electric pile availability ratio low is solved. The charging user and the charging vehicle can charge on any charging pile in the same blockchain network, and the charging user and the charging vehicle cannot be limited by a charging pile operator, so that the use limit of the charging pile is reduced, and the use efficiency of the charging pile is fully improved.
3. Data security: business data between an operator and a bank are subjected to data isolation through a blockchain isolation technology, and each blockchain user can only access an authority isolation area with corresponding authorities, so that the safety and privacy of account book data are improved. The data store is cryptographically protected and even if the blockchain is bypassed to directly access the database, no access to the business data is possible.
4. Algorithm security: the security is endorsed by the country by adopting the algorithms of SM2, SM3 and SM4 of the country.
Based on the same inventive concept, the embodiment of the invention also provides a charging pile operation device based on the block chain, and because the principle of solving the problem of the device is similar to that of the charging pile operation method based on the block chain, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted.
Fig. 11 is a block diagram of a charging pile operation device based on a blockchain in an embodiment of the invention. Fig. 12 is a block diagram illustrating a construction of a charging pile operating device based on a blockchain in another embodiment of the present invention. As shown in fig. 11 to 12, the charging pile operation device is applied to an operator node, the charging pile node and at least one operator node form a blockchain network, and the charging pile operation device based on the blockchain comprises:
the acquisition unit is used for acquiring encrypted transaction information broadcast by the charging pile node through a blockchain network; the transaction information comprises bank information, user information and charging amount;
the charging amount locking unit is used for decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount and the user information obtained by decryption, and uploading the charging amount locking instruction to a bank corresponding to the bank information so that the bank locks the charging amount according to the charging amount locking instruction;
the broadcasting unit is used for broadcasting transaction information to consensus nodes in the blockchain network to perform transaction consensus;
and the charging amount transfer unit is used for sending a charging amount transfer instruction to the bank according to the consensus result from the consensus node so that the bank transfers the charging amount to the corresponding operator account according to the charging amount transfer instruction.
In one embodiment, the blockchain network further includes a banking node, and the charging stake operating device further includes:
the shared encryption unit is used for determining a shared encryption key of the authority isolation area according to the bank node corresponding to the bank information so as to encrypt the transaction information;
the writing unit is used for writing the encrypted transaction information into the authority isolation area;
the broadcasting unit is specifically used for:
the encrypted transaction information is broadcast to consensus nodes in the blockchain network for transaction consensus.
In one embodiment, the transaction information further includes operator information;
the acquisition unit is specifically configured to:
acquiring a charging pile public key broadcasted by a charging pile node through a blockchain network, and encrypting transaction information digitally signed by an operator public key corresponding to operator information and a charging pile private key;
charging stake operation device based on block chain still includes:
the digital signature verification unit is used for verifying the transaction information which is encrypted by the public key of the operator and digitally signed by the private key of the charging pile according to the public key of the charging pile;
and the first decryption unit is used for decrypting the encrypted transaction information through the pre-acquired operator private key when the verification passes.
In one embodiment, the method further comprises:
The operator digital signature unit is used for carrying out operator digital signature on the encrypted transaction information according to the private key of the operator;
the broadcasting unit is specifically used for:
broadcasting transaction information digitally signed by an operator and an operator public key to consensus nodes in a blockchain network to perform transaction consensus;
the transaction information also includes a transaction timestamp;
the acquisition unit is further configured to: and the obtaining consensus node verifies the consensus result obtained by the transaction information digitally signed by the operator according to the operator public key and the transaction timestamp.
In one of the embodiments, the acquisition unit is further configured to:
acquiring transmission information of a bank node from a permission isolation area; the transmission information comprises first bank node encryption information obtained by encrypting the second shared encryption key component by the bank node according to operation Shang Gongyao and second bank node encryption information obtained by encrypting the first bank node encryption information by the bank node according to a bank private key;
the second decryption unit is used for decrypting the encrypted information of the second bank node according to the bank public key acquired in advance;
the third decryption unit is used for decrypting the first bank node encryption information according to the private key of the operator when the decryption result is consistent with the first bank node encryption information, so as to obtain a second shared encryption key component;
And the shared encryption key generation unit is used for generating the shared encryption key of the authority isolation area according to the first shared encryption key component and the second shared encryption key component which are obtained in advance.
In one of the embodiments, the acquisition unit is further configured to:
acquiring charging pile state information broadcast by a charging pile node and subjected to encryption by an operator public key and digital signature by a charging pile private key, and the charging pile public key;
the digital signature verification unit is further configured to: verifying charging pile state information which is encrypted by an operator public key and digitally signed by a charging pile private key according to the charging pile public key;
the first decryption unit is further for: when the verification is passed, decrypting the charging pile state information through a pre-acquired operator private key;
the electric pile operation device still includes:
the charging pile state information verification unit is used for verifying whether the decrypted charging pile state information is valid or not according to the public time stamp in the charging pile state information;
and the updating unit is used for updating the original charging pile state information according to the decrypted charging pile state information when the charging pile state information is effective, and pushing the updated charging pile state information to the client.
As shown in fig. 12, in practical application, the blockchain-based charging pile operating device includes a second communication unit, a first authority management unit, a block generation unit, a state management unit, a first consensus unit, and a first accounting unit.
The second communication unit includes an acquisition unit, a charge amount locking unit, a broadcasting unit, and a charge amount transfer unit.
The first authority management unit comprises a shared encryption unit, a digital signature verification unit, a first decryption unit, a second decryption unit, a third decryption unit, an operator digital signature unit and a shared encryption key generation unit, and is also used for setting an authority isolation area, account book data in the authority isolation area are only opened to nodes with corresponding authorities, and users without the authorities of the isolation area cannot access the account book data of the isolation area.
The block generating unit is used for packaging the encrypted transaction information to generate a block.
The state management unit comprises a charging pile state information verification unit and an updating unit; the first consensus unit is for performing the function of a consensus node.
The first accounting unit includes a writing unit that can also perform the functions of an accounting node to write the blocks to the distributed ledger.
In summary, the charging pile operation device based on the blockchain of the embodiment of the invention firstly decrypts the encrypted transaction information, generates and uploads the charging amount locking instruction to the bank corresponding to the bank information according to the charging amount and the user information so as to lock the charging amount, then broadcasts the transaction information to the consensus node in the blockchain network to carry out transaction consensus, and finally sends the charging amount transferring instruction to the bank according to the consensus result from the consensus node so as to transfer the charging amount to the corresponding operator account, thereby establishing a unified charging pile operation platform, improving the use efficiency and the user experience of the charging pile and reducing the operation cost.
The embodiment of the invention also provides a concrete implementation mode of the computer equipment capable of realizing all the steps in the charging pile operation method based on the block chain. Fig. 13 is a block diagram of a computer device in an embodiment of the present invention, and referring to fig. 13, the computer device specifically includes:
a processor (processor) 1301 and a memory (memory) 1302.
The processor 1301 is configured to invoke a computer program in the memory 1302, where the processor executes the computer program to implement all the steps in the blockchain-based charging pile operation method in the foregoing embodiment, for example, the processor executes the computer program to implement the following steps:
acquiring encrypted transaction information broadcast by a charging pile node through a block chain network; the transaction information comprises bank information, user information and charging amount;
decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount and the user information obtained by decryption, and uploading the charging amount locking instruction to a bank corresponding to the bank information so that the bank locks the charging amount according to the charging amount locking instruction;
broadcasting transaction information to consensus nodes in the blockchain network to perform transaction consensus;
And sending a charging amount transfer instruction to the bank according to the consensus result from the consensus node, so that the bank transfers the charging amount to the corresponding operator account according to the charging amount transfer instruction.
In summary, the computer device of the embodiment of the invention firstly decrypts the encrypted transaction information, generates and uploads the charging amount locking instruction to the bank corresponding to the bank information according to the charging amount and the user information so as to lock the charging amount, then broadcasts the transaction information to the consensus node in the blockchain network to carry out transaction consensus, and finally sends the charging amount transferring instruction to the bank according to the consensus result from the consensus node so as to enable the bank to transfer the charging amount to the corresponding operator account, thereby establishing a unified charging pile operation platform, improving the service efficiency and user experience of the charging pile and reducing the operation cost.
The embodiment of the present invention also provides a computer readable storage medium capable of implementing all the steps in the blockchain-based charging pile operation method in the above embodiment, where the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps in the blockchain-based charging pile operation method in the above embodiment, for example, the processor implements the following steps when executing the computer program:
Acquiring encrypted transaction information broadcast by a charging pile node through a block chain network; the transaction information comprises bank information, user information and charging amount;
decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount and the user information obtained by decryption, and uploading the charging amount locking instruction to a bank corresponding to the bank information so that the bank locks the charging amount according to the charging amount locking instruction;
broadcasting transaction information to consensus nodes in the blockchain network to perform transaction consensus;
and sending a charging amount transfer instruction to the bank according to the consensus result from the consensus node, so that the bank transfers the charging amount to the corresponding operator account according to the charging amount transfer instruction.
In summary, the computer readable storage medium of the embodiment of the invention firstly decrypts the encrypted transaction information, generates and uploads the charge amount locking instruction to the bank corresponding to the bank information according to the charge amount and the user information so as to lock the charge amount, then broadcasts the transaction information to the consensus node in the blockchain network to carry out transaction consensus, and finally sends the charge amount transfer instruction to the bank according to the consensus result from the consensus node so as to transfer the charge amount to the corresponding operator account, thereby establishing a unified charge pile operation platform, improving the service efficiency and user experience of the charge pile and reducing the operation cost.
Based on the same inventive concept, the embodiment of the invention also provides a charging pile operation system based on the block chain, and because the principle of solving the problem of the system is similar to that of the charging pile operation method based on the block chain, the implementation of the system can refer to the implementation of the method, and the repetition is omitted.
Fig. 14 is a schematic diagram of a charging pile operation system based on a blockchain in an embodiment of the invention. Fig. 15 is a block diagram of a charging pile node in an embodiment of the present invention. Fig. 16 is a block diagram of a banking node in an embodiment of the present invention. As shown in fig. 14 to 16, the blockchain-based charging pile operation system includes:
the charging pile node 3, the operator nodes 1 and the banks 5, wherein the charging pile node 3 and at least one of the operator nodes 1 form a blockchain network;
the charging pile node encrypts transaction information and broadcasts the encrypted transaction information to a blockchain network; the transaction information comprises bank information, user information and charging amount;
the operator node obtains transaction information through a blockchain network, then decrypts the transaction information, generates a charging amount locking instruction according to the charging amount and user information obtained through decryption, and uploads the charging amount locking instruction to a bank corresponding to the bank information; broadcasting transaction information to consensus nodes in the blockchain network to perform transaction consensus; sending a charging amount transfer instruction to a bank according to a consensus result from a consensus node;
The bank locks the charging amount according to the received charging amount locking instruction; and transferring the charging amount to the corresponding operator account according to the received charging amount transfer instruction.
Wherein the consensus node comprises an operator node 1 and a bank node 2.
The charging pile node includes: the system comprises an interaction unit, a charging unit, an encryption unit and a first communication unit.
The interaction unit is used for performing front-end interaction with charging users belonging to the operators based on the existing operator nodes in the blockchain network, and different operator users have different interaction interfaces to support the functions of checking, starting and stopping charging users, inquiring charging transaction records and the like.
The charging unit is used for charging the charging behavior according to charging rules preset by an operator corresponding to the operator information, and the obtained charging amount is obtained.
The encryption unit is used for: combining the charging amount with the transaction time stamp, the operator information, the charging time length, the user information, the bank information preset by the charging user and the unique charging pile identifier of the whole network which are acquired before to obtain transaction information; encrypting the transaction information by using the corresponding operator public key, and digitally signing the transaction information encrypted by using the charging pile private key; and encrypting the charging pile state information by using each operator public key, and digitally signing the charging pile state information encrypted by using each operator public key by using the charging pile private key.
The first communication unit is used for: broadcasting a charging pile public key in a blockchain network, and encrypting transaction information digitally signed by an operator public key corresponding to operator information and a charging pile private key; broadcasting a charging pile public key, an operator unique identifier and charging pile state information digitally signed by the operator public key encryption and the charging pile private key in a blockchain network at regular time so that all operator nodes in the blockchain network can normally collect the working state of the charging pile; initiating a request to a timestamp server 4 to acquire a full-network unique transaction timestamp of the charging transaction; initiating a request to a timestamp server 4 to acquire a unique public timestamp of the whole network; pushing the updated state information of the charging pile to the client, and feeding back the working state of the charging pile to the charging user normally.
The banking node includes: the system comprises a third communication unit, a second authority management unit, a second consensus unit and a second accounting unit.
The third communication unit is used for acquiring the broadcasted transaction information digitally signed by the operator and the public key of the operator; and returning a consensus result.
The second rights management unit is used for: verifying transaction information digitally signed by an operator according to the operator public key; when the verification is passed, verifying whether the transaction information is valid or not through the transaction time stamp; and setting a permission isolation area, wherein account book data in the permission isolation area are only opened to nodes with corresponding permissions, and users without the permission of the isolation area cannot access the account book data of the isolation area.
The second consensus unit is for performing the function of the consensus node.
The second accounting unit includes a writing unit that can also perform the functions of accounting nodes to write blocks to the distributed ledger.
In summary, the charging pile operation system based on the blockchain of the embodiment of the invention firstly decrypts the encrypted transaction information, generates and uploads a charging amount locking instruction to a bank corresponding to bank information according to the charging amount and user information so as to lock the charging amount, then broadcasts the transaction information to a consensus node in a blockchain network to conduct transaction consensus, and finally sends a charging amount transfer instruction to the bank according to a consensus result from the consensus node so as to transfer the charging amount to a corresponding operator account, thereby establishing a unified charging pile operation platform, improving the service efficiency and user experience of the charging pile and reducing the operation cost.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.
Those of skill in the art will further appreciate that the various illustrative logical blocks (illustrative logical block), units, and steps described in connection with the embodiments of the invention may be implemented by electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components (illustrative components), elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Those skilled in the art may implement the described functionality in varying ways for each particular application, but such implementation is not to be understood as beyond the scope of the embodiments of the present invention.
The various illustrative logical blocks, or units, or devices described in the embodiments of the invention may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described. A general purpose processor may be a microprocessor, but in the alternative, the general purpose processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. In an example, a storage medium may be coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may reside in a user terminal. In the alternative, the processor and the storage medium may reside as distinct components in a user terminal.
In one or more exemplary designs, the above-described functions of embodiments of the present invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on a computer-readable medium or transmitted as one or more instructions or code on the computer-readable medium. Computer readable media includes both computer storage media and communication media that facilitate transfer of computer programs from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media may include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that may be used to carry or store program code in the form of instructions or data structures and other data structures that may be read by a general or special purpose computer, or a general or special purpose processor. Further, any connection is properly termed a computer-readable medium, e.g., if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless such as infrared, radio, and microwave, and is also included in the definition of computer-readable medium. The disks (disks) and disks (disks) include compact disks, laser disks, optical disks, DVDs, floppy disks, and blu-ray discs where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included within the computer-readable media.

Claims (15)

1. The charging pile operation method based on the blockchain is characterized in that the charging pile operation method is applied to operator nodes, and the charging pile nodes and at least one operator node form a blockchain network; the charging pile operation method comprises the following steps:
acquiring encrypted transaction information broadcast by a charging pile node through the blockchain network; the transaction information comprises bank information, user information and charging amount;
decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount and the user information obtained through decryption, and uploading the charging amount locking instruction to a bank corresponding to the bank information, so that the bank locks the charging amount according to the charging amount locking instruction;
broadcasting the transaction information to consensus nodes in the blockchain network to perform transaction consensus;
sending a charging amount transfer instruction to the bank according to a consensus result from the consensus node, so that the bank transfers the charging amount to a corresponding operator account according to the charging amount transfer instruction;
the blockchain network further comprises a banking node, and the charging pile operation method further comprises the following steps:
Determining a shared encryption key of the authority isolation area according to the bank node corresponding to the bank information so as to encrypt the transaction information;
writing the encrypted transaction information into the authority isolation area;
broadcasting the transaction information to consensus nodes in the blockchain network for transaction consensus includes:
broadcasting the encrypted transaction information to consensus nodes in the blockchain network to perform transaction consensus.
2. The blockchain-based charging pile operation method of claim 1, wherein the transaction information further includes operator information;
the obtaining, by the blockchain network, encrypted transaction information broadcast by a charging pile node includes:
and acquiring a charging pile public key broadcasted by the charging pile node and transaction information encrypted by an operator public key corresponding to the operator information and digitally signed by a charging pile private key through the blockchain network.
3. The blockchain-based charging stake operating method of claim 2, further comprising, prior to decrypting the encrypted transaction information:
verifying the transaction information digitally signed by the operator public key encryption and the charging pile private key according to the charging pile public key;
Decrypting the encrypted transaction information includes:
and when the verification is passed, decrypting the encrypted transaction information through a pre-acquired operator private key.
4. The blockchain-based charging stake operating method of claim 3, further comprising, prior to broadcasting the encrypted transaction information to a consensus node in the blockchain network for transaction consensus:
carrying out operator digital signature on the encrypted transaction information according to the operator private key;
broadcasting the encrypted transaction information to consensus nodes in the blockchain network for transaction consensus includes:
transaction information digitally signed by an operator and the operator public key are broadcast to consensus nodes in the blockchain network for transaction consensus.
5. The blockchain-based charging stake operating method of claim 4, wherein the transaction information further includes a transaction timestamp;
before sending a charge amount transfer instruction to the bank account according to the consensus result from the consensus node, the method further comprises:
and acquiring a consensus result obtained by the consensus node verifying the transaction information subjected to the operator digital signature according to the operator public key and the transaction time stamp.
6. The blockchain-based charging pile operation method of claim 3, further comprising:
acquiring transmission information of a bank node from the authority isolation region; the transmission information comprises first bank node encryption information obtained by encrypting the second shared encryption key component by the bank node according to the operation Shang Gongyao and second bank node encryption information obtained by encrypting the first bank node encryption information by the bank node according to a bank private key;
decrypting the encrypted information of the second bank node according to a pre-acquired bank public key;
when the decryption result is consistent with the first bank node encryption information, decrypting the first bank node encryption information according to the operator private key to obtain a second shared encryption key component;
and generating the shared encryption key of the authority isolation area according to the first shared encryption key component and the second shared encryption key component which are obtained in advance.
7. The blockchain-based charging pile operation method of claim 6, further comprising:
acquiring charging pile state information broadcast by the charging pile node, which is subjected to encryption by the operator public key and digital signature by the charging pile private key, and the charging pile public key;
Verifying charging pile state information digitally signed by the operator public key encryption and the charging pile private key according to the charging pile public key;
when the verification is passed, decrypting the charging pile state information through a pre-acquired operator private key;
verifying whether the decrypted charging pile state information is valid or not according to the public time stamp in the charging pile state information;
and when the charging pile state information is effective, updating the original charging pile state information according to the decrypted charging pile state information, and pushing the updated charging pile state information to the client.
8. The charging pile operation device based on the blockchain is characterized in that the charging pile operation device is applied to operator nodes, and the charging pile nodes and at least one operator node form a blockchain network; the charging pile operation device comprises:
the acquisition unit is used for acquiring encrypted transaction information broadcast by the charging pile node through the blockchain network; the transaction information comprises bank information, user information and charging amount;
the charging amount locking unit is used for decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount and the user information obtained through decryption, and uploading the charging amount locking instruction to a bank corresponding to the bank information so that the bank locks the charging amount according to the charging amount locking instruction;
The broadcasting unit is used for broadcasting the transaction information to consensus nodes in the blockchain network to perform transaction consensus;
the charging amount transfer unit is used for sending a charging amount transfer instruction to the bank according to the consensus result from the consensus node so that the bank transfers the charging amount to a corresponding operator account according to the charging amount transfer instruction;
the blockchain network further comprises a banking node, and the charging pile operation device further comprises:
the shared encryption unit is used for determining a shared encryption key of the authority isolation area according to the bank node corresponding to the bank information so as to encrypt the transaction information;
the writing unit is used for writing the encrypted transaction information into the authority isolation area;
the broadcasting unit is specifically configured to:
broadcasting the encrypted transaction information to consensus nodes in the blockchain network to perform transaction consensus.
9. The blockchain-based charging stake operating device of claim 8, wherein the transaction information further includes operator information;
the acquisition unit is specifically configured to:
acquiring a charging pile public key broadcasted by a charging pile node and transaction information encrypted by an operator public key corresponding to the operator information and digitally signed by a charging pile private key through the blockchain network;
The charging pile operation device based on the block chain further comprises:
the digital signature verification unit is used for verifying the transaction information digitally signed by the public key encryption of the operator and the private key of the charging pile according to the public key of the charging pile;
and the first decryption unit is used for decrypting the encrypted transaction information through a pre-acquired operator private key when the verification is passed.
10. The blockchain-based charging pile operating device of claim 9, further comprising:
an operator digital signature unit, configured to perform an operator digital signature on the encrypted transaction information according to the operator private key;
the broadcasting unit is specifically configured to:
broadcasting transaction information digitally signed by an operator and the operator public key to consensus nodes in the blockchain network to perform transaction consensus;
the transaction information further includes a transaction timestamp;
the acquisition unit is further configured to: and acquiring a consensus result obtained by the consensus node verifying the transaction information subjected to the operator digital signature according to the operator public key and the transaction time stamp.
11. The blockchain-based charging pile operating device of claim 9, wherein the acquisition unit is further configured to:
Acquiring transmission information of a bank node from the authority isolation region; the transmission information comprises first bank node encryption information obtained by encrypting the second shared encryption key component by the bank node according to the operation Shang Gongyao and second bank node encryption information obtained by encrypting the first bank node encryption information by the bank node according to a bank private key;
the second decryption unit is used for decrypting the encrypted information of the second bank node according to the bank public key acquired in advance;
the third decryption unit is used for decrypting the first bank node encryption information according to the operator private key when the decryption result is consistent with the first bank node encryption information, so as to obtain a second shared encryption key component;
and the shared encryption key generation unit is used for generating the shared encryption key of the authority isolation area according to the first shared encryption key component and the second shared encryption key component which are obtained in advance.
12. The blockchain-based charging pile operating device of claim 11, wherein the acquisition unit is further configured to:
acquiring charging pile state information broadcast by the charging pile node, which is subjected to encryption by the operator public key and digital signature by the charging pile private key, and the charging pile public key;
The digital signature verification unit is further configured to: verifying charging pile state information digitally signed by the operator public key encryption and the charging pile private key according to the charging pile public key;
the first decryption unit is further configured to: when the verification is passed, decrypting the charging pile state information through a pre-acquired operator private key;
the charging pile operation device further comprises:
the charging pile state information verification unit is used for verifying whether the decrypted charging pile state information is valid or not according to the public timestamp in the charging pile state information;
and the updating unit is used for updating the original charging pile state information according to the decrypted charging pile state information when the charging pile state information is effective, and pushing the updated charging pile state information to the client.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the steps of the blockchain-based charging pile operating method of any of claims 1 to 7 when the computer program is executed.
14. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of the blockchain-based charging pile operating method of any of claims 1 to 7.
15. A blockchain-based charging stake operating system, comprising:
the charging pile node, the operator nodes and the banks, wherein the charging pile node and at least one operator node form a blockchain network;
the charging pile node encrypts transaction information and broadcasts the encrypted transaction information to the blockchain network; the transaction information comprises bank information, user information and charging amount;
the operator node obtains transaction information through the blockchain network, decrypts the transaction information, generates a charging amount locking instruction according to the charging amount obtained through decryption and the user information, and uploads the charging amount locking instruction to a bank corresponding to the bank information; broadcasting the transaction information to consensus nodes in the blockchain network to perform transaction consensus; sending a charging amount transfer instruction to the bank according to a consensus result from the consensus node;
the bank locks the charging amount according to the received charging amount locking instruction; transferring the charging amount to a corresponding operator account according to the received charging amount transfer instruction;
the operator node is further configured to: determining a shared encryption key of the authority isolation area according to the bank node corresponding to the bank information so as to encrypt the transaction information; writing the encrypted transaction information into the authority isolation area;
The operator node is specifically configured to: broadcasting the encrypted transaction information to consensus nodes in the blockchain network to perform transaction consensus.
CN202010588992.XA 2020-06-24 2020-06-24 Charging pile operation method, device and system based on block chain Active CN111768189B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010588992.XA CN111768189B (en) 2020-06-24 2020-06-24 Charging pile operation method, device and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010588992.XA CN111768189B (en) 2020-06-24 2020-06-24 Charging pile operation method, device and system based on block chain

Publications (2)

Publication Number Publication Date
CN111768189A CN111768189A (en) 2020-10-13
CN111768189B true CN111768189B (en) 2023-08-22

Family

ID=72722472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010588992.XA Active CN111768189B (en) 2020-06-24 2020-06-24 Charging pile operation method, device and system based on block chain

Country Status (1)

Country Link
CN (1) CN111768189B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241891A (en) * 2020-10-26 2021-01-19 国网区块链科技(北京)有限公司 Charging transaction management system based on alliance chain
CN116743505B (en) * 2023-08-14 2023-10-20 上海特高信息技术有限公司 Safety transmission encryption method based on national secret

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106549749A (en) * 2016-12-06 2017-03-29 杭州趣链科技有限公司 A kind of block chain method for secret protection encrypted based on additive homomorphism

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106549749A (en) * 2016-12-06 2017-03-29 杭州趣链科技有限公司 A kind of block chain method for secret protection encrypted based on additive homomorphism

Also Published As

Publication number Publication date
CN111768189A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
US11139951B2 (en) Blockchain system and data processing method for blockchain system
CN110032865B (en) Authority management method, device and storage medium
CN108768988B (en) Block chain access control method, block chain access control equipment and computer readable storage medium
CN108429759B (en) Decentralized storage safety implementation method
CN107231351B (en) Electronic certificate management method and related equipment
CN109508552B (en) Privacy protection method of distributed cloud storage system
RU2325693C2 (en) Methods of authentication of potentials members, which were invited to join the group
CN110581854B (en) Intelligent terminal safety communication method based on block chain
CN107579958B (en) Data management method, device and system
WO2021018088A1 (en) Trusted authentication method, network device, system and storage medium
CN110046521A (en) Decentralization method for secret protection
CN111797415A (en) Block chain based data sharing method, electronic device and storage medium
KR102307574B1 (en) Cloud data storage system based on blockchain and method for storing in cloud
CN112003889A (en) Distributed cross-chain system and cross-chain information interaction and system access control mechanism
CN110059503A (en) The retrospective leakage-preventing method of social information
CN112152778B (en) Node management method and device and electronic equipment
CN110932850B (en) Communication encryption method and system
CN108959523B (en) Music playing method and player based on block chain technology
CN114329529A (en) Asset data management method and system based on block chain
CN113761582A (en) Group signature based method and system for protecting privacy of block chain transaction under supervision
CN111768189B (en) Charging pile operation method, device and system based on block chain
CN111314066B (en) Block chain-based data transfer method, terminal and computer-readable storage medium
CN104468074A (en) Method and equipment for authentication between applications
US11240661B2 (en) Secure simultaneous authentication of equals anti-clogging mechanism
CN117056984A (en) Method, system, computer equipment and storage medium for data security calculation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant