CN109981547B - Logistics transmission method and device based on block chain - Google Patents

Logistics transmission method and device based on block chain Download PDF

Info

Publication number
CN109981547B
CN109981547B CN201711462462.5A CN201711462462A CN109981547B CN 109981547 B CN109981547 B CN 109981547B CN 201711462462 A CN201711462462 A CN 201711462462A CN 109981547 B CN109981547 B CN 109981547B
Authority
CN
China
Prior art keywords
node
information
block
logistics
logistics information
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
CN201711462462.5A
Other languages
Chinese (zh)
Other versions
CN109981547A (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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201711462462.5A priority Critical patent/CN109981547B/en
Publication of CN109981547A publication Critical patent/CN109981547A/en
Application granted granted Critical
Publication of CN109981547B publication Critical patent/CN109981547B/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
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0833Tracking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a logistics transmission method and a logistics transmission device based on a block chain, wherein when a current node receives logistics information, whether the logistics information can be decrypted is judged; when determining that the logistics information can be decrypted, determining node information of a next node; generating a block according to the logistics information, the node information of the current node and the node information of the next node; and writing the block body as new logistics information into a block chain, and broadcasting to all nodes where the block chain is located. Compared with the prior art, in the embodiment of the invention, when each node determines that the node can decrypt the logistics information, the corresponding block can be generated according to the logistics information, the node information of the node and the node information of the next node, and the corresponding main node is not needed to be relied on, so that the safety of the logistics information can be ensured.

Description

Logistics transmission method and device based on block chain
Technical Field
The invention relates to the technical field of block chains, in particular to a logistics transmission method and a logistics transmission device based on a block chain.
Background
Currently, the block chain-based logistics transportation method commonly used in the industry may generally include the following steps: the sending node uploads package information to the host node; the main node generates a digital fingerprint aiming at the package information uploaded by the sending node, the digital fingerprint and the corresponding timestamp are written into the block chain, the package information is broadcasted in all the slave nodes, each logistics node sequentially generates package state information according to the digital fingerprint, the node information of the logistics node and the node information of the next logistics node according to the physical space transmission path of the package, and the main node writes the package state information into the block chain. However, in this way, once the master node is destroyed (or stolen), the information in the package information is tampered, which may cause the whole logistics information to be untrustworthy, and there is a serious security risk.
That is to say, the existing logistics transmission method based on the block chain has the problem of low safety.
Disclosure of Invention
The embodiment of the invention provides a logistics transmission method based on a block chain, which is used for solving the problem of low safety caused by the existing logistics transmission method based on the block chain.
The embodiment of the invention provides a logistics transmission method based on a block chain, which comprises the following steps:
when the current node receives the logistics information, judging whether the logistics information can be decrypted or not;
when determining that the logistics information can be decrypted, determining node information of a next node;
generating a block according to the logistics information, the node information of the current node and the node information of the next node;
and writing the block body as new logistics information into a block chain, and broadcasting to all nodes where the block chain is located.
Specifically, the determining, by the current node, that the current node can decrypt the logistics information includes:
and the current node determines that the private key of the current node can decrypt the logistics information.
Specifically, generating a block according to the logistics information, the node information of the current node, and the node information of the next node includes:
generating an initial area block according to the logistics information, the mark information of the current node and the mark information of the next node;
signing the initial region block to obtain a signature region block;
encrypting the signature area block by adopting the public key of the next node to obtain an encryption area block;
performing hash processing on the encryption zone block to obtain a hash file;
and generating the zone block body according to the encryption zone block body and the Hash file.
Further, after the block body is generated, the block chain-based logistics transportation method further comprises the following steps:
adding timestamp information to the block.
Further, when it is determined that the logistics information can be decrypted by itself, the block chain-based logistics transmission method further includes:
carrying out Hash processing on the logistics information;
and if the file obtained after the hash processing is consistent with the hash file carried in the logistics information, determining that the logistics information is not tampered.
Correspondingly, the embodiment of the invention also provides a logistics transmission device based on the block chain, which comprises:
the judging module is used for judging whether the logistics information can be decrypted or not when the current node receives the logistics information;
the determining module is used for determining the node information of the next node when determining that the determining module can decrypt the logistics information;
the generation module is used for generating an area block according to the logistics information, the node information of the current node and the node information of the next node;
and the broadcasting module is used for writing the block body into a block chain as new logistics information and broadcasting the block body to all nodes where the block chain is located.
Specifically, the determining module is specifically configured to determine that the current node can decrypt the logistics information if the current node determines that the private key of the current node can decrypt the logistics information.
Further, the generating module is specifically configured to generate an initial area block according to the logistics information, the flag information of the current node, and the flag information of the next node; signing the initial region block to obtain a signature region block; encrypting the signature area block by adopting the public key of the next node to obtain an encryption area block; performing hash processing on the encryption zone block to obtain a hash file; and generating the zone block body according to the encryption zone block body and the Hash file.
Further, the block chain-based logistics transmission method further comprises an adding module, wherein:
the adding module is used for adding timestamp information to the block after the block is generated.
Further, the determining module is further configured to perform hash processing on the logistics information when determining that the logistics information can be decrypted by itself; and if the file obtained after the hash processing is determined to be consistent with the hash file carried in the logistics information, determining that the logistics information is not tampered.
Accordingly, an embodiment of the present invention further provides a computing device, including a memory and a processor, where:
the memory to store program instructions;
the processor is configured to call the program instruction stored in the memory, and execute the block chain-based logistics transmission method according to the obtained program.
Further, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions are configured to enable the computer to execute the block chain-based logistics transmission method in the embodiment of the present invention.
The invention has the following beneficial effects:
the embodiment of the invention provides a logistics transmission method and a logistics transmission device based on a block chain, wherein when a current node receives logistics information, whether the logistics information can be decrypted is judged; when determining that the logistics information can be decrypted, determining node information of a next node; generating a block according to the logistics information, the node information of the current node and the node information of the next node; and writing the block body as new logistics information into a block chain, and broadcasting to all nodes where the block chain is located. Compared with the prior art, in the embodiment of the invention, when each node determines that the node can decrypt the logistics information, the corresponding block can be generated according to the logistics information, the node information of the node and the node information of the next node, and the corresponding main node is not needed to be relied on, so that the safety of the logistics information can be ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be 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 to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a block chain-based logistics transportation method according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of an initiation block provided in the first embodiment of the present invention;
fig. 3 is a schematic structural diagram of a block provided in the first embodiment of the present invention;
fig. 4 is a schematic diagram illustrating information interaction between nodes according to a first embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a building structure of a blockchain according to a first embodiment of the present invention;
fig. 6 is a schematic structural diagram of a block chain-based logistics transportation apparatus provided in the second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computing device provided in the third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, 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.
The first embodiment is as follows:
in order to solve the problem of low security of the conventional logistics transmission method based on a block chain, an embodiment of the present invention provides a logistics transmission method based on a block chain, as shown in fig. 1, which is a schematic flow diagram of the logistics transmission method based on a block chain provided in the first embodiment of the present invention. Specifically, as can be seen from fig. 1, the block chain-based logistics transportation method may include the following steps:
step 101: when the current node receives the logistics information, judging whether the logistics information can be decrypted or not;
step 102: when determining that the logistics information can be decrypted, determining node information of a next node;
step 103: generating a block according to the logistics information, the node information of the current node and the node information of the next node;
step 104: and writing the block body as new logistics information into a block chain, and broadcasting to all nodes where the block chain is located.
That is to say, in the embodiment of the present invention, when the current node receives the logistics information, it is determined whether the logistics information can be decrypted; when determining that the logistics information can be decrypted, determining node information of a next node; generating a block according to the logistics information, the node information of the current node and the node information of the next node; and writing the block body as new logistics information into a block chain, and broadcasting to all nodes where the block chain is located. Compared with the prior art, in the embodiment of the invention, when each node determines that the node can decrypt the logistics information, the corresponding block can be generated according to the logistics information, the node information of the node and the node information of the next node, and the corresponding main node is not needed to be relied on, so that the safety of the logistics information can be ensured.
It should be noted that the logistics information may be a block, which may include corresponding article information, node information of a previous node, and the like, and is not described in detail herein.
Specifically, the determining, by the current node, that the current node can decrypt the logistics information may specifically include:
and the current node determines that the private key of the current node can decrypt the logistics information.
It should be noted that, when the current node receives the block including the logistics information, the block may be decrypted by a private key of the current node, and when the block can be decrypted, the current node may be a transmission node of the logistics information, which is not described in detail herein.
Specifically, generating the block according to the logistics information, the node information of the current node, and the node information of the next node may specifically include:
generating an initial area block according to the logistics information, the mark information of the current node and the mark information of the next node;
signing the initial region block to obtain a signature region block;
encrypting the signature area block by adopting the public key of the next node to obtain an encryption area block;
performing hash processing on the encryption zone block to obtain a hash file;
and generating the zone block body according to the encryption zone block body and the Hash file.
It should be noted that the flag information of the current node may include a name, a serial number, a code, or the like of the current node; the flag information of the next node may also include a name, a serial number, a code, or the like of the next node, which is not limited in any way.
For example, assuming that the logistics information is a commodity object, such as grain, the flag information of the current node is the serial number of the current node, such as 001, and the flag information of the next node is the serial number of the next node, such as 002, an initial area block may be generated according to the logistics information, the flag information of the current node, and the flag information of the next node, as shown in fig. 2, which is a schematic structural diagram of the initial area block in the embodiment of the present invention.
It should be noted that, in the embodiment of the present invention, the initial block may be signed, so that non-repudiation of the block can be achieved, and flexibility and accuracy of the block chain are ensured.
For example, as shown in fig. 3, it is a schematic structural diagram of a block body provided in the first embodiment of the present invention. Specifically, as can be seen from fig. 3, the block body may include a cryptographic block body and a hash file, so that when the current node receives the block body, the cryptographic block body may be decrypted to obtain corresponding logistics information; meanwhile, the encryption block body can be subjected to hash processing, and when the file obtained after the hash processing is determined to be consistent with the hash file in the block body, the logistics information is considered to be not tampered, so that the accuracy and the integrity of the logistics information can be determined.
Specifically, encrypting the signature block by using the public key of the next node to obtain an encrypted block may include:
calling a corresponding KM (Key Management) system, and acquiring a public Key of the next node from the KM;
and encrypting the signature area block by adopting the public key of the next node to obtain an encryption area block.
The KM system implements services such as generation, storage, backup, update, recovery, or query of a key pair, manages various keys in the service system from the perspective of key usage, and the key algorithm operation and operation inside the KM system can be implemented by a hardware cryptographic device, which is not described herein again.
Of course, it should be noted that, in the embodiment of the present invention, the public key of the next node may also be stored in another storage system, as long as the security and the privacy of the public key can be ensured, which is not limited at all.
Further, after the block body is generated, the block chain-based logistics transportation method may further include:
adding timestamp information to the block.
It should be noted that the timestamp information may be time information representing the generation of the block (or written into a block chain), and the timestamp information may include any one or more of year information, month information, day information, time information, minute information, and second information, for example, the timestamp information may be 2018, 1, 3, 12, 20, 30 seconds, 2017/12/05/01, 20, 45, 2018/1/30, and the like, which is not limited in any way by the embodiment of the present invention.
Specifically, adding timestamp information to the block may include:
and calling a corresponding timestamp server, and acquiring timestamp information from the timestamp server.
The Time Stamp server is a Time service server with legal effectiveness, which is authorized by a national Time service center and issued by an authoritative trusted Time Stamp Authority TSA (Time Stamp Authority, Time Stamp service center), and compared with a common Time service server, the Time information provided by the TSA has higher reliability and security and legal effectiveness. Each time stamp is used to characterize the corresponding data message (electronic file, e.g. block) that is already present at a point in time, and is complete, verifiable, and legally effective, and will not be described in detail.
It should be noted that, in the embodiment of the present invention, any entity, including the timestamp server, cannot modify the time itself, so that authority of the time can be ensured, and tampering and subsequent repudiation of the logistics information can be avoided.
Further, when it is determined that it is capable of decrypting the logistics information, the block chain based logistics transmission method may further include:
carrying out Hash processing on the logistics information;
and if the file obtained after the hash processing is consistent with the hash file carried in the logistics information, determining that the logistics information is not tampered.
It should be noted that the hash processing in the embodiment of the present invention may include calculating a hash (hash) value of the logistics information, comparing the hash value calculated by itself with the hash value in the block, and if it is determined that the hash value calculated by itself is consistent with the hash value in the block, it may be indicated that the logistics information is not tampered and belongs to the trusted logistics information in the transmission process from the previous node to the current node, which is not described herein again.
Further, the block body may further include a random number, which is not described in detail herein.
Fig. 4 is a schematic diagram of information interaction between nodes according to a first embodiment of the present invention. Specifically, as shown in fig. 4, when receiving logistics information, a user (i.e., a current user) corresponding to the current node (e.g., the node a shown in fig. 4) may upload the logistics information, the node information of the current node, and the node information of the next node to the current node; the current node can generate a corresponding block according to the logistics information, the node information of the current node of the data and the node information of the next node; the current node calls a TSA server to obtain timestamp information and signs the block so as to ensure non-repudiation of the logistics information; the current node calls a KM server to obtain a public key of a next node, and the zone block is encrypted according to the public key of the next node; the hash value of the block body can be calculated to obtain a hash file, and the block body can be generated according to the encryption block body and the hash file; broadcasting the block to each node in the block chain, such as node B, node C, and node D described in fig. 4, which is not described in detail herein.
The block chain-based logistics transmission method in the embodiment of the present invention is described in detail below by way of example:
specifically, as shown in fig. 5, it is a schematic flow chart of building a blockchain according to an embodiment of the present invention. As can be seen from fig. 5, in the embodiment of the present invention, the method for entire logistics transportation may include the following steps:
step 501: starting;
step 502: constructing a block body by using logistics information of a current node, node information of the current node and node information of a next node;
step 503: the current node accesses a timestamp server and adds a timestamp to the block;
step 504: the current node calls a key management system to obtain a public key of the next node;
step 505: encrypting the block body by adopting a public key of a next node, and writing the block body into a block chain;
step 506: the current node broadcasts the block to all other nodes;
step 507: all nodes of the whole network are decrypted by using a private key of the nodes, and if the decryption is successful, the node which is successfully decrypted is used as a new current node;
step 508: judging whether the current node is the last node or not;
step 509: and (6) ending.
As can be seen from the above, in the embodiment of the present invention, in the first aspect, the key used by the user for encryption and decryption is stored in the hardware key or the dedicated KM system, and other people cannot obtain the key pair, so that the absolute security of the logistics information can be ensured; in the second aspect, the use of the timestamp server improves the accurate time for generating the zone block, so that the core data of the article at different stages cannot be tampered, and the method also has legal effectiveness; in the third aspect, the encryption algorithm adopts SM3 domestic cipher digest algorithm, is an improved algorithm based on SHA-256, and has higher complexity and security compared with SHA-256 algorithm; in the fourth aspect, each node is encrypted by using the public key of the next node, so that the logistics process can be carried out orderly according to a set sequence; in the fifth aspect, each node compares and verifies corresponding logistics information through a hash value, so that the correctness and the reliability of the logistics information are guaranteed.
The embodiment of the invention provides a logistics transmission method based on a block chain, wherein when a current node receives logistics information, whether the logistics information can be decrypted is judged; when determining that the logistics information can be decrypted, determining node information of a next node; generating a block according to the logistics information, the node information of the current node and the node information of the next node; and writing the block body as new logistics information into a block chain, and broadcasting to all nodes where the block chain is located. Compared with the prior art, in the embodiment of the invention, when each node determines that the node can decrypt the logistics information, the corresponding block can be generated according to the logistics information, the node information of the node and the node information of the next node, and the corresponding main node is not needed to be relied on, so that the safety of the logistics information can be ensured.
Example two:
based on the same inventive concept as that of the first embodiment of the present invention, a second embodiment of the present invention provides a logistics transportation device based on a block chain, as shown in fig. 6, which is a schematic structural diagram of the logistics transportation device based on a block chain provided in the second embodiment of the present invention. Specifically, as can be seen from fig. 6, the block chain-based logistics transportation apparatus may include:
the judging module 61 is configured to judge whether the logistics information can be decrypted when the current node receives the logistics information;
a determining module 62, configured to determine node information of a next node when determining that the determining module is capable of decrypting the logistics information;
a generating module 63, configured to generate an area block according to the logistics information, the node information of the current node, and the node information of the next node;
the broadcasting module 64 may be configured to write the block as new logistics information into the block chain, and broadcast the new logistics information to all nodes where the block chain is located.
That is to say, in the embodiment of the present invention, the apparatus may include a determining module configured to determine whether the current node can decrypt the logistics information when receiving the logistics information, a determining module configured to determine node information of a next node when determining that the current node can decrypt the logistics information, a generating module configured to generate a block according to the logistics information, the node information of the current node, and the node information of the next node, and a broadcasting module configured to write the block as new logistics information into a block chain and broadcast the new logistics information to all nodes where the block chain is located. Compared with the prior art, in the embodiment of the invention, when each node determines that the node can decrypt the logistics information, the corresponding block can be generated according to the logistics information, the node information of the node and the node information of the next node without depending on the corresponding main node, so that the safety of the logistics information can be ensured.
Specifically, the determining module 62 may be specifically configured to determine that the current node can decrypt the logistics information if the current node determines that its own private key can decrypt the logistics information.
Further, the generating module 63 is specifically configured to generate an initial block according to the logistics information, the flag information of the current node, and the flag information of the next node; signing the initial region block to obtain a signature region block; encrypting the signature area block by adopting the public key of the next node to obtain an encryption area block; performing hash processing on the encryption zone block to obtain a hash file; and generating the zone block body according to the encryption zone block body and the Hash file.
Further, the block chain-based logistics transmission method further comprises an adding module 65, wherein:
the adding module 65 may be configured to add timestamp information to the block after the block is generated.
Further, the determining module 62 may be further configured to perform hash processing on the logistics information when determining that the logistics information can be decrypted by itself; and if the file obtained after the hash processing is determined to be consistent with the hash file carried in the logistics information, determining that the logistics information is not tampered.
The second embodiment of the present invention provides a block chain-based logistics transmission device, which may include a determining module configured to determine whether the logistics information can be decrypted when a current node receives the logistics information, a determining module configured to determine node information of a next node when it is determined that the current node can decrypt the logistics information, a generating module configured to generate a block according to the logistics information, the node information of the current node, and the node information of the next node, and a broadcasting module configured to write the block as new logistics information into a block chain and broadcast the new logistics information to all nodes where the block chain is located. Compared with the prior art, in the embodiment of the invention, when each node determines that the node can decrypt the logistics information, the corresponding block can be generated according to the logistics information, the node information of the node and the node information of the next node, and the corresponding main node is not needed to be relied on, so that the safety of the logistics information can be ensured.
Example three:
a third embodiment of the present invention provides a computing device, as shown in fig. 7, which is a schematic structural diagram of the computing device in the third embodiment of the present invention. The computing device may be specifically a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like. Specifically, the computing device described in the embodiments of the present invention may include a processor, such as a Central Processing Unit (CPU) 701, a memory 702, an input device 703, an output device 704, and the like, where the input device 703 may include a keyboard, a mouse, a touch screen, and the like, and the output device 704 may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), and the like.
The memory 702 may include a Read Only Memory (ROM) and a Random Access Memory (RAM), and provides the cpu 701 with program instructions and data stored in the memory 702. In the embodiment of the present invention, the memory 702 may be used to store a program of a block chain-based logistics transmission method.
The central processing unit 701 may be configured to, by calling the program instructions stored in the memory 702, perform the following steps according to the obtained program instructions: when the current node receives the logistics information, judging whether the logistics information can be decrypted or not; when determining that the logistics information can be decrypted, determining node information of a next node; generating a block according to the logistics information, the node information of the current node and the node information of the next node; and writing the block body as new logistics information into a block chain, and broadcasting to all nodes where the block chain is located.
Example four:
an embodiment of the present invention provides a computer storage medium, configured to store computer program instructions for the computing device, where the computer program instructions include a program for executing the block chain based logistics transmission method.
The computer storage media may be any available media or data storage device that can be accessed by a computer, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus (device), or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A logistics transmission method based on a block chain is characterized by comprising the following steps:
when a current node receives logistics information sent by a previous node, judging whether the logistics information can be decrypted by using a private key of the current node, wherein the logistics information is stored in a block generated by the previous node, and the block comprises an encrypted block obtained by encrypting the previous node by using a public key of a next node of the previous node based on the logistics information;
when determining that the logistics information can be decrypted, determining node information of a next node; the determining, by the current node, that the current node can decrypt the logistics information specifically includes: the current node determines that the private key of the current node can decrypt the logistics information;
generating a block according to the logistics information, the node information of the current node and the node information of the next node, specifically comprising: generating an initial area block according to the logistics information, the mark information of the current node and the mark information of the next node; signing the initial region block to obtain a signature region block; encrypting the signature area block by adopting the public key of the next node to obtain an encryption area block; performing hash processing on the encryption zone block to obtain a hash file; generating the zone block body according to the encryption zone block body and the Hash file;
and writing the block body as new logistics information into a block chain, and broadcasting to all nodes where the block chain is located.
2. The blockchain-based logistics transport method of claim 1, wherein after generating the block, the blockchain-based logistics transport method further comprises:
time stamp information is added to the block body.
3. The block chain-based logistics transmission method of claim 1, wherein when determining that it is capable of decrypting the logistics information itself, the block chain-based logistics transmission method further comprises:
carrying out Hash processing on the logistics information;
and if the file obtained after the hash processing is consistent with the hash file carried in the logistics information, determining that the logistics information is not tampered.
4. A block chain-based logistics transmission device is characterized by comprising:
the judging module is used for judging whether the logistics information can be decrypted by using a private key of the current node when the current node receives the logistics information sent by the previous node, wherein the logistics information is stored in an area block generated by the previous node, and the area block comprises an encrypted area block obtained by encrypting the logistics information by using a public key of the next node of the previous node;
the determining module is used for determining the node information of the next node when determining that the determining module can decrypt the logistics information;
the determining module is specifically configured to determine that the current node can decrypt the logistics information if the current node determines that the private key of the current node can decrypt the logistics information;
a generating module, configured to generate a block according to the logistics information, the node information of the current node, and the node information of the next node;
the generating module is specifically configured to generate an initial area block according to the logistics information, the flag information of the current node, and the flag information of the next node; signing the initial region block to obtain a signature region block; encrypting the signature area block by adopting the public key of the next node to obtain an encryption area block; performing hash processing on the encryption zone block to obtain a hash file; generating the zone block body according to the encryption zone block body and the Hash file;
and the broadcasting module is used for writing the block body into a block chain as new logistics information and broadcasting the block body to all nodes where the block chain is located.
5. The block chain-based logistics transportation apparatus of claim 4, wherein the block chain-based logistics transportation method further comprises an adding module, wherein:
the adding module is used for adding timestamp information to the block after the block is generated.
6. The block chain-based logistics transportation apparatus of claim 4,
the determining module is further configured to perform hash processing on the logistics information when determining that the determining module can decrypt the logistics information; and if the file obtained after the hash processing is determined to be consistent with the hash file carried in the logistics information, determining that the logistics information is not tampered.
7. A computing device comprising a memory and a processor, wherein:
the memory to store program instructions;
the processor is used for calling the program instructions stored in the memory and executing the block chain-based logistics transmission method according to any one of claims 1 to 3 according to the obtained program.
8. A computer storage medium storing computer-executable instructions for causing a computer to perform the method for block chain based logistics transport of any one of claims 1 to 3.
CN201711462462.5A 2017-12-28 2017-12-28 Logistics transmission method and device based on block chain Active CN109981547B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711462462.5A CN109981547B (en) 2017-12-28 2017-12-28 Logistics transmission method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711462462.5A CN109981547B (en) 2017-12-28 2017-12-28 Logistics transmission method and device based on block chain

