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 verification information of the confidentence of the Internet of Things is used to verify the data collection data of the Internet of Things, which solves the problem of insufficient data credibility in the traditional scheme. Belief guarantee.
Patent Information
- Application Number
- PCT/CN2024/107182
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-25
- Filing Date
- 2024-07-24
- Publication Date
- 2025-01-30
AI Technical Summary
Traditional IoT online solutions cannot achieve data credibility that matches or is close to blockchain technology itself, especially when IoT devices cannot run blockchain node protocol stacks.
The data processing method is introduced between the Internet of Things equipment and the blockchain node, the current collection data and the equipment side verification historical superposition information generate information to generate verification information, and it is encapsulated in the data packet to the blockchain node for verification.
After the IoT collection data is collected, the credibility guarantees are available, and the problems such as replacement and discarding data are prevented, and the integrity and reliability of data in transmission and storage procedures are ensured.
Smart Images

Figure CN2024107182_30012025_PF_FP_ABST
Abstract
Description
Data processing method, Internet of Things device, node, communication device and medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202310913420.8 filed in China on July 25, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure 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
[0004] Blockchain is a digital technology for trust transfer, but it doesn't address the question of whether data is trustworthy before it's uploaded to the blockchain. Traditional IoT blockchain solutions use IoT devices as a means of data collection. While the collected data (possibly through devices like IoT gateways) is ultimately uploaded to the blockchain, because IoT devices can't run the blockchain node protocol stack, traditional IoT blockchain solutions can't achieve data trustworthiness that matches or even approaches that of blockchain technology itself. For IoT data collection and blockchain scenarios, current solutions can't achieve the same level of trustworthiness as blockchain systems.
[0005] Summary of the Invention
[0006] The present disclosure 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 trusted after being uploaded to the chain.
[0007] To solve the above technical problems, the technical solutions disclosed in this disclosure are as follows:
[0008] A data processing method, applied to an Internet of Things device, comprising:
[0009] Obtaining currently collected data and first device-side verification history superposition information, where the first device-side verification history superposition information is obtained based on a verification status of the last collected data;
[0010] Encapsulating the currently collected data according to the currently collected data and the first device-side verification history superposition information to obtain an encapsulated data packet;
[0011] The encapsulated data packet is sent to a node on the blockchain.
[0012] 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:
[0013] Generate first device-side verification information based on the currently collected data and the first device-side verification history superposition information;
[0014] The currently collected data is encapsulated according to the currently collected data, the first device side verification history superposition information, and the first device side verification information to obtain an encapsulated data packet.
[0015] Optionally, the data processing method further includes:
[0016] Receiving confirmation information fed back by the node after verifying the encapsulated data packet;
[0017] The confirmation information is parsed to obtain target information for next data collection and uplink transmission.
[0018] Optionally, 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;
[0019] The second chain-side verification information is generated based on 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 based on the last chain-side verification status.
[0020] Optionally, the data processing method further includes:
[0021] Generate second-device-side verification information based on the transaction identifier, the block identifier storing the transaction, and the first-device-side verification history overlay information;
[0022] 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 of the transaction storage.
[0023] Optionally, the target information includes: a transaction identifier for uploading the currently collected data to the blockchain, an identifier of a block storing the transaction, second-chain side verification information, target content of the highest-height block on the blockchain, and third-chain side verification information;
[0024] The second chain side verification information is generated based on the transaction identifier, the block identifier storing the transaction, and the first chain side verification history superposition information stored by the node;
[0025] The third chain side verification information is generated based on the target content and the first chain side verification history superposition information.
[0026] Optionally, the data processing method further includes:
[0027] Generate second-device-side verification information based on the transaction identifier, the block identifier storing the transaction, and the first-device-side verification history overlay information;
[0028] generating third device-side verification information based on the target content and the first device-side verification history superposition information;
[0029] 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 of the transaction storage, and the target content.
[0030] Optionally, the data processing method further includes:
[0031] The third device side verification history superposition information used for the next data encapsulation is generated based on the first device side verification history superposition information and the current collected data. The third device side verification history superposition information is used for the encapsulation of the next collected data.
[0032] The embodiments of the present disclosure further provide a data processing method, which is applied to a node on a blockchain, comprising:
[0033] Receive encapsulated data packets sent by IoT devices;
[0034] Parsing the encapsulated data packet to obtain the current collected data of the IoT device;
[0035] Verifying the encapsulated data packet based on the currently collected data and the first link-side verification history superposition information stored by the node to obtain a verification result; the first link-side verification history superposition information is obtained based on the previous link-side verification status;
[0036] 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.
[0037] Optionally, after reaching a consensus with other nodes on the blockchain, the process further includes:
[0038] Generate confirmation information;
[0039] The confirmation information is sent to the IoT device.
[0040] Optionally, verifying the encapsulated data packet according to the currently collected data and the first-chain side verification history superposition information saved by the node to obtain a verification result includes:
[0041] Generate first chain-side verification information based on the currently collected data and the first chain-side verification history superposition information saved by the node;
[0042] If the first chain verification information is the same as the first device side verification information, a verification result of verification passing is obtained; otherwise, a verification result of verification failing 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.
[0043] Optionally, generate confirmation information, including:
[0044] Obtain the transaction identifier of the current collected data on-chain transaction and reach a consensus with other nodes of the blockchain, as well as the block identifier of the transaction;
[0045] Generate confirmation information based on the transaction ID and the block ID where the transaction is saved.
[0046] Optionally, based on the transaction ID and the block ID where the transaction is saved, generate confirmation information, including:
[0047] Generate second-chain verification information based on the transaction identifier, the block identifier storing the transaction, and the first-chain verification history superposition information stored by the node;
[0048] The transaction identifier, the block identifier storing the transaction, and the second chain side verification information are encapsulated to generate confirmation information.
[0049] Optionally, based on the transaction ID and the block ID where the transaction is saved, generate confirmation information, including:
[0050] Generate second-chain verification information based on the transaction identifier, the block identifier storing the transaction, and the first-chain verification history superposition information stored by the node;
[0051] Generate third-chain verification information based on the target content of the highest-height block on the blockchain and the first-chain verification history superposition information;
[0052] 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.
[0053] Optionally, the data processing method further includes:
[0054] 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 saving the transaction, and the target content.
[0055] Optionally, the data processing method further includes:
[0056] Based on the first link side verification history superposition information and the currently collected data, the third link side verification history superposition information used for the next data encapsulation is generated. The third link side verification history superposition information is used to verify the encapsulated data packet received next time.
[0057] An embodiment of the present disclosure further provides an Internet of Things device, including:
[0058] an obtaining module for obtaining current collected data and first device-side verification history superposition information, wherein the first device-side verification history superposition information is obtained based on the verification status of the last collected data;
[0059] 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 the node on the blockchain.
[0060] An embodiment of the present disclosure further provides a node, applied to a blockchain, comprising:
[0061] The transceiver module is used to receive encapsulated data packets sent by IoT devices;
[0062] 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 based on 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 previous 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.
[0063] An embodiment of the present disclosure further provides a communication device, including: a processor and a memory storing a computer program, wherein the computer program executes the method described above when executed by the processor.
[0064] An embodiment of the present disclosure further provides a computer-readable storage medium storing instructions, which, when executed on a computer, causes the computer to execute the method described above.
[0065] The above solution of the present disclosure includes at least the following beneficial effects:
[0066] The disclosed solution obtains currently collected data and first-device side verification history overlay information, where the first-device side verification history overlay information is obtained based on the verification status of the last collected data; encapsulates the currently collected data based on the current collected data and the first-device side verification history overlay information to obtain an encapsulated data packet; and sends the encapsulated data packet to a node on the blockchain. Based on the verification history overlay information, the currently collected data of the IoT device is associated with the verification history overlay information and sent to the blockchain. This effectively prevents problems such as replay and data discard, ensuring the credibility of the collected data after it is uploaded to the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] FIG1 is a flow chart of a data processing method on an IoT device side according to an embodiment of the present disclosure;
[0068] FIG2 is a schematic diagram of the network system architecture between the IoT device and the blockchain according to an embodiment of the present disclosure;
[0069] FIG3 is a flow chart of a data processing method on a node side of a blockchain according to an embodiment of the present disclosure;
[0070] FIG4 is a schematic diagram of a flow chart of interaction between an IoT device and a node according to an embodiment of the present disclosure;
[0071] FIG5 is a schematic diagram of a module architecture of an IoT device according to an embodiment of the present disclosure;
[0072] FIG6 is a schematic diagram of a module architecture of a node according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0073] 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 disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0074] As shown in FIG1 , an embodiment of the present disclosure provides a data processing method applied to an IoT device, the method comprising:
[0075] Step 11: Obtain current collected data SD d,i and first device-side verification history overlay information CHA d,i, where the first device-side verification history overlay information CHA d,i is obtained based on the verification status of the last collected data;
[0076] Step 12: encapsulate the current collected data SD d,i according to the current collected data and the first device side verification history superposition information CHA d,i to obtain an encapsulated data packet;
[0077] Step 13: Send the encapsulated data packet to a node on the blockchain.
[0078] It should be noted that the above SD d,i and CHA d,i are both variable names, where "SD" represents sampled data, CHA represents checksum accumulated information, and i represents the i-th collection.
[0079] This embodiment of the present disclosure obtains current collected data SD d,i and first device-side verification history overlay information CHA d,i, which is obtained based on the verification status of the last collected data; encapsulates the current collected data based on the current collected data SD d,i and the first device-side verification history overlay information CHA d,i to obtain an encapsulated data packet; and sends the encapsulated data packet to a 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 based on the current collected data SD d,i and the first chain-side verification history overlay information B-CHA d,i stored by the node to obtain a verification result; if the verification result indicates that the verification is passed, the current collected data is uploaded to the blockchain for transaction, and consensus is reached 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 IoT devices is associated with 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.
[0080] It should be noted that the B-CHA is a variable representing the Blockchain-maintained Checksum Accumulated (BCAC) value stored at the blockchain node. Under normal circumstances, the B-CHA value at the blockchain node should be the same as the CHA value on the IoT device side.
[0081] As shown in Figure 2, the network system used in the above-mentioned embodiments of the present disclosure includes a new "on-chain function" module on the IoT device side (such as an IoT (Internet of Things) sensor), and a new "IoT adaptation function" module on the blockchain system node side. These two new modules work together, indicating that in a blockchain system, one or more nodes (such as blockchain node 1, which could also be blockchain node 2, blockchain node 3, or blockchain node 4) may have the "IoT adaptation function" module installed, while some nodes may not have the "IoT adaptation function" module deployed.
[0082] IoT sensors collect data, and the "on-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.
[0083] Due to the mutual cooperation of the "on-chain function" and the "IoT adaptation function", the trust transmission of the blockchain is extended to the IoT collection side.
[0084] In an optional embodiment of the present disclosure, step 12 may include:
[0085] Step 121 : Generate first device-side verification information, namely, SIGN-1, based on the current collected data SD d,i and the first device-side verification history superposition information CHA d,i;
[0086] 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.
[0087] The above SIGN-1 is a variable indicating a signature value.
[0088] In this embodiment, during the preparatory phase, the IoT device prepares an initial value for CHA, denoted as CHA d,0, on both the IoT device and blockchain. The IoT device collects data SD d,i, packages it, and submits it to the blockchain. The data package includes at least the following:
[0089] (1) SD d,i, the data collected this time.
[0090] (2)SIGN-1≡SIGN(CHA d,i,SD d,i);
[0091] The formula symbol “≡” indicates “defined as” and “SIGN()” indicates a function for calculating a digital signature.
[0092] The first device verification information, SIGN-1, uses CHA d,i and SD d,i as input parameters to calculate the signature. This disclosure does not limit the specific algorithm for SIGN-1. In this embodiment, the encapsulated data packet may optionally include other data parameters, such as a sequence number indicating the number of acquisitions. The calculation of SIGN-1 may also include other input parameters, such as a sequence number indicating the number of acquisitions.
[0093] In an optional embodiment of the present disclosure, the data processing method may further include:
[0094] Step 14: receiving confirmation information B-AD d,i fed back by the node after verifying that the encapsulated data packet is successful;
[0095] Step 15: parse the confirmation information to obtain target information for next data collection and uplink transmission.
[0096] 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;
[0097] 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;
[0098] 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.
[0099] In an optional embodiment, the target information includes: a transaction identifier B-BT d,i for uploading the currently collected data to the blockchain, a block identifier B-BH d,i for storing the transaction, and second chain-side verification information SIGN-2;
[0100] The second chain-side verification information SIGN-2 is generated based on 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.
[0101] It should be noted that the above B-BT d,i and B-BH d,i are variables, "B-BT" represents the blockchain transaction identifier (Blockchain-maintained Blockchain Transaction ID) maintained by the blockchain node, and "B-BH" represents the block identifier (Blockchain-maintained Blockchain Header ID) on the blockchain maintained by the blockchain node.
[0102] 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 based on the locally saved B-CHA d,i to confirm that SD d,i is authentic and valid.
[0103] The verification method is: calculate SIGN-1 = SIGN(B-CHA d,i,SD d,i). If the calculation result matches the SIGN-1 value submitted by IoT, the verification is considered to have passed.
[0104] Furthermore, the blockchain saves SD d,i to the blockchain and reaches consensus among all blockchain nodes. The transaction ID used to save SD d,i on the blockchain is B-BT d,i; the block ID recording this transaction is B-BH d,i.
[0105] Furthermore, the blockchain side generates confirmation information B-AD d,i and sends it to the IoT device side.
[0106] (1) B-AD d,i content
[0107] B-AD d,i ≡ (B-BH d,i, B-BT d,i, other parameters optional, SIGN-2);
[0108] 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. This disclosure does not limit the specific algorithm of SIGN-2.
[0109] SIGN-2≡SIGN(B-BH d,i, B-BT d,i, B-CHA d,i, other parameters are optional).
[0110] It should be noted that the above B-AD d,i is a variable whose value is a tuple composed of elements such as B-BH and B-BT. "B-AD" represents the response data packet (Blockchain-maintained Acknowledgement Datapacket) on the blockchain node side.
[0111] The above SIGN-2 is a variable used here to indicate a signature value.
[0112] The formula symbol “≡” indicates “defined as” and “SIGN()” indicates a function for calculating a digital signature.
[0113] In another optional embodiment of the present disclosure, the data processing method may further include:
[0114] Step 16: Generate second device-side verification information based on the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the first device-side verification history overlay information CHA d,i;
[0115] Step 17: If the second device-side verification information is the same as the second chain-side verification information, generate the second device-side verification history overlay information CHA d,i+1 for the next data encapsulation based on the first device-side verification history overlay information CHA d,i, the currently collected data SD d,i, the transaction identifier B-BT d,i, and the block identifier B-BH d,i storing the transaction.
[0116] In another optional embodiment, the target information includes: a transaction identifier B-BT d,i for 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;
[0117] The second chain-side verification information SIGN-2 is generated based on 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;
[0118] The third chain-side verification information is generated based on the target content B-BhC i and the first chain-side verification history superposition information B-CHA d,i.
[0119] In this embodiment, the content of the confirmation information B-AD d,i may also include the content of the currently effective, highest-height block on the B-BhC i blockchain. The block content may be taken or compressed or hashed. Accordingly, a signature calculation SIGN-3 is added, whose input parameters include B-BhC i. This disclosure does not limit the signature algorithm.
[0120] B-AD d,i≡(B-BH d,i, B-BT d,i, other parameters optional, SIGN-2, B-BhC i, SIGN-3),
[0121] SIGN-3≡SIGN(B-CHA d,i,B-BhC i).
[0122] The above SIGN-3 is a variable, indicating the signature value.
[0123] The formula symbol “≡” indicates “defined as” and “SIGN()” indicates a function for calculating a digital signature.
[0124] 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).
[0125] The verification method is: calculate SIGN-2 = SIGN(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.
[0126] Optionally, if B-AD d,i carries B-BhC i (the content of the currently valid and highest-height block on the blockchain, which is obtained by taking the block content 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.
[0127] It should be noted that the above B-BhC is a variable name, which represents the content of the highest height block maintained by the blockchain side (Blockchain-maintained Block-of-the-highest Content).
[0128] In an optional embodiment of the present disclosure, the data processing method may further include:
[0129] Step 18: Generate second device-side verification information based on the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the first device-side verification history overlay information CHA d,i;
[0130] Step 19: Generate third device-side verification information based on the target content B-BhC i and the first device-side verification history superposition information CHA d,i;
[0131] 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 generate the second device-side verification history overlay information CHA d,i+1 for the next data encapsulation based on the first device-side verification history overlay information CHA d,i, the currently collected data 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. Here, the function of the second device-side verification history overlay information is the same as that of the first device-side verification history overlay information.
[0132] In this embodiment, the IoT device calculates CHA d,i+1 to prepare for the next collection and on-chain upload. Simultaneously, the blockchain also calculates B-CHA d,i+1 using the same formula and parameters (corresponding to those on the IoT device) to prepare for the next collection and on-chain upload.
[0133] Calculation formula: CHA d,i+1=ALG-1(CHA d,i,SD d,i,BH d,i,BT d,i)
[0134] or ALG-1 (CHA d,i, SD d,i, BH d,i, BT d,i, BhC i);
[0135] ALG-1() represents an algorithm, and this disclosure 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
[0136] in, is the parameter vector, which refers to the tuple of all parameters, is the parameter vector The m components in , that is, taking out m parameters from the set of all parameters.
[0137] In the above-described embodiment of the present disclosure, after each data submission, CHA d,i iterates to CHA d,i+1. In the event of a replay attack, SIGN-1 will continue to use the old CHA d,i value. However, the blockchain will use B-CHA d,i+1, causing SIGN-1 verification to fail. This prevents replay attacks between the IoT and blockchain. If an upstream replay attack occurs between the IoT and blockchain, the blockchain will be able to detect it promptly.
[0138] After the IoT submits an uplink data packet, it waits for a downlink B-AD packet. Only after the data is successfully uploaded will the blockchain generate a B-AD downlink data packet, where the SIGN-2 contains the blockchain's B-CHA d,i information. If the uplink data is discarded, the IoT device will either not receive the downlink B-AD packet or detect a mismatch in the downlink B-AD through SIGN-2. This prevents malicious data discard between the IoT and blockchain. If malicious uplink data is discarded between the IoT and blockchain, the IoT device will be able to detect it promptly.
[0139] 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 saved the previously collected data on the chain.
[0140] In the above-mentioned embodiment of the present disclosure, 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, then after the IoT device switches to access the new blockchain node, the existing verification process can be seamlessly continued.
[0141] In the above embodiment of the present disclosure, 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 a new blockchain node, a certain synchronization mechanism needs to be adopted before the verification process can be restarted.
[0142] In the above-mentioned embodiment of the present disclosure, the IoT device helps the blockchain 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 kind of compression or hashing), the IoT device side will save BhC i.
[0143] Based on the BhC i on the IoT device side, if the BhC i is the block content itself, or a compressed form of the block content that can be restored, 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.
[0144] If BhC i is a hash of the block content, then when other nodes submit ledger history, BhC i on the IoT device can be used to confirm the authenticity of the block at that height. When enough BhCs on IoT devices help verify the authenticity of the relevant blocks, the authenticity of a large portion of the blocks in the blockchain ledger history can also be confirmed.
[0145] In the above-mentioned embodiments of the present disclosure, during the process of IoT data collection and on-chain storage, the uplink verification mechanism is improved and the downlink verification mechanism is added, so that the current collection is no longer an isolated event, but a moment in the collection history process (and this moment is connected to other moments before and after), so as to achieve the purpose of preventing attacks such as replay and discard. Specifically:
[0146] Add the "on-chain function" module to the IoT device side and add the "IoT adaptation function" to one or more blockchain nodes;
[0147] 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.
[0148] After receiving the data packet, the blockchain node (via the IoT Adaptor function) splits and separates the original data and verification information, and performs a verification calculation based on the verification history information stored on the blockchain node. If the verification passes, the data is uploaded to the blockchain.
[0149] 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.
[0150] The IoT device (controlled 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.
[0151] 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 packaging based on the previous device side verification history superposition information and the current acquisition data; therefore, the data processing method of the present disclosure may further include:
[0152] The third device side verification history superposition information used for the next data encapsulation is generated based on the first device side verification history superposition information and the current collected data. The third device side verification history superposition information is used for the encapsulation of the next collected data.
[0153] In specific implementation, when updating the calculation and verification history status, there is no need to consider parameters such as the transaction identifier and block identifier on the chain.
[0154] When calculating CHA d,i+1 (i.e., when 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:
[0155] The IoT device calculates CHA d,i+1 to prepare for the next collection and on-chain. Simultaneously, the blockchain calculates B-CHA d,i+1 using the same formula and parameters (corresponding to those on the IoT device) to prepare for the next collection and on-chain.
[0156] Calculation formula:
[0157] CHA d,i+1=ALG-2(CHA d,i,SD d,i)
[0158] B-CHA d,i+1=ALG-2(B-CHA d,i,B-SD d,i)
[0159] ALG-2() represents a certain algorithm. The present disclosure 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:
[0160] in, is a parameter vector; or
[0161] in, is the parameter vector, is the parameter vector The m components in .
[0162] In the above formula It can be understood as the parameter vector First calculate the hash value, and then calculate the signature value based on the hash value calculation result;
[0163] It can be understood as the parameter vector (all parameters), take out m parameters; and for the parameter vector First calculate the hash value, then calculate the signature value for the hash value calculation result; finally, combine the m parameters and the calculated signature value into a tuple as the final result.
[0164] As shown in FIG3 , an embodiment of the present disclosure further provides a data processing method applied to a node on a blockchain, comprising:
[0165] Step 31, receiving the encapsulated data packet sent by the IoT device;
[0166] Step 32: Parse the encapsulated data packet to obtain the current collected data SD d,i of the IoT device;
[0167] Step 33: Verify the encapsulated data packet based on the currently collected data SD d,i and the first link-side verification history overlay information B-CHA d,i stored by the node to obtain a verification result; the first link-side verification history overlay information B-CHA d,i is obtained based on the previous link-side verification state B-CHA d,i-1;
[0168] 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.
[0169] Furthermore, after reaching a consensus with other nodes on the blockchain, the following steps may also be included:
[0170] Step 35: Generate confirmation information and send the confirmation information to the IoT device.
[0171] This embodiment of the present disclosure also associates the current collected data of the IoT device with 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.
[0172] In an optional embodiment of the present disclosure, step 33 may include:
[0173] Step 331: Generate first chain-side verification information based on the current collected data SD d,i and the first chain-side verification history overlay information B-CHA d,i saved by the node;
[0174] 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.
[0175] In an optional embodiment of the present disclosure, in step 35, generating confirmation information includes:
[0176] Step 351: Obtain the transaction identifier B-BT d,i after the current collected data is uploaded to the blockchain and reaches a consensus with other nodes in the blockchain, and the identifier B-BH d,i of the block storing the transaction;
[0177] 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 where the transaction is stored.
[0178] In an optional embodiment of the present disclosure, based on the transaction identifier B-BT d,i and the block identifier B-BH d,i storing the transaction, confirmation information B-AD d,i is generated, including:
[0179] Step 3521: Generate second-chain verification information based on the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the first-chain verification history overlay information B-CHA d,i stored by the node.
[0180] 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.
[0181] In another optional embodiment of the present disclosure, based on the transaction identifier B-BT d,i and the block identifier B-BH d,i storing the transaction, confirmation information B-AD d,i is generated, including:
[0182] Step 3523: Generate second-chain verification information based on the transaction identifier B-BT d,i, the block identifier B-BH d,i storing the transaction, and the first-chain verification history overlay information B-CHA d,i stored by the node.
[0183] Step 3524: Generate third-chain verification information based on the target content B-BhC i of the highest-height block on the blockchain and the first-chain verification history overlay information B-CHA d,i;
[0184] 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.
[0185] In an optional embodiment of the present disclosure, the data processing method may further include:
[0186] Step 36: Generate the second chain-side verification history overlay information B-CHA d,i+1 for the next data encapsulation based on the first chain-side verification history overlay information B-CHA d,i, the parsed 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. Here, the second chain-side verification history overlay information is the same as the first chain-side verification history overlay information.
[0187] As shown in FIG4 , this is a specific implementation process of the above embodiment of the present disclosure:
[0188] Step 40: In the preparation phase, the initial value of CHA is prepared on the IoT device side and the blockchain side, respectively, and is denoted as CHA d,0.
[0189] Steps 41-43: The IoT device collects data SD d,i, packages it, and submits it to the blockchain.
[0190] The data packet includes at least the following contents:
[0191] (1)SD d,i, / / is the data collected this time.
[0192] (2)SIGN-1≡SIGN(CHA d,i,SD d,i).
[0193] SIGN-1 uses CHA d,i and SD d,i as input parameters to calculate the signature. This disclosure does not limit the specific algorithm of SIGN-1.
[0194] Optionally, the data packet may also introduce other data parameters, such as a sequence number of acquisition times, etc.
[0195] Optionally, the SIGN formula 1 may also introduce other input parameters, such as a sequence number of acquisition times.
[0196] 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.
[0197] The verification method is to calculate SIGN-1 (B-CHA d,i, SD d,i). If the calculation result matches the SIGN-1 value submitted by IoT, the verification is considered passed.
[0198] Steps 45-46: The blockchain side saves SD d,i to the blockchain and reaches a consensus among the nodes of the blockchain.
[0199] The transaction ID used to save SD d,i on the chain is B-BT d,i; the block ID recording this transaction is B-BH d,i.
[0200] Steps 47-48: The blockchain generates confirmation information B-AD d,i and sends it to the IoT device.
[0201] (1) B-AD d,i content
[0202] B-AD d,i ≡ (B-BH d,i, B-BT d,i, other parameters optional, SIGN-2);
[0203] SIGN-2 uses B-BH d,i, B-BT d,i, B-CHA d,i, etc. as input parameters to calculate the signature. This disclosure does not limit the specific algorithm of SIGN-2.
[0204] SIGN-2≡SIGN(B-BH d,i, B-BT d,i, B-CHA d,i, other parameters are optional).
[0205] (2) The content of B-AD d,i may also include B-BhC i (the content of the currently valid and highest-level block on the blockchain, which may be obtained by taking the content of the block or performing some compression or hashing). Accordingly, a signature calculation SIGN-3 is added, whose input parameters include B-BhC i. This disclosure does not limit the signature algorithm.
[0206] B-AD d,i ≡ (B-BH d,i, B-BT d,i, other optional parameters, SIGN-2, B-BhC i, SIGN-3);
[0207] SIGN-3≡SIGN(B-CHA d,i,B-BhC i).
[0208] 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).
[0209] The verification method is: calculate SIGN-2 = SIGN(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.
[0210] Optionally, if B-AD d,i carries B-BhC i (the content of the currently valid and highest-height block on the blockchain, which is obtained by taking the block content 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.
[0211] In step 410, the IoT device calculates CHA d,i+1 to prepare for the next data collection and on-chain upload. Simultaneously, the blockchain calculates B-CHA d,i+1 using the same formula and parameters (corresponding to those on the IoT device) to prepare for the next data collection and on-chain upload.
[0212] Calculation formula:
[0213] CHA d,i+1=ALG-1(CHA d,i,SD d,i,BH d,i,BT d,i);
[0214] or ALG-1 (CHA d,i, SD d,i, BH d,i, BT d,i, BhC i);
[0215] 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-CHA d,i,B-SD d,i,B-BH d,i,B-BT d,i,B-BhC i);
[0216] This disclosure does not limit the specific algorithm of ALG-1. For example, it can be a combination of a signature and a hash algorithm, namely:
[0217] in, is a parameter vector; or,
[0218] in, is the parameter vector, is the parameter vector The m components in .
[0219] Step 412: When the IoT side waits for the next collection, it jumps to step 1. When the blockchain side waits for the next collection data submission, it jumps to step 44.
[0220] In the above embodiments of the present disclosure, the IoT device side needs to maintain relevant data: the blockchain, and the access addresses of all blockchain nodes that support IoT adaptation.
[0221] BhC i: When IoT device d collects data and successfully uploads it to the blockchain, and the blockchain issues a confirmation AD, the content of the highest-level block in effect at that time, or the compressed or hashed version of the blockchain content. Corresponds to B-BhC i on the blockchain side.
[0222] 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.
[0223] B-BhC i: When IoT device d collects data and successfully uploads it to the blockchain, and the blockchain issues a confirmation AD, the content of the highest-level block in effect at that time, or the compressed or hashed version of the blockchain content. Corresponds to BhC i on the IoT device side.
[0224] In the above embodiment of the present disclosure, downlink confirmation information is constructed.
[0225] B-AD d,i ≡ (B-BH d,i, B-BT d,i, other parameters optional, SIGN-2);
[0226] SIGN-2≡SIGN(B-BH d,i, B-BT d,i, B-CHA d,i, other parameters are optional).
[0227] In the above-mentioned embodiments of the present disclosure, in the process of updating verification history information on the blockchain node side, in the ALG-1 algorithm, 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 some compression or hash is performed); accordingly, a signature calculation SIGN-3 is added, and its input parameters include B-BhC i.
[0228] B-AD d,i ≡ (B-BH d,i, B-BT d,i, other optional parameters, SIGN-2, B-AD d,i, SIGN-3);
[0229] SIGN-2 remains unchanged;
[0230] SIGN-3≡SIGN(B-CHA d,i,B-BhC i).
[0231] In the above-mentioned embodiments of the present disclosure, (1) the latest status of the corresponding relationship (d, B-CHA d, i) can be recorded in the blockchain ledger so as to be synchronized to other blockchain nodes that have deployed the "IoT adaptation function" based on the blockchain consensus mechanism. The IoT device can access other blockchain nodes (that have deployed the "IoT adaptation function") to confirm whether the data it has collected and submitted has been successfully uploaded to the blockchain and recorded in the blockchain ledger; or when the original blockchain node is unavailable, it can switch to another available blockchain node and continue to implement the original credibility verification capability after the switch.
[0232] (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.
[0233] (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 the verification process can be restarted.
[0234] 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 disclosure may further include:
[0235] Based on the first link side verification history superposition information and the currently collected data, the third link side verification history superposition information used for the next data encapsulation is generated. The third link side verification history superposition information is used to verify the encapsulated data packet received next time.
[0236] In specific implementation, when updating the calculation and verification history status, there is no need to consider parameters such as the transaction identifier and block identifier on the chain.
[0237] When calculating CHA d,i+1 (i.e., when 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:
[0238] The IoT device calculates CHA d,i+1 to prepare for the next collection and on-chain. Simultaneously, the blockchain calculates B-CHA d,i+1 using the same formula and parameters (corresponding to those on the IoT device) to prepare for the next collection and on-chain.
[0239] Calculation formula:
[0240] CHA d,i+1=ALG-2(CHA d,i,SD d,i)
[0241] B-CHA d,i+1=ALG-2(B-CHA d,i,B-SD d,i)
[0242] This disclosure does not limit the specific algorithm of ALG-2. For example, it can be a combination of a signature and a hash algorithm, namely:
[0243] in, is a parameter vector; or
[0244] in, is the parameter vector, is the parameter vector The m components in .
[0245] As shown in FIG5 , an embodiment of the present disclosure further provides an Internet of Things device 50, including:
[0246] An acquisition module 51 is configured to obtain currently 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;
[0247] 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.
[0248] 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:
[0249] Generate first device-side verification information based on the currently collected data and the first device-side verification history superposition information;
[0250] The currently collected data is encapsulated according to the currently collected data, the first device side verification history superposition information and the first device side verification information to obtain an encapsulated data packet.
[0251] 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;
[0252] The confirmation information is parsed to obtain target information for next data collection and uplink transmission.
[0253] Optionally, the target information includes: a transaction identifier B-BT d,i for uploading the currently collected data to the blockchain, a block identifier for storing the transaction, and second-chain side verification information;
[0254] The second chain-side verification information is generated based on 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 based on the last chain-side verification status.
[0255] Optionally, the processing module 52 is further configured to generate second device-side verification information based on the transaction identifier, the block identifier storing the transaction, and the first device-side verification history overlay information;
[0256] 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.
[0257] Optionally, the target information includes: a transaction identifier for uploading the currently collected data to the blockchain, an identifier of a block storing the transaction, second-chain side verification information, target content of the highest-height block on the blockchain, and third-chain side verification information;
[0258] The second chain-side verification information is generated based on the transaction identifier, the block identifier storing the transaction, and the first chain-side verification history superposition information stored by the node;
[0259] The third chain side verification information is generated based on the target content and the first chain side verification history superposition information.
[0260] Optionally, the processing module 52 is further configured to generate second device-side verification information based on the transaction identifier, the block identifier storing the transaction, and the first device-side verification history overlay information;
[0261] generating third device-side verification information based on the target content and the first device-side verification history superposition information;
[0262] 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 and the target content storing the transaction.
[0263] Optionally, the processing module 52 is also used to generate third device side verification history superposition information used for next data packaging based on 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 packaging the next collected data.
[0264] As shown in FIG6 , an embodiment of the present disclosure further provides a node 60 applied to a blockchain, the node comprising:
[0265] The transceiver module 61 is used to receive encapsulated data packets sent by the IoT device;
[0266] Processing module 62 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 based on 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 previous 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.
[0267] Optionally, the processing module 62 is further configured to generate confirmation information;
[0268] The transceiver module 61 is further configured to send the confirmation information to the IoT device.
[0269] Optionally, verifying the encapsulated data packet according to the currently collected data and the first-chain side verification history superposition information saved by the node to obtain a verification result includes:
[0270] Generate first chain-side verification information based on the currently collected data and the first chain-side verification history superposition information saved by the node;
[0271] If the first chain verification information is the same as the first device side verification information, a verification result of verification passing is obtained; otherwise, a verification result of verification failing 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.
[0272] Optionally, generate confirmation information, including:
[0273] Obtain the transaction identifier of the current collected data on-chain transaction and reach a consensus with other nodes of the blockchain, as well as the block identifier of the transaction;
[0274] Generate confirmation information based on the transaction ID and the block ID that stores the transaction.
[0275] Optionally, based on the transaction identifier and the block identifier storing the transaction, confirmation information is generated, including:
[0276] Generate second-chain verification information based on the transaction identifier, the block identifier storing the transaction, and the first-chain verification history superposition information stored by the node;
[0277] The transaction identifier, the block identifier storing the transaction, and the second chain side verification information are encapsulated to generate confirmation information.
[0278] Optionally, based on the transaction identifier and the block identifier storing the transaction, confirmation information is generated, including:
[0279] Generate second-chain verification information based on the transaction identifier, the block identifier storing the transaction, and the first-chain verification history superposition information stored by the node;
[0280] Generate third-chain verification information based on the target content of the highest-height block on the blockchain and the first-chain verification history superposition information;
[0281] 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.
[0282] Optionally, the processing module 62 is also used to generate the second chain side verification history overlay information used for the next data packaging based on the first chain side verification history overlay information, the current collected data obtained by analysis, the transaction identifier, the block identifier and the target content storing the transaction.
[0283] 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.
[0284] 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 the 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.
[0285] The present disclosure also provides a communication device comprising: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, executes the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0286] The embodiments of the present disclosure further provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to execute the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.
[0287] 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. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0288] Those skilled in the art will 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.
[0289] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, 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.
[0290] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0291] In addition, each functional unit in each embodiment of the present disclosure 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.
[0292] 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 disclosure, 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, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0293] 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 will be 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.
[0294] Therefore, the purpose of the present disclosure 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-purpose device. Therefore, the purpose of the present disclosure can also be achieved simply by providing a program product containing program code that implements the method or device. That is to say, such a program product also constitutes the present disclosure, and the storage medium storing such a program product also constitutes the present disclosure. 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 disclosure, 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 disclosure. 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 do not necessarily need to be performed in chronological order. Certain steps can be performed in parallel or independently of each other.
[0295] The above is a preferred embodiment of the present disclosure. 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 described in the present disclosure. These improvements and modifications should also be regarded as the scope of protection of the present disclosure.
Claims
1. A data processing method, applied to an Internet of Things device, comprising: 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, wherein: 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, further comprising: 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, wherein: 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, further comprising: 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 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.
6. The data processing method according to claim 3, wherein: 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, further comprising: Generate a second Device-side verification 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 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.
8. The data processing method according to claim 1, further comprising: 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, applied to a node on a blockchain, the method comprising: 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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, wherein: 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, further comprising: 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.
16. The data processing method according to claim 9, further comprising: 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, comprising: 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, applied to a blockchain, comprising: A transceiver module, used to receive encapsulated data packets sent by IoT devices; A processing module, used to parse the encapsulated data packet to obtain the current collected data of the IoT device; 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; 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 comprising: 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 for storing instructions, which, when executed on a computer, enables 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.
Citation Information
Patent Citations
Data processing method, data processing device and storage medium
CN110400142A
Method and system for realizing credibility of data calculation in block chain
CN111539033A
Approval information processing method and device based on block chain
CN112712452A
Aerial work vehicle with improved working range
KR1020240050739A