Data processing method, Internet of Things device, node, communication device and medium
Through the introduction of data processing methods between the Internet of Things equipment and the blockchain node, the current collection data and equipment side verification historical superposition information are used for packaging and verification to solve the problem of insufficient data in the traditional Internet of Things on the online chain scheme of the Internet of Things , Realize the credibility guarantee after the Internet of Things data is on chain.
Patent Information
- Application Number
- CN202310913420.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-01-28
AI Technical Summary
Traditional IoT online solutions cannot achieve data credibility guarantees that match or be close to blockchain technology itself, especially when IoT devices cannot run the blockchain node protocol stack.
Through the introduction of data processing methods between the Internet of Things equipment and the blockchain node, the current collection of data and equipment side verification historical superposition information is used for packaging and verification to ensure that the data obtains credible guarantee before the chain.
Effective prevention of loan distribution and discarding data, ensure that the Internet of Things is credible after collecting data, and enhances the reliability of data in the blockchain system.
Smart Images

Figure CN119383612A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a data processing method, an Internet of Things device, a node, a communication device and a medium. Background Art
[0002] Blockchain is a digital technology for trust transmission, but it cannot solve the problem of whether data is credible before it is uploaded to the chain. In the traditional IoT chain solution, IoT devices are used as a means of data collection. Although the collected data (possibly through devices such as IoT gateways) is eventually uploaded to the blockchain; however, since IoT devices cannot run the blockchain node protocol stack, the traditional IoT chain solution cannot achieve data credibility that matches or is close to the blockchain technology itself. For the IoT collection chain scenario, the current solution cannot achieve credibility assurance that matches or is close to the blockchain system. Summary of the invention
[0003] The present invention provides a data processing method, an Internet of Things device, a node, a communication device and a medium, so that the collected data of the Internet of Things can be guaranteed to be credible after being uploaded to the chain.
[0004] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0005] A data processing method, applied to an Internet of Things device, comprises:
[0006] Obtaining current collected data and first device-side verification history superposition information, wherein the first device-side verification history superposition information is obtained according to the verification status of the last collected data;
[0007] Encapsulating the current collected data according to the current collected data and the first device-side verification history superposition information to obtain an encapsulated data packet;
[0008] The encapsulated data packet is sent to a node on the blockchain.
[0009] Optionally, encapsulating the current collected data according to the current collected data and the first device-side verification history superposition information to obtain an encapsulated data packet includes:
[0010] Generate first device side verification information according to the current collected data and the first device side verification history superposition information;
[0011] According to the current collected data, the first device side verification history superposition information and the first device side verification information, the current collected data is encapsulated to obtain an encapsulated data packet.
[0012] Optionally, the data processing method further includes:
[0013] Receiving confirmation information fed back by the node after verifying the encapsulated data packet;
[0014] The confirmation information is parsed to obtain target information for next data collection and uplink transmission.
[0015] Optionally, the target information includes: a transaction identifier for uploading the currently collected data to a blockchain, a block identifier for storing the transaction, and second chain side verification information;
[0016] Among them, the second chain side verification information is generated according to the transaction identifier, the block identifier storing the transaction and the first chain side verification history superposition information stored by the node, and the first chain side verification history superposition information is obtained according to the last chain side verification status.
[0017] Optionally, the data processing method further includes:
[0018] Generate second device side verification information according to the transaction identifier, the block identifier storing the transaction, and the first device side verification history superposition information;
[0019] If the second device side verification information is the same as the second chain side verification information, the second device side verification history superposition information used for the next data encapsulation is generated based on the first device side verification history superposition information, the current collected data, the transaction ID, and the block ID of the transaction.
[0020] Optionally, the target information includes: a transaction identifier for uploading the currently collected data to a blockchain, a block identifier for storing the transaction, second chain side verification information, target content of the highest block on the blockchain, and third chain side verification information;
[0021] The second chain side verification information is generated according to the transaction identifier, the block identifier storing the transaction, and the first chain side verification history superposition information stored by the node;
[0022] The third chain side verification information is generated based on the target content and the first chain side verification history superposition information.
[0023] Optionally, the data processing method further includes:
[0024] Generate second device side verification information according to the transaction identifier, the block identifier storing the transaction, and the first device side verification history superposition information;
[0025] Generate third device-side verification information according to the target content and the first device-side verification history superposition information;
[0026] If the second device side verification information is the same as the second chain side verification information, and the third device side verification information is the same as the third chain side verification information, then the second device side verification history overlay information used for the next data encapsulation is generated based on the first device side verification history overlay information, the current collected data, the transaction identifier, the block identifier for saving the transaction, and the target content.
[0027] Optionally, the data processing method further includes:
[0028] The third device side verification history superposition information used for the next data encapsulation is generated according to the first device side verification history superposition information and the current collected data, and the third device side verification history superposition information is used for the encapsulation of the next collected data.
[0029] An embodiment of the present invention further provides a data processing method, which is applied to a node on a blockchain, comprising:
[0030] Receive encapsulated data packets sent by IoT devices;
[0031] Parsing the encapsulated data packet to obtain current collected data of the IoT device;
[0032] Verify the encapsulated data packet according to the current collected data and the first link side verification history superposition information saved by the node to obtain a verification result; the first link side verification history superposition information is obtained according to the last link side verification state;
[0033] If the verification result indicates that the verification is passed, the currently collected data will be put on the chain for transaction and a consensus will be reached with other nodes on the blockchain.
[0034] Optionally, after reaching a consensus with other nodes on the blockchain, the process further includes:
[0035] Generate confirmation information;
[0036] The confirmation information is sent to the IoT device.
[0037] Optionally, the encapsulated data packet is verified according to the current collected data and the first chain side verification history superposition information saved by the node to obtain a verification result, including:
[0038] Generate first chain side verification information according to the current collected data and the first chain side verification history superposition information saved by the node;
[0039] If the first chain verification information is the same as the first device side verification information, a verification result of passing the verification is obtained; otherwise, a verification result of failing the verification is obtained. The first device side verification information is generated based on the current collected data and the first device side verification history superposition information.
[0040] Optionally, generate confirmation information, including:
[0041] Obtain the transaction of the current collected data on-chain and the transaction identifier and block identifier of the transaction after reaching a consensus with other nodes of the blockchain;
[0042] Generate confirmation information based on the transaction ID and the block ID where the transaction is saved.
[0043] Optionally, generate confirmation information based on the transaction ID and the block ID where the transaction is saved, including:
[0044] Generate second-chain side verification information based on the transaction identifier, the block identifier storing the transaction, and the first-chain side verification history superposition information stored by the node;
[0045] The transaction identifier, the block identifier storing the transaction, and the second chain side verification information are encapsulated to generate confirmation information.
[0046] Optionally, generate confirmation information based on the transaction ID and the block ID where the transaction is saved, including:
[0047] Generate second-chain side verification information based on the transaction identifier, the block identifier storing the transaction, and the first-chain side verification history superposition information stored by the node;
[0048] Generate third-chain side verification information based on the target content of the highest block on the blockchain and the first-chain side verification history superposition information;
[0049] The transaction identifier, the block identifier storing the transaction, the first chain side verification history superposition information stored by the node, the target content, the second chain side verification information and the third chain side verification information are encapsulated to generate confirmation information.
[0050] Optionally, the data processing method further includes:
[0051] The second chain side verification history superposition information used for the next data encapsulation is generated based on the first chain side verification history superposition information, the current collected data obtained by analysis, the transaction identifier, the block identifier for storing the transaction, and the target content.
[0052] Optionally, the data processing method further includes:
[0053] The third chain side verification history superposition information used for the next data encapsulation is generated based on the first chain side verification history superposition information and the currently collected data. The third chain side verification history superposition information is used to verify the encapsulated data packet received next time.
[0054] An embodiment of the present invention further provides an Internet of Things device, including:
[0055] An acquisition module, for acquiring current collected data and first device-side verification history superposition information, wherein the first device-side verification history superposition information is obtained according to the verification status of the last collected data;
[0056] A processing module is used to encapsulate the current collected data according to the current collected data and the first device side verification history superposition information to obtain an encapsulated data packet; and send the encapsulated data packet to a node on the blockchain.
[0057] An embodiment of the present invention further provides a node, applied to a blockchain, the node comprising:
[0058] A transceiver module, used to receive encapsulated data packets sent by IoT devices;
[0059] A processing module is used to parse the encapsulated data packet to obtain the current collected data of the Internet of Things device; verify the encapsulated data packet according to the current collected data and the first chain side verification history superposition information saved by the node to obtain a verification result; the first chain side verification history superposition information is obtained according to the last chain side verification status; if the verification result indicates that the verification is passed, the current collected data is put on the chain for transaction, and a consensus is reached with other nodes on the blockchain.
[0060] An embodiment of the present invention further provides a communication device, comprising: a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed.
[0061] An embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above.
[0062] The above solution of the present invention includes at least the following beneficial effects:
[0063] The solution of the present invention obtains the current collected data and the first device side verification history superposition information, wherein the first device side verification history superposition information is obtained according to the verification status of the last collected data; encapsulates the current collected data according to the current collected data and the first device side verification history superposition information to obtain a packaged data packet; and sends the packaged data packet to a node on the blockchain. Based on the verification history superposition information, the current collected data of the IoT device is associated with the verification history superposition information and sent to the blockchain, which can effectively prevent problems caused by replay, discarded data, etc., and ensure the credibility of the collected data after it is uploaded to the chain. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a flow chart of a data processing method on an IoT device side according to an embodiment of the present invention;
[0065] Figure 2 It is a schematic diagram of the network system architecture between the Internet of Things device and the blockchain according to an embodiment of the present invention;
[0066] Figure 3 It is a flow chart of a data processing method on the node side of a blockchain according to an embodiment of the present invention;
[0067] Figure 4 is a schematic diagram of the flow of interaction between an IoT device and a node according to an embodiment of the present invention;
[0068] Figure 5 It is a schematic diagram of the module architecture of an Internet of Things device according to an embodiment of the present invention;
[0069] Figure 6 It is a schematic diagram of the module architecture of the node of the embodiment of the present invention. DETAILED DESCRIPTION
[0070] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0071] like Figure 1 As shown, an embodiment of the present invention provides a data processing method, which is applied to an Internet of Things device, and the method includes:
[0072] Step 11, obtaining current collected data SD d,i and first device side verification history superposition information CHA d,i, wherein the first device side verification history superposition information CHA d,i is obtained according to the verification status of the last collected data;
[0073] Step 12: encapsulate the current collected data SD d,i according to the current collected data SD d,i and the first device side verification history superposition information CHA d,i to obtain an encapsulated data packet;
[0074] Step 13, sending the encapsulated data packet to a node on the blockchain.
[0075] This embodiment of the present invention obtains the current collected data SD d,i and the first device side verification history superposition information CHA d,i), wherein the first device side verification history superposition information CHA d,i is obtained according to the verification status of the last collected data; according to the current collected data SD d,i and the first device side verification history superposition information CHA d,i, the current collected data is encapsulated to obtain an encapsulated data packet; and the encapsulated data packet is sent to the node on the blockchain. The node receives the encapsulated data packet sent by the IoT device; parses the encapsulated data packet to obtain the current collected data SD d,i of the IoT device; verifies the encapsulated data packet according to the current collected data SD d,i and the first chain side verification history superposition information B-CHA d,i saved by the node to obtain a verification result; if the verification result indicates that the verification is passed, the current collected data is put on the chain for transaction, and a consensus is formed with other nodes on the blockchain to generate confirmation information; and the confirmation information is sent to the IoT device. Based on the verification of historical superposition information, the current collected data of the IoT device is associated with the historical behavior, which can effectively prevent problems caused by replay and discarded data, and ensure the credibility of the collected data after it is uploaded to the chain.
[0076] like Figure 2 As shown, the network system used in the above embodiment of the present invention has a new "on-chain function" module on the IoT device (such as an IoT sensor), and a new "IoT adaptation function" module on the node of the blockchain system. The two new modules cooperate with each other, which shows that in the blockchain system, there may be one or more nodes (such as blockchain node 1, of course, blockchain node 2, blockchain node 3, or blockchain node 4) with a new "IoT adaptation function" module, and some nodes do not deploy the "IoT adaptation function" module.
[0077] IoT sensors collect data, and the "chain function" performs secure computing and processing of the data; the "IoT adaptation function" on the blockchain side performs supporting secure computing and processing; the data is uploaded to the blockchain to implement operations such as evidence storage.
[0078] Due to the mutual cooperation of "on-chain function" and "IoT adaptation function", the trust transmission of blockchain is extended to the IoT collection side.
[0079] In an optional embodiment of the present invention, step 12 may include:
[0080] Step 121, generating first device side verification information, namely, SIGN-1, according to the current collected data SD d,i and the first device side verification history superposition information CHA d,i;
[0081] Step 122: encapsulate the current collected data according to the current collected data SD d,i, the first device side verification history superposition information CHA d,i and the first device side verification information SIGN-1 to obtain an encapsulated data packet.
[0082] In this embodiment, in the preparation stage, the IoT device prepares the initial value of CHA on the IoT device side and the blockchain side, respectively, which is recorded as CHA d,0. The IoT device collects data SD d,i, packages it, and submits it to the blockchain side. The data packet includes at least the following contents:
[0083] (1)SD d,i, that is, the data collected this time.
[0084] (2)SIGN-1≡SIGN(CHA d,i,SD d,i);
[0085] The first device verification information SIGN-1 uses CHA d,i and SD d,i as input parameters to calculate the signature. The present invention does not limit the specific algorithm of SIGN-1. In this embodiment, the encapsulated data packet may optionally introduce other data parameters, such as the serial number of the number of acquisitions. The calculation of SIGN-1 may also introduce other input parameters, such as the serial number of the number of acquisitions.
[0086] In an optional embodiment of the present invention, the data processing method may further include:
[0087] Step 14, receiving confirmation information B-AD d,i fed back by the node after verifying the encapsulated data packet;
[0088] Step 15, parse the confirmation information to obtain target information for uplink transmission of next data collection.
[0089] In this embodiment, after receiving the encapsulated data packet sent by the IoT device, the node parses the encapsulated data packet to obtain the current collected data SD d,i and the first device side verification information;
[0090] Generate first chain side verification information according to the current collected data SD d,i and the first chain side verification history superposition information B-CHA d,i saved by the node;
[0091] If the first chain verification information is the same as the first device side verification information, a verification result of passing the verification is obtained; otherwise, a verification result of failing the verification is obtained.
[0092] In an optional example, the target information includes: a transaction identifier B-BT d,i for uploading the currently collected data to a chain, a block identifier B-BH d,i for storing the transaction, and second chain side verification information SIGN-2;
[0093] The second chain side verification information SIGN-2 is generated according to the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the first chain side verification history superposition information B-CHA d,i stored by the node.
[0094] In this embodiment, the node on the blockchain side receives the encapsulated data packet, parses the encapsulated data packet, obtains the current collected data SD d,i, and verifies it according to the locally saved B-CHA d,i to confirm that SD d,i is true and valid.
[0095] The verification method is: calculate SIGN-1 (B-CHA d,i, SD d,i. If the calculation result matches the value of SIGN-1 submitted by IoT, the verification is considered to be successful.
[0096] Furthermore, the blockchain side saves SD d,i to the blockchain and reaches a consensus among the nodes of the blockchain. The transaction ID used to save SD d,i on the chain is B-BT d,i; the block ID recording the transaction is B-BH d,i.
[0097] Furthermore, the blockchain side generates confirmation information B-AD d,i and sends it to the IoT device side.
[0098] (1) B-AD d,i content
[0099] B-AD d,i≡(B-BH d,i, B-BT d,i, other parameters optional, SIGN-2);
[0100] Among them, SIGN-2 uses B-BH d,i, B-BT d,i, B-CHA d,i, etc. as input parameters to calculate the signature. The present invention does not limit the specific algorithm of SIGN-2.
[0101] SIGN-2≡SIGN(B-BH d,i, B-BT d,i, B-CHA d,i, other parameters are optional).
[0102] In another optional embodiment of the present invention, the data processing method may further include:
[0103] Step 16, generating second device side verification information according to the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction and the first device side verification history superposition information CHA d,i;
[0104] Step 17: If the second device side verification information is the same as the second link side verification information, verify the historical superposition information CHA d,i and the current collected data SD d,i on the first device side. 、 The transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the second device side verification history superposition information CHA d,i+1 used for the next data encapsulation are generated.
[0105] In another optional embodiment, the target information includes: a transaction identifier B-BT d,i for the transaction of uploading the currently collected data to the blockchain, a block identifier B-BH d,i for storing the transaction, second chain side verification information SIGN-2, target content B-BhC i of the highest block on the blockchain, and third chain side verification information SIGN-3;
[0106] The second chain-side verification information SIGN-2 is generated according to the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the first chain-side verification history superposition information B-CHA d,i stored by the node;
[0107] The third chain side verification information is generated according to the target content B-BhC i and the first chain side verification history superposition information B-CHA d,i.
[0108] In this embodiment, the content of the confirmation information B-AD d,i may also include the content of the currently effective and highest-height block on the B-BhC i blockchain, taking the content of the block or performing some compression or hashing; accordingly, a signature calculation SIGN-3 is added, and its input parameters include B-BhC i. The present invention does not limit the signature algorithm.
[0109] B-AD d,i≡(B-BH d,i, B-BT d,i, other parameters are optional, SIGN-2, B-BhC i, SIGN-3), SIGN-3≡SIGN(B-CHA d,i, B-BhC i).
[0110] The IoT device verifies the received confirmation information B-AD d,i to confirm that the on-chain process is completed correctly (confirm whether the on-chain evidence is completed on the desired blockchain).
[0111] The verification method is: calculate SIGN-2 (B-BH d,i, B-BT d,i, CHA d,i). If the calculation result matches the received SIGN-2 value, the verification is considered to be successful.
[0112] Optionally, if B-AD d,i carries B-BhC i (the content of the currently valid and highest block on the blockchain, the content of the block is taken or compressed or hashed), then BhC i is restored from B-AD d,i, and SIGN-3 is verified to confirm whether BhC i is correct. If correct, BhC i is saved on the IoT device side.
[0113] In an optional embodiment of the present invention, the data processing method may further include:
[0114] Step 18, generating second device side verification information according to the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction and the first device side verification history superposition information CHA d,i;
[0115] Step 19, generating third device side verification information according to the target content B-BhC i and the first device side verification history superposition information CHA d,i;
[0116] Step 20: If the second device side verification information is the same as the second chain side verification information, and the third device side verification information is the same as the third chain side verification information, then verify the historical superposition information CHA d,i and the current collection data SD d,i according to the first device side verification 、 The transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the target content B-BhC i generate the second device side verification history overlay information CHA d,i+1 used for the next data encapsulation. Here, the role of the second device side verification history overlay information is the same as that of the first device side verification history overlay information.
[0117] In this embodiment, the IoT device side calculates CHA d,i+1 to prepare for the next collection and uploading to the chain. At the same time, the blockchain side also uses the same formula and the same parameters (parameters corresponding to the IoT device side) to calculate B-CHA d,i+1 to prepare for the next collection and uploading to the chain.
[0118] Calculation formula: CHA d,i+1=ALG-1(CHA d,i,SD d,i,BH d,i,BT d,i)
[0119] or ALG-1 (CHA d,i, SD d,i, BH d,i, BT d,i, BhC i);
[0120] The present invention does not limit the specific algorithm of ALG-1. For example, it can be a combination of a signature and a hash algorithm, that is: in, is a parameter vector; or
[0121] in, is the parameter vector, is the parameter vector The m components in .
[0122] In the above embodiment of the present invention, after each data submission, CHA d,i will iterate to CHA d,i+1. During a replay attack, SIGN-1 still uses the old CHA d,i value. The blockchain side will use B-CHA d,i+1, and the SIGN-1 verification will fail. Therefore, replay attacks between the IoT side and the blockchain side can be prevented. If a replay attack occurs in the uplink between the IoT side and the blockchain side, the blockchain side can detect it in time.
[0123] After the IoT side submits the uplink data packet, it needs to wait for the downlink B-AD data packet. Only after the data is successfully uploaded to the chain, the blockchain side will generate a B-AD downlink data packet, in which SIGN-2 will implicitly contain the information of B-CHA d,i on the blockchain side. If the current uplink submitted data is discarded, the IoT device side will either not receive the downlink B-AD data packet, or will find that the downlink B-AD does not match through SIGN-2. Prevent malicious data discarding between the IoT side and the blockchain side; if the uplink submitted data is maliciously discarded between the IoT side and the blockchain side, the IoT side can discover it in time.
[0124] It can also prevent individual blockchain nodes from failing or doing evil. If individual blockchain nodes fail or do evil, since multiple blockchain nodes are deployed with the "IoT adaptation function", IoT devices can try to connect to other blockchain nodes, thereby being able to: restore the chain function in the event that the original node fails; or, even if the original node has not failed, the IoT device can actively connect to other nodes in order to query the blockchain ledger again through the new node to confirm whether the blockchain node originally connected has successfully uploaded and saved the previously collected data.
[0125] In the above embodiment of the present invention, if the latest status of the corresponding relationship (d, B-CHA d,i) is recorded in the blockchain ledger and synchronized to other blockchain nodes deployed with the "IoT adaptation function" based on the blockchain consensus mechanism, the IoT device can seamlessly continue the existing verification process after switching to the new blockchain node.
[0126] In the above embodiment of the present invention, if the latest status of the corresponding relationship (d, B-CHA d,i) is not recorded in the blockchain ledger, after the IoT device switches to access the new blockchain node, a certain synchronization mechanism needs to be adopted, and then the verification process can be restarted.
[0127] In the above embodiment of the present invention, the IoT device helps the blockchain to partially restore the ledger history. If B-AD d,i carries B-BhC i (the content of the currently effective and highest-height block on the blockchain, taking the content of the block or performing some compression or hashing), the IoT device side will save BhC i.
[0128] Based on the BhC i on the IoT device side, if BhC i is the block content itself, or a compressed form of the block content but can restore the block content, it can help restore the block. When enough BhC blocks on the IoT device side are collected, a large part of the blockchain's ledger history can be restored.
[0129] If BhCi is the hash of the block content, then when other nodes submit the ledger history, BhCi on the IoT device side can be used to confirm whether the block at this height is credible. When enough BhCs on the IoT device side help verify the credibility of the relevant blocks, the credibility of a larger portion of the blocks in the blockchain ledger history can also be confirmed.
[0130] In the above embodiments of the present invention, in the process of IoT collecting data and storing it on the chain, the uplink verification mechanism is improved and the downlink verification mechanism is added, so that this collection is no longer an isolated event, but a moment in the collection history (this moment is related to other moments before and after), so as to achieve the purpose of preventing attacks such as replay and discard. Specifically:
[0131] Add the "chain function" module on the IoT device side and add the "IoT adaptation function" on one or more blockchain nodes;
[0132] After the IoT device collects the original data, the verification information is calculated (by the "on-chain function" module) based on the verification history information stored on the IoT device side and the original data collected this time, and the original data and the verification information are packaged into a data packet and submitted to the blockchain node together.
[0133] After receiving the data packet, the blockchain node splits and separates the original data and verification information (by the "IoT Adaptation Function"), and performs verification in combination with the verification history information stored on the blockchain node side. If the verification passes, the chain operation is performed.
[0134] After the chain is successfully uploaded, the blockchain node (by the "IoT adaptation function") constructs confirmation information and feeds it back to the IoT device; and updates the verification history information stored on the blockchain side.
[0135] The IoT device (by the "on-chain function" module) analyzes and determines whether the information collected and submitted this time is successful based on the confirmation information fed back by the blockchain node; if successful, the verification history information on the IoT device side is updated and saved.
[0136] In another optional embodiment, the device side may not receive the confirmation information fed back by the link side, and directly generate the verification history superposition state used for the first acquisition data encapsulation according to the previous device side verification history superposition information and the current acquisition data; therefore, the data processing method of the present invention may also include:
[0137] The third device side verification history superposition information used for the next data encapsulation is generated according to the first device side verification history superposition information and the current collected data, and the third device side verification history superposition information is used for the encapsulation of the next collected data.
[0138] In specific implementation, when updating the calculation and verification history status, there is no need to consider the transaction identifier, block identifier and other parameters on the chain.
[0139] When calculating CHA d,i+1 (i.e. updating historical overlay information), only the data collected this time is considered, without considering the transaction identifier and block identifier in the blockchain. The details are as follows:
[0140] The IoT device side calculates CHA d,i+1 to prepare for the next collection and uploading to the chain. At the same time, the blockchain side also uses the same formula and the same parameters (parameters corresponding to the IoT device side) to calculate B-CHA d,i+1 to prepare for the next collection and uploading to the chain.
[0141] Calculation formula:
[0142] CHA d,i+1=ALG-2(CHA d,i,SD d,i)
[0143] B-CHA d,i+1=ALG-2(B-CHA d,i,B-SD d,i)
[0144] The present invention does not limit the specific algorithm of ALG-2, for example, it can be a combination of a signature and a hash algorithm, that is:
[0145] in, is a parameter vector; or
[0146] in, is the parameter vector, is the parameter vector The m components in .
[0147] like Figure 3 As shown, an embodiment of the present invention further provides a data processing method, which is applied to a node on a blockchain, comprising:
[0148] Step 31, receiving an encapsulated data packet sent by an IoT device;
[0149] Step 32, parsing the encapsulated data packet to obtain the current collected data SD d,i of the IoT device;
[0150] Step 33, verifying the encapsulated data packet according to the current collected data SD d,i and the first link side verification history superposition information B-CHA d,i saved by the node, to obtain a verification result; the first link side verification history superposition information B-CHA d,i is obtained according to the last link side verification state B-CHA d,i-1;
[0151] Step 34: If the verification result indicates that the verification is passed, the currently collected data is put on the chain for transaction and a consensus is reached with other nodes on the blockchain.
[0152] Furthermore, after reaching a consensus with other nodes on the blockchain, the following may also be included:
[0153] Step 35: Generate confirmation information and send the confirmation information to the IoT device.
[0154] This embodiment of the present invention also associates the current collected data of the IoT device with the historical behavior based on the verification of historical superposition information, which can effectively prevent problems caused by replay and discarded data, and ensure the credibility of the collected data after it is uploaded to the chain.
[0155] In an optional embodiment of the present invention, step 33 may include:
[0156] Step 331, generating first chain side verification information according to the current collected data SD d,i and the first chain side verification history superposition information B-CHA d,i saved by the node;
[0157] Step 332, if the first chain verification information is the same as the first device side verification information, a verification result of passing the verification is obtained, otherwise, a verification result of failing the verification is obtained. The first device side verification information is generated based on the current collected data SD d,i and the first device side verification history superposition information CHA d,i.
[0158] In an optional embodiment of the present invention, in step 35, generating confirmation information includes:
[0159] Step 351, obtaining the transaction of the current collected data on-chain and reaching a consensus with other nodes of the blockchain, the transaction identifier B-BT d,i and the block identifier B-BH d,i storing the transaction;
[0160] Step 352: Generate confirmation information B-AD d,i according to the transaction identifier B-BT d,i and the block identifier B-BH d,i storing the transaction.
[0161] In an optional embodiment of the present invention, according to the transaction identifier B-BT d,i and the block identifier B-BH d,i storing the transaction, the confirmation information B-AD d,i is generated, including:
[0162] Step 3521, generating second chain side verification information according to the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the first chain side verification history superposition information B-CHA d,i stored by the node;
[0163] Step 3522: encapsulate the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the second chain side verification information SIGN-2 to generate confirmation information.
[0164] In another optional embodiment of the present invention, according to the transaction identifier B-BT d,i and the block identifier B-BH d,i storing the transaction, the confirmation information B-AD d,i is generated, including:
[0165] Step 3523, generating second chain side verification information according to the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the first chain side verification history superposition information B-CHA d,i stored by the node;
[0166] Step 3524, generating third chain side verification information according to the target content B-BhC i of the highest block on the blockchain and the first chain side verification history superposition information B-CHA d,i;
[0167] Step 3525, encapsulate the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, the first chain side verification history overlay information B-CHA d,i stored by the node, the target content B-BhC i, the second chain side verification information and the third chain side verification information to generate confirmation information.
[0168] In an optional embodiment of the present invention, the data processing method may further include:
[0169] Step 36: verify the historical overlay information B-CHA d,i on the first link side and analyze the current collected data B-SD d,i 、The transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the target content B-BhC i generate the second chain side verification history overlay information B-CHA d,i+1 used for the next data encapsulation. Here, the second chain side verification history overlay information is the same as the first chain side verification history overlay information.
[0170] like Figure 4 As shown, it is the specific implementation process of the above embodiment of the present invention:
[0171] Step 40, in the preparatory stage, the initial value of CHA is prepared on the IoT device side and the blockchain side, respectively, and is denoted as CHA d,0.
[0172] Steps 41-43, the IoT device collects data SD d,i, packages it, and submits it to the blockchain side.
[0173] The data packet includes at least the following contents:
[0174] (1)SD d,i, / / the data collected this time.
[0175] (2)SIGN-1≡SIGN(CHA d,i,SD d,i).
[0176] SIGN-1 uses CHA d,i and SD d,i as input parameters to calculate the signature. The present invention does not limit the specific algorithm of SIGN-1.
[0177] Optionally, the data packet may also introduce other data parameters, such as a sequence number of acquisition times, etc.
[0178] Optionally, SIGN-Formula 1 may also introduce other input parameters, such as a sequence number of acquisition times, etc.
[0179] Step 44: The blockchain side receives SD d,i and verifies it based on the locally saved B-CHA d,i to confirm that SD d,i is authentic and valid.
[0180] The verification method is: calculate SIGN-1 (B-CHA d,i, SD d,i). If the calculation result matches the value of SIGN-1 submitted by IoT, the verification is considered to be successful.
[0181] Steps 45-46: The blockchain side saves SD d,i to the blockchain and reaches a consensus among the nodes of the blockchain.
[0182] The transaction ID used to save SD d,i on the chain is B-BT d,i; the block ID recording the transaction is B-BH d,i.
[0183] Steps 47-48: The blockchain generates confirmation information B-AD d,i and sends it to the IoT device.
[0184] (1) B-AD d,i content
[0185] B-AD d,i≡(B-BH d,i, B-BT d,i, other parameters optional, SIGN-2);
[0186] SIGN-2 uses B-BH d,i, B-BT d,i, B-CHA d,i, etc. as input parameters to calculate the signature. The present invention does not limit the specific algorithm of SIGN-2.
[0187] SIGN-2≡SIGN(B-BH d,i, B-BT d,i, B-CHA d,i, other parameters are optional).
[0188] (2) The content of B-AD d,i may also include B-BhC i (the content of the currently effective and highest-level block on the blockchain, the content of the block is taken or compressed or hashed in some way); accordingly, a signature calculation SIGN-3 is added, and its input parameters include B-BhC i. The present invention does not limit the signature algorithm.
[0189] B-AD d,i≡(B-BH d,i, B-BT d,i, other parameters optional, SIGN-2, B-BhC i, SIGN-3);
[0190] SIGN-3≡SIGN(B-CHA d,i,B-BhC i).
[0191] Step 49: The IoT device verifies the received B-AD d,i to confirm that the on-chain process is completed correctly (confirm whether the on-chain evidence is completed on the desired blockchain).
[0192] The verification method is: calculate SIGN-2 (B-BH d,i, B-BT d,i, CHA d,i). If the calculation result matches the received SIGN-2 value, the verification is considered to be successful.
[0193] Optionally, if B-AD d,i carries B-BhC i (the content of the currently valid and highest-height block on the blockchain, taking the content of the block or performing some compression or hashing), BhC i is restored from B-AD d,i, and SIGN-3 is verified to confirm whether BhC i is correct. If correct, BhC i is saved on the IoT device side.
[0194] Step 410: The IoT device side calculates CHA d,i+1 to prepare for the next collection and uploading to the chain. At the same time, the blockchain side also uses the same formula and the same parameters (parameters corresponding to the IoT device side) to calculate B-CHA d,i+1 to prepare for the next collection and uploading to the chain.
[0195] Calculation formula:
[0196] CHA d,i+1=ALG-1(CHA d,i,SD d,i,BH d,i,BT d,i);
[0197] or ALG-1 (CHA d,i, SD d,i, BH d,i, BT d,i, BhC i);
[0198] B-CHA d,i+1=ALG-1(B-CHA d,i,B-SD d,i,B-BH d,i,B-BT d,i) or ALG-1(B-CHAd,i,B-SD d,i,B-BH d,i,B-BT d,i,B-BhC i);
[0199] The present invention does not limit the specific algorithm of ALG-1. For example, it can be a combination of a signature and a hash algorithm, that is:
[0200] in, is a parameter vector; or,
[0201] in, is the parameter vector, is the parameter vector The m components in .
[0202] Step 412: When the IoT side waits for the next collection, jump to step 1. When the blockchain side waits for the next collection data submission, jump to step 44.
[0203] In the above-mentioned embodiment of the present invention, the IoT device side needs to maintain relevant data: the blockchain, the access addresses of all blockchain nodes that support IoT adaptation.
[0204] BhC i: After the IoT device d collects data and successfully uploads it to the chain, and the blockchain sends the confirmation AD, the content of the block with the highest height that is effective at that time, or the compression or hashing of the blockchain content. Corresponds to B-BhC i on the blockchain side.
[0205] The blockchain node side needs to maintain relevant data: the latest status of the corresponding relationship (d, B-CHA d,i) can be recorded in the blockchain ledger so that it can be synchronized to other blockchain nodes deployed with the "IoT adaptation function" based on the blockchain consensus mechanism.
[0206] B-BhC i: After the IoT device d collects data and successfully uploads it to the chain, and the blockchain sends the confirmation AD, the content of the block with the highest height that is effective at that time, or the compression or hashing of the blockchain content. Corresponds to BhC i on the IoT device side.
[0207] In the above embodiment of the present invention, downlink confirmation information is constructed.
[0208] B-AD d,i≡(B-BH d,i, B-BT d,i, other parameters optional, SIGN-2);
[0209] SIGN-2≡SIGN(B-BH d,i, B-BT d,i, B-CHA d,i, other parameters are optional).
[0210] In the above embodiment of the present invention, in the process of updating the verification history information on the blockchain node side, in the ALG-1 algorithm, the content of B-AD d,i can also include B-BhC i (the content of the currently effective and highest-level block on the blockchain, taking the content of the block or performing some compression or hashing); accordingly, a signature calculation SIGN-3 is added, and its input parameters include B-BhC i.
[0211] B-AD d,i≡(B-BH d,i, B-BT d,i, other parameters optional, SIGN-2, B-AD d,i, SIGN-3);
[0212] SIGN-2 unchanged;
[0213] SIGN-3≡SIGN(B-CHA d,i,B-BhC i).
[0214] In the above embodiment of the present invention, (1) the latest state of the corresponding relationship (d, B-CHA d,i) can be recorded in the blockchain account book so as to be synchronized to other blockchain nodes that have deployed the "IoT adaptation function" based on the blockchain consensus mechanism. IoT devices can access other blockchain nodes (that have deployed the "IoT adaptation function") to confirm whether the data they have collected and submitted has been successfully uploaded to the blockchain and included in the blockchain account book; or when the original blockchain node is unavailable, switch to other available blockchain nodes, and continue to implement the original credibility verification capability after switching.
[0215] (2) If the latest status of the corresponding relationship (d, B-CHA d,i) is recorded in the blockchain ledger and synchronized to other blockchain nodes deployed with the "IoT adaptation function" based on the blockchain consensus mechanism, the IoT device can seamlessly continue the existing verification process after switching to the new blockchain node.
[0216] (3) If the latest status of the corresponding relationship (d, B-CHA d,i) is not recorded in the blockchain ledger, after the IoT device switches to a new blockchain node, a synchronization mechanism needs to be adopted, and then the verification process can be restarted.
[0217] Similarly, in another optional embodiment, the link side may not feed back confirmation information, and directly generate verification history superposition information used for verifying the encapsulated data packet based on the previous link side verification history superposition information and the current collected data; therefore, the data processing method of the present invention may also include:
[0218] The third chain side verification history superposition information used for the next data encapsulation is generated based on the first chain side verification history superposition information and the currently collected data. The third chain side verification history superposition information is used to verify the encapsulated data packet received next time.
[0219] In specific implementation, when updating the calculation and verification history status, there is no need to consider the transaction identifier, block identifier and other parameters on the chain.
[0220] When calculating CHA d,i+1 (i.e. updating historical overlay information), only the data collected this time is considered, without considering the transaction identifier and block identifier in the blockchain. The details are as follows:
[0221] The IoT device side calculates CHA d,i+1 to prepare for the next collection and uploading to the chain. At the same time, the blockchain side also uses the same formula and the same parameters (parameters corresponding to the IoT device side) to calculate B-CHA d,i+1 to prepare for the next collection and uploading to the chain.
[0222] Calculation formula:
[0223] CHA d,i+1=ALG-2(CHA d,i,SD d,i)
[0224] B-CHAd,i+1=ALG-2(B-CHAd,i,B-SD d,i)
[0225] The present invention does not limit the specific algorithm of ALG-2, for example, it can be a combination of a signature and a hash algorithm, that is:
[0226] in, is a parameter vector; or
[0227] in, is the parameter vector, is the parameter vector The m components in .
[0228] like Figure 5 As shown, an embodiment of the present invention further provides an Internet of Things device 50, including:
[0229] An acquisition module 51 is used to obtain current collected data and first device-side verification history superposition information, where the first device-side verification history superposition information is obtained based on the verification status of the last collected data;
[0230] The processing module 52 is used to encapsulate the current collected data according to the current collected data and the first device side verification history superposition information to obtain an encapsulated data packet; and send the encapsulated data packet to the node on the blockchain.
[0231] Optionally, encapsulating the current collected data according to the current collected data and the first device side verification history superposition information to obtain an encapsulated data packet includes:
[0232] Generate first device side verification information according to the current collected data and the first device side verification history superposition information;
[0233] According to the current collected data, the first device side verification history superposition information and the first device side verification information, the current collected data is encapsulated to obtain an encapsulated data packet.
[0234] Optionally, the processing module 52 is further configured to receive confirmation information fed back by the node after verifying that the encapsulated data packet is successful;
[0235] The confirmation information is parsed to obtain target information for next data collection and uplink transmission.
[0236] Optionally, the target information includes: a transaction identifier B-BT d,i for the transaction of uploading the currently collected data to the blockchain, a block identifier for storing the transaction, and second chain side verification information;
[0237] Among them, the second chain side verification information is generated according to the transaction identifier, the block identifier storing the transaction and the first chain side verification history superposition information stored by the node, and the first chain side verification history superposition information is obtained according to the last chain side verification status.
[0238] Optionally, the processing module 52 is further configured to generate second device side verification information according to the transaction identifier, the block identifier storing the transaction and the first device side verification history superposition information;
[0239] If the second device side verification information is the same as the second chain side verification information, the second device side verification history overlay information used for the next data encapsulation is generated based on the first device side verification history overlay information, the currently collected data, the transaction ID, and the block ID that stores the transaction.
[0240] Optionally, the target information includes: a transaction identifier for uploading the currently collected data to a blockchain, a block identifier for storing the transaction, second chain side verification information, target content of the highest block on the blockchain, and third chain side verification information;
[0241] The second chain side verification information is generated according to the transaction identifier, the block identifier storing the transaction, and the first chain side verification history superposition information stored by the node;
[0242] The third chain side verification information is generated based on the target content and the first chain side verification history superposition information.
[0243] Optionally, the processing module 52 is further configured to generate second device side verification information according to the transaction identifier, the block identifier storing the transaction and the first device side verification history superposition information;
[0244] Generate third device-side verification information according to the target content and the first device-side verification history superposition information;
[0245] If the second device side verification information is the same as the second chain side verification information, and the third device side verification information is the same as the third chain side verification information, then the first device side verification history superposition information, current collection data 、 The transaction identifier, the block identifier and the target content storing the transaction are used to generate the second device side verification history overlay information used for the next data encapsulation.
[0246] Optionally, the processing module 52 is also used to generate third device side verification history superposition information used for next data encapsulation based on the first device side verification history superposition information and current collected data, and the third device side verification history superposition information is used for encapsulation of next collected data.
[0247] like Figure 6 As shown, an embodiment of the present invention further provides a node 60, which is applied to a blockchain, and the node includes:
[0248] The transceiver module 61 is used to receive the encapsulated data packets sent by the IoT device;
[0249] The processing module 62 is used to parse the encapsulated data packet to obtain the current collected data of the IoT device; verify the encapsulated data packet according to the current collected data and the first chain side verification history superposition information saved by the node to obtain a verification result; the first chain side verification history superposition information is obtained based on the last chain side verification status; if the verification result indicates that the verification is passed, the current collected data is put on the chain for transaction, and a consensus is reached with other nodes on the blockchain.
[0250] Optionally, the processing module 62 is further used to generate confirmation information;
[0251] The transceiver module 61 is further configured to send the confirmation information to the IoT device.
[0252] Optionally, the encapsulated data packet is verified according to the current collected data and the first chain side verification history superposition information saved by the node to obtain a verification result, including:
[0253] Generate first chain side verification information according to the current collected data and the first chain side verification history superposition information saved by the node;
[0254] If the first chain verification information is the same as the first device side verification information, a verification result of passing the verification is obtained; otherwise, a verification result of failing the verification is obtained. The first device side verification information is generated based on the current collected data and the first device side verification history superposition information.
[0255] Optionally, generate confirmation information, including:
[0256] Obtain the transaction of the current collected data on-chain and the transaction identifier and block identifier of the transaction after reaching a consensus with other nodes of the blockchain;
[0257] Generate confirmation information based on the transaction ID and the block ID that stores the transaction.
[0258] Optionally, based on the transaction identifier and the block identifier storing the transaction, generate confirmation information, including:
[0259] Generate second-chain-side verification information according to the transaction identifier, the block identifier storing the transaction, and the first-chain-side verification history superposition information stored by the node;
[0260] The transaction identifier, the block identifier storing the transaction, and the second chain side verification information are encapsulated to generate confirmation information.
[0261] Optionally, based on the transaction identifier and the block identifier storing the transaction, generate confirmation information, including:
[0262] Generate second-chain-side verification information according to the transaction identifier, the block identifier storing the transaction, and the first-chain-side verification history superposition information stored by the node;
[0263] Generate third-chain side verification information based on the target content of the highest block on the blockchain and the first-chain side verification history superposition information;
[0264] The transaction identifier, the block identifier storing the transaction, the first chain side verification history superposition information stored by the node, the target content, the second chain side verification information and the third chain side verification information are encapsulated to generate confirmation information.
[0265] Optionally, the processing module 62 is also used to generate the second chain side verification history overlay information used for the next data encapsulation based on the first chain side verification history overlay information, the parsed current collected data, the transaction identifier, the block identifier and the target content storing the transaction.
[0266] Optionally, the processing module 62 is also used to generate third link side verification history overlay information used for the next data encapsulation based on the first link side verification history overlay information and the currently collected data, and the third link side verification history overlay information is used to verify the encapsulated data packet received next time.
[0267] It should be noted that the node can be any node on the blockchain, and at least one node of the blockchain can have the above-mentioned transceiver module and processing module. The node is a node corresponding to the above-mentioned method applied to the node side. All implementation methods in the above-mentioned method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0268] The embodiment of the present invention further provides a communication device, comprising: a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0269] The embodiment of the present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.
[0270] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0271] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0272] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0273] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0274] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0275] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0276] In addition, it should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
[0277] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.
[0278] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A data processing method, characterized in that: Applied to an IoT device, the method comprises: Obtaining current collected data and first device-side verification history superposition information, wherein the first device-side verification history superposition information is obtained according to the verification status of the last collected data; Encapsulating the current collected data according to the current collected data and the first device-side verification history superposition information to obtain an encapsulated data packet; The encapsulated data packet is sent to a node on the blockchain.
2. The data processing method according to claim 1, characterized in that: According to the current collected data and the first device-side verification history superposition information, the current collected data is encapsulated to obtain an encapsulated data packet, including: Generate first device side verification information according to the current collected data and the first device side verification history superposition information; According to the current collected data, the first device side verification history superposition information and the first device side verification information, the current collected data is encapsulated to obtain an encapsulated data packet.
3. The data processing method according to claim 2, characterized in that: Also includes: Receiving confirmation information fed back by the node after verifying the encapsulated data packet; The confirmation information is parsed to obtain target information for next data collection and uplink transmission.
4. The data processing method according to claim 3, characterized in that: The target information includes: a transaction identifier for uploading the currently collected data to the blockchain, a block identifier for storing the transaction, and second chain side verification information; Among them, the second chain side verification information is generated according to the transaction identifier, the block identifier storing the transaction and the first chain side verification history superposition information stored by the node, and the first chain side verification history superposition information is obtained according to the last chain side verification status.
5. The data processing method according to claim 4, characterized in that: Also includes: Generate second device side verification information according to the transaction identifier, the block identifier storing the transaction, and the first device side verification history superposition information; If the second device side verification information is the same as the second chain side verification information, the first device side verifies the historical superposition information and the current collection data. 、 The transaction identifier and the block identifier storing the transaction are used to generate the second device side verification history overlay information used for the next data encapsulation.
6. The data processing method according to claim 3, characterized in that: The target information includes: a transaction identifier for uploading the currently collected data to the blockchain, a block identifier for storing the transaction, second-chain side verification information, target content of the highest-height block on the blockchain, and third-chain side verification information; The second chain side verification information is generated according to the transaction identifier, the block identifier storing the transaction, and the first chain side verification history superposition information stored by the node; The third chain side verification information is generated based on the target content and the first chain side verification history superposition information.
7. The data processing method according to claim 6, characterized in that: Also includes: Generate second device side verification information according to the transaction identifier, the block identifier storing the transaction, and the first device side verification history superposition information; Generate third device-side verification information according to the target content and the first device-side verification history superposition information; If the second device side verification information is the same as the second chain side verification information, and the third device side verification information is the same as the third chain side verification information, then the first device side verification history superposition information, current collection data 、 The transaction identifier, the block identifier and the target content of the saved transaction are used to generate the second device side verification history overlay information used for the next data encapsulation.
8. The data processing method according to claim 1, characterized in that: Also includes: The third device side verification history superposition information used for the next data encapsulation is generated according to the first device side verification history superposition information and the current collected data, and the third device side verification history superposition information is used for the encapsulation of the next collected data.
9. A data processing method, characterized in that: Nodes used in blockchain include: Receive encapsulated data packets sent by IoT devices; Parsing the encapsulated data packet to obtain current collected data of the IoT device; Verify the encapsulated data packet according to the current collected data and the first link side verification history superposition information saved by the node to obtain a verification result; the first link side verification history superposition information is obtained according to the last link side verification state; If the verification result indicates that the verification is passed, the currently collected data will be put on the chain for transaction and a consensus will be reached with other nodes on the blockchain.
10. The data processing method according to claim 9, characterized in that: After reaching consensus with other nodes on the blockchain, it also includes: Generate confirmation information; The confirmation information is sent to the IoT device.
11. The data processing method according to claim 9 or 10, characterized in that: According to the currently collected data and the first-chain side verification history superposition information saved by the node, the encapsulated data packet is verified to obtain a verification result, including: Generate first chain side verification information according to the current collected data and the first chain side verification history superposition information saved by the node; If the first chain verification information is the same as the first device side verification information, a verification result of passing the verification is obtained; otherwise, a verification result of failing the verification is obtained. The first device side verification information is generated based on the current collected data and the first device side verification history superposition information.
12. The data processing method according to claim 10, characterized in that: Generates confirmation information, including: Obtain the transaction of the current collected data on-chain and the transaction identifier and block identifier of the transaction after reaching a consensus with other nodes of the blockchain; Confirmation information is generated according to the transaction identifier and the block identifier storing the transaction.
13. The data processing method according to claim 12, characterized in that: Generate confirmation information based on the transaction identifier and the block identifier storing the transaction, including: Generate second chain side verification information according to the transaction identifier, the block identifier storing the transaction, and the first chain side verification history superposition information stored by the node; The transaction identifier, the block identifier storing the transaction, and the second chain side verification information are encapsulated to generate confirmation information.
14. The data processing method according to claim 12, characterized in that: Generate confirmation information based on the transaction identifier and the block identifier storing the transaction, including: Generate second chain side verification information according to the transaction identifier, the block identifier storing the transaction, and the first chain side verification history superposition information stored by the node; Generate third-chain side verification information based on the target content of the highest block on the blockchain and the first-chain side verification history superposition information; The transaction identifier, the block identifier storing the transaction, the first chain side verification history superposition information stored by the node, the target content, the second chain side verification information and the third chain side verification information are encapsulated to generate confirmation information.
15. The data processing method according to claim 12, characterized in that: Also includes: According to the first chain side verification history superposition information, the current collection data obtained by analysis 、 The transaction identifier, the block identifier that stores the transaction, and the target content generate the second-chain side verification history overlay information used for the next data encapsulation.
16. The data processing method according to claim 9, characterized in that: Also includes: The third chain side verification history superposition information used for the next data encapsulation is generated based on the first chain side verification history superposition information and the currently collected data. The third chain side verification history superposition information is used to verify the encapsulated data packet received next time.
17. An Internet of Things device, characterized in that: include: An acquisition module, for acquiring current collected data and first device-side verification history superposition information, wherein the first device-side verification history superposition information is obtained according to the verification status of the last collected data; The processing module is used to encapsulate the current collected data according to the current collected data and the historical superposition information of the first device side verification to obtain an encapsulated data packet; and send the encapsulated data packet to a node on the blockchain.
18. A node, characterized in that: Applied to blockchain, the nodes include: A transceiver module, used to receive encapsulated data packets sent by IoT devices; A processing module is used to parse the encapsulated data packet to obtain the current collected data of the Internet of Things device; verify the encapsulated data packet according to the current collected data and the first chain side verification history superposition information saved by the node to obtain a verification result; the first chain side verification history superposition information is obtained according to the last chain side verification status; if the verification result indicates that the verification is passed, the current collected data is put on the chain for transaction, and a consensus is reached with other nodes on the blockchain.
19. A communication device, characterized in that: include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 8 or the method according to any one of claims 9 to 16 is executed.
20. A computer-readable storage medium, characterized in that: The storage device comprises a storage device and a storage device. When the storage device is executed on a computer, the storage device causes the computer to execute the method according to any one of claims 1 to 8 or the method according to any one of claims 9 to 16.