CN113556334B - Data interaction encryption method, device, equipment and storage medium based on Internet of things - Google Patents

Data interaction encryption method, device, equipment and storage medium based on Internet of things Download PDF

Info

Publication number
CN113556334B
CN113556334B CN202110795817.2A CN202110795817A CN113556334B CN 113556334 B CN113556334 B CN 113556334B CN 202110795817 A CN202110795817 A CN 202110795817A CN 113556334 B CN113556334 B CN 113556334B
Authority
CN
China
Prior art keywords
target
information
node
ciphertext
cargo
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
CN202110795817.2A
Other languages
Chinese (zh)
Other versions
CN113556334A (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.)
Shenzhen Auvn Technology Co ltd
Original Assignee
Shenzhen Auvn Technology Co ltd
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 Shenzhen Auvn Technology Co ltd filed Critical Shenzhen Auvn Technology Co ltd
Priority to CN202110795817.2A priority Critical patent/CN113556334B/en
Publication of CN113556334A publication Critical patent/CN113556334A/en
Application granted granted Critical
Publication of CN113556334B publication Critical patent/CN113556334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04L63/0442Network 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 wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a data interaction encryption method, device, equipment and storage medium based on the Internet of things, and relates to the technical field of the Internet of things. And each node in the block chain system acquires cargo information based on the Internet of things technology, and corresponding nodes are determined in the block chain system according to upstream merchants and downstream merchants corresponding to the supply chain to form a local consensus network, and the initiating node can directly perform data interaction with the target node through the consensus network, so that the cargo information of the supply chain link corresponding to the target node is directly acquired, and the acquisition efficiency of the cargo information and the reliability of the information are improved. And because the consensus network only comprises upstream merchants and downstream merchants corresponding to the supply chain, and all nodes in the block chain system are not needed to participate, the number of nodes which need to perform consensus operation on the cargo information is greatly reduced, and therefore the occupation of operation resources is reduced.

Description

