Cross-block-chain Internet of Things data detection method, device and equipment and medium
By integrating the verification results of different testing agencies through cross-chain transmission protocols and intelligent evaluation systems, the problem of fragmented test results caused by the lack of interoperability of blockchain systems is solved, and the reliability and efficiency of cross-chain data transmission and test results are improved.
Patent Information
- Application Number
- CN202510821539.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-05
AI Technical Summary
The blockchain systems of different testing agencies are not interoperable, resulting in the problem of fragmented testing results between different departments.
Real-time dynamic IoT data is stored in the target blockchain network layer through a cross-chain transmission protocol, and data synchronization is achieved using a dynamic hash algorithm between the main chain and the sub-chain. The verification results of different testing agencies are integrated through an intelligent evaluation system to obtain the target detection results.
It realizes cross-chain data transmission, shields the differences in the underlying blockchain, and improves the reliability and efficiency of detection results.
Smart Images

Figure CN120602173A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a cross-blockchain Internet of Things data detection method, device, equipment and medium. Background Art
[0002] Blockchain is a decentralized, tamper-proof, and secure distributed ledger. It combines distributed storage, peer-to-peer transmission, consensus mechanisms, and cryptography to record transactions and information through a continuously growing chain of blocks, ensuring data security and transparency. Blockchain's hallmarks include decentralization, immutability, transparency, security, and programmability. Each data block is linked to the previous one, forming a continuous chain that safeguards the integrity of transaction history.
[0003] Currently, when using blockchain to test data, the blockchain systems of different testing institutions are not interoperable, resulting in fragmented test results between different departments. Therefore, how to aggregate test results across different departments across the blockchain has become a technical challenge that needs to be solved. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a cross-blockchain IoT data detection method, device, equipment, and medium. The specific solution is as follows:
[0005] In the first aspect, the present application provides a cross-blockchain IoT data detection method, which is applied to the blockchain network layer, including:
[0006] Obtain target compressed data obtained by compressing real-time dynamic IoT data using a preset data interface; wherein the real-time dynamic IoT data is a set of continuous data in time series collected by a preset IoT data collection device; the blockchain network layer is composed of a main chain and sub-chains, the main chain is used to store data, the sub-chains are used to detect data, and data synchronization is achieved between the main chain and each sub-chain using a dynamic hash algorithm;
[0007] Decompress the target compressed data, determine the data verification rules corresponding to the real-time dynamic IoT data obtained after decompression based on the local smart contract library, and perform preliminary verification on the real-time dynamic IoT data using the local detection mechanisms corresponding to each sub-chain and the data verification rules to obtain a corresponding preliminary verification result;
[0008] Each of the preliminary verification results is sent to an intelligent evaluation system so that the intelligent evaluation system receives each of the preliminary verification results, uses each of the preliminary verification results to detect the real-time dynamic Internet of Things data, and obtains the target detection result corresponding to the real-time dynamic Internet of Things data; wherein, the intelligent evaluation system is a data analysis system built based on artificial intelligence technology.
[0009] Optionally, the process of compressing the real-time dynamic IoT data by the preset data interface includes:
[0010] Determine a sampling interval corresponding to the preset IoT data collection device, obtain timestamps corresponding to the real-time dynamic IoT data, and record an absolute value of a timestamp corresponding to a first timestamp of the real-time dynamic IoT data;
[0011] Calculating first-order differences corresponding to each of the timestamps other than the first timestamp in sequence based on the absolute value of the timestamp, and calculating the difference between each of the first-order differences and the sampling interval to obtain second-order differences corresponding to each of the timestamps other than the first timestamp;
[0012] Obtaining second-order difference absolute values corresponding to each of the second-order differences, and determining whether a target difference between each of the second-order difference absolute values and the sampling interval is greater than the sampling interval;
[0013] The encoding rules corresponding to each of the second-order differences are determined according to the corresponding judgment results, and each of the second-order differences is encoded based on the encoding rules to compress the real-time dynamic Internet of Things data.
[0014] Optionally, determining encoding rules corresponding to each second-order difference according to the corresponding judgment result, and encoding each second-order difference based on the encoding rule includes:
[0015] If the judgment result indicates that the target difference corresponding to the current second-order difference is not greater than the sampling interval, encoding the current second-order difference based on the current second-order difference and a first preset number of flag bits;
[0016] If the judgment result indicates that the target difference corresponding to the current second-order difference is greater than the sampling interval, the current second-order difference is encoded based on the timestamp corresponding to the current second-order difference and a second preset number of flag bits.
[0017] Optionally, the process of compressing the real-time dynamic IoT data by the preset data interface includes:
[0018] The first data in the real-time dynamic Internet of Things data is stored in IEEE754 format, an XOR operation is performed on any target data in the real-time dynamic Internet of Things data and the previous adjacent target data to obtain a corresponding operation result, and the real-time dynamic Internet of Things data is compressed based on the operation result; wherein the target data is data other than the first data in the real-time dynamic Internet of Things data.
[0019] Optionally, performing preliminary verification on the real-time dynamic IoT data using the local detection mechanisms corresponding to the respective sub-chains and the data verification rules includes:
[0020] Verify the data integrity of the real-time dynamic IoT data using the detection mechanisms and hash value comparison technology corresponding to each of the local sub-chains, and sign the real-time dynamic IoT data;
[0021] The BLS aggregate signature algorithm is used to detect the validity of each signature corresponding to the real-time dynamic Internet of Things data, and the real-time dynamic Internet of Things data is verified based on the WASM bytecode corresponding to the data verification rule.
[0022] Optionally, the intelligent assessment system uses each of the preliminary verification results to detect the real-time dynamic Internet of Things data and obtains a target detection result corresponding to the real-time dynamic Internet of Things data, including:
[0023] Using natural language processing technology to split each of the preliminary verification results into semantic units to obtain the detection basis and detection results corresponding to each of the preliminary verification results;
[0024] The real-time dynamic Internet of Things data is analyzed according to each of the detection bases and each of the detection results to obtain the target detection result corresponding to the real-time dynamic Internet of Things data.
[0025] Optionally, after the intelligent assessment system detects the real-time dynamic IoT data using the preliminary verification results, it further includes:
[0026] Determining sensitive data from the real-time dynamic IoT data according to the target detection result, and generating reminder information corresponding to the sensitive data;
[0027] Determine the user permissions corresponding to each terminal device, and display the real-time dynamic Internet of Things data and the sensitive data to each terminal device based on the user permissions respectively corresponding to each terminal device.
[0028] In a second aspect, the present application provides a cross-blockchain IoT data detection device, which is applied to the blockchain network layer, including:
[0029] A data acquisition module is used to obtain target compressed data obtained by compressing real-time dynamic IoT data using a preset data interface; wherein the real-time dynamic IoT data is a set of continuous data in time series collected by a preset IoT data collection device. The blockchain network layer is composed of a main chain and sub-chains. The main chain is used to store data, and the sub-chains are used to detect data. The main chain and each sub-chain achieve data synchronization through a dynamic hash algorithm.
[0030] A data verification module is used to decompress the target compressed data, determine the data verification rules corresponding to the real-time dynamic IoT data obtained after decompression based on the local smart contract library, and perform preliminary verification on the real-time dynamic IoT data using the local detection mechanisms corresponding to each of the sub-chains and the data verification rules to obtain a corresponding preliminary verification result;
[0031] A verification result sending module is used to send each of the preliminary verification results to the intelligent evaluation system, so that the intelligent evaluation system receives each of the preliminary verification results, uses each of the preliminary verification results to detect the real-time dynamic Internet of Things data, and obtains the target detection result corresponding to the real-time dynamic Internet of Things data; wherein, the intelligent evaluation system is a data analysis system built based on artificial intelligence technology.
[0032] In a third aspect, the present application provides an electronic device, comprising:
[0033] Memory, used to store computer programs;
[0034] A processor is configured to execute the computer program to implement the aforementioned cross-blockchain IoT data detection method.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned cross-blockchain IoT data detection method.
[0036] In the present application, the blockchain network layer first obtains target compressed data obtained by compressing real-time dynamic IoT data through a preset data interface; wherein the real-time dynamic IoT data is a set of continuous data in a time series collected by a preset IoT data collection device, and the blockchain network layer is composed of a main chain and a sub-chain, wherein the main chain is used to store data, and the sub-chain is used to detect data, and data synchronization is achieved between the main chain and each sub-chain through a dynamic hash algorithm. Then, the target compressed data is decompressed, and a data verification rule corresponding to the real-time dynamic IoT data obtained after decompression is determined based on a local smart contract library, and the real-time dynamic IoT data is preliminarily verified using each detection mechanism corresponding to each local sub-chain and the data verification rule to obtain a corresponding preliminary verification result, and finally, each preliminary verification result is sent to an intelligent evaluation system so that the intelligent evaluation system receives each preliminary verification result, uses each preliminary verification result to detect the real-time dynamic IoT data, and obtains a target detection result corresponding to the real-time dynamic IoT data; wherein, the intelligent evaluation system is a data analysis system constructed based on artificial intelligence technology. It can be seen that this application reduces the amount of data that needs to be transmitted by compressing the data, thereby improving the data transmission efficiency; based on the cross-chain transmission protocol, the target compressed data corresponding to the real-time dynamic IoT data can be stored and encapsulated as a standard cross-chain transaction data packet and stored in the target blockchain network layer, thereby shielding the differences in the underlying blockchains and realizing cross-chain data transmission; by aggregating the verification results of data from different blockchain platforms and integrating different verification results to detect real-time dynamic IoT data, the problem of data fragmentation between different detection results is avoided, and the reliability of the detection results is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0038] Figure 1 This is a flow chart of a cross-blockchain IoT data detection method disclosed in this application;
[0039] Figure 2 A flow chart of a data compression method disclosed in this application;
[0040] Figure 3 This is a schematic diagram of the structure of a cross-blockchain IoT data detection device disclosed in this application;
[0041] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0043] Currently, when using blockchain to test data, the blockchain systems of different testing institutions are not interoperable, resulting in fragmented test results between different departments. To this end, this application provides a cross-blockchain IoT data detection method. By storing real-time dynamic IoT data on the target blockchain network layer based on a cross-chain transmission protocol, it shields the differences in the underlying blockchains and realizes cross-chain data transmission.
[0044] See also Figure 1 As shown, an embodiment of the present invention discloses a cross-blockchain IoT data detection method, which is applied to the blockchain network layer and includes:
[0045] Step S11, obtaining target compressed data obtained by compressing real-time dynamic IoT data through a preset data interface; wherein the real-time dynamic IoT data is a set of continuous data in a time series collected by a preset IoT data collection device, and the blockchain network layer is composed of a main chain and a sub-chain, the main chain is used to store data, and the sub-chain is used to detect data, and data synchronization is achieved between the main chain and each sub-chain through a dynamic hash algorithm.
[0046] In this embodiment, it is necessary to first deploy IoT data collection terminals such as detection sensors and monitoring equipment (i.e., pre-set Internet data collection devices) to continuously collect IoT data. The collected IoT data is then compressed using a pre-set data interface and a "time series data compression algorithm." The compressed data is then transmitted to the blockchain network layer, achieving second-level data slicing and on-chain. The code for the dynamic evidence structure of IoT data is shown below:
[0047] struct DynamicEvidence {
[0048] bytes32 dataHash; / / data summary;
[0049] uint256 timestamp; / / timestamp;
[0050] address deviceID; / / collect device digital identity;
[0051] bytes32 prevHash; / / previous data chain structure;
[0052] }
[0053] In this embodiment, the blockchain network layer is a consortium blockchain mainnet + industry subchain architecture, using an improved atomic swap protocol to achieve cross-chain verification of test reports. It should be noted that the architecture of the two blockchain network layers includes an application link interface layer, a verification core layer, and a routing and scheduling layer. The application link interface layer uses a plug-in mechanism to be compatible with different blockchain protocols (such as Fabric and Ethereum), and uniformly encapsulates cross-chain requests through standardized interfaces such as the InterBlockchain Transfer Protocol (IBTP). For example, an adapter can convert sensor data from a testing agency into a standard cross-chain transaction package, masking differences in the underlying blockchains.
[0054] The core verification layer integrates dual-mode BLS (Boneh-Lynn-Shacham, a signature algorithm) threshold signature verification and WASM (WebAssembly, a bytecode) verification engine. For high-frequency detection and data transmission scenarios, BLS aggregate signature technology is used. Consensus is confirmed by only verifying the number of signatures reaching a threshold (for example, 6 out of 10 nodes must have valid signatures). WASM bytecode is loaded for complex verification rules (such as compliance audits of detection standards), and dynamic deployment of verification logic written in Rust / Go (a programming language) is supported.
[0055] The routing scheduling layer adopts a hybrid routing strategy, including relay mode and direct connection mode; relay mode: docking with the main chain to complete global consensus, suitable for multi-institution joint authentication scenarios; direct connection mode: direct transmission through the P2P (Peer-to-peer) network, suitable for point-to-point data verification between testing institutions.
[0056] By acquiring detection data from deployed IoT devices in real time and using a time series data compression algorithm to upload the compressed data to the blockchain network layer, the limitations of traditional static evidence storage are broken through, avoiding the problem of only storing result files. By uniformly encapsulating cross-chain requests through standardized interfaces, the detection data corresponding to different blockchains can be interoperable, thereby improving the reliability of data detection.
[0057] Step S12: Decompress the target compressed data, determine the data verification rules corresponding to the real-time dynamic IoT data obtained after decompression based on the local smart contract library, and use the local detection mechanisms corresponding to each sub-chain and the data verification rules to perform preliminary verification on the real-time dynamic IoT data to obtain corresponding preliminary verification results.
[0058] In this embodiment, after obtaining the target compressed data, it is necessary to decompress the target compressed data using the preset value range comparison table in the smart contract library.
[0059] In this embodiment, the process of performing preliminary verification of real-time dynamic IoT data using the detection mechanisms and data verification rules corresponding to each local sub-chain may specifically include: verifying the data integrity of the real-time dynamic IoT data using the detection mechanisms and hash value comparison techniques corresponding to each local sub-chain, and signing the real-time dynamic IoT data; verifying the validity of each signature corresponding to the real-time dynamic IoT data using the BLS aggregate signature algorithm; and verifying the real-time dynamic IoT data based on the WASM bytecode corresponding to the data verification rules. Specifically, in the preprocessing stage of data verification, the detection data stream is time-series sliced (e.g., generating a data hash every 5 seconds), and then aggregated through a Merkle tree to generate a lightweight evidence certificate. For example, for PM2.5 data continuously uploaded by environmental monitoring equipment, a compressed evidence package is generated every 30 minutes. The data is then verified using a layered verification mechanism: Level 1 verification: rapid verification of data integrity (hash comparison) and signature validity (BLS threshold verification); Level 2 verification: execution of WASM verification rules, such as determining the compliance of detection indicators (whether pesticide residues exceed the standard) and checking data time series continuity. It should be noted that this embodiment utilizes SPV (Simple Payment Verification) light node synchronization technology during cross-chain data verification, synchronizing only the block header information of the relevant testing institutions, thus conserving storage resources. This cross-chain data authentication enables interoperability between testing institutions corresponding to different blockchains, improving the comprehensiveness of data verification.
[0060] Step S13: Send each of the preliminary verification results to an intelligent evaluation system so that the intelligent evaluation system receives each of the preliminary verification results, uses each of the preliminary verification results to detect the real-time dynamic Internet of Things data, and obtains the target detection result corresponding to the real-time dynamic Internet of Things data; wherein, the intelligent evaluation system is a data analysis system built based on artificial intelligence technology.
[0061] In this embodiment, the intelligent assessment system uses each preliminary verification result to detect the real-time dynamic Internet of Things data and obtains the target detection result corresponding to the real-time dynamic Internet of Things data. Specifically, the process may include: using natural language processing technology to split each preliminary verification result into semantic units to obtain the detection basis and detection result corresponding to each preliminary verification result; analyzing the real-time dynamic Internet of Things data based on each detection basis and each detection result to obtain the target detection result corresponding to the real-time dynamic Internet of Things data. In addition, after the intelligent assessment system uses each preliminary verification result to detect the real-time dynamic Internet of Things data, it also includes: determining sensitive data from the real-time dynamic Internet of Things data based on the target detection result and generating reminder information corresponding to the sensitive data; determining the user permissions corresponding to each terminal device, and displaying the real-time dynamic Internet of Things data and sensitive data to each terminal device based on the user permissions corresponding to each terminal device.
[0062] Specifically, the intelligent assessment system in this embodiment includes an AI (Artificial Intelligence) assisted scoring module, which can realize automatic classification of detection results and risk warning; the AI assisted scoring module includes a data preprocessing submodule, an intelligent scoring engine, a real-time feedback submodule and a privacy calculation submodule; the above-mentioned data preprocessing submodule is responsible for processing the preliminary verification results of the input multimodal: through NLP (Natural Natural language processing (NLP) technology breaks down test results (i.e., preliminary verification results) into semantic units (e.g., opinions, arguments, and conclusions). Furthermore, the data preprocessing submodule features image recognition, supports handwritten formula recognition, and can identify and alert users of abnormal or sensitive data. The intelligent scoring engine automatically generates a multi-dimensional scoring table based on test criteria and implements regular expression matching and mathematical formula equivalent transformation verification for text. The real-time feedback submodule uses interactive radar charts to display the relative performance of test data across various capability dimensions and generates a heat map of unqualified test data to reveal weaknesses in test quality. The privacy computing submodule utilizes zero-knowledge proof technology to develop a "tiered decryption strategy." For example, a primary weight is assigned to regulators, ensuring full data visibility, while a secondary weight is assigned to enterprises, displaying only desensitized data. By utilizing NLP to segment the initial test results and perform data testing based on this information, the reliability of the test results is ensured. By leveraging artificial intelligence to build and test the data using an intelligent assessment system, manual data testing is avoided, improving data testing efficiency.
[0063] It can be seen that this application reduces the amount of data that needs to be transmitted by compressing the data, thereby improving the data transmission efficiency; based on the cross-chain transmission protocol, the target compressed data corresponding to the real-time dynamic IoT data can be stored and encapsulated as a standard cross-chain transaction data packet and stored in the target blockchain network layer, thereby shielding the differences in the underlying blockchains and realizing cross-chain data transmission; by aggregating the verification results of data from different blockchain platforms and integrating different verification results to detect real-time dynamic IoT data, the problem of data fragmentation between different detection results is avoided, and the reliability of the detection results is improved.
[0064] Based on the previous embodiment, this application describes the overall process of cross-blockchain IoT data detection. In order to make the technical solution in this application more complete, this application will next explain the process of data compression. Figure 2 As shown, an embodiment of the present invention provides a data compression process, including:
[0065] Step S21: Acquire real-time dynamic IoT data collected by a preset IoT data collection device, wherein the real-time dynamic IoT data is a set of data that is continuous in time series.
[0066] The IoT data acquisition device in this embodiment can be an IoT data acquisition terminal such as a detection sensor, a monitoring device, etc., and the data acquisition frequency of the IoT data acquisition device can be set as needed to adapt to different application scenarios.
[0067] Step S22: compress the timestamp corresponding to the real-time dynamic Internet of Things data, and compress the real-time dynamic Internet of Things data.
[0068] In this embodiment, the timestamps corresponding to the real-time dynamic IoT data are compressed, and the process of compressing the real-time dynamic IoT data is completed by a preset data interface. The process of compressing the real-time dynamic IoT data by the preset data interface includes: determining a sampling interval corresponding to a preset IoT data acquisition device, obtaining each timestamp corresponding to the real-time dynamic IoT data, and recording the absolute value of the timestamp corresponding to the first timestamp of the real-time dynamic IoT data;
[0069] Based on the absolute value of the timestamp, the first-order differences corresponding to each timestamp other than the first timestamp are calculated in sequence, and the difference between each first-order difference and the sampling interval is calculated to obtain the second-order differences corresponding to each timestamp other than the first timestamp; the absolute value of the second-order difference corresponding to each second-order difference is obtained, and it is judged whether the target difference between the absolute value of each second-order difference and the sampling interval is greater than the sampling interval; the encoding rules corresponding to each second-order difference are determined according to the corresponding judgment results, and each second-order difference is encoded based on the encoding rule to compress the real-time dynamic Internet of Things data.
[0070] The above process of determining the encoding rules corresponding to each second-order difference based on the corresponding judgment results, and encoding each second-order difference based on the encoding rules, can specifically include: if the judgment result indicates that the target difference corresponding to the current second-order difference is not greater than the sampling interval, then encoding the current second-order difference based on the current second-order difference and a first preset number of flag bits; if the judgment result indicates that the target difference corresponding to the current second-order difference is greater than the sampling interval, then encoding the current second-order difference based on the timestamp corresponding to the current second-order difference and a second preset number of flag bits. Specifically, the first timestamp stores the absolute value, and subsequent timestamps use second-order difference encoding, where the first-order difference and the second-order difference are as follows:
[0071] ;
[0072] ;
[0073] in, are the first-order differences corresponding to the timestamps, are the second-order differences corresponding to the timestamps, is the nth timestamp, is the n-1th timestamp, is the sampling interval.
[0074] according to The number of encoding bits is dynamically selected based on the numerical range:
[0075] When , 1 flag bit + 2 difference bits are stored (covering ±1 second deviation);
[0076] When , a 5-bit flag bit + 32-bit complete timestamp is stored (to cope with sudden exceptions);
[0077] After the data is compressed and uploaded to the chain, each data block header records the base timestamp and Δbase to achieve the time anchor point of second-level slicing. The above data block header refers to the metadata part of each block in the blockchain, which usually contains hash value, timestamp, previous block hash and other information.
[0078] After testing, using the above data compression method, the compression rate in normal scenarios (fixed 1-second interval) is as high as 96%, and the compression efficiency can still be maintained above 80% in abnormal scenarios.
[0079] In this embodiment, the process of compressing real-time dynamic IoT data using a preset data interface may specifically include: storing the first data in the real-time dynamic IoT data using the IEEE754 format (a floating-point arithmetic standard), performing an XOR operation on any target data in the real-time dynamic IoT data and the previous adjacent target data to obtain a corresponding operation result, and compressing the real-time dynamic IoT data based on the operation result; wherein the target data is data other than the first data in the real-time dynamic IoT data. Specifically, for floating-point numbers, the first value (i.e., the first data in the real-time dynamic IoT data) is stored in the original IEEE754 format (64 bits), and subsequent values are sequentially used to calculate XOR (i.e., XOR operation) with the previous value, and encoded according to the result type (i.e., the operation result):
[0080] if (XOR == 0), store 1 bit '0';
[0081] else if (significant bit < 16), store '10' + 4-bit significant bit length + significant bit data;
[0082] else, store '11' + full 64-bit data;
[0083] Huffman coding is used to optimize small-range differences that appear at high frequencies.
[0084] For integer Delta, the first step is to calculate the difference between adjacent data. ; Step 2: Zig-zag encoding is performed to eliminate the influence of symbols; Step 3: Use Simple8b (a time series data compression algorithm) to convert multiple small Values are packed into 64-bit words (a single word can store up to 240 value).
[0085] Slice structure example: , performing Simple8b compression on it, resulting in an 8-byte data block. A single second-level slice (1000 sampling points) can be compressed to an average of 120 bytes. By compressing real-time dynamic IoT data and its corresponding timestamp separately, the data volume is reduced, thereby reducing routing resource usage when storing data on-chain and improving data transmission efficiency.
[0086] It can be seen that this application reduces the amount of data that needs to be transmitted by compressing the data, thereby improving the data transmission efficiency; based on the cross-chain transmission protocol, the target compressed data corresponding to the real-time dynamic IoT data can be stored and encapsulated as a standard cross-chain transaction data packet and stored in the target blockchain network layer, thereby shielding the differences in the underlying blockchains and realizing cross-chain data transmission; by aggregating the verification results of data from different blockchain platforms and integrating different verification results to detect real-time dynamic IoT data, the problem of data fragmentation between different detection results is avoided, and the reliability of the detection results is improved.
[0087] See also Figure 3 As shown, an embodiment of the present invention discloses a cross-blockchain IoT data detection device, which is applied to the blockchain network layer and includes:
[0088] The data acquisition module 11 is used to obtain target compressed data obtained by compressing real-time dynamic IoT data using a preset data interface; wherein the real-time dynamic IoT data is a set of continuous data in time series collected by a preset IoT data collection device. The blockchain network layer is composed of a main chain and sub-chains. The main chain is used to store data, and the sub-chains are used to detect data. The main chain and each sub-chain achieve data synchronization through a dynamic hash algorithm.
[0089] The data verification module 12 is used to decompress the target compressed data, determine the data verification rules corresponding to the real-time dynamic IoT data obtained after decompression based on the local smart contract library, and perform preliminary verification on the real-time dynamic IoT data using the local detection mechanisms corresponding to each sub-chain and the data verification rules to obtain a corresponding preliminary verification result;
[0090] The verification result sending module 13 is used to send each of the preliminary verification results to the intelligent evaluation system, so that the intelligent evaluation system receives each of the preliminary verification results, uses each of the preliminary verification results to detect the real-time dynamic Internet of Things data, and obtains the target detection result corresponding to the real-time dynamic Internet of Things data; wherein, the intelligent evaluation system is a data analysis system built based on artificial intelligence technology.
[0091] It can be seen that this application reduces the amount of data that needs to be transmitted by compressing the data, thereby improving the data transmission efficiency; based on the cross-chain transmission protocol, the target compressed data corresponding to the real-time dynamic IoT data can be stored and encapsulated as a standard cross-chain transaction data packet and stored in the target blockchain network layer, thereby shielding the differences in the underlying blockchains and realizing cross-chain data transmission; by aggregating the verification results of data from different blockchain platforms and integrating different verification results to detect real-time dynamic IoT data, the problem of data fragmentation between different detection results is avoided, and the reliability of the detection results is improved.
[0092] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.
[0093] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the cross-blockchain IoT data detection method disclosed in any of the aforementioned embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0094] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0095] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0096] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of implementing the cross-blockchain IoT data detection method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 may further include a computer program capable of completing other specific tasks.
[0097] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when executed by a processor, the computer program implements the aforementioned cross-blockchain IoT data detection method. The specific steps of this method can be referred to the corresponding content disclosed in the aforementioned embodiments and will not be repeated here.
[0098] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.
[0099] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0100] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0101] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0102] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A cross-blockchain IoT data detection method, characterized in that: Applied to the blockchain network layer, including: Obtain target compressed data obtained by compressing real-time dynamic IoT data using a preset data interface; wherein the real-time dynamic IoT data is a set of continuous data in time series collected by a preset IoT data collection device; the blockchain network layer is composed of a main chain and sub-chains, the main chain is used to store data, the sub-chains are used to detect data, and data synchronization is achieved between the main chain and each sub-chain using a dynamic hash algorithm; Decompress the target compressed data, determine the data verification rules corresponding to the real-time dynamic IoT data obtained after decompression based on the local smart contract library, and perform preliminary verification on the real-time dynamic IoT data using the local detection mechanisms corresponding to each sub-chain and the data verification rules to obtain a corresponding preliminary verification result; Each of the preliminary verification results is sent to an intelligent evaluation system so that the intelligent evaluation system receives each of the preliminary verification results, uses each of the preliminary verification results to detect the real-time dynamic Internet of Things data, and obtains the target detection result corresponding to the real-time dynamic Internet of Things data; wherein, the intelligent evaluation system is a data analysis system built based on artificial intelligence technology.
2. The cross-blockchain IoT data detection method according to claim 1 is characterized in that: The process of compressing the real-time dynamic IoT data by the preset data interface includes: Determine a sampling interval corresponding to the preset IoT data collection device, obtain timestamps corresponding to the real-time dynamic IoT data, and record an absolute value of a timestamp corresponding to a first timestamp of the real-time dynamic IoT data; Calculating first-order differences corresponding to each of the timestamps other than the first timestamp in sequence based on the absolute value of the timestamp, and calculating the difference between each of the first-order differences and the sampling interval to obtain second-order differences corresponding to each of the timestamps other than the first timestamp; Obtaining second-order difference absolute values corresponding to each of the second-order differences, and determining whether a target difference between each of the second-order difference absolute values and the sampling interval is greater than the sampling interval; The encoding rules corresponding to each of the second-order differences are determined according to the corresponding judgment results, and each of the second-order differences is encoded based on the encoding rules to compress the real-time dynamic Internet of Things data.
3. The cross-blockchain IoT data detection method according to claim 2 is characterized in that: The determining, according to the corresponding judgment results, the encoding rules corresponding to the second-order differences, and encoding the second-order differences based on the encoding rules, includes: If the judgment result indicates that the target difference corresponding to the current second-order difference is not greater than the sampling interval, encoding the current second-order difference based on the current second-order difference and a first preset number of flag bits; If the judgment result indicates that the target difference corresponding to the current second-order difference is greater than the sampling interval, the current second-order difference is encoded based on the timestamp corresponding to the current second-order difference and a second preset number of flag bits.
4. The cross-blockchain IoT data detection method according to claim 1 is characterized in that: The process of compressing the real-time dynamic IoT data by the preset data interface includes: The first data in the real-time dynamic Internet of Things data is stored in IEEE754 format, an XOR operation is performed on any target data in the real-time dynamic Internet of Things data and the previous adjacent target data to obtain a corresponding operation result, and the real-time dynamic Internet of Things data is compressed based on the operation result; wherein the target data is data other than the first data in the real-time dynamic Internet of Things data.
5. The cross-blockchain IoT data detection method according to claim 1 is characterized in that: The preliminary verification of the real-time dynamic IoT data using the local detection mechanisms corresponding to the sub-chains and the data verification rules includes: Verify the data integrity of the real-time dynamic IoT data using the detection mechanisms and hash value comparison technology corresponding to each of the local sub-chains, and sign the real-time dynamic IoT data; The BLS aggregate signature algorithm is used to detect the validity of each signature corresponding to the real-time dynamic Internet of Things data, and the real-time dynamic Internet of Things data is verified based on the WASM bytecode corresponding to the data verification rule.
6. The cross-blockchain IoT data detection method according to claim 1 is characterized in that: The process of the intelligent assessment system detecting the real-time dynamic Internet of Things data using the preliminary verification results and obtaining the target detection results corresponding to the real-time dynamic Internet of Things data includes: Using natural language processing technology to split each of the preliminary verification results into semantic units to obtain the detection basis and detection results corresponding to each of the preliminary verification results; The real-time dynamic Internet of Things data is analyzed according to each of the detection bases and each of the detection results to obtain the target detection result corresponding to the real-time dynamic Internet of Things data.
7. The cross-blockchain IoT data detection method according to claim 1 is characterized in that: After the intelligent assessment system detects the real-time dynamic IoT data using the preliminary verification results, the system further includes: Determining sensitive data from the real-time dynamic IoT data according to the target detection result, and generating reminder information corresponding to the sensitive data; Determine the user permissions corresponding to each terminal device, and display the real-time dynamic Internet of Things data and the sensitive data to each terminal device based on the user permissions respectively corresponding to each terminal device.
8. A cross-blockchain IoT data detection device, characterized in that: Applied to the blockchain network layer, including: A data acquisition module is used to obtain target compressed data obtained by compressing real-time dynamic IoT data using a preset data interface; wherein the real-time dynamic IoT data is a set of continuous data in time series collected by a preset IoT data collection device. The blockchain network layer is composed of a main chain and sub-chains. The main chain is used to store data, and the sub-chains are used to detect data. The main chain and each sub-chain achieve data synchronization through a dynamic hash algorithm. A data verification module is used to decompress the target compressed data, determine the data verification rules corresponding to the real-time dynamic IoT data obtained after decompression based on the local smart contract library, and perform preliminary verification on the real-time dynamic IoT data using the local detection mechanisms corresponding to each of the sub-chains and the data verification rules to obtain a corresponding preliminary verification result; A verification result sending module is used to send each of the preliminary verification results to the intelligent evaluation system, so that the intelligent evaluation system receives each of the preliminary verification results, uses each of the preliminary verification results to detect the real-time dynamic Internet of Things data, and obtains the target detection result corresponding to the real-time dynamic Internet of Things data; wherein, the intelligent evaluation system is a data analysis system built based on artificial intelligence technology.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the cross-blockchain Internet of Things data detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that Used to store a computer program, which, when executed by a processor, implements the cross-blockchain Internet of Things data detection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data desensitization method, device, apparatus and medium for unstructured data access
CN109325326A
Threshold voting method and system based on BLS signature algorithm, and related device
CN110400409A
Supervision method for product inspection process
CN113706178A
Verification method and device for cross-chain transaction of Fabric block chain, equipment and medium
CN114338666A
Data processing system, method and device based on block chain
CN114462084A