Internet of Things data storage method and device based on block chain, and medium
By employing homomorphic encryption and differential privacy mechanisms, along with a hierarchical cross-chain collaboration model, the problems of insufficient privacy protection and low cross-chain efficiency in blockchain IoT data storage are solved, achieving efficient and secure multi-chain collaborative storage.
Patent Information
- Application Number
- CN202511322641.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-12-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing blockchain IoT data storage methods lack a collaborative integration mechanism of homomorphic encryption and differential privacy, leading to noise accumulation and an imbalance in privacy budget allocation during the encryption process, which affects the privacy protection capability of data storage and results in inefficient cross-chain collaboration models.
The data is encrypted with a homomorphic encryption algorithm to a high level of security, and privacy-preserving data is generated through noise perturbation and differential aggregation. Combined with a hierarchical cross-chain collaboration model, threshold relay signature and distributed ledger synchronization are performed to achieve cross-chain collaborative storage.
It significantly enhances privacy protection during data storage and greatly reduces cross-chain verification latency and communication overhead, enabling secure and efficient multi-chain collaborative storage in high-concurrency scenarios.
Smart Images

Figure CN121125745A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data storage, in particular to a blockchain-based Internet of Things data storage method, device and medium. BACKGROUND
[0002] With the rapid development of Internet of Things (IoT) technology, the data generated by a large number of terminal devices is growing exponentially, which puts higher requirements on data storage. Traditional technologies mostly use centralized cloud storage combined with symmetric encryption to process data. In recent years, blockchain has been widely used in the storage and management of Internet of Things data due to its characteristics of decentralization, tamper resistance and traceability, which has alleviated the problem of easy tampering of data under centralized architecture and initially realized the trusted storage and efficient retrieval of Internet of Things data.
[0003] However, the existing blockchain-based Internet of Things data storage method still has some problems to be solved. First, the existing storage method lacks a homomorphic encryption and differential privacy collaborative fusion mechanism, resulting in noise accumulation and privacy budget allocation imbalance in the encryption process, which further affects the privacy protection capability of data storage. Second, the existing cross-chain collaboration model mostly relies on preset rules or static consensus protocols for inter-chain verification and state synchronization, which is difficult to realize efficient and secure cross-chain authentication and distributed ledger synchronization, resulting in low cross-chain efficiency of data storage. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a blockchain-based Internet of Things data storage method to solve the problems of insufficient privacy protection capability and low cross-chain efficiency.
[0006] To solve the above technical problems, the present application provides the following technical solutions: In a first aspect, the present application provides a blockchain-based Internet of Things data storage method, which includes collecting Internet of Things terminal data sets and performing noise disturbance and differential aggregation to generate privacy-protected data; performing hash encoding on the privacy-protected data to output tamper-resistant data packets to be stored; Using a homomorphic encryption algorithm to encrypt the tamper-resistant data packets to be stored at a security level to form an anti-attack ciphertext vector; performing data sharding and storage node mapping on the anti-attack ciphertext vector to obtain a sharded storage index; Inputting the sharded storage index into a hierarchical cross-chain collaboration model, performing threshold relay signature in the relay authentication layer, performing state synchronization and consensus sharding in the consensus coordination layer, and outputting a multi-chain collaboration storage scheme; According to the multi-chain cooperation storage scheme, the tamper-proof to-be-stored data packet is subjected to distributed IPFS scheduling and off-chain and on-chain collaborative evidence, and a blockchain evidence record is formed; the blockchain evidence record is subjected to integrity verification, and a storage security audit report is output.
[0007] As a preferred scheme of the blockchain-based Internet of Things data storage method, the method comprises the steps of: Randomly perturb the Internet of Things terminal data set by injecting Laplace noise, and obtain a noise data set; Perform privacy budget allocation and differential aggregation on the noise data set to generate desensitized intermediate data; and perform sliding window filtering on the desensitized intermediate data to output privacy protection data.
[0008] As a preferred scheme of the blockchain-based Internet of Things data storage method, the method comprises the steps of: Perform Top-k gradient sparsification on the privacy protection data to form a structured gradient vector; and perform hash encoding on the structured gradient vector to generate a unique digital fingerprint; Timestamp the unique digital fingerprint through the NTP time synchronization protocol to output the tamper-proof to-be-stored data packet.
[0009] As a preferred scheme of the blockchain-based Internet of Things data storage method, the method comprises the steps of: Encrypt the tamper-proof to-be-stored data packet using a homomorphic encryption algorithm to output an encrypted polynomial; Perform homomorphic operation and noise suppression on the encrypted polynomial to form a low-noise ciphertext structure; and perform key exchange on the low-noise ciphertext structure to obtain an anti-attack ciphertext vector.
[0010] As a preferred scheme of the blockchain-based Internet of Things data storage method, the method comprises the steps of: Perform metadata decoding and data block reorganization on the anti-attack ciphertext vector to form a shard data block group; Perform data positioning and storage node mapping on the shard data block group through a consistent hash algorithm to obtain a sharding storage index.
[0011] As a preferred scheme of the blockchain-based Internet of Things data storage method, the method comprises the steps of: Build a relay authentication layer through a Transformer architecture, and build a consensus coordination layer using a graph neural network; The relay authentication layer and the consensus coordination layer are subjected to cross-modal feature fusion and residual hierarchical stacking to construct a hierarchical cross-chain collaboration model.
[0012] As a preferred scheme of the blockchain-based Internet of Things data storage method, the output multi-chain collaboration storage scheme specifically comprises the following steps, The shard storage index is input into the hierarchical cross-chain collaboration model, the relay authentication layer uses a zero-knowledge proof engine to perform threshold relay signature on the shard storage index to generate a cross-chain verification statement; The consensus coordination layer uses a shard broadcast protocol to perform state synchronization and consensus sharding on the cross-chain verification statement to obtain a distributed ledger fragment; The cross-chain verification statement and the distributed ledger fragment are fused and encapsulated to output the multi-chain collaboration storage scheme.
[0013] As a preferred scheme of the blockchain-based Internet of Things data storage method, the output storage security audit report specifically comprises the following steps, According to the multi-chain collaboration storage scheme, the tamper-proof data packet to be stored is subjected to distributed IPFS scheduling and content addressing storage to output a storage content identifier; The storage content identifier is subjected to off-chain hash anchoring and on-chain signature storage to form a blockchain storage record; The blockchain storage record is subjected to Merkle tree verification to obtain an integrity proof, and the integrity proof is subjected to evidence chain aggregation to output a storage security audit report.
[0014] In a second aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program, when executed by the processor, implements any step of the blockchain-based Internet of Things data storage method according to the first aspect of the present application.
[0015] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any step of the blockchain-based Internet of Things data storage method according to the first aspect of the present application.
[0016] The present application has the following advantages: through the dual privacy protection mechanism of homomorphic encryption and differential privacy, noise differential disturbance and security level encryption are performed, the dynamic allocation of privacy budget and the precise execution of encryption process are realized, and the privacy protection strength in the data storage process is significantly improved. At the same time, through the threshold relay signature and distributed ledger fragment consensus synchronization of the hierarchical cross-chain collaboration model, the cross-chain verification delay and communication overhead are greatly reduced, thereby realizing safe and efficient multi-chain collaboration storage in a high-concurrency scenario. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort.
[0018] Fig. 1 Flowchart for the blockchain-based Internet of Things data storage method.
[0019] Fig. 2 Flowchart for privacy-protected data generation.
[0020] Fig. 3 Flowchart for the multi-chain collaborative storage scheme.
[0021] Fig. 4 Flowchart for the attack-resistant ciphertext vector generation. DETAILED DESCRIPTION
[0022] In order to make the above-mentioned objects, features and advantages of the present application more apparent and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0023] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the concept of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0024] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.
[0025] Reference Figs. 1-4 For one embodiment of the present application, the embodiment provides a blockchain-based Internet of Things data storage method, comprising the following steps: S1, collecting an Internet of Things terminal data set, and performing noise disturbance and differential aggregation to generate privacy-protected data; performing hash encoding on the privacy-protected data to output tamper-proof data packets to be stored.
[0026] S1.1, collecting an Internet of Things terminal data set and performing preprocessing.
[0027] In the specific operation, The Internet of Things terminal dataset includes device environment parameters, device state data, and terminal operation logs; wherein the device environment parameters are collected by a temperature and humidity sensor, the device state data is collected by a vibration monitoring instrument and a current detection instrument, and the terminal operation logs are collected by a remote operation and maintenance management software (such as Zabbix).
[0028] The Internet of Things terminal dataset is preprocessed, and further, for the device environment parameters, median filtering is applied for noise suppression to eliminate random jitter in the collection process, and wavelet transform is used for signal enhancement to improve the time sequence continuity of the device environment parameters, and Z-score standardization is used simultaneously for dimension unification to ensure the dimension consistency of the device environment parameters; For the device state data, a Butterworth filter is used to filter out low-frequency noise to improve the signal purity of the device state data, and a sliding window is used to perform data smoothing to enhance the stability of the device state data, and linear interpolation is used simultaneously for missing compensation to maintain the integrity of the device state data; For the terminal operation logs, NTP protocol is used to perform timestamp synchronization to establish a unified time sequence benchmark, and an XML parser is applied simultaneously for format normalization to eliminate the format differences of different terminal operation logs.
[0029] S1.2, inject Laplace noise into the preprocessed Internet of Things terminal dataset for random disturbance to obtain a noisy dataset.
[0030] In specific operation, Initialize the scale parameter of the Laplace distribution, for example, set the scale coefficient to 0.5-2.0 and the global sensitivity to 10-100; use a random number generator to randomly sample and expand the sequence of the scale parameter of the Laplace distribution to obtain a Laplace noise sequence; In a trusted environment (such as an SGX trusted execution environment), superimpose the Laplace noise sequence and the preprocessed Internet of Things terminal dataset point by point to avoid data leakage during noise disturbance, and obtain noisy data; perform boundary truncation processing on noisy data that exceeds the reasonable physical quantity value range to prevent data abnormalities caused by noise injection, and form a noisy dataset; It should be noted that the reasonable physical quantity value range is defined based on the mean and standard deviation of historical noisy data, and an example value range is [μ-3σ, μ+3σ] (where μ is the mean of the historical noisy data and σ is the standard deviation).
[0031] S1.3, allocate privacy budget and differentially aggregate the noisy dataset to generate desensitized intermediate data; perform sliding window filtering on the desensitized intermediate data to output privacy-protected data.
[0032] In specific operation, assign a higher value of privacy budget (such as 1.0) to the noise dataset; when the fluctuation standard deviation is higher than the stability threshold, assign a lower value of privacy budget (such as 0.1) to the noise dataset; It should be noted that the stability threshold is defined based on the statistical quantile of the historical fluctuation standard deviation, and the exemplary value range is [0.5, 1.5].
[0033] According to the assigned privacy budget, the noise dataset is differentially aggregated, and further, the noise dataset is re-injected with Laplace noise according to the assigned privacy budget to obtain noise-enhanced data; in the time-space dimension, the noise-enhanced data is grouped and averaged to obtain initial aggregated data; the initial aggregated data is normalized to output desensitized intermediate data. It should be noted that the grouped and averaged aggregation refers to the process of time window division and spatial region aggregation of the noise-enhanced data.
[0034] The desensitized intermediate data is filtered by a sliding window, and further, the desensitized intermediate data is segmented and intercepted to generate a window data sequence; the window data sequence is executed by a moving weighted average to eliminate short-term fluctuations caused by random noise, generating a smooth data sequence; the smooth data sequence is trend fitted to retain the overall trend characteristics of the data, forming privacy protection data. It should be noted that trend fitting refers to the process of linear regression and trend extraction of the smooth data sequence.
[0035] S1.4, perform Top-k gradient sparsification on the privacy protection data to form a structured gradient vector; hash encode the structured gradient vector to generate a unique digital fingerprint.
[0036] In specific operations, Perform gradient projection on the privacy protection data to obtain the gradient amplitude of each data point; sort the gradient amplitude of each data point from large to small, and only retain the top k largest gradient amplitudes for sparsification processing to obtain a sparse gradient set; perform vector reconstruction on the sparse gradient set by orthogonal basis transformation to form a structured gradient vector.
[0037] The SHA-256 algorithm is used to hash-encode the structured gradient vector. Further, the structured gradient vector is serialized and binary-encoded; for example, positive gradient values are encoded as 1, and negative gradient values are encoded as 0, resulting in a binary data stream. A one-way hash mapping is performed on the binary data stream to obtain a fixed-length (e.g., 256-bit) hash digest. A hexadecimal conversion is then performed on the fixed-length hash digest to generate a unique digital fingerprint. This unique digital fingerprint not only identifies the uniqueness of the data but also enables tamper-proof verification. It should be noted that one-way hash mapping refers to the process of iterating through blocks and generating a message digest of a binary data stream using a compressed hash function.
[0038] S1.5. Timestamp the unique digital fingerprint using the NTP time synchronization protocol and output the tamper-proof data packet to be stored.
[0039] In specific operations, Adapt the unique digital fingerprint to the timestamp protocol, package the unique digital fingerprint into a TSR (Timestamp Request) data packet; and send the TSR data packet to a third-party timestamp server via the HTTPS security protocol. It should be noted that timestamp protocol adaptation refers to the process of encapsulating and extracting the digest of a unique digital fingerprint using ASN.1 encoding rules (directly called through the OpenSSL library) to conform to the standard format of a timestamp request.
[0040] After receiving the TSR data packet, the third-party timestamp server uses the NTP time synchronization protocol to synchronize the time of the TSR data packet and authoritatively authoritatively time it, and applies a digital private key to perform standardized signing to ensure the authenticity and integrity of the timestamp, and generates a timestamp response data packet; it extracts metadata from the timestamp response data packet to obtain data identification information; and packages the unique digital fingerprint, the timestamp response data packet and the data identification information together to output a tamper-proof data packet to be stored.
[0041] S2. Use homomorphic encryption algorithm to encrypt the data packet to be stored to prevent tampering, forming an attack-resistant ciphertext vector; perform data fragmentation and storage node mapping on the attack-resistant ciphertext vector to obtain the fragmented storage index.
[0042] S2.1 Use homomorphic encryption algorithm to perform security level encryption on the data packet to be stored to prevent tampering, and output the encryption polynomial.
[0043] In specific operations, The tamper-proof data packet to be stored is subjected to structured parsing. Further, the digital fingerprint and timestamp segments are extracted from the data packet, and byte concatenation is performed to generate a fingerprint-timestamp joint matrix. Singular value decomposition is used to perform a low-rank approximation decomposition of the fingerprint-timestamp joint matrix, decomposing it into left and right singular values. Feature space projection is performed on the left and right singular values to obtain a dimension-reduced feature subspace. Basis transformation decoding is performed on the dimension-reduced feature subspace to obtain a low-rank approximation vector. Polynomial coefficient mapping is performed on the low-rank approximation vector to output the plaintext polynomial. It should be noted that low-rank approximation decomposition refers to the process of singular value truncation and feature subspace extraction of the fingerprint-timestamp joint matrix; basis transformation decoding refers to the process of coordinate transformation and spatial expansion of the dimensionality-reduced feature subspace; the specific process of polynomial coefficient mapping is as follows: the low-rank approximation vector is extended to a finite field through Galois field transformation to obtain the extended field vector; the extended field vector is normalized to generate plaintext coefficients; the plaintext coefficients are polynomial constructed to output the plaintext polynomial.
[0044] The plaintext polynomial is encrypted with a security level. Further, the plaintext polynomial is randomized and masked to obtain a perturbation mask polynomial. Modular reduction is performed on the perturbation mask polynomial to obtain the primary ciphertext. The primary ciphertext is relinearized and modulo switched to generate the standard ciphertext. The standard ciphertext is encapsulated in a polynomial format to obtain the encryption polynomial. The encryption polynomial represents the data characteristics under homomorphic encryption and can support arithmetic operations and logical processing in the ciphertext state. It should be noted that randomization masking refers to the process of injecting noise and perturbing the coefficients of a plaintext polynomial; the specific process of modular reduction is as follows: the perturbed mask polynomial is truncated to obtain a truncated polynomial; homomorphic scaling is used to map the coefficients of the truncated polynomial to generate scaled ciphertext; range constraints are applied to the scaled ciphertext to generate primary ciphertext; the specific process of relinearization is as follows: the primary ciphertext is key-switched to obtain the switched ciphertext; noise suppression is performed on the switched ciphertext to generate low-noise ciphertext; the generated low-noise ciphertext is compressed to obtain standard ciphertext; modular switching refers to the process of performing modular conversion and precision adjustment on the primary ciphertext.
[0045] S2.2 Perform homomorphic operations and noise suppression on the cryptographic polynomial to form a low-noise ciphertext structure; perform key exchange on the low-noise ciphertext structure to obtain an attack-resistant ciphertext vector.
[0046] In specific operations, Modular expansion is performed on the encryption polynomial to increase the ciphertext computation space, resulting in an extended modulo polynomial. The R-LWE homomorphic encryption formula is then used to perform term-by-term homomorphic operations on the extended modulo polynomial, outputting a homomorphic ciphertext vector. The specific mathematical formulas are as follows. ; in, Represents a homomorphic ciphertext vector. This represents the first ciphertext component of the extended modulo polynomial. This represents the second ciphertext component of the extended modulo polynomial. Modulo operation is represented. Indicates the modulus factor; It should be noted that the ciphertext components are obtained through polynomial ring sampling and subspace projection operations on the extended modulus polynomial; the prime field security strength of the modulus factor basis modulus operation is defined, with an exemplary range of values being... .
[0047] Noise control is applied to the homomorphic ciphertext vector. Furthermore, noise equalization is applied to the homomorphic ciphertext vector to reduce the noise growth rate and form a noise-suppressed intermediate ciphertext. Gaussian smoothing filtering is applied to the noise-suppressed intermediate ciphertext to obtain a low-noise ciphertext. Amplitude normalization and phase alignment are performed on the low-noise ciphertext to form a low-noise ciphertext structure.
[0048] The Diffie-Hellman key exchange protocol is used to exchange keys on the low-noise ciphertext structure. Further, elliptic curve dot product is performed on the low-noise ciphertext structure to generate a temporary session key. Symmetric encryption is performed on the temporary session key to obtain the encrypted key exchange material. Tensor reconstruction is performed on the encrypted key exchange material to generate an attack-resistant ciphertext vector. It should be noted that the Diffie-Hellman key exchange protocol is invoked via a public internet channel; elliptic curve multiplication refers to the process of performing discrete logarithmic transformation and one-way mapping on a low-noise ciphertext structure through scalar multiplication.
[0049] S2.3. Decode the metadata and reassemble the data blocks from the ciphertext vectors used to combat attacks to form a group of sharded data blocks; use a consistent hashing algorithm to locate the data in the sharded data block group and map the storage nodes to obtain the sharded storage index.
[0050] In specific operations, Metadata decoding is performed on the ciphertext vector against attacks. Further, a Base64 decoding filter is used to separate the payload from the ciphertext vector, generating metadata and payload segments (such as header information and encrypted data body). Field extraction and byte alignment are performed on the metadata and payload segments to obtain structured data segments. The structured data segments are then reassembled to output a decoded data stream. It should be noted that stream reassembly refers to the process of sequentially splicing and eliminating redundancy in structured data segments.
[0051] The decoded data stream is divided into data blocks and reassembled. Further, the decoded data stream is cut into boundaries according to a fixed byte length (e.g., 64KB) to obtain initial block fragments. The initial block fragments are redundantly encoded to enhance integrity and traceability, generating protected data blocks. The protected data blocks are grouped and arranged to obtain fragmented data block groups. It should be noted that redundancy coding refers to the process of adding verification information and expanding the data structure of the initial block fragments.
[0052] Data location is performed on the fragmented data block group. Further, a consistent hashing algorithm is used to perform a weighted hash calculation on the fragmented data block group to obtain the data block hash location value. The specific mathematical formula is as follows. ; in, This represents the hash location value of the data block. This indicates the total number of data block groups in the fragment. The index representing a group of fragmented data blocks. Indicates the first The weight scaling factor for each group of data fragments. Indicates the first The original binary values of each data block group. The hash function value representing the original binary number. Modulo operation is represented. A constant representing the size of the hash space; It should be noted that the original binary value is obtained by performing binary conversion and byte concatenation operations on the sharded data block group; the weight scaling factor is defined based on the load balancing requirements of the sharded data block group (such as node storage capacity and network bandwidth), and the exemplary value range is 0.5 to 2.0; the hash space size constant is obtained by performing prime modulus optimization on the hash function calculation value.
[0053] Distributed storage mapping is performed on the hash location values of data blocks. Further, consistent hash ring matching is performed on the hash location values of data blocks to obtain data storage identifiers. Storage space projection is performed on the data storage identifiers to generate storage addresses. Directory combination and index encoding are performed on the storage addresses to output the fragmented storage index. It should be noted that consistent hash ring matching refers to the process of performing ring space interpolation and virtual node binding on the hash location value of the data block; storage space projection maps the logical address of the data storage identifier to the physical storage space through linear transformation.
[0054] S3. Input the sharded storage index into the hierarchical cross-chain collaboration model, the relay authentication layer performs threshold relay signature, the consensus coordination layer performs state synchronization and consensus sharding, and outputs a multi-chain collaborative storage scheme.
[0055] S3.1 Build and train a hierarchical cross-chain collaboration model.
[0056] In specific operations, In the PyTorch framework, the Transformer architecture is invoked through the nn.Transformer parameter and initialized. For example, the number of attention heads is set to 8, the number of encoder layers is set to 6, and the feedforward network dimension is set to 2048. A zero-knowledge proof engine is then connected after the Transformer architecture to perform verifiable proof for cross-chain identity authentication, and LayerNorm is used for feature normalization to complete the construction of the relay authentication layer. The graph neural network is invoked through the torch_geometric parameter and initialized, for example, by setting the number of input channels to 64, the number of hidden channels to 128, and the number of channels to 256. A fragmented broadcast protocol is then applied after the graph neural network to propagate messages and achieve state synchronization. Attention is then aggregated through graph convolution to complete the construction of the consensus coordination layer. Attention mechanisms are used to perform cross-modal feature fusion on the relay authentication layer and consensus coordination layer to obtain a joint feature representation. The joint feature representation is then non-linearly activated using the ReLU activation function to generate an enhanced feature tensor. Residual connections are used to superimpose the enhanced feature tensor and the joint feature representation to obtain a fused output feature. The fused output feature is then normalized using Softmax to generate attention weights. Based on the attention weights, the relay authentication layer and consensus coordination layer are stacked in a residual hierarchy to complete the construction of a layered cross-chain collaboration model. Next, the hierarchical cross-chain collaboration model is trained. Further, the historical shard storage index is divided into a sample set, a training set, and a validation set. On the sample set, linear interpolation is used to expand the feature space, and Min-Max standardization is used to unify the dimensions, forming augmented samples. On the training set, stochastic gradient descent is used to optimize the augmented samples, and L2 regularization is applied simultaneously to suppress overfitting, obtaining optimized parameters for the hierarchical cross-chain collaboration model. On the validation set, the cross-entropy function is used to quantize the loss of the optimized parameters, obtaining the validation set loss value. When the validation set loss value exceeds the convergence threshold for several consecutive rounds (e.g., 5 times), training terminates, and the trained hierarchical cross-chain collaboration model is output simultaneously. It should be noted that the convergence threshold is defined based on the volatility stability of the validation set loss value, with an exemplary range of 0.001-0.005.
[0057] S3.2 The relay authentication layer uses a zero-knowledge proof engine to perform threshold relay signatures on the sharded storage index and generate cross-chain verification statements.
[0058] In specific operations, The sharded storage index is input into the trained hierarchical cross-chain collaboration model via a RESTful API. The relay authentication layer uses a zero-knowledge proof engine to perform threshold relay signatures on the sharded storage index. Further, hash digests are extracted from the sharded storage index to obtain fixed-length hash values. The fixed-length hash values are then secretly shared and segmented using the Shamir secret-sharing scheme to obtain sub-secret shards. Lagrange interpolation is performed on the sub-secret shards to obtain interpolation polynomials. Elliptic curve mapping is applied to the interpolation polynomials to form local signature fragments. Weighted aggregation of the local signature fragments generates an aggregate signature. Finally, the aggregate signature is encapsulated with zero-knowledge proofs to output signature proof data. It should be noted that the specific process of secret sharing and partitioning a fixed-length hash value is as follows: the fixed-length hash value is discretized to obtain a random hash sequence; the random hash sequence is weighted and reassembled using the Shamir secret sharing scheme to generate threshold hash components; the threshold hash components are distributed based on the consistent hashing rule to output sub-secret fragments; Lagrange interpolation refers to the process of sampling coordinate points and reconstructing polynomials on the sub-secret fragments; elliptic curve mapping refers to the process of compressing coordinate points and mapping finite fields on the interpolation polynomials through scalar multiplication.
[0059] The signature proof data is enhanced using the Transformer architecture. Further, multi-head attention weighting is applied to the signature proof data to obtain attention-weighted features. Layer normalization is then applied to the attention-weighted features to improve feature stability and generate standardized feature vectors. A non-linear transformation is performed on the standardized feature vectors, and then the dimensionality is expanded using a fully connected function to generate a high-dimensional feature representation. Global pooling is applied to compress the high-dimensional feature representation to obtain dense feature vectors. The dense feature vectors are timestamped to obtain the declaration feature representation. Finally, the declaration feature representation is serialized into JSON format to output the cross-chain verification declaration.
[0060] S3.3 The consensus coordination layer uses the sharding broadcast protocol to synchronize the state of cross-chain verification statements and shard the consensus, thereby obtaining fragments of the distributed ledger.
[0061] In specific operations, A graph neural network is used to perform multimodal feature fusion on cross-chain verification claims. Further, node embedding encoding is performed on the cross-chain verification claims to obtain node feature vectors. Graph attention aggregation is performed on the node feature vectors to generate neighborhood aggregation features. Residual fusion is performed on the neighborhood aggregation features to output fused claim features. It should be noted that node embedding encoding refers to the process of semantic embedding and structural integration of cross-chain verification claims.
[0062] Based on a fragmented broadcast protocol (such as the Gossip protocol), the fusion declaration feature is synchronized in three phases using the PBFT consensus algorithm (Practical Byzantine Fault Tolerance algorithm). Further, in the pre-preparation phase, the fusion declaration feature is hash-signed and the proposal is broadcast to obtain a pre-preparation synchronization message; in the preparation phase, the pre-preparation synchronization message is signed and the state is synchronized to generate a preparation synchronization certificate; in the submission phase, the preparation synchronization certificate is locally submitted and confirmed and broadcast, outputting the confirmed synchronization declaration.
[0063] Consensus fragmentation is performed on the confirmed synchronization declarations. Further, fragmentation keys are allocated to the confirmed synchronization declarations to obtain fragmentation consensus identifiers. Hash ring mapping is performed on the fragmentation consensus identifiers to generate distributed consensus data segments. The distributed consensus data segments are synchronized in a consistent state to output distributed ledger fragments. It should be noted that the specific process of shard key allocation is as follows: key derivation is performed on the confirmed synchronization declaration to obtain initial key material, and the initial key material is divided into sub-blocks to generate key shards. At the same time, distributed identifiers are bound to the key shards using a hash digest algorithm to obtain shard consensus identifiers; hash ring mapping refers to the process of hash transformation and ring projection of the shard consensus identifiers; consistency state synchronization refers to the process of state verification and data merging of distributed consensus data segments.
[0064] S3.4. Merge and encapsulate the cross-chain verification statement and the distributed ledger fragment to output a multi-chain collaborative storage solution.
[0065] In specific operations, The cross-chain verification declaration and distributed ledger fragments are merged and encapsulated. Furthermore, the cross-chain verification declaration and distributed ledger fragments are converted into a multi-chain protocol, transforming them into a unified protocol format to obtain protocol-compatible data. The protocol-compatible data is then semantically fused and its fields are reorganized to generate a structured data body and perform cross-chain semantic bridging to achieve logical-level data fusion and output a cross-chain fused data block. It should be noted that multi-chain protocol conversion refers to the process of standardizing and semantically aligning cross-chain verification statements and distributed ledger fragments according to the target chain protocol format (such as the XCM cross-chain message format). The specific process of cross-chain semantic bridging is as follows: semantic mapping is performed on the structured data body according to the target chain protocol format to obtain semantically unified data and integrate fields to generate integrated semantic data. At the same time, cross-chain logical rules (based on the definition of multi-chain smart contracts) are applied to logically associate the integrated semantic data to obtain cross-chain fused data blocks.
[0066] Add a multi-chain routing header to the cross-chain fused data block to obtain routable cross-chain data packets; extract the routing distribution parameters and inter-chain delay parameters of the routable cross-chain data packets, and perform weighted fusion to generate a multi-chain collaborative storage scheme.
[0067] It should be noted that the multi-link information is obtained by the header through a query of the routing registry.
[0068] S4. Based on the multi-chain collaborative storage scheme, perform distributed IPFS scheduling and on-chain collaborative evidence storage on the tamper-proof data packets to be stored to form a blockchain evidence record; verify the integrity of the blockchain evidence record and output a storage security audit report.
[0069] S4.1. Based on the multi-chain collaborative storage scheme, the anti-tampering data packets to be stored are distributed IPFS scheduled and content-addressed for storage, and the storage content identifier is output. The storage content identifier is then hashed off-chain and signed on-chain for notarization, forming a blockchain notarization record.
[0070] In specific operations, According to the multi-chain collaborative storage scheme, the IPFS cluster scheduler performs structured data block division and multi-path network distribution on the anti-tampering data packets to be stored to obtain distributed storage data blocks; the IPFS content management software (such as IPFS-Cluster) performs content addressing registration and globally unique identification on the distributed storage data blocks, and outputs storage content identifiers.
[0071] The storage content identifier is anchored off-chain by hashing. Further, the storage content identifier is timestamped to obtain timestamp authentication data. The timestamp authentication data is then integrated with a hash structure to generate a hash anchor digest. The hash anchor digest is then broadcast on a decentralized network to output the off-chain anchor proof. It should be noted that hash structure integration refers to the process of data blocking and hash iteration of timestamp authentication data; decentralized network broadcasting refers to node distribution and consensus synchronization of hash anchor digests.
[0072] The storage content identifier is signed and stored on the blockchain. Further, the storage content identifier is encrypted and signed with a private key to obtain digital signature data. The digital signature data is encapsulated into a transaction to generate a storage transaction body. The storage transaction body is broadcast on the blockchain network to form an on-chain storage record. The off-chain anchored proof and the on-chain storage record are integrated to obtain a blockchain storage record. It should be noted that blockchain network broadcasting refers to the process of distributing transactions and achieving consensus among nodes in a notarized transaction body.
[0073] S4.2 Perform Merkle tree verification on the blockchain evidence records to obtain integrity proof; aggregate the evidence chain of the integrity proof and output a storage security audit report.
[0074] In specific operations, Merkle tree verification is performed on the blockchain evidence records. Further, feature extraction and vector reconstruction are performed on the blockchain evidence records to obtain evidence feature vectors. Uniform sampling is performed on the evidence feature vectors to generate evidence data nodes. These evidence data nodes are used as leaf nodes of the Merkle tree, and the leaf nodes are recursively stacked to construct a Merkle tree structure. A depth-first traversal is performed on the Merkle tree structure to obtain the cumulative hash value of each node. When the cumulative hash value of a node is greater than the integrity threshold, the data in the Merkle tree structure is considered to meet the integrity requirements. The data in the Merkle tree structure that meets the integrity requirements is then digitally signed, and an integrity proof is output. It should be noted that recursive hierarchical stacking refers to the process of merging data and aggregating nodes layer by layer in the leaf nodes of the Merkle tree; depth-first traversal refers to the process of accessing nodes and collecting hashes in the Merkle tree structure; the complete threshold is defined based on the average hash density of the historical Merkle tree structure, with an exemplary value range of 95%-99%.
[0075] The integrity proof is aggregated into an evidence chain. Furthermore, the integrity proof is timestamped to obtain a timestamped evidence sequence. Logical linking is performed on the timestamped evidence sequence to generate an evidence chain structure. The evidence chain structure is aggregated from multiple sources and encapsulated in a structured manner to form structured audit data. The structured audit data is integrated to output a storage security audit report. It should be noted that logical linking refers to the process of chronologically arranging and logically binding a sequence of timestamped evidence.
[0076] This embodiment also provides a computer device applicable to the blockchain-based Internet of Things (IoT) data storage method, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the blockchain-based IoT data storage method proposed in the above embodiment.
[0077] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0078] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the blockchain-based Internet of Things (IoT) data storage method proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0079] In summary, this invention employs a dual privacy protection mechanism of homomorphic encryption and differential privacy to perform noise differential perturbation and security level encryption, achieving dynamic allocation of the privacy budget and precise execution of the encryption process, significantly enhancing the privacy protection strength during data storage. Simultaneously, by constructing a layered cross-chain collaboration model for threshold relay signatures and distributed ledger fragment consensus synchronization, cross-chain verification latency and communication overhead are significantly reduced, thereby achieving secure and efficient multi-chain collaborative storage in high-concurrency scenarios.
[0080] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A blockchain-based Internet of Things (IoT) data storage method, characterized in that: include, Collect IoT terminal datasets, perform noise perturbation and differential aggregation to generate privacy-preserving data; Perform hash encoding on privacy-preserving data and output a tamper-proof data packet to be stored; Homomorphic encryption algorithm is used to encrypt the data packet to be stored to prevent tampering, forming an attack-resistant ciphertext vector; the attack-resistant ciphertext vector is then used to perform data fragmentation and storage node mapping to obtain the fragmented storage index. The sharded storage index is input into the hierarchical cross-chain collaboration model, the relay authentication layer performs threshold relay signature, the consensus coordination layer performs state synchronization and consensus sharding, and the multi-chain collaborative storage scheme is output. Based on the multi-chain collaborative storage scheme, the data packets to be stored are subject to distributed IPFS scheduling and on-chain and off-chain collaborative notarization to form a blockchain notarization record; the integrity of the blockchain notarization record is verified and a storage security audit report is output.
2. The blockchain-based IoT data storage method as described in claim 1, characterized in that: The generation of privacy-protected data specifically includes the following steps. The IoT terminal dataset is randomly perturbed by injecting Laplace noise into it to obtain a noisy dataset. Privacy budget allocation and differential aggregation are performed on the noisy dataset to generate de-identified intermediate data; A sliding window filter is applied to the anonymized intermediate data to output privacy-protected data.
3. The blockchain-based IoT data storage method as described in claim 2, characterized in that: The process of outputting the tamper-proof data packet to be stored specifically includes the following steps. Top-k gradient sparsification is performed on the privacy-preserving data to form a structured gradient vector; the structured gradient vector is then hashed to generate a unique digital fingerprint. The unique digital fingerprint is timestamped using the NTP time synchronization protocol, and a tamper-proof data packet to be stored is output.
4. The blockchain-based IoT data storage method as described in claim 1, characterized in that: The process of forming attack-resistant encrypted data specifically includes the following steps. The homomorphic encryption algorithm is used to encrypt the tamper-proof data packet to be stored, and the encryption polynomial is output. Homomorphic operations and noise suppression are performed on the cryptographic polynomial to form a low-noise ciphertext structure; key exchange is performed on the low-noise ciphertext structure to obtain an attack-resistant ciphertext vector.
5. The blockchain-based IoT data storage method as described in claim 4, characterized in that: The process of obtaining the sharded storage index specifically includes the following steps. The encrypted vector against attacks is used to decode metadata and reassemble data blocks into fragmented data block groups. The data location and storage node mapping of the sharded data block group are performed using the consistent hashing algorithm to obtain the sharded storage index.
6. The blockchain-based IoT data storage method as described in claim 1, characterized in that: The specific construction of the hierarchical cross-chain collaboration model is as follows. A relay authentication layer is built using the Transformer architecture, and a consensus coordination layer is built using a graph neural network. Cross-modal feature fusion and residual layer stacking are performed on the relay authentication layer and consensus coordination layer to construct a layered cross-chain collaboration model.
7. The blockchain-based IoT data storage method as described in claim 6, characterized in that: The output multi-chain collaborative storage scheme specifically includes the following steps. The sharded storage index is input into the hierarchical cross-chain collaboration model. The relay authentication layer uses a zero-knowledge proof engine to perform threshold relay signature on the sharded storage index and generate a cross-chain verification statement. The consensus coordination layer uses a sharding broadcast protocol to synchronize the state of cross-chain verification statements and shard them to obtain fragments of the distributed ledger. The cross-chain verification statement and distributed ledger fragments are merged and encapsulated to output a multi-chain collaborative storage solution.
8. The blockchain-based IoT data storage method as described in claim 7, characterized in that: The output storage security audit report specifically includes the following steps. Based on the multi-chain collaborative storage scheme, the anti-tampering data packets to be stored are scheduled and stored using distributed IPFS and content-addressed storage, and the storage content identifier is output. The stored content identifier is anchored by off-chain hash and signed on-chain for notarization, forming a blockchain notarization record; Merkle tree verification is performed on the blockchain evidence records to obtain integrity proof; evidence chain aggregation is performed on the integrity proof to output a storage security audit report.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the blockchain-based Internet of Things data storage method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the blockchain-based Internet of Things data storage method according to any one of claims 1 to 8.
Citation Information
Cited By
Verifiable cross-modal retrieval method
CN121327887A
A verifiable cross-modal retrieval method
CN121327887B
Self-adaptive real-time digital signal encryption processing system
CN121690860A
Multi-device communication protocol processing method and system based on block chain
CN121711110A