Data interaction encryption method, device, equipment and storage medium based on Internet of things
Technical Field
The invention relates to the technical field of the Internet of things, in particular to a data interaction encryption method, device, equipment and storage medium based on the Internet of things.
Background
With the rapid development of the internet of things, the tracking of supply chain processes such as logistics, product production and processing and the like is becoming perfect. At present, many supply chains monitor materials, products and vehicles by adopting the internet of things technology, acquire real-time states of goods through sensors and wireless transmission technology, so as to support higher-layer internet of things real-time operation management applications, such as: inventory management, logistics management, recycle management, and the like. Tracking the entire supply chain process of the cargo becomes possible.
The inventors found in the study that the prior art has at least the following disadvantages:
1. for goods with a longer or more complex supply chain, such as raw material production and processing involving more industries, or a wide variety of raw materials, the prior art lacks an efficient means to obtain target goods information in the whole supply chain;
2. since the supply chain generally involves a plurality of merchants, in order to acquire raw material information, production processing records and other information of goods, the merchants in the supply chain can generally only transmit the goods information layer by layer through upstream and downstream merchants, and the transmission process is easy to generate information distortion and even malicious tampering.
Disclosure of Invention
The data interaction encryption method, the device, the equipment and the storage medium based on the Internet of things can efficiently acquire the reliable information of the target goods in the supply chain through the block chain system; meanwhile, the partial consensus network is formed by the nodes associated with the supply chain, so that the occupied operation resources for achieving information consensus in the block chain system are greatly reduced.
The data interaction encryption method based on the Internet of things, provided by the first embodiment of the invention, is applied to a block chain system comprising a plurality of nodes; the method comprises the following steps:
acquiring a plurality of target nodes corresponding to target cargo batches in the blockchain system;
sending communication requests to the plurality of target nodes, and acquiring a first public key returned by each target node; generating a second public key and a second private key of the initiating node;
sending public key ciphertext to each target node; the public key ciphertext sent to each target node is obtained by encrypting the second public key according to the first public key of the target node;
acquiring cargo information ciphertext sent by the plurality of target nodes, and decrypting the cargo information ciphertext according to a first public key of the target node to obtain corresponding cargo information plaintext; the cargo information ciphertext is ciphertext information obtained by encrypting cargo information corresponding to the target cargo batch on each target node according to a first private key of the target node;
obtaining an information updating plaintext according to the cargo information on the initiating node, which corresponds to the target cargo batch, and the cargo information plaintext; encrypting the information updating plaintext according to the second private key to obtain a corresponding information updating ciphertext, and sending the information updating ciphertext to a target node;
and if the target nodes are in common knowledge of the information updating ciphertext, uploading the information updating ciphertext to the block chain system.
As an improvement of the above solution, before the step of obtaining a plurality of target nodes corresponding to the target cargo lot in the blockchain system, the method further includes the steps of:
nodes in the blockchain system upload supply chain information; the supply chain information includes an association between a received cargo batch and an issued cargo batch.
As an improvement of the above solution, the step of obtaining a plurality of target nodes corresponding to a target cargo batch in the blockchain system includes the steps of:
and determining a plurality of association nodes of the target cargo batch supply chain according to the supply chain information and the target cargo batch, wherein the plurality of association nodes are used as the plurality of target nodes.
As an improvement of the above solution, the sending a communication request to the plurality of target nodes, and obtaining a first public key returned by each target node, includes the steps of:
the initiating node sends communication requests to the plurality of target nodes;
the target node generates a first public key and a first private key according to the communication request;
the target node sends the first public key to the originating node.
As an improvement of the above solution, the decrypting the cargo information ciphertext according to the first public key of the target node includes the steps of:
the initiating node queries a mapping table of the target node and the first public key, and determines the first public key of the target node corresponding to the cargo information ciphertext;
and the initiating node decrypts the cargo information ciphertext according to the determined first public key.
As an improvement of the above solution, the sending the information update ciphertext to the target node includes the steps of:
updating a plaintext according to the information, and determining a target node directly related to the plaintext; the directly related target node is a target node which sends or receives goods recorded in the information updating plaintext;
and sending the information updating ciphertext to the directly-related target node.
As an improvement of the above solution, if the plurality of target nodes upload the information update ciphertext to the blockchain system through consensus of the information update ciphertext, the method includes the steps of:
the target node decrypts the information updating ciphertext according to the second public key to obtain the information updating plaintext;
the target node verifies the information updating plaintext, sends a consensus signal to the initiating node when the verification is passed, and sends a rejection signal to the initiating node when the verification is failed; and if all the target nodes receiving the information updating plaintext send consensus signals to the initiating node, judging that the target nodes pass through the consensus of the information updating ciphertext.
The second embodiment of the invention provides a data interaction encryption device based on the Internet of things, which is applied to a block chain system comprising a plurality of nodes; comprising the following steps:
the node determining module is used for acquiring a plurality of target nodes corresponding to the target cargo batch in the blockchain system;
the key management module is used for sending communication requests to the plurality of target nodes and acquiring a first public key returned by each target node; the second public key and the second private key are also used for generating the initiating node;
the ciphertext sending module is used for sending public key ciphertext to each target node; the public key ciphertext sent to each target node is obtained by encrypting the second public key according to the first public key of the target node;
the information processing module is used for acquiring cargo information ciphertext sent by the plurality of target nodes, decrypting the cargo information ciphertext according to the first public key of the target node and acquiring corresponding cargo information plaintext; the cargo information ciphertext is ciphertext information obtained by encrypting cargo information corresponding to the target cargo batch on each target node according to a first private key of the target node;
the ciphertext sending module is also used for obtaining an information updating plaintext according to the cargo information corresponding to the target cargo batch on the initiating node and the cargo information plaintext; encrypting the information updating plaintext according to the second private key to obtain a corresponding information updating ciphertext, and sending the information updating ciphertext to a target node; and if the target nodes are in common knowledge of the information updating ciphertext, uploading the information updating ciphertext to the block chain system.
The third embodiment of the invention provides a data interaction encryption device based on the Internet of things, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the data interaction encryption method based on the Internet of things is realized when the processor executes the computer program.
A fourth embodiment of the present invention provides a computer-readable storage medium including a stored computer program; when the computer program runs, the equipment where the computer readable storage medium is located is controlled to realize the data interaction encryption method based on the Internet of things.
According to the data interaction encryption method, device, equipment and storage medium based on the Internet of things, the cargo information is obtained by each node in the blockchain system based on the Internet of things technology, corresponding nodes are determined in the blockchain system according to upstream merchants and downstream merchants corresponding to the supply chains to form a local consensus network, and the initiating node can directly conduct data interaction with the target node through the consensus network, so that the cargo information of the supply chain link corresponding to the target node is directly obtained, and the cargo information obtaining efficiency and the information reliability are improved. And because the consensus network only comprises upstream merchants and downstream merchants corresponding to the supply chain, and all nodes in the block chain system are not needed to participate, the number of nodes which need to perform consensus operation on the cargo information is greatly reduced, and therefore the occupation of operation resources is reduced.
Drawings
Fig. 1 is a schematic flow chart of a data interaction encryption method based on the internet of things according to a first embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a data interaction encryption device based on internet of things according to a second embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a data interaction encryption device based on the internet of things according to a third embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The first embodiment of the invention provides a data interaction encryption method based on the Internet of things. Referring to fig. 1, a flow chart of the data interaction encryption method is shown, and the data interaction encryption method is applied to a blockchain system including a plurality of nodes, specifically, may be executed by any one of the originating nodes, and includes steps S11 to S16.
S11, acquiring a plurality of target nodes corresponding to the target cargo batch in the blockchain system.
The correspondence between the cargo lot and the node may be uploaded to the blockchain system in advance. Accordingly, step S10 may be performed before step S11.
S10, the nodes in the block chain system upload the supply chain information. The supply chain information includes an association between a received cargo batch and an issued cargo batch.
Specifically, according to the supply chain information and the target cargo batch, a plurality of association nodes of the target cargo batch supply chain are determined, and the plurality of association nodes are used as the plurality of target nodes.
For example, assume that the current node D receives the good of lot C1, and before that, the supply chain information related to the good of lot C1 is: node a produces the shipment for lot A1 and provides lot A1 to node B; the node B takes the goods in the batch A1 as raw materials, produces the goods in the batch B1 and provides the goods to the node C; node C takes the goods of batch B1 as raw materials, produces the goods of batch C1, and provides the goods to node D. Thus, the supply chain information can be traced back to lot A1 from lot D1, including: node a sends out batch A1; node B receives batch A1 and sends out batch B1; node C receives batch B1 and issues batch C1. Thus determining node a, node B, node C associated with lot D1.
S12, sending communication requests to the target nodes, and acquiring a first public key returned by each target node. A second public key and a second private key of the originating node are generated.
Step S12 may include steps S12-1 to S12-3.
S12-1, the initiating node sends communication requests to the plurality of target nodes.
And S12-2, the target node generates a first public key and a first private key according to the communication request.
S12-3, the target node sends the first public key to the initiating node.
In connection with the above example, it may be that node D sends a communication request to node a, node B and node C. Next, the node a, the node B, and the node C generate respective first public keys and first private keys according to the communication request. Node a, node B and node C then send the respective first public keys to node D. And node D generates a second asymmetric public key set comprising a second public key Dg and a second private key Ds.
S13, sending the public key ciphertext to each target node.
The public key ciphertext sent to each target node is obtained by encrypting the second public key according to the first public key of the target node.
In combination with the above example, after the node D receives the first public key Ag of the node a and the generation of the second asymmetric public key set is completed, the first public key Ag is used to encrypt the second public key Dg to obtain a corresponding public key ciphertext, and the corresponding public key ciphertext is sent to the node a. Similarly, for node B and node C, the first public key Bg of node B and the first public key Cg of node C may be used to encrypt the second public key Dg, and send corresponding public key ciphertext.
S14, acquiring cargo information ciphertext sent by the plurality of target nodes, and decrypting the cargo information ciphertext according to the first public key of the target node to obtain corresponding cargo information plaintext.
And the cargo information ciphertext is ciphertext information obtained by encrypting cargo information corresponding to the target cargo batch on each target node according to the first private key of the target node.
Preferably, step S14 may include steps S14-1 to S14-2.
S14-1, the initiating node queries a mapping table of the target node and the first public key, and determines the first public key of the target node corresponding to the cargo information ciphertext.
S14-2, the initiating node decrypts the cargo information ciphertext according to the determined first public key.
In connection with the above example, the node D may record the corresponding information into the mapping table after receiving the first public keys of the node a, the node B and the node C, for example, record that the node a corresponds to the first public key Ag, the node B corresponds to the first public key Bg, and the node C corresponds to the first public key Cg. After receiving the cargo information ciphertext sent by the target node, for example, after receiving the cargo information ciphertext sent by the node A, determining a corresponding first public key Ag through the mapping table, and decrypting the cargo information ciphertext by adopting the first public key Ag to obtain a corresponding cargo information plaintext.
S15, obtaining an information updating plaintext according to the cargo information corresponding to the target cargo batch on the initiating node and the cargo information plaintext; encrypting the information updating plaintext according to the second private key to obtain a corresponding information updating ciphertext, and sending the information updating ciphertext to a target node.
Preferably, step S15 may include steps S15-1 to S15-2.
S15-1, updating a plaintext according to the information, and determining a target node directly related to the plaintext.
The directly related target nodes are the target nodes which send out goods or receive goods recorded in the information updating plaintext.
In combination with the above example, after the node D obtains the cargo information plaintext according to the cargo information ciphertext received from the node a, the node B, and the node C, the node D generates the information update plaintext in combination with the cargo information of the lot C1 on the node D. For example, the information update text may record d items, and at least one of a to c items, as follows.
a. Batch A1 is a raw material derived from node a.
b. Batch B1 is derived from batch A1 received by node B.
c. Batch C1 is derived from batch B1 received by node C.
d. Batch C1 was combined with the A material and the cargo of batch D1 was produced by the B process.
Wherein items a to C are directly associated with nodes A to C respectively, and the directly associated target nodes comprise node A, node B and node C under the condition that the items a to C are recorded in the information updating text; it will be appreciated that in the case where the information update plaintext does not fully record items a to C, for example, items B and C are recorded, and item a is not recorded, the directly associated nodes include node B and node C, but not node a.
S15-2, the information updating ciphertext is sent to the directly-related target node.
S16, if the target nodes are in common knowledge of the information updating ciphertext, uploading the information updating ciphertext to the blockchain system.
The judging whether the information updating ciphertext passes through the consensus or not may specifically include steps S16-1 to S16-2.
S16-1, the target node decrypts the information updating ciphertext according to the second public key to obtain the information updating plaintext.
S16-2, the target node verifies the information updating plaintext, and sends a consensus signal to the initiating node when verification is passed, and sends a rejection signal to the initiating node when verification is failed; and if all the target nodes receiving the information updating plaintext send consensus signals to the initiating node, judging that the target nodes pass through the consensus of the information updating ciphertext.
Wherein each target node may verify that the content directly associated with the node in the plain text is updated for the information. In combination with the above example, in the case where the information update plaintext includes item a, node a may be a means for verifying whether the content of item a is correct; in the case that the information update plaintext includes item B, the node B may be to verify whether the content of item B is correct; in case the information update plaintext includes item C, node C may be a verification if item C is correct. In case the verification is correct, the target node wants the originating node to send the consensus information, and in case the verification fails, a rejection signal is sent. If the information updating ciphertext fails to pass the consensus, discarding the information updating ciphertext, or modifying the information updating plaintext to generate a new information updating plaintext and re-performing the consensus verification.
According to the data interaction encryption method based on the Internet of things, the cargo information is obtained by each node in the blockchain system based on the Internet of things technology, corresponding nodes are determined in the blockchain system according to upstream merchants and downstream merchants corresponding to the supply chains to form a local consensus network, and the initiating node can directly conduct data interaction with the target node through the consensus network, so that the cargo information of the supply chain link corresponding to the target node is directly obtained, and the cargo information obtaining efficiency and the information reliability are improved. And because the consensus network only comprises upstream merchants and downstream merchants corresponding to the supply chain, and all nodes in the block chain system are not needed to participate, the number of nodes which need to perform consensus operation on the cargo information is greatly reduced, and therefore the occupation of operation resources is reduced.
The second embodiment of the invention provides a data interaction encryption device based on the Internet of things, which is applied to a blockchain system comprising a plurality of nodes. Referring to fig. 2, the data interaction encryption apparatus 200 includes:
the node determining module 210 is configured to obtain a plurality of target nodes corresponding to a target cargo batch in the blockchain system.
The key management module 220 is configured to send a communication request to the plurality of target nodes, and obtain a first public key returned by each target node; and is further configured to generate a second public key and a second private key of the originating node.
A ciphertext sending module 230 for sending the public key ciphertext to each target node; the public key ciphertext sent to each target node is obtained by encrypting the second public key according to the first public key of the target node.
The information processing module 240 is configured to obtain cargo information ciphertext sent by the plurality of target nodes, and decrypt the cargo information ciphertext according to the first public key of the target node to obtain corresponding cargo information plaintext; and the cargo information ciphertext is ciphertext information obtained by encrypting cargo information corresponding to the target cargo batch on each target node according to the first private key of the target node.
The ciphertext sending module 230 is further configured to obtain an information update plaintext according to cargo information on the initiating node, which corresponds to the target cargo batch, and the cargo information plaintext; encrypting the information updating plaintext according to the second private key to obtain a corresponding information updating ciphertext, and sending the information updating ciphertext to a target node; and if the target nodes are in common knowledge of the information updating ciphertext, uploading the information updating ciphertext to the block chain system.
The working process of the data interaction encryption device 200 is the same as that of the data interaction encryption method described in the first embodiment, and will not be described herein.
According to the data interaction encryption device based on the Internet of things, each node in the blockchain system obtains goods information based on the Internet of things technology, corresponding nodes are determined in the blockchain system according to upstream merchants and downstream merchants corresponding to the supply chains to form a local consensus network, and an initiating node can directly conduct data interaction with a target node through the consensus network, so that the goods information of a supply chain link corresponding to the target node is directly obtained, and the obtaining efficiency of the goods information and the reliability of the information are improved. And because the consensus network only comprises upstream merchants and downstream merchants corresponding to the supply chain, and all nodes in the block chain system are not needed to participate, the number of nodes which need to perform consensus operation on the cargo information is greatly reduced, and therefore the occupation of operation resources is reduced.
Referring to fig. 3, a schematic diagram of a data interaction encryption device 300 based on the internet of things according to a third embodiment of the present invention is provided. The data interaction encryption device 300 based on the internet of things comprises: a processor 310, a memory 320, and a computer program stored in the memory and executable on the processor, such as a data interaction encryption program. The steps in the data interaction encryption method embodiment based on the internet of things, for example, the steps of the data interaction encryption method shown in fig. 1, are implemented when the processor executes the computer program. Or when executing the computer program, the processor realizes the functions of the modules in the above device embodiments, for example, the functions of the modules of the data interaction encryption device based on the internet of things described in embodiment 2.
Illustratively, the computer program may be partitioned into one or more modules that are stored in the memory 320 and executed by the processor 310 to accomplish the present invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program in the data interaction encryption terminal device. For example, the node determining module, the key management module, the ciphertext sending module and the information processing module are included. The functions of each module are as follows: the node determining module is used for acquiring a plurality of target nodes corresponding to the target cargo batch in the blockchain system; the key management module is used for sending communication requests to the plurality of target nodes and acquiring a first public key returned by each target node; the second public key and the second private key are also used for generating the initiating node; the ciphertext sending module is used for sending public key ciphertext to each target node; the public key ciphertext sent to each target node is obtained by encrypting the second public key according to the first public key of the target node; the information processing module is used for acquiring cargo information ciphertext sent by the plurality of target nodes, decrypting the cargo information ciphertext according to the first public key of the target node and acquiring corresponding cargo information plaintext; the cargo information ciphertext is ciphertext information obtained by encrypting cargo information corresponding to the target cargo batch on each target node according to a first private key of the target node; the ciphertext sending module is also used for obtaining an information updating plaintext according to the cargo information corresponding to the target cargo batch on the initiating node and the cargo information plaintext; encrypting the information updating plaintext according to the second private key to obtain a corresponding information updating ciphertext, and sending the information updating ciphertext to a target node; and if the target nodes are in common knowledge of the information updating ciphertext, uploading the information updating ciphertext to the block chain system.
The data interaction encryption device 300 based on the internet of things may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The data interaction encryption device 300 based on the internet of things may include, but is not limited to, a processor and a memory. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the data interaction encryption device 300 based on the internet of things, and does not constitute a limitation of the data interaction encryption device 300 based on the internet of things, and may include more or less components than those illustrated, or may combine some components, or different components, for example, the data interaction encryption device 300 based on the internet of things may further include an input/output device, a network access device, a bus, and so on.
The processor 310 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general processor may be a microprocessor or the processor may be any conventional processor, etc., and the processor 310 is a control center of the data interaction encryption device 300 based on the internet of things, and connects various parts of the whole data interaction encryption terminal device by using various interfaces and lines.
The memory 320 may be used to store the computer program or module, and the processor 310 implements various functions of the data interactive encryption terminal device by running or executing the computer program or module stored in the memory and invoking data stored in the memory. The memory 320 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, etc.; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 320 may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
The modules or units integrated by the data interaction encryption device 300 based on the internet of things may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as independent products. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
It should be noted that the above-described apparatus embodiments are merely illustrative, and the units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the invention, the connection relation between the modules represents that the modules have communication connection, and can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
According to the third embodiment of the invention, the data interaction encryption equipment and the storage medium based on the Internet of things are provided, the goods information is obtained by each node in the blockchain system based on the Internet of things technology, and according to upstream merchants and downstream merchants corresponding to the supply chain, corresponding nodes are determined in the blockchain system to form a local consensus network, and the initiating node can directly conduct data interaction with the target node through the consensus network, so that the goods information of the supply chain link corresponding to the target node is directly obtained, and the obtaining efficiency and the reliability of the goods information are improved. And because the consensus network only comprises upstream merchants and downstream merchants corresponding to the supply chain, and all nodes in the block chain system are not needed to participate, the number of nodes which need to perform consensus operation on the cargo information is greatly reduced, and therefore the occupation of operation resources is reduced.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.