Publications (2)

Publication Number Publication Date
CN109981547A CN109981547A (en) 2019-07-05
CN109981547B true CN109981547B (en) 2022-06-07

Family

ID=67074889

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711462462.5A Active CN109981547B (en) 2017-12-28 2017-12-28 Logistics transmission method and device based on block chain

Country Status (1)

Country Link
CN (1) CN109981547B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106971288A (en) * 2017-05-31 2017-07-21 无锡井通网络科技有限公司 A kind of distributed material flow tracking method based on block chain
CN107301521A (en) * 2017-06-26 2017-10-27 深圳前海华深安信物联技术有限公司 Strengthen the method for warehouse receipt transaction security in a kind of warehouse receipt system based on block chain
CN107483198A (en) * 2017-09-25 2017-12-15 中国科学院信息工程研究所 A kind of block catenary system supervised and method
CN107516180A (en) * 2017-08-25 2017-12-26 迅鳐成都科技有限公司 A kind of system and method that storage transaction security and operating efficiency are improved based on block chain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3335367A4 (en) * 2015-08-11 2019-02-06 Stollman, Jeff System and methods to ensure asset and supply chain integrity
CN106022681A (en) * 2016-05-13 2016-10-12 杭州云象网络技术有限公司 Logistics tracking method based on block chain
CN107094155B (en) * 2017-06-14 2020-03-10 广东工业大学 Data security storage method and device based on alliance block chain
CN107181599B (en) * 2017-07-18 2020-01-21 天津理工大学 Routing position data secret storage and sharing method based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106971288A (en) * 2017-05-31 2017-07-21 无锡井通网络科技有限公司 A kind of distributed material flow tracking method based on block chain
CN107301521A (en) * 2017-06-26 2017-10-27 深圳前海华深安信物联技术有限公司 Strengthen the method for warehouse receipt transaction security in a kind of warehouse receipt system based on block chain
CN107516180A (en) * 2017-08-25 2017-12-26 迅鳐成都科技有限公司 A kind of system and method that storage transaction security and operating efficiency are improved based on block chain
CN107483198A (en) * 2017-09-25 2017-12-15 中国科学院信息工程研究所 A kind of block catenary system supervised and method

Also Published As

Publication number Publication date
CN109981547A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
KR102153845B1 (en) Verification of the integrity of data stored in the consortium blockchain using public sidechains
CN111865586B (en) Method and device for encrypting product information
CN110800250B (en) Controlled release of encrypted private keys
CN110378139B (en) Data key protection method, system, electronic equipment and storage medium
CN107077557B (en) Method and device for releasing and verifying software application program
WO2020211496A1 (en) Method, system and apparatus for verifying signature in blockchain ledger, and device
CN112866228B (en) Method and device for controlling unauthorized access of web system
US7891009B2 (en) Time data checking unit, electronic device and method for checking a time indication
US11057220B2 (en) Signature verification for a blockchain ledger
TWI835300B (en) A data matching method, device, equipment and medium
US8972732B2 (en) Offline data access using trusted hardware
US11290256B2 (en) Blockchain-based advertisement monitoring method and apparatus, and electronic device
CN110851843A (en) Data management method and device based on block chain
US20070239617A1 (en) Method and apparatus for temporarily accessing content using temporary license
CN111628863B (en) Data signature method and device, electronic equipment and storage medium
CN114172659B (en) Message transmission method, device, equipment and storage medium in block chain system
US20220045866A1 (en) Method and system for authentication seal deployment in networked immutable transactions
CN109818965B (en) Personal identity verification device and method
CN102270285A (en) Key authorization information management method and device
CN109981547B (en) Logistics transmission method and device based on block chain
CN115361198A (en) Decryption method, encryption method, device, computer equipment and storage medium
CN114238886A (en) IBE-based power grid PMU identity authentication method, device, computer equipment and medium
CN111582954B (en) False data identification method and device
CN113836538A (en) Data model processing method, device, server and storage medium
CN112465501A (en) Copyright evidence storage and infringement behavior automatic evidence collection method and system based on block chain

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