A blockchain-based brain-computer interface learning class data credible archiving method and system
By encrypting EEG signals using Chebyshev chaotic mapping and additive homomorphic encryption algorithms, and combining them with two-layer temporal Merkle trees and IPFS storage, the privacy leakage and storage bottleneck problems of brain-computer interface learning data are solved, achieving trusted archiving and efficient verification.
Patent Information
- Application Number
- CN202611213478.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies for brain-computer interface learning data lack sufficient privacy protection capabilities, suffer from severe storage bottlenecks, and lack trusted verification mechanisms, leading to problems such as high risk of privacy leakage, large storage consumption, and transaction delays.
The EEG signal is encrypted using Chebyshev chaotic mapping and additive homomorphic encryption algorithm. Combined with two-layer temporal Merkle tree and IPFS distributed storage, only the metadata of the archived certificate is uploaded to the blockchain. The data integrity is verified by the ZK-SNARKs zero-knowledge verification mechanism.
It achieves privacy protection for EEG data, reduces storage space and transaction latency, ensures the credibility of data integrity verification, and is compatible with decentralized archiving of large-scale brain-computer interface learning data and leak-free auditing by multiple institutions.
Smart Images

Figure CN123157697A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of brain-computer interface data processing technology, and more specifically, to a blockchain-based method and system for trusted archiving of brain-computer interface learning data. Background Technology
[0002] Brain-Computer Interface (BCI) technology has been widely applied in education, cognitive training, and active learning scenarios. The learning data collected through BCI during the learning process includes various types of information such as electroencephalogram (EEG) signals, cognitive load characteristics, and learning focus indicators. This type of data is highly unique. On the one hand, it carries highly sensitive personal physiological privacy information such as users' brainprint features and real-time psychological states; leakage of such data would directly threaten user information security. On the other hand, the high sampling frequency and continuous collection of data generate massive amounts of time-series data, exhibiting typical characteristics of large data volume and high real-time requirements, placing stringent demands on storage, encryption, and trusted verification schemes.
[0003] Existing blockchain archiving solutions for brain-computer interface (BCI) learning data suffer from three major unavoidable technical flaws: First, insufficient privacy protection capabilities. When raw EEG features are directly uploaded to public or consortium blockchains for storage, attackers can reverse engineer and reconstruct the user's physiological and cognitive information, posing a significant risk of privacy breaches. Second, there is a bottleneck in blockchain storage. Uploading high-sampling-rate raw EEG data to the blockchain quickly consumes a large amount of on-chain storage space, leading to issues such as network storage explosion and transaction confirmation delays. Third, a lack of trusted verification mechanisms. The industry-standard architecture of "storing raw data off-chain and only storing hash values on-chain" cannot verify and audit the temporal integrity and feature validity of EEG data without decrypting the raw data. Summary of the Invention
[0004] To address the problems in related technologies, this invention proposes a blockchain-based trusted archiving method and system for brain-computer interface learning data, in order to overcome the aforementioned technical problems existing in the current related technologies.
[0005] The technical solution of this invention is implemented as follows:
[0006] A blockchain-based method for trusted archiving of brain-computer interface learning data includes the following steps:
[0007] The raw EEG signal X(t) is acquired in advance using an EEG acquisition device and processed according to a fixed time window T. w The brainwave learning feature vector F is constructed by segmenting the brainwave into temporal segments and extracting learning features.
[0008] The pseudo-random sequence is generated based on Chebyshev chaotic mapping, and the feature vector F is encrypted by the additive homomorphic encryption algorithm. The ciphertext matrix C is generated based on the Gaussian noise perturbation matrix that is adaptively adjusted with the brain-to-electrical-to-noise ratio.
[0009] Construct a two-layer temporal Merkle tree consisting of a base Epoch-Tree and a top Session-Tree, and process the ciphertext C within a single time window. i Concatenate timestamps to calculate hashes and generate basic leaf nodes; aggregate to obtain the single-session basic root hash R. epoch The multi-session base root hash is aggregated as the top-level leaf node to generate the global session root hash R. session Store the entire ciphertext matrix into the IPFS distributed file system and obtain the IPFS addressing hash URI. IPFS Combine user identifier, global session root hash, IPFS addressing hash, and timestamp to form archive credential metadata;
[0010] Archive credential metadata M etadata Uploaded to the blockchain smart contract, the smart contract verifies the gateway signature's legality, timestamp validity, and record uniqueness. After consensus among blockchain nodes, the metadata is permanently written into the blockchain ledger.
[0011] When a third-party organization initiates a data access request, the data holder generates a zero-knowledge proof π based on R1CS constraints. Without decrypting the original EEG features or revealing the key, the blockchain node executes the zero-knowledge verification logic. Once the verification is successful, access to the encrypted text is automatically granted.
[0012] The learning features include a focus index, a fatigue parameter, and EEG rhythm features based on power spectral density (PSD).
[0013] The generation of the ciphertext matrix C includes the following steps:
[0014] The EEG learning feature vector extracted by calibration is ;
[0015] The generation of pseudo-random sequences is represented as:
[0016] ;
[0017] In the formula, d is the order of chaos. ;
[0018] The encrypted ciphertext matrix C is represented as:
[0019] ;
[0020] In the formula, ⊗ represents the direct product. This is an additive homomorphic encryption algorithm, where R is the dynamic noise perturbation matrix.
[0021] The construction of the two-layer temporal Merkle tree includes the following steps:
[0022] For each time-sequenced ciphertext C within a single session i implement The leaf hash is obtained through calculation. Aggregate all leaf hashes of the same session to generate a single-session base root hash R. epoch ;
[0023] The root hash of all learning sessions for the same user As the top-level leaf node, the aggregation operation yields the global session root hash, represented as:
[0024] ;
[0025] Archived certificate metadata is represented as follows: .
[0026] The smart contract verification includes the following steps:
[0027] Verify that the data upload gateway is a contract-authorized trusted node;
[0028] Verify that there are no duplicate evidence records for the same user and the global session root hash combination;
[0029] The metadata is bound to the block timestamp and written to the on-chain state database, triggering the archiving of the event log for on-chain evidence storage.
[0030] The zero-knowledge verification logic executed by the blockchain node includes: a verification function. The proof body π constraint satisfies ;
[0031] The verification process does not disclose the original EEG feature vector F or the decryption key; it only outputs the results of data integrity verification.
[0032] Another aspect of the present invention
[0033] A blockchain-based trusted archiving system for brain-computer interface learning data, used to execute the aforementioned blockchain-based trusted archiving method for brain-computer interface learning data, includes: an EEG acquisition terminal module, a chaotic homomorphic encryption gateway module, a two-layer temporal Merkle tree construction module, an IPFS distributed storage module, a blockchain smart contract notarization module, and a ZK-SNARK zero-knowledge verification module.
[0034] The EEG acquisition terminal module is used to acquire raw EEG signals and extract learning features;
[0035] The chaotic homomorphic encryption gateway module is used to integrate Chebyshev chaotic mapping and Paillier homomorphic encryption algorithm to generate an adaptive noise ciphertext matrix.
[0036] The two-layer temporal Merkle tree construction module is used to construct DT-MT in layers, generating the basic root hash and the global session root hash;
[0037] The IPFS distributed storage module is used to persistently store encrypted EEG ciphertext and output a unique addressing hash.
[0038] The blockchain smart contract notarization module is used to verify the legality of metadata and complete decentralized notarization.
[0039] The ZK-SNARK zero-knowledge verification module is used to generate and verify non-decryption-based data integrity proofs.
[0040] The beneficial effects of this invention are:
[0041] This invention combines Chebyshev chaotic mapping with an adaptive homomorphic encryption algorithm. It dynamically adjusts the Gaussian noise perturbation intensity based on the signal-to-noise ratio of the EEG signal to implement privacy encryption on the EEG learning feature matrix, preventing the leakage of sensitive privacy information such as original brainprints and cognitive states due to reverse engineering. This effectively solves the problem of weak privacy protection in traditional solutions. Simultaneously, it innovatively adopts a two-layer temporal Merkle tree (DT-MT) architecture to off-chain store massive amounts of encrypted EEG data on the IPFS distributed file system, anchoring only lightweight archiving credential metadata onto the blockchain. This significantly reduces blockchain storage requirements and eliminates the direct uploading of high-sampling-rate brain-computer interface data. The solution addresses the storage explosion and transaction latency bottlenecks brought about by blockchain. In addition, it integrates a lossless zero-knowledge non-interactive integrity proof mechanism called ZK-SNARKs. Relying on R1CS constraints, it can complete the trusted verification of the temporal integrity and feature validity of EEG data without decrypting the original features or revealing the key. This makes up for the shortcomings of traditional off-chain hash storage in that it cannot perform encrypted auditing. Ultimately, while taking into account privacy and security and lightweight storage overhead, it achieves decentralized trusted archiving of brain-computer interface learning data and trusted auditing by multiple institutions without leakage. Overall, it is suitable for the archiving and use needs of large-scale BCI devices continuously collecting massive amounts of temporal EEG data in educational scenarios. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1This is a flowchart illustrating a blockchain-based trusted archiving method for brain-computer interface learning data according to an embodiment of the present invention. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of protection of the present invention.
[0045] According to an embodiment of the present invention, a blockchain-based method for trusted archiving of brain-computer interface learning data is provided.
[0046] like Figure 1 As shown, the blockchain-based trusted archiving method for brain-computer interface learning data according to an embodiment of the present invention includes the following steps:
[0047] Step S1: Acquire the raw EEG signal X(t) in advance using an EEG acquisition device, and then process it according to a fixed time window T. w The brainwave learning feature vector F is constructed by segmenting the brainwave into temporal segments and extracting learning features.
[0048] The learning characteristics include focus index, fatigue parameters, and EEG rhythm characteristics based on power spectral density (PSD), namely α, β, and θ bands.
[0049] Step S2: Based on Chebyshev chaotic mapping, a pseudo-random sequence is generated, and the feature vector F is encrypted by the additive homomorphic encryption algorithm. A Gaussian noise perturbation matrix that is adaptively adjusted with the brain signal-to-noise ratio is introduced to generate the ciphertext matrix C.
[0050] Specifically, the following steps are included:
[0051] The EEG learning feature vector extracted by calibration is .
[0052] The generation of pseudo-random sequences is represented as:
[0053] ;
[0054] In the formula, d is the order of chaos.
[0055] The encrypted ciphertext matrix C is represented as:
[0056] ;
[0057] In the formula, ⊗ represents the direct product. For additive homomorphic encryption algorithms, the Paillier algorithm can be used, where R is the dynamic noise perturbation matrix, satisfying... The perturbation variance is adaptively adjusted based on the signal-to-noise ratio (SNR) of the input EEG signal: γ is a privacy regulation factor.
[0058] Step S3: Construct a two-layer temporal Merkle tree consisting of a base-level Epoch-Tree and a top-level Session-Tree, and process the ciphertext C within a single time window. i Concatenate timestamps to calculate hashes and generate basic leaf nodes; aggregate to obtain the single-session basic root hash R. epoch The multi-session base root hash is aggregated as the top-level leaf node to generate the global session root hash R. session Store the entire ciphertext matrix into the IPFS distributed file system and obtain the IPFS addressing hash URI. IPFS Combine user identifier, global session root hash, IPFS addressing hash, and timestamp to form archive credential metadata;
[0059] The generation of basic leaf nodes is represented as follows:
[0060] ;
[0061] And the aggregation yields a single-session base root hash R epoch ;
[0062] Among them, the global session root hash R is generated. session , is represented as:
[0063] ;
[0064] The metadata that forms the archived credentials is represented as follows:
[0065] ;
[0066] Step S4, archive the metadata M of the credential. etadata Uploaded to the blockchain smart contract, the smart contract verifies the gateway signature's legality, timestamp validity, and record uniqueness. After consensus among blockchain nodes, the metadata is permanently written into the blockchain ledger.
[0067] Among them, M etadata Send to the blockchain smart contract. The smart contract performs the following verification:
[0068] Verify the timeliness of the timestamp and the validity of the signature.
[0069] The consensus node is invoked to confirm that the metadata has not been tampered with, and then it is permanently written into the blockchain ledger.
[0070] Step S5: When a third-party organization initiates a data access request, the data holder generates a zero-knowledge proof π based on R1CS constraints. Without decrypting the original EEG features or revealing the key, the blockchain node executes the zero-knowledge verification logic. After successful verification, access to the encrypted text is automatically granted.
[0071] Specifically, when regulatory agencies or educational evaluation institutions request access to archived data, the data owner must prove the authenticity of the archived data without disclosing the original feature F and the decryption key.
[0072] The proof system uses R1CS (Rank-1 Constraint System) constraints, and the logical representation of the zero-knowledge proof system is as follows:
[0073] ;
[0074] In the formula, π represents the generated proof, which satisfies the relation, expressed as:
[0075] ;
[0076] If the verification is successful, the blockchain node will automatically authorize the access to this data.
[0077] In this technical solution, the data archiving is completed upon implementation. When the teaching quality assessment agency retrieves the data, it downloads the corresponding encrypted data from IPFS and submits a ZK-SNARKs verification request to the smart contract. Without decryption, the paired bilinear mapping logic algorithm running on the smart contract automatically completes a reliable proof that "the data has not been illegally modified during transmission and offline archiving."
[0078] According to embodiments of the present invention, a blockchain-based trusted archiving system for brain-computer interface learning data is provided.
[0079] Specifically, the data archive method for the aforementioned blockchain-based brain-computer interface learning data includes: an EEG acquisition terminal module, a chaotic homomorphic encryption gateway module, a two-layer temporal Merkle tree construction module, an IPFS distributed storage module, a blockchain smart contract notarization module, and a ZK-SNARK zero-knowledge verification module.
[0080] The EEG acquisition terminal module is used to acquire raw EEG signals and extract learning features;
[0081] The chaotic homomorphic encryption gateway module is used to integrate Chebyshev chaotic mapping and Paillier homomorphic encryption algorithm to generate an adaptive noise ciphertext matrix.
[0082] The two-layer temporal Merkle tree construction module is used to construct DT-MT in layers, generating the basic root hash and the global session root hash;
[0083] The IPFS distributed storage module is used to persistently store encrypted EEG ciphertext and output a unique addressing hash.
[0084] The blockchain smart contract notarization module is used to verify the legality of metadata and complete decentralized notarization.
[0085] The ZK-SNARK zero-knowledge verification module is used to generate and verify non-decryption-based data integrity proofs.
[0086] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Those skilled in the art, upon considering the disclosure in the specification and embodiments, will readily conceive of other embodiments of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0087] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A blockchain-based method for trusted archiving of brain-computer interface learning data, characterized in that, Includes the following steps: The raw EEG signal X(t) is acquired in advance using an EEG acquisition device and processed according to a fixed time window T. w The brainwave learning feature vector F is constructed by segmenting the brainwave into temporal segments and extracting learning features. The pseudo-random sequence is generated based on Chebyshev chaotic mapping, and the feature vector F is encrypted by the additive homomorphic encryption algorithm. The ciphertext matrix C is generated based on the Gaussian noise perturbation matrix that is adaptively adjusted with the brain-to-electrical-to-noise ratio. Construct a two-layer temporal Merkle tree consisting of a base Epoch-Tree and a top Session-Tree, and process the ciphertext C within a single time window. i Concatenate timestamps to calculate hashes and generate basic leaf nodes; aggregate to obtain the single-session basic root hash R. epoch The multi-session base root hash is aggregated as the top-level leaf node to generate the global session root hash R. session Store the entire ciphertext matrix into the IPFS distributed file system and obtain the IPFS addressing hash URI. IPFS Combine user identifier, global session root hash, IPFS addressing hash, and timestamp to form archive credential metadata; Archive credential metadata M etadata Uploaded to the blockchain smart contract, the smart contract verifies the gateway signature's legality, timestamp validity, and record uniqueness. After consensus among blockchain nodes, the metadata is permanently written into the blockchain ledger. When a third-party organization initiates a data access request, the data holder generates a zero-knowledge proof π based on R1CS constraints. Without decrypting the original EEG features or revealing the key, the blockchain node executes the zero-knowledge verification logic. Once the verification is successful, access to the encrypted text is automatically granted.
2. The blockchain-based trusted archiving method for brain-computer interface learning data according to claim 1, characterized in that, The learning features include focus index, fatigue parameter, and EEG rhythm features based on power spectral density (PSD).
3. The blockchain-based trusted archiving method for brain-computer interface learning data according to claim 1, characterized in that, The generation of the ciphertext matrix C includes the following steps: The EEG learning feature vector extracted by calibration is ; The generation of pseudo-random sequences is represented as: ; In the formula, d is the order of chaos. ; The encrypted ciphertext matrix C is represented as: ; In the formula, ⊗ represents the direct product. This is an additive homomorphic encryption algorithm, where R is the dynamic noise perturbation matrix.
4. The blockchain-based trusted archiving method for brain-computer interface learning data according to claim 1, characterized in that, Constructing the two-layer temporal Merkle tree includes the following steps: For each time-sequenced ciphertext C within a single session i implement The leaf hash is obtained through calculation. Aggregate all leaf hashes of the same session to generate a single-session base root hash R. epoch ; The root hash of all learning sessions for the same user As the top-level leaf node, the aggregation operation yields the global session root hash, represented as: ; Archived certificate metadata is represented as follows: .
5. The blockchain-based trusted archiving method for brain-computer interface learning data according to claim 1, characterized in that, The smart contract verification includes the following steps: Verify that the data upload gateway is a contract-authorized trusted node; Verify that there are no duplicate evidence records for the same user and the global session root hash combination; The metadata is bound to the block timestamp and written to the on-chain state database, triggering the archiving of the event log for on-chain evidence storage.
6. The blockchain-based trusted archiving method for brain-computer interface learning data according to claim 1, characterized in that, The zero-knowledge verification logic executed by the blockchain node includes: verification function The proof body π constraint satisfies ; The verification process does not disclose the original EEG feature vector F or the decryption key; it only outputs the results of data integrity verification.
7. A blockchain-based trusted archiving system for brain-computer interface learning data, used to execute the blockchain-based trusted archiving method for brain-computer interface learning data as described in any one of claims 1 to 7, characterized in that, include: EEG acquisition terminal module, chaotic homomorphic encryption gateway module, two-layer temporal Merkle tree construction module, IPFS distributed storage module, blockchain smart contract notarization module, ZK-SNARK zero-knowledge verification module; The EEG acquisition terminal module is used to acquire raw EEG signals and extract learning features; The chaotic homomorphic encryption gateway module is used to integrate Chebyshev chaotic mapping and Paillier homomorphic encryption algorithm to generate an adaptive noise ciphertext matrix. The two-layer temporal Merkle tree construction module is used to construct DT-MT in layers, generating the basic root hash and the global session root hash; The IPFS distributed storage module is used to persistently store encrypted EEG ciphertext and output a unique addressing hash. The blockchain smart contract notarization module is used to verify the legality of metadata and complete decentralized notarization. The ZK-SNARK zero-knowledge verification module is used to generate and verify non-decryption-based data integrity proofs.