Claims (10)

1. The data interaction encryption method based on the Internet of things is characterized by being applied to a block chain system comprising a plurality of nodes; the method comprises the following steps:
acquiring a plurality of target nodes corresponding to target cargo batches in the blockchain system;
sending communication requests to the plurality of target nodes, and acquiring a first public key returned by each target node; generating a second public key and a second private key of the initiating node;
sending public key ciphertext to each target node; the public key ciphertext sent to each target node is obtained by encrypting the second public key according to the first public key of the target node;
acquiring cargo information ciphertext sent by the plurality of target nodes, and decrypting the cargo information ciphertext according to a first public key of the target node to obtain corresponding cargo information plaintext; the cargo information ciphertext is ciphertext information obtained by encrypting cargo information corresponding to the target cargo batch on each target node according to a first private key of the target node;
obtaining an information updating plaintext according to the cargo information on the initiating node, which corresponds to the target cargo batch, and the cargo information plaintext; encrypting the information updating plaintext according to the second private key to obtain a corresponding information updating ciphertext, and sending the information updating ciphertext to a target node;
and if the target nodes are in common knowledge of the information updating ciphertext, uploading the information updating ciphertext to the block chain system.
2. The method for data interaction encryption as claimed in claim 1, wherein before the step of obtaining the plurality of target nodes corresponding to the target cargo lot in the blockchain system, the method further comprises the steps of:
nodes in the blockchain system upload supply chain information; the supply chain information includes an association between a received cargo batch and an issued cargo batch.
3. The method for data interaction encryption as claimed in claim 2, wherein the step of obtaining a plurality of target nodes corresponding to the target cargo batch in the blockchain system includes the steps of:
and determining a plurality of association nodes of the target cargo batch supply chain according to the supply chain information and the target cargo batch, wherein the plurality of association nodes are used as the plurality of target nodes.
4. The method for data interaction encryption as claimed in claim 1, wherein said sending a communication request to the plurality of target nodes, obtaining the first public key returned by each target node, comprises the steps of:
the initiating node sends communication requests to the plurality of target nodes;
the target node generates a first public key and a first private key according to the communication request;
the target node sends the first public key to the originating node.
5. The data interactive encryption method according to claim 1, wherein said decrypting said cargo information ciphertext according to the first public key of the target node comprises the steps of:
the initiating node queries a mapping table of the target node and the first public key, and determines the first public key of the target node corresponding to the cargo information ciphertext;
and the initiating node decrypts the cargo information ciphertext according to the determined first public key.
6. The data interaction encryption method according to claim 1, wherein the step of transmitting the information update ciphertext to the target node includes the steps of:
updating a plaintext according to the information, and determining a target node directly related to the plaintext; the directly related target node is a target node which sends or receives goods recorded in the information updating plaintext;
and sending the information updating ciphertext to the directly-related target node.
7. The method for data interaction encryption as set forth in claim 6, wherein if the plurality of target nodes upload the information update ciphertext to the blockchain system through consensus on the information update ciphertext, comprising the steps of:
the target node decrypts the information updating ciphertext according to the second public key to obtain the information updating plaintext;
the target node verifies the information updating plaintext, sends a consensus signal to the initiating node when the verification is passed, and sends a rejection signal to the initiating node when the verification is failed; and if all the target nodes receiving the information updating plaintext send consensus signals to the initiating node, judging that the target nodes pass through the consensus of the information updating ciphertext.
8. The data interaction encryption device based on the Internet of things is characterized by being applied to a blockchain system comprising a plurality of nodes; comprising the following steps:
the node determining module is used for acquiring a plurality of target nodes corresponding to the target cargo batch in the blockchain system;
the key management module is used for sending communication requests to the plurality of target nodes and acquiring a first public key returned by each target node; the second public key and the second private key are also used for generating the initiating node;
the ciphertext sending module is used for sending public key ciphertext to each target node; the public key ciphertext sent to each target node is obtained by encrypting the second public key according to the first public key of the target node;
the information processing module is used for acquiring cargo information ciphertext sent by the plurality of target nodes, decrypting the cargo information ciphertext according to the first public key of the target node and acquiring corresponding cargo information plaintext; the cargo information ciphertext is ciphertext information obtained by encrypting cargo information corresponding to the target cargo batch on each target node according to a first private key of the target node;
the ciphertext sending module is also used for obtaining an information updating plaintext according to the cargo information corresponding to the target cargo batch on the initiating node and the cargo information plaintext; encrypting the information updating plaintext according to the second private key to obtain a corresponding information updating ciphertext, and sending the information updating ciphertext to a target node; and if the target nodes are in common knowledge of the information updating ciphertext, uploading the information updating ciphertext to the block chain system.
9. An internet of things based data interaction encryption device, comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the internet of things based data interaction encryption method according to any one of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium, wherein the computer readable storage medium comprises a stored computer program; wherein, when the computer program runs, the device where the computer readable storage medium is located is controlled to implement the data interaction encryption method based on the internet of things according to any one of claims 1 to 7.
CN202110795817.2A 2021-07-14 2021-07-14 Data interaction encryption method, device, equipment and storage medium based on Internet of things Active CN113556334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110795817.2A CN113556334B (en) 2021-07-14 2021-07-14 Data interaction encryption method, device, equipment and storage medium based on Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110795817.2A CN113556334B (en) 2021-07-14 2021-07-14 Data interaction encryption method, device, equipment and storage medium based on Internet of things

Publications (2)

Publication Number Publication Date
CN113556334A CN113556334A (en) 2021-10-26
CN113556334B true CN113556334B (en) 2023-04-28

Family

ID=78103087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110795817.2A Active CN113556334B (en) 2021-07-14 2021-07-14 Data interaction encryption method, device, equipment and storage medium based on Internet of things

Country Status (1)

Country Link
CN (1) CN113556334B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019174187A1 (en) * 2018-03-12 2019-09-19 深圳壹账通智能科技有限公司 Blockchain-based method for message communication between multiple terminals, terminal and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018115567A1 (en) * 2016-12-19 2018-06-28 Nokia Technologies Oy Method and apparatus for private data transfer between parties
US11153069B2 (en) * 2018-02-27 2021-10-19 Bank Of America Corporation Data authentication using a blockchain approach
CN109756582B (en) * 2019-03-15 2022-08-12 腾讯科技(深圳)有限公司 Information recording method, device, node and storage medium in block chain network
CN110390212B (en) * 2019-07-31 2021-09-24 中国工商银行股份有限公司 Supply monitoring method based on block chain and node device
CN112948153B (en) * 2021-05-14 2021-08-10 支付宝(杭州)信息技术有限公司 Method and device for message cross-link transmission

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019174187A1 (en) * 2018-03-12 2019-09-19 深圳壹账通智能科技有限公司 Blockchain-based method for message communication between multiple terminals, terminal and storage medium

Also Published As

Publication number Publication date
CN113556334A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
CN108470265B (en) Multi-warehouse data management method based on block chain and related equipment
CN111163130B (en) Network service system and data transmission method thereof
CN109905351B (en) Method, device, server and computer readable storage medium for storing data
CN110830581A (en) Method for improving block chain response speed, block chain application system and related equipment
CN107733882A (en) SSL certificate automatically dispose method and apparatus
CN111314172A (en) Data processing method, device and equipment based on block chain and storage medium
US20240163119A1 (en) Device management method, system, and apparatus
CN116523518A (en) Cross-channel data access method, system and storage medium based on blockchain
CN111988418A (en) Data processing method, device, equipment and computer readable storage medium
CN113722753B (en) Private data processing method, device and system based on blockchain
CN114239064A (en) Privacy calculation method and device, electronic equipment and computer readable storage medium
CN110765488A (en) Data storage and reading method and electronic equipment
CN113556334B (en) Data interaction encryption method, device, equipment and storage medium based on Internet of things
EP3972199A1 (en) Open interface management method, electronic device, and storage medium
CN111581251B (en) Digital asset query method, device and storage medium for cross-chain transaction
CN111932178A (en) Method, device, server and system for processing product logistics information
CN109859041B (en) Block chain-based fund transaction real-time updating method and system and electronic equipment
CN115174645B (en) Automobile OTA cloud interaction method and system
CN108829725B (en) Block chain user communication method, block chain user communication device, terminal equipment and storage medium
US8386452B2 (en) Data combination system and data combination method
CN114844860A (en) WeChat enterprise number processing method, device, equipment and medium
CN114143002B (en) Node data sharing system, method, device and storage medium based on Internet of things
CN113094732A (en) Certificate storage data verification method, verification device, certificate storage method and certificate storage device
CN112162923A (en) Interface testing method and device
CN110839217B (en) Addressing method, device, server and medium for mobile terminal

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