CN111768189A - 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
CN111768189A
CN111768189A CN202010588992.XA CN202010588992A CN111768189A CN 111768189 A CN111768189 A CN 111768189A CN 202010588992 A CN202010588992 A CN 202010588992A CN 111768189 A CN111768189 A CN 111768189A
Authority
CN
China
Prior art keywords
charging pile
information
bank
node
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.)
Granted
Application number
CN202010588992.XA
Other languages
Chinese (zh)
Other versions
CN111768189B (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

Images

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/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas 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

Abstract

The invention provides a charging pile operation method, device and system based on a block chain. The method is applied to operator nodes, the charging pile nodes and at least one operator node form a block chain network, and the method comprises the following steps: acquiring encrypted transaction information broadcasted 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 obtained by decryption and the user information, 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 a consensus node 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, and a unified charging pile operation platform can be established, so that the use efficiency and the 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 block chains, in particular to a charging pile operation method, a charging pile operation device and a charging pile operation system based on block chains.
Background
The charging pile has the function similar to that of an oiling machine in a gas station, the input end of the charging pile is connected with an alternating current power grid, and the output end of the charging pile charges a battery of the electric automobile through a charging plug. The public charging pile is installed in public buildings (public buildings, shopping malls, public parking lots and the like) and residential quarter parking lots, and the private charging pile is generally installed in a private parking place of the residential quarter parking lot according to personal needs.
According to public statistical data, the number of the charging piles of the Chinese electric automobiles is in a trend of increasing year by year from 2012 to 2018. The number of Chinese electric automobile charging piles in 2012 only reaches 1.8 thousands, the electric automobile charging piles enter an explosive growth period after 2016, the number of the Chinese electric automobile charging piles reaches 14.1 thousands, and the number of the Chinese electric automobile charging piles approaches 30 thousands as long as 2018. In 2019, the number of the public charging piles is nearly 40 thousands.
Although the quantity of filling electric pile is constantly increasing, from the current situation, user's experience of charging does not promote correspondingly. The utilization ratio of the existing charging pile is very low, and great resource waste exists, namely, the place with the pile has no pile and the place with the pile has no car. The surrounding electric vehicles are provided with large-amount charging piles with convenient geographical positions, so that a user can conveniently go to charge, and the charging user often encounters the problems of electric vehicle pile-up charging, charging time interval conflict and the like; and 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 the charging piles are not used by people and almost completely idle, and become so-called 'zombie charging piles'. On the other hand, the charging pile operator has difficulty in profit. Due to the characteristics of large investment and long return period in the charging pile industry, in recent years, the information about closing, returning and purchasing of charging pile operation enterprises is endless, and the high threshold and the difficulty of profit of the whole industry are just reflected.
In addition, the number of the existing charging pile operators is large, and each operator generally establishes a payment platform; different user systems and payment systems can be established by each operator for operation consideration, great inconvenience is brought to electric vehicle users, and meanwhile, the conditions of huge investment and difficult profit of the operators are caused.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a charging pile operation method, a charging pile operation device and a charging pile operation system based on a block chain, so that a unified charging pile operation platform is established, the use efficiency and the user experience of a charging pile are improved, and the operation cost is reduced.
In order to achieve the above object, an embodiment of the present invention provides a charging pile operation method based on a block chain, where the charging pile operation method is applied to an operator node, and a charging pile node and at least one operator node form a block chain network, and the charging pile operation method includes:
acquiring encrypted transaction information broadcasted 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 obtained by decryption and the user information, 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 a consensus node 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 block chain, the charging pile operation device is applied to the operator nodes, the charging pile nodes and at least one operator node form a block chain network, and the charging pile operation device comprises:
the acquisition unit is used for acquiring encrypted transaction information broadcasted by the charging pile nodes through a block chain 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 obtained through decryption and the user information, and uploading the charging amount locking instruction to a bank corresponding to the bank information so that the bank can lock the charging amount according to the charging amount locking instruction;
the broadcast unit is used for broadcasting the transaction information to the consensus node in the block chain network so as to carry out 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 step of the charging pile operation method based on the block chain when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the charging pile operating 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 system comprises charging pile nodes, operator nodes and banks, wherein the charging pile nodes and at least one operator node form a block chain network;
the charging pile node encrypts the transaction information and broadcasts the encrypted transaction information to the block chain network; the transaction information comprises bank information, user information and charging amount;
the operator node acquires the transaction information through the blockchain network, decrypts the transaction information, generates a charging amount locking instruction according to the charging amount acquired 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 a consensus node in the blockchain network to perform transaction consensus; sending a charging amount transfer instruction to a bank according to a consensus result from the 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, the charging pile operation device and the charging pile operation system based on the block chain, encrypted transaction information is decrypted, a charging amount locking instruction is generated and uploaded to a bank corresponding to bank information according to the charging amount and user information, so that the bank locks the charging amount, the transaction information is broadcasted to a consensus node in a block chain network to perform transaction consensus, and finally a charging amount transfer instruction is sent 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.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a flowchart of a charging pile operation method based on a block chain in an embodiment of the present invention;
FIG. 2 is a flow diagram of generating a shared encryption key in an embodiment of the invention;
fig. 3 is a flowchart of feedback of charging pile status in an embodiment of the present invention;
FIG. 4 is a block-chain network according to an embodiment of the present invention;
fig. 5 is a flowchart of processing of a charging pile node in the embodiment of the present invention;
FIG. 6 is a flowchart of the interaction between an operator node and other nodes in the embodiment of the present invention;
FIG. 7 is a flow chart of a process for consensus nodes in an embodiment of the present invention;
FIG. 8 is a flow chart of establishing a permission isolation zone in an embodiment of the present invention;
FIG. 9 is a flow diagram of generating a shared encryption key in another embodiment of the invention;
fig. 10 is a flowchart of feedback of charging pile status according to another embodiment of the present invention;
fig. 11 is a block diagram of a charging pile operation apparatus based on a block chain according to an embodiment of the present invention;
fig. 12 is a block diagram of a charging pile operating apparatus based on a block chain according to another embodiment of the present invention;
FIG. 13 is a block diagram of the structure of a computer device in an embodiment of the present invention;
fig. 14 is a schematic diagram of a charging pile operation system based on a block chain in an embodiment of the present invention;
fig. 15 is a block diagram of a structure of a charging pile node in the embodiment of the present invention;
fig. 16 is a block diagram of the structure of a bank node in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In view of the problems of low utilization rate and difficult operation of the existing charging pile and great inconvenience brought to users, the embodiment of the invention provides a charging pile operation method based on a block chain, so as to establish a uniform charging pile operation platform, improve the use efficiency and user experience of the charging pile and reduce the operation cost. The present invention will be described in detail below with reference to the accompanying drawings.
Because the block chain network is decentered and reliable, the unified charging pile operation platform established by adopting the block chain technology is more easily accepted by the public, and the charging pile facility resources can be fully utilized, so that operators participating in the alliance can reduce the investment risk of investing in sharing infrastructure together, and share profit.
Fig. 1 is a flowchart of a charging pile operation method based on a block chain in an embodiment of the present invention. FIG. 4 is a block-chain network according to an embodiment of the present invention. Fig. 5 is a flowchart of processing of the charging pile node in the embodiment of the present invention. Fig. 6 is a flowchart of interaction between an operator node and other nodes in the embodiment of the present invention. Fig. 7 is a flowchart of processing of a consensus node in an embodiment of the present invention. Node processing flow diagrams as shown in fig. 1, 4-7, the blockchain network includes an operator node 1, a bank node 2 and a charging pile node 3. Fill electric pile node 3 and timestamp server 4 and be connected.
The operator node 1 and the bank node 2 are a consensus node and an accounting node and are responsible for processing the 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 nodes 3 are used as light nodes to access the block chain network, only provide functions of user interaction, transaction information generation, time stamp request and the like, do not participate in block packaging and transaction consensus, and are designed to achieve the purpose that the number of consensus nodes is relatively small, rapid consensus of the block chain network can be achieved, and rapid transaction is facilitated. The timestamp server 4 is deployed under the chain and provides a unique timestamp of the whole network to the charging pile nodes 3 in a network communication mode.
The block chain network of the embodiment of the invention further comprises a CA node (not shown in the figure), and when a newly added charging pile node is accessed into the block chain network, the CA node allocates a unique charging pile public and private key pair and an operator public key of an operator node for the charging pile public and private key pair. And the charging pile public and private key pair and the operator public key are stored in the newly-accessed charging pile node and used for encrypting and signing charging information. The charging pile operation method is applied to operator nodes, the charging pile nodes and at least one operator node form a block chain network, and the charging pile operation method based on the block chain comprises the following steps:
s101: and acquiring encrypted transaction information broadcasted by the charging pile node through a block chain network.
The transaction information comprises bank information, charging amount determined according to a preset uniform charging rule of the whole network, operator information, a transaction timestamp, a charging pile identifier unique to the whole network, charging duration and user information.
S101 includes: and acquiring a charging pile public key broadcasted by a charging pile node and transaction information which is encrypted by an operator public key corresponding to operator information and digitally signed by a charging pile private key through a block chain network.
As shown in fig. 5, in specific implementation, the charging post node interacts with the charging user to obtain the transaction information of the charging transaction. The charging user starts charging after interaction with the charging pile node is successful, the charging pile node initiates a request to the timestamp server 4 through a first communication unit preset inside, and the unique transaction timestamp of the charging transaction in the whole network is obtained. And after the charging action is finished, the charging pile node charges the charging action according to a charging rule preset by an operator corresponding to the operator information, and the obtained charging amount is combined with the transaction timestamp, the operator information, the charging time, the user information, the bank information preset by the charging user and the charging pile identifier unique to the whole network to obtain transaction information. And encrypting the transaction information by using the corresponding operator public key, and then digitally signing the transaction information encrypted by using the charging pile private key. And finally broadcasting the charging pile public key and transaction information which is encrypted by the operator public key corresponding to the operator information and digitally signed by the charging pile private key in the blockchain network.
S102: and decrypting the encrypted transaction information, generating a charging amount locking instruction according to the charging amount obtained by decryption and the user information, 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 an embodiment, before executing S102, the method further includes: verifying transaction information encrypted by an operator public key and digitally signed by a charging pile private key according to the charging pile public key; and when the verification is passed, decrypting the encrypted transaction information based on the asymmetric encryption algorithm by using the operator private key acquired in advance. 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 comprises a bank node; after executing S102, the method further includes: and determining the 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, V, 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, KC=SM4_EBC(K);VC=SM4_EBC(V)。
TABLE 1
Figure BDA0002555676580000061
Table 1 is a permission isolation region schematic table. Fig. 8 is a flow chart of establishing a permission isolation region in an embodiment of the present invention. As shown in Table 1 and FIG. 8, R is the read permission and W is the write permission. A network administrator of the charging pile blockchain network presets authority relationships of different authority isolation areas in CA nodes of the blockchain network by taking 'authority isolation area & node & read authority/write authority' as authority granularity, and the authority relationships are subjected to CA node signature authentication and are synchronized to all VP nodes (the VP nodes comprise operator nodes and bank nodes) of the blockchain network. Based on a preset authority relationship, a CA node of the block chain network respectively issues certificates containing public and private key pairs for service authority isolation to an operator node and a bank node, the certificates are respectively stored by each VP node, and a public key and a private key in each certificate are used for asymmetrically encrypting and decrypting transaction information in charging pile block chain transaction. The CA node itself stores all the certificates containing public and private key pairs of the preset service authority isolation area. If the account book data in a preset service authority isolation area needs to be read (for example, the encrypted transaction information is read after the transaction is finished) or written (for example, the 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 service authority isolation area, and if the read authority or the write authority is not present, the VP node refuses to execute the transaction, and if the read authority or the write authority is present, the VP node executes the read authority or the write authority.
S103: and broadcasting the transaction information to a consensus node in the blockchain network to perform transaction consensus.
In one embodiment, S103 includes: and broadcasting the encrypted transaction information to a consensus node in the blockchain network to perform 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 an operator private key. At this time, S103 includes: and broadcasting the transaction information and the operator public key which are digitally signed by the operator to a consensus node in the block chain network to perform transaction consensus. The consensus nodes comprise bank nodes and other operator nodes in the block chain 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 an embodiment, before performing S104, the method further includes: and the acquisition consensus node verifies the consensus result obtained by the transaction information subjected to the operator digital signature according to the operator public key and the transaction timestamp.
In specific implementation, the consensus node acquires the broadcasted transaction information and the operator public key which are digitally signed by the operator through a communication unit (a second communication unit or a third communication unit). Firstly, verifying transaction information digitally signed by an operator according to the public key of the operator; and when the verification is passed, verifying whether the transaction information is valid or not through the transaction timestamp (the consensus node sends a request to the timestamp server 4 to obtain the current timestamp; and when the difference value between the current timestamp and the transaction timestamp is smaller than a preset time threshold, the transaction information is valid). And returning a consensus result when the verification is successful. And when the verification fails, discarding the transaction information and returning the transaction failure information to the user.
In one embodiment, S104 includes: and when f +1 consensus results are received, indicating that the consensus is successful, sending a charging amount transfer instruction to the bank. And 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, the block chain network has 3f +1 common nodes. f is a positive integer greater than 1.
In one embodiment, after executing S104, the method further includes: writing the encrypted transaction information into an authority isolation area (namely writing (Kc: Vc) into the authority isolation area of the block chain network), packaging the encrypted transaction information by using a calling block generation unit to generate a block, and calling a second communication unit to broadcast the block to accounting nodes (bank nodes and other operator nodes in the block chain network) in the block chain network. And the accounting node updates the local account book data according to the block, and the transaction is completed.
After the transaction is completed, the operator node or the bank node in the right isolation area may also read the encrypted transaction information, for example, decrypt (Kc: Vc) by using the shared encryption KEY through the EBC mode of the SM4 algorithm to obtain the decrypted transaction information K: V. Where K is SM4_ EBC (K)C);V=SM4_EBC(VC)。
The execution subject of the charging pile operation method based on the block chain shown in fig. 1 is an operator node corresponding to operator information. As can be seen from the flow shown in fig. 1, in the charging pile operation method based on the block chain according to the embodiment of the present invention, encrypted transaction information is decrypted, a charging amount locking instruction is generated and uploaded according to the charging amount and the user information to a bank corresponding to the bank information, so that the bank locks the charging amount, the transaction information is broadcast to a consensus node in the block chain network to perform transaction consensus, and finally, a charging amount transfer instruction is sent 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.
Fig. 2 is a flow diagram of generating a shared encryption key in an embodiment of the invention. Fig. 9 is a flow diagram of generating a shared encryption key in another embodiment of the invention. As shown in fig. 2 and 9, the charging pile operation method based on the block chain further includes:
s201: and acquiring transmission information from the bank nodes in the authority isolation area.
The transmission information comprises first bank node encryption information obtained by the bank node encrypting the second shared encryption key component according to the operator public key and second bank node encryption information obtained by the bank node encrypting the first bank node encryption information according to the bank private key.
Before executing S201, the method further includes: requesting the bank public key Pub _YHThe preset first shared encryption Key component Key1 is encrypted by the SM2 algorithm using the bank public Key provided by the bank node, and the first operator node encryption information Key _ c1 is obtained. Using the operator private key Pri \uYYSAnd encrypting the first operator node encryption information Key _ c1 by an SM2 algorithm to obtain second operator node encryption information Key _ c 1', and sending the first transmission information M1 to the bank node.
Wherein, the first transmission information M1 is:
M1=(Key_c1||Key_c1’||Pub_YYS);Pub_YYSfor the operator public key, | | represents the join operation.
The bank node receives the first transmission M1, using the operator public key Pub \uYYSDecrypting the encryption information Key _ c 1' of the second operator node in M1 to obtain Key _ d1, if Key _ d1 is Key _ c1, proving that M1 is sent by the operator node, the decryption is normal, and using the bank private Key Pri _YHAnd decrypting the first operator node encryption information Key _ c1 in the M1 to obtain a first shared encryption Key component Key1 when the decryption is normal.
Bank node using operator public key Pub \uYYSThe first banking node encryption information Key _ c2 obtained by encrypting the second shared encryption Key component Key2 by the SM2 algorithm. Using the bank private key Pri \uYHAnd encrypting the first bank node encryption information Key _ c2 by an SM2 algorithm to obtain second bank node encryption information Key _ c 2', and sending second transmission information M2 to the operator node.
Wherein, the second transmission information M2 is:
M2=(Key_c2||Key_c2’)。
in specific implementation, the operator node obtains the second transmission information from the bank node in the authority isolation area.
S202: and decrypting the encrypted information of the second bank node according to the pre-acquired bank public key.
In specific implementation, according to the public key Pub \uof bankYHDecrypting the second bank node encryption information Key _ c 2' in M2 yields Key _ d 2.
S203: and 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.
In specific implementation, if the decryption result Key _ d2 is Key _ c2, it proves that M2 is sent by the bank node, the decryption is normal, and the operator private Key Pri _isusedYYSAnd decrypting the first bank node encryption information Key _ c2 in the M2 to obtain a second shared encryption Key component Key2 when the 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, the secret SM3 hash algorithm is executed according to the first shared encryption Key component Key1 and the second shared encryption Key component Key2 to generate the shared encryption Key in the authority isolation area:
C(0)=SM3_Hash(Key1);
C(n)=SM3_HMACC(n-1)(SM3_Hash(Key2));
KEY=SM3_HMACSM3_Hash(Key1||Key2)(C0+C1)。
wherein n is a positive integer greater than 0, SM3_ Hash is a Hash function using the SM3 Hash algorithm for cryptographic keys, SM3_ HMAC is a Hash operation using the SM3 algorithm associated with a cryptographic key, and | | represents a join operation.
Fig. 3 is a flowchart of charging pile state feedback according to an embodiment of the present invention. Fig. 10 is a flowchart of charging pile status feedback according to another embodiment of the present invention. As shown in fig. 3 and 10, the charging pile operation method based on the block chain further includes:
s301: and acquiring the charging pile state information and the charging pile public key which are broadcasted by the charging pile node and are encrypted by the operator public key and digitally signed by the charging pile private key.
In specific implementation, the charging pile node initiates a request to the timestamp server 4 through a first communication unit preset inside, and obtains a public timestamp unique to the whole network; the method comprises the steps of firstly encrypting the charging pile state information by using each operator public key, and then digitally signing the charging pile state information after each operator public key is encrypted by using a charging pile private key. And finally broadcasting the charging pile public key, the operator unique identifier and the charging pile state information which is encrypted by the operator public key and digitally signed by the charging pile private key in the block chain network. Each operator node corresponds to one charging pile state information. The charging pile state information comprises a public timestamp, a charging pile identifier 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 the operator private key acquired in advance.
During specific implementation, the charging pile state information is decrypted through an operator private key corresponding to the operator unique identifier.
S304: and verifying whether the decrypted charging pile state information is valid according to the public timestamp in the charging pile state information.
In specific implementation, a request is sent to the timestamp server 4 to obtain the current public timestamp. And when the difference value between the current public timestamp and the public timestamp is smaller than a preset threshold value, the charging pile state information is effective.
S305: 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.
In one embodiment, when the verification fails or the decryption fails, the charging pile state information is discarded, and the state is not updated. The charging user can log in a charging pile management system client, and latest charging pile state information on the charging pile block chain network is inquired so as to freely select the charging pile in the nearest idle state for charging.
To sum up, the specific process of the embodiment of the invention is as follows:
1. and the charging pile node interacts with a charging user to acquire the transaction information of the charging transaction. And the charging user starts charging after successfully interacting with the charging pile node, and the charging pile node initiates a request to the timestamp server 4 to obtain the unique transaction timestamp of the charging transaction in the whole network. And after the charging behavior is finished, charging the charging pile node for the charging behavior, and combining the obtained charging amount 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 in the whole network to obtain transaction information.
2. The charging pile node encrypts transaction information by using a corresponding operator public key, digitally signs the transaction information encrypted by using a 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 using the charging pile private key in the block chain network.
3. The operator node verifies the transaction information 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 the asymmetric encryption algorithm by using the operator private key acquired in advance. 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 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 area according to the bank node corresponding to the bank information to encrypt the transaction information, and carries out operator digital signature on the encrypted transaction information according to an operator private key.
6. The operator node broadcasts the transaction information and the operator public key which are digitally signed by the operator to a consensus node in the block chain network to perform 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 through the transaction timestamp; when the transaction information is valid, returning a consensus result; and when the verification fails, discarding the transaction information and returning the 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. And 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 node in the block chain network.
10. And the accounting node updates the local account book data according to the blocks.
In summary, the invention forms a block chain backbone network by operator nodes and bank nodes, and unifies charging standards; the charging pile nodes are used as light nodes to access a block chain backbone network, and transaction information is encrypted and transmitted through an asymmetric encryption technology to guarantee communication safety. The block chain network carries out transaction verification on the transaction information, the transaction information is subjected to block packaging and added into the block chain through verification, the transaction is completed after a plurality of subsequent blocks are generated, and the anti-tampering target can be achieved, so that the charging vehicles can be charged on any charging pile located in the same block chain 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 requirement related to the charging transaction is fully guaranteed, a third-party payment platform is not needed, the fund risk is effectively avoided, and the fund transfer process is simplified to a certain extent; and through the data isolation technology of the block chain, the transaction information of different operators and banks is only shared between the operators and the banks, so that the data security of the business account book is ensured.
The invention has the following advantages:
1. the transaction is credible: the non-tampering technology, the consensus mechanism and the synchronization mechanism of the blockchain technology ensure that each account book keeps 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 fill electric pile rate of utilization low is solved. The charging user and the charging vehicle can charge on any charging pile located in the same block chain network, and cannot be limited by a charging pile operator, so that the use limitation of the charging pile is reduced, and the use efficiency of the charging pile is fully improved.
3. And (3) data security: service data between an operator and a bank are subjected to data isolation through a block chain isolation technology, and each block chain user can only access the authority isolation area with the corresponding authority, so that the safety and privacy of the account book data are improved. Data storage is protected by encryption, and even if the database is directly accessed by bypassing the blockchain, the business data cannot be accessed.
4. The algorithm is safe: by adopting the national secret SM2, SM3 and SM4 algorithms, the security is endorsed by 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 as the principle of solving the problems of the device is similar to the charging pile operation method based on the block chain, the implementation of the device can refer to the implementation of the method, and repeated parts are not described again.
Fig. 11 is a block diagram of a charging pile operation apparatus based on a block chain in an embodiment of the present invention. Fig. 12 is a block diagram of a charging pile operating apparatus based on a block chain according to another embodiment of the present invention. As shown in fig. 11 to 12, the charging pile operating apparatus is applied to an operator node, the charging pile node and at least one operator node form a block chain network, and the charging pile operating apparatus based on the block chain includes:
the acquisition unit is used for acquiring encrypted transaction information broadcasted by the charging pile nodes through a block chain 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 obtained through decryption and the user information, and uploading the charging amount locking instruction to a bank corresponding to the bank information so that the bank can lock the charging amount according to the charging amount locking instruction;
the broadcast unit is used for broadcasting the transaction information to the consensus node in the block chain network so as to carry out 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 block chain network further includes a bank node, and the charging pile 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 broadcast unit is specifically configured to:
and broadcasting the encrypted transaction information to a consensus node in the blockchain network to perform transaction consensus.
In one embodiment, the transaction information further includes operator information;
the obtaining 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 operator information and digitally signed by a charging pile private key through a block chain network;
fill electric pile operation device based on block chain still includes:
the digital signature verification unit is used for verifying transaction 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;
and the first decryption unit is used for decrypting the encrypted transaction information through the pre-acquired operator private key when the verification is passed.
In one embodiment, the method further comprises the following steps:
the operator digital signature unit is used for carrying out operator digital signature on the encrypted transaction information according to an operator private key;
the broadcast unit is specifically configured to:
broadcasting the transaction information and the operator public key which are subjected to the operator digital signature to a consensus node in the block chain network to perform transaction consensus;
the transaction information further includes a transaction timestamp;
the acquisition unit is further configured to: and the acquisition consensus node verifies the consensus result obtained by the transaction information subjected to the operator digital signature according to the operator public key and the transaction timestamp.
In one embodiment, the obtaining unit is further configured to:
acquiring transmission information of a bank node from an authority isolation area; the transmission information comprises first bank node encryption information obtained by the bank node encrypting the second shared encryption key component according to the operator public key and second bank node encryption information obtained by the bank node encrypting the first bank node encryption information according to the bank private key;
the second decryption unit is used for decrypting the encrypted information of the second bank node according to the pre-acquired bank public key;
the third decryption unit is used for decrypting the encrypted information of the first bank node according to the private key of the operator to obtain a second shared encryption key component when the decryption result is consistent with the encrypted information of the first bank node;
and the shared encryption key generating unit is used for generating a 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 embodiment, the obtaining unit is further configured to:
acquiring charging pile state information and a charging pile public key which are broadcasted by a charging pile node and are encrypted by an operator public key and digitally signed by a charging pile private key;
the digital signature verification unit is further configured to: 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;
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;
fill electric pile operation device and still include:
the charging pile state information verifying unit is used for verifying whether the decrypted charging pile state information is valid according to a 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.
As shown in fig. 12, in practical applications, the charging pile operating apparatus based on a block chain includes a second communication unit, a first right management unit, a block generation unit, a state management unit, a first consensus unit, and a first accounting unit.
The second communication unit comprises an acquisition unit, a charging amount locking unit, a broadcasting unit and a charging amount transferring 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 further used for setting an authority isolation area, account book data in the authority isolation area are only open to nodes with corresponding authorities, and users without the authority 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 used for performing the function of a consensus node.
The first accounting unit comprises a writing unit and can also execute the function of an accounting node and write the block into the distributed accounting book.
To sum up, the charging pile operation device based on the block chain in the embodiment of the present invention decrypts encrypted transaction information, generates and uploads a charging amount locking instruction to a bank corresponding to bank information according to a charging amount and user information, so that the bank locks the charging amount, broadcasts the transaction information to a consensus node in a block chain network to perform transaction consensus, and finally sends 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.
The embodiment of the invention also provides a specific implementation mode of computer equipment, which can realize all the steps in the charging pile operation method based on the block chain in the embodiment. 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 the following:
a processor (processor)1301 and a memory (memory) 1302.
The processor 1301 is configured to invoke a computer program in the memory 1302, and the processor implements all the steps in the charging pile operation method based on the block chain in the above embodiments when executing the computer program, for example, the processor implements the following steps when executing the computer program:
acquiring encrypted transaction information broadcasted 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 obtained by decryption and the user information, 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 a consensus node 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.
To sum up, the computer device of the embodiment of the present invention decrypts encrypted transaction information, generates and uploads a charging amount locking instruction to a bank corresponding to bank information according to a charging amount and user information, so that the bank locks the charging amount, broadcasts the transaction information to a consensus node in a block chain network to perform transaction consensus, and finally sends 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.
An embodiment of the present invention further provides a computer-readable storage medium capable of implementing all steps in the charging pile operating method based on the block chain in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements all steps of the charging pile operating method based on the block chain in the foregoing embodiment, for example, when the processor executes the computer program, implements the following steps:
acquiring encrypted transaction information broadcasted 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 obtained by decryption and the user information, 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 a consensus node 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.
To sum up, the computer-readable storage medium of the embodiment of the present invention decrypts encrypted transaction information, generates and uploads a charging amount locking instruction to a bank corresponding to bank information according to a charging amount and user information, so that the bank locks the charging amount, broadcasts the transaction information to a consensus node in a block chain network to perform transaction consensus, and finally sends 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.
Based on the same inventive concept, the embodiment of the invention also provides a charging pile operation system based on the block chain, and as the principle of solving the problems of the system is similar to the charging pile operation method based on the block chain, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
Fig. 14 is a schematic diagram of a charging pile operation system based on a block chain in the embodiment of the present invention. Fig. 15 is a block diagram of a structure of a charging pile node in the embodiment of the present invention. Fig. 16 is a block diagram of the structure of a bank node in the embodiment of the present invention. As shown in fig. 14 to 16, the charging pile operating system based on the block chain includes:
the system comprises a charging pile node 3, an operator node 1 and a bank 5, wherein the charging pile node 3 and at least one operator node 1 form a block chain network;
the charging pile node encrypts the transaction information and broadcasts the encrypted transaction information to the block chain network; the transaction information comprises bank information, user information and charging amount;
the operator node acquires the transaction information through the blockchain network, decrypts the transaction information, generates a charging amount locking instruction according to the charging amount acquired 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 a consensus node in the blockchain network to perform transaction consensus; sending a charging amount transfer instruction to a bank according to a consensus result from the 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.
The consensus nodes comprise an operator node 1 and a bank node 2.
Fill electric pile node and include: the device 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 operator based on existing operator nodes in the block chain network, different operator users have different interaction interfaces, and functions of charging user verification, charging starting and stopping, charging transaction record query and the like are supported.
The charging unit is used for charging the charging behavior according to a charging rule preset by the operator corresponding to the operator information to obtain the charging amount.
The encryption unit is used for: combining the charging amount with the transaction timestamp, operator information, charging duration, user information, bank information preset by a charging user and a charging pile identifier unique to the whole network 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 the charging pile private key.
The first communication unit is used for: broadcasting a charging pile public key and transaction information which is encrypted by an operator public key corresponding to operator information and digitally signed by a charging pile private key in a block chain network; broadcasting a charging pile public key, an operator unique identifier and charging pile state information which is encrypted by the operator public key and digitally signed by a 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; a request is sent to a timestamp server 4, and a network-wide unique transaction timestamp of the charging transaction is obtained; a request is sent to a timestamp server 4 to obtain a public timestamp unique to the whole network; and pushing the updated charging pile state information to the client, and normally feeding back the working state of the charging pile to a charging user.
The bank 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 which is digitally signed by the operator and the public key of the operator; and returning a consensus result.
The second right management unit is used for: verifying 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 through the transaction timestamp; and an authority isolation area is set, the account book data in the authority isolation area is only open to nodes with corresponding authorities, and users without the authority of the isolation area cannot access the account book data of the isolation area.
The second consensus unit is used for performing the function of a consensus node.
The second accounting unit comprises a writing unit and can also execute the function of the accounting node and write the block into the distributed account book.
To sum up, the charging pile operation system based on the block chain of the embodiment of the invention decrypts 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 that the bank locks the charging amount, broadcasts the transaction information to a consensus node in the block chain network so as to perform transaction consensus, and finally sends 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.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various 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. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, or devices described in connection with the embodiments disclosed herein 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 herein. A general-purpose processor may be a microprocessor, but in the alternative, the 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. For example, a storage medium may be coupled to the processor such 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 be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described above in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. 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 can 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 which can be used to carry or store program code in the form of instructions or data structures and which can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Additionally, any connection is properly termed a computer-readable medium, and, thus, is included 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 wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.

Claims (17)

1. A charging pile operation method based on a block chain is characterized in that the charging pile operation method is applied to operator nodes, and a charging pile node and at least one operator node form a block chain network; the charging pile operation method comprises the following steps:
acquiring encrypted transaction information broadcasted by the charging pile node through the 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 obtained by decryption and the user information, 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 a consensus node 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 a corresponding operator account according to the charging amount transfer instruction.
2. The method of claim 1, wherein the blockchain network further comprises a bank node, and wherein the method further comprises:
determining a shared encryption key of an authority isolation area according to a 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 a consensus node in the blockchain network for transaction consensus comprises:
and broadcasting the encrypted transaction information to a consensus node in the blockchain network to perform transaction consensus.
3. The method of claim 2, wherein the transaction information further includes operator information;
acquiring encrypted transaction information broadcast by a charging pile node through the blockchain network comprises:
and acquiring a charging pile public key broadcasted by a charging pile node and transaction information which is encrypted by an operator public key corresponding to the operator information and digitally signed by a charging pile private key through the block chain network.
4. The method of operating a blockchain-based charging pile according to claim 3, wherein before decrypting the encrypted transaction information, the method further comprises:
verifying transaction information encrypted by the operator public key and digitally signed by a 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 the operator private key acquired in advance.
5. The method of operating a blockchain-based charging pile according to claim 4, wherein before broadcasting the encrypted transaction information to a consensus node in the blockchain network for transaction consensus, the method further comprises:
carrying out operator digital signature on the encrypted transaction information according to the operator private key;
broadcasting the encrypted transaction information to a consensus node in the blockchain network for transaction consensus comprises:
and broadcasting the transaction information digitally signed by the operator and the operator public key to a consensus node in the block chain network to perform transaction consensus.
6. The method of claim 5, wherein the transaction information further comprises a transaction timestamp;
before sending a charging amount transfer instruction to the bank account according to the consensus result from the consensus node, the method further comprises the following steps:
and acquiring a consensus result obtained by verifying the transaction information subjected to the operator digital signature by the consensus node according to the operator public key and the transaction timestamp.
7. The method of claim 4, further comprising:
acquiring transmission information of the bank node from the authority isolation area; the transmission information comprises first bank node encryption information obtained by encrypting a second shared encryption key component by the bank node according to the operator public key 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 the 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 a shared encryption key of the authority isolation area according to a first shared encryption key component and the second shared encryption key component which are obtained in advance.
8. The method of claim 7, further comprising:
acquiring charging pile state information and a charging pile public key which are broadcasted by the charging pile node and are encrypted by the operator public key and digitally signed by a charging pile private key;
verifying the charging pile state information which is encrypted by the operator public key and digitally signed by a 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 according to the public timestamp 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.
9. A charging pile operation device based on a block chain is characterized in that the charging pile operation device is applied to operator nodes, and a charging pile node and at least one operator node form a block chain network; fill electric pile operation device and include:
the acquisition unit is used for acquiring encrypted transaction information broadcasted by the charging pile nodes through the block chain 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 obtained through decryption and the user information, 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 a consensus node in the block chain network so as 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.
10. The blockchain-based charging pile operating apparatus according to claim 9, wherein the blockchain network further includes a bank node, the charging pile operating apparatus 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 broadcast unit is specifically configured to:
and broadcasting the encrypted transaction information to a consensus node in the blockchain network to perform transaction consensus.
11. The blockchain-based charging pile operating apparatus according to claim 10, wherein the transaction information further includes operator information;
the obtaining unit is specifically configured to:
acquiring a charging pile public key broadcasted by a charging pile node and transaction information which is encrypted by an operator public key corresponding to the operator information and digitally signed by a charging pile private key through the block chain network;
fill electric pile 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 operator public key and digitally signed by the charging pile private key according to the charging pile public key;
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.
12. The device of claim 11, further comprising:
the operator digital signature unit is used for carrying out operator digital signature on the encrypted transaction information according to the operator private key;
the broadcast unit is specifically configured to:
broadcasting transaction information which is digitally signed by an operator and the operator public key to a consensus node in the block chain 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 verifying the transaction information subjected to the operator digital signature by the consensus node according to the operator public key and the transaction timestamp.
13. The device of claim 11, wherein the obtaining unit is further configured to:
acquiring transmission information of the bank node from the authority isolation area; the transmission information comprises first bank node encryption information obtained by encrypting a second shared encryption key component by the bank node according to the operator public key 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 pre-acquired bank public key;
the third decryption unit is used for decrypting the encrypted information of the first bank node according to the private key of the operator to obtain a second shared encryption key component when the decryption result is consistent with the encrypted information of the first bank node;
and the shared encryption key generating unit is used for generating the shared encryption key of the authority isolation area according to a first shared encryption key component and the second shared encryption key component which are obtained in advance.
14. The device of claim 13, wherein the obtaining unit is further configured to:
acquiring charging pile state information and a charging pile public key which are broadcasted by the charging pile node and are encrypted by the operator public key and digitally signed by a charging pile private key;
the digital signature verification unit is further configured to: verifying the charging pile state information which is encrypted by the 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 configured to: when the verification is passed, decrypting the charging pile state information through a pre-acquired operator private key;
fill electric pile operation device still includes:
the charging pile state information verifying unit is used for verifying whether the decrypted charging pile state information is valid according to a 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.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor when executing the computer program implements the steps of the block chain based charging pile operating method according to any one of claims 1 to 8.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the block chain-based charging pile operating method according to any one of claims 1 to 8.
17. The utility model provides a fill electric pile operation system based on block chain which characterized in that includes:
the system comprises charging pile nodes, operator nodes and banks, wherein the charging pile nodes and at least one operator node form a block chain network;
the charging pile node encrypts transaction information and broadcasts the encrypted transaction information to the block chain network; the transaction information comprises bank information, user information and charging amount;
the operator node acquires transaction information through the block chain network, decrypts the transaction information, generates a charging amount locking instruction according to the charging amount acquired 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 a consensus node in the blockchain network to perform transaction consensus; sending a charging amount transfer instruction to the bank according to the consensus result from the consensus node;
the bank locks the charging amount according to the received charging amount locking instruction; and transferring the charging amount to a corresponding operator account according to the received charging amount transfer instruction.
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 true CN111768189A (en) 2020-10-13
CN111768189B 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)

Cited By (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
CN116743505A (en) * 2023-08-14 2023-09-12 上海特高信息技术有限公司 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

Cited By (3)

* 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
CN116743505A (en) * 2023-08-14 2023-09-12 上海特高信息技术有限公司 Safety transmission encryption method based on national secret
CN116743505B (en) * 2023-08-14 2023-10-20 上海特高信息技术有限公司 Safety transmission encryption method based on national secret

Also Published As

Publication number Publication date
CN111768189B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
WO2022042301A1 (en) Data processing method and apparatus, smart device and storage medium
CN108768988B (en) Block chain access control method, block chain access control equipment and computer readable storage medium
CN107231351B (en) Electronic certificate management method and related equipment
CN108429759B (en) Decentralized storage safety implementation method
CN107579958B (en) Data management method, device and system
KR100843072B1 (en) Wireless network system and communication method using wireless network system
CN110046521A (en) Decentralization method for secret protection
RU2325693C2 (en) Methods of authentication of potentials members, which were invited to join the group
KR102307574B1 (en) Cloud data storage system based on blockchain and method for storing in cloud
CN109088857B (en) Distributed authorization management method in scene of Internet of things
CN110059503A (en) The retrospective leakage-preventing method of social information
CN110381145B (en) Interaction method and system between electric automobile and power grid
CN110581854A (en) intelligent terminal safety communication method based on block chain
CN108959523B (en) Music playing method and player based on block chain technology
CN103974255B (en) A kind of vehicle access system and method
CN112311537A (en) Block chain-based equipment access authentication system and method
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
CN112423302B (en) Wireless network access method, terminal and wireless access equipment
EP1912147A1 (en) Method and apparatus for selling a digital resource
CN102857497A (en) User access system and authentication method based on hybrid type content network of CDN (Content Distribution Network) and P2P (peer to peer)
CN117056984A (en) Method, system, computer equipment and storage medium for data security calculation
CN113472722A (en) Data transmission method, storage medium, electronic device and automatic ticket selling and checking system
CN113676330B (en) Digital certificate application system and method based on secondary secret key
CN111885510B (en) Attendance checking method, attendance checking client and attendance checking system

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