Public health sensitive data sharing method and system based on alliance chain

By using hash functions and elliptic curve cryptography to decompose and distribute public health data on a consortium blockchain, combined with multi-party computation and zero-knowledge proofs, the issues of traceability and privacy protection in data sharing are solved, achieving secure and efficient data management.

CN121583434AInactive Publication Date: 2026-02-27QINGDAO CENT FOR DISEASE CONTROL & PREVENTION (QINGDAO INST OF PREVENTIVE MEDICINE)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511772050.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing public health data sharing methods are inadequate in protecting the security of sensitive data and achieving efficient sharing. In particular, in multi-party collaborations, it is difficult to balance data traceability and privacy protection, leading to increased risks of data leakage and verification difficulties.

Method used

A hash function is used to generate a data digest carrying an embedded identifier. The data is decomposed into factors using an elliptic curve cryptography algorithm and stored in a distributed manner across consortium blockchain nodes. The dataset is reconstructed through a multi-party computation protocol and privacy compliance is verified by combining zero-knowledge proofs to ensure data integrity and traceability.

Benefits of technology

It enables secure sharing, efficient traceability, and privacy protection of medical data, significantly improving the security and credibility of data management and ensuring the reliability of data integrity and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121583434A_ABST
    Figure CN121583434A_ABST
Patent Text Reader

Abstract

The invention discloses a public health sensitive data sharing method and system based on an alliance chain, and belongs to the field of sensitive data sharing, and the method comprises the steps: obtaining a patient record and a detection report from a medical institution node, employing a hash function to calculate an original data abstract, and obtaining binding information of an embedded identifier; generating a data factor sequence according to the binding information, performing encryption processing on each factor by adopting elliptic curve encryption, and determining a node distribution scheme for distributed storage; extracting a transaction log from the block, and for an authorized user request, collecting each node factor by adopting a multi-party computing protocol to obtain a preliminary reconstruction data set; integrity verification is carried out according to the preliminary reconstruction data set, and if it is verified that the hash value is matched with the original abstract, complete data passing verification is output; obtaining complete data passing verification, tracing and querying for a source, extracting embedded identifiers, comparing records on a chain, and generating a tracing report if the identifiers are judged to be consistent; and determining a final sharing output result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of sensitive data sharing, and particularly relates to a public health sensitive data sharing method and system based on a consortium chain. BACKGROUND

[0002] Data sharing in the field of public health is of key significance to improving the quality of medical services, promoting disease prevention and control, and driving scientific research innovation. With the deepening of medical informatization, medical institutions need to efficiently share patient records, test reports, and epidemiological data to support joint diagnosis and epidemic monitoring. However, existing data sharing methods have obvious shortcomings in protecting the security of sensitive data and achieving efficient sharing. Traditional solutions rely on centralized storage or simple encryption mechanisms, which are prone to data leakage due to single point of failure or improper authority management, and it is difficult to ensure the traceability and integrity of data sources in multi-party collaboration. This limitation makes medical institutions worry about privacy leakage when sharing data, and it is difficult to quickly verify the authenticity and ownership of data.

[0003] Under the consortium chain architecture, the core challenge of data sharing is how to balance the traceability and privacy protection of data in multi-party collaboration. First, the traceability of data sources requires identifying the original provider of each piece of data in the sharing process. For example, in cross-regional epidemic monitoring, a hospital's test report may be used by other institutions, but if the data is tampered with or the source is unknown, it may lead to incorrect epidemic analysis and affect prevention and control decisions. By embedding identification information into data and binding it with a blockchain hash value, source tracing can be achieved, but this requires that the embedded identification information remain tamper-proof and easy to verify in sharing. Second, the privacy protection of data requires decentralized storage among multiple nodes to reduce the risk of leakage. If complete medical records are directly shared, they may be stolen by malicious users, and if data is divided into multiple factors and stored in different nodes, it is necessary to ensure that a single factor cannot be cracked alone, while authorized users can efficiently reconstruct the complete information. These two technical factors are interrelated: traceability depends on the protection of data integrity, and the factorization processing of decentralized storage increases the complexity of verifying integrity. For example, in actual business, a patient record is divided into multiple factors and distributed to different hospital nodes, and if one factor is maliciously modified, it may lead to data reconstruction failure or information distortion, thereby affecting medical decisions. SUMMARY

[0004] To solve the above technical problems, the application provides a public health sensitive data sharing method based on a consortium chain, comprising:

[0005] Obtaining patient records and test reports from medical institution nodes, and generating data summaries carrying embedded identification based on a hash function;

[0006] According to the data digest, the original data is decomposed into a data factor sequence, each data factor is encrypted by using an elliptic curve encryption algorithm, and an encrypted factor set is formed;

[0007] According to the encrypted factor set, the encrypted factors are distributed among the nodes of the alliance chain, and when the number of distribution confirmations reaches a preset threshold, a transaction log is written into a block;

[0008] In response to an access request of an authorized user, the encrypted factors are collected from the nodes by a multi-party computing protocol and reconstructed into a preliminary reconstructed data set;

[0009] The integrity of the preliminary reconstructed data set is checked, and if the hash value is consistent with the data digest, the complete data verified for integrity is output;

[0010] According to the complete data verified for integrity, the embedded identifier is extracted and compared with the on-chain record, and if the identifiers are consistent, a traceability report is generated;

[0011] The data ownership information in the traceability report is parsed, the privacy compliance is verified by using a zero-knowledge proof protocol, and a final sharing result is output.

[0012] Optionally, the patient records and test reports are obtained from the medical institution node, and a data digest carrying an embedded identifier is generated based on a hash function, including:

[0013] The patient records and test reports are received from the medical institution node, and the structured data therein is extracted;

[0014] The structured data is calculated by using a hash function to obtain an original data digest;

[0015] The patient identity identifier and the timestamp are bound to the original data digest to form an embedded identifier, and a data digest carrying the embedded identifier is generated.

[0016] Optionally, the original data is decomposed into a data factor sequence according to the data digest, each data factor is encrypted by using an elliptic curve encryption algorithm, and an encrypted factor set is formed, including:

[0017] The original data is divided into an ordered data factor sequence based on a preset rule;

[0018] Each data factor is encrypted by using an elliptic curve encryption algorithm to obtain a corresponding encrypted factor;

[0019] The encrypted factors are combined into an encrypted factor set.

[0020] Optionally, the distributing the cryptographic factors among the plurality of nodes of the consortium chain according to the set of cryptographic factors, and writing the transaction log into a block when a number of distribution confirmations reaches a preset threshold, comprises:

[0021] generating a node distribution mapping table according to the set of cryptographic factors;

[0022] distributing the cryptographic factors to the plurality of nodes in the consortium chain according to the node distribution mapping table;

[0023] receiving distribution confirmation information returned by each node, and counting the number of confirmations;

[0024] if the number of confirmations reaches the preset threshold, generating a transaction log containing a node identifier and a timestamp, and writing the transaction log into a block.

[0025] Optionally, the collecting the cryptographic factors from each node and reconstructing a preliminary reconstructed data set through a multi-party computation protocol in response to an access request of an authorized user, comprises:

[0026] verifying the identity and access authority of the authorized user;

[0027] sending a factor collection instruction to each node holding the cryptographic factors through a multi-party computation protocol;

[0028] receiving the cryptographic factors returned by each node, and reconstructing the cryptographic factors through a multi-party computation protocol to obtain a preliminary reconstructed data set.

[0029] Optionally, the performing integrity verification on the preliminary reconstructed data set, and outputting complete data that has passed integrity verification if a hash value of the preliminary reconstructed data set is consistent with the data digest, comprises:

[0030] calculating a hash value of the preliminary reconstructed data set;

[0031] comparing the calculated hash value with the original data digest;

[0032] if the comparison result is consistent, outputting the preliminary reconstructed data set as complete data that has passed integrity verification.

[0033] Optionally, the extracting the embedded identifier from the complete data that has passed integrity verification and comparing the embedded identifier with a record on the chain, and generating a traceability report if the identifiers are consistent, comprises:

[0034] extracting an embedded identifier from the complete data that has passed integrity verification;

[0035] querying a record related to the complete data on the chain to obtain a chain identifier;

[0036] comparing the consistency of the embedded identifier and the chain identifier;

[0037] If the comparison result is consistent, a traceability report is generated based on the complete data and its on-chain record.

[0038] Further, the present application also discloses a public health sensitive data sharing system based on a consortium chain, which comprises:

[0039] A data digest binding module is configured to generate binding information with embedded identification according to patient records and detection reports provided by the medical institution node.

[0040] A factor encryption storage module is configured to split original data into a data factor sequence according to the binding information, and perform elliptic curve encryption on each factor to obtain an encrypted factor set, and determine a distribution scheme of the distributed storage node.

[0041] A node distribution confirmation module is configured to distribute the encrypted factor to a plurality of nodes in the consortium chain, and write a transaction log into a block when a distribution confirmation quantity reaches a preset threshold.

[0042] A data reconstruction module is configured to reconstruct a preliminary data set through a multi-party computing protocol in response to a request of an authorized user according to the transaction log.

[0043] An integrity verification module is configured to perform integrity verification on the preliminary data set, and output complete data passing the verification.

[0044] A source traceability module is configured to generate a traceability report according to the complete data passing the verification.

[0045] A privacy verification module is configured to analyze data ownership information according to the traceability report, and verify privacy compliance based on zero-knowledge proof, and output a sharing result.

[0046] In another aspect, the present application also provides an electronic device, comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein the processor implements the method when executing the computing program.

[0047] In another aspect, the present application also provides a computer readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement the method.

[0048] Compared with the prior art, the present application has the following advantages and technical effects:

[0049] The application discloses a medical data security sharing and tracing method based on a blockchain and a cryptography technology, and proposes an integrated solution for the business scene problems of medical data scattered storage, privacy protection and trusted tracing. BRIEF DESCRIPTION OF DRAWINGS

[0050] The accompanying drawings, which form a part of the present application, are intended to provide further understanding of the present application and serve as an explanation of the illustrative embodiments of the present application and are not intended to impose any undue limitations on the present application. In the drawings:

[0051] Figure 1 The method flowchart of the embodiment of the present application is shown. DETAILED DESCRIPTION

[0052] It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0053] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.

[0054] Embodiment one

[0055] As Figure 1 shown, the present embodiment provides a public health sensitive data sharing method based on a consortium chain, which includes:

[0056] Obtaining patient records and test reports from medical institution nodes, generating data digest carrying embedded identification based on a hash function;

[0057] According to the data digest, the original data is decomposed into a data factor sequence, each data factor is encrypted by using an elliptic curve encryption algorithm, and an encrypted factor set is formed;

[0058] According to the encrypted factor set, the encrypted factors are distributed among the nodes of the alliance chain, and when the number of distribution confirmations reaches a preset threshold, the transaction log is written into a block;

[0059] In response to an access request of an authorized user, the encrypted factors are collected from the nodes by a multi-party computing protocol and reconstructed into a preliminary reconstructed data set;

[0060] The integrity of the preliminary reconstructed data set is checked, and if the hash value is consistent with the data digest, the complete data verified for integrity is output;

[0061] According to the complete data verified for integrity, the embedded identifier is extracted and compared with the on-chain record, and if the identifiers are consistent, a traceability report is generated;

[0062] The data ownership information in the traceability report is parsed, the privacy compliance is verified by using a zero-knowledge proof protocol, and a final sharing result is output.

[0063] Specifically,

[0064] In step S101, the patient record and the detection report are obtained from the medical institution node, a hash function is used to calculate the original data digest, and the binding information of the embedded identifier is obtained.

[0065] The patient record and the detection report are obtained from the medical institution node, the structured data is extracted by data parsing, the patient identity information and the detection result are obtained. According to the patient identity information and the detection result, a hash function is used to calculate the digest of the original data, and the data digest is generated. If the data digest is consistent with the preset integrity check value, an embedded identifier is generated by using an encryption algorithm, and the identifier information is obtained. According to the identifier information, the embedded identifier is bound to the patient record by using an association algorithm, and the binding information is generated. The association field is extracted from the binding information, the binding information is stored in the medical institution node by using a distributed storage system, and the storage address is obtained. According to the storage address, an index algorithm is used to establish the mapping relationship between the patient record and the detection report, and a query index is generated. According to the query index, the access request is verified by a permission verification mechanism, the access legality is judged, and an authorized result is obtained.

[0066] Exemplarily, obtaining patient records and test reports from medical institution nodes can be implemented through a distributed database system, for example, using Hyperledger Fabric in a blockchain network, medical institutions as nodes store patient data, records containing patient ID, visit date, diagnosis results and test reports (such as blood test values). Assuming that the patient ID is P001, the record contains a blood test report on August 1, 2025, and the report data is in JSON format, containing white blood cell count 7.5 x 10^9 / L, red blood cell count 4.8 x 10^12 / L. The node transmits data to the processing center through an API interface (such as RESTful API) in an encrypted manner (AES-256) to ensure data integrity. Then, a hash function is used to calculate the original data digest, for example, using the SHA-256 algorithm to hash the patient record in JSON format. The input data is {“ID”:“P001”,“Date”:“2025-08-01”,“WBC”:7.5,“RBC”:4.8}, after SHA-256 calculation, a fixed length of 256-bit hash value is generated, such as“a1b2c3.。。f8e9”(here is an example, actually 64-bit hexadecimal). This hash value is used as a data digest to verify that the data has not been tampered with. The analysis process includes comparing the newly generated hash value with the stored hash value, if consistent, the data is complete. Subsequently, a binding information embedded with an identifier is generated, by combining the hash value with the patient ID and the timestamp (2025-08-01T10:00:00Z), a digital signature is generated using the ECDSA algorithm to form the binding information {“ID”:“P001”,“Hash”:“a1b2c3.。。f8e9”,“Timestamp”:“2025-08-01T10:00:00Z”,“Signature”:“x9y8z7.。。”}. This binding information is stored in the blockchain to ensure that it cannot be tampered with. Logically, obtaining data ensures that the source is reliable, hash calculation verifies integrity, and binding information associates patient identity through digital signature, forming a traceable chain.

[0067] Step S102, generate data factor sequence according to binding information, use elliptic curve encryption to encrypt each factor, and determine the node distribution scheme for distributed storage.

[0068] The original data is acquired, a data factor sequence is generated through a preset rule, and an ordered factor set is obtained. An elliptic curve encryption algorithm is used to encrypt each factor in the ordered factor set, and an encrypted factor set is obtained. If the encrypted factor set meets a preset security threshold, the encrypted factor set is divided into multiple data shards according to a data sharding strategy, and a data shard set is obtained. Through a node communication protocol, current loads and availability of nodes in a distributed storage system are acquired, and node state information is obtained. According to the node state information, a consistent hashing algorithm is used to determine a node allocation scheme of the data shard set, and an allocation mapping table is obtained. The data shard set is distributed to corresponding storage nodes according to the allocation mapping table, distributed storage is completed, and storage confirmation information is obtained. If the storage confirmation information indicates that all data shards are successfully stored, an encryption key management mechanism is used to update and distribute keys to related nodes, and key distribution records are obtained.

[0069] For example, based on the binding information to generate data factor sequence, first assume that the binding information is user identity (ID = 12345) and time stamp (T = 2025-08-13 02:07:00), and generate the initial factor sequence by the hash function SHA-256. Concatenate ID and T into a string "1234520250813020700", and calculate the hash value "e2f3c...a1b2" (example of the first 8 bits) by SHA-256. Divide it into 4 8-bit substrings, and convert them into decimal numbers as factor sequence: [3801234567, 2912345678, 4567891234, 1234567890]. To ensure security, encrypt each factor using elliptic curve encryption (ECC), select secp256k1 curve, base point G = (x, y), private key k = 987654321, and public key Q = kG. Each factor is used as plaintext m, and encrypted by ECIES algorithm: generate temporary private key r = random number (example: 54321), calculate R = rG, share key S = rQ, and encrypt m to get ciphertext c = AES-256 (S, m). Take factor 3801234567 as an example, the encrypted ciphertext is "7b9a2...f3c1" (example of the first 8 bits). Other factors are processed similarly to obtain the ciphertext sequence: [c1, c2, c3, c4]. To achieve distributed storage, a node allocation scheme is designed. Assume there are 5 storage nodes (N1 to N5), and use consistent hashing algorithm to distribute the ciphertext. Calculate the hash value (SHA-256) of each ciphertext, map it to a hash ring (range 0 to 2^32-1), and distribute the nodes N1 to N5 evenly on the ring (location example: 0, 858993459, 1717986918, 2576980377, 3435973836). The hash value of ciphertext c1 (example: 500000000) falls between N1 and N2, and is distributed clockwise to N2; c2 (example: 900000000) is distributed to N3, and so on, to obtain the allocation scheme: c1→N2, c2→N3, c3→N4, c4→N1. The analysis process ensures that the factor sequence generation is based on irreversible hash, ECC encryption ensures security, consistent hash realizes load balancing, and in the case of node failure, the neighbor node on the ring can take over to ensure data availability.

[0070] In step S103, after obtaining the node allocation scheme, the encrypted factors are distributed to multiple nodes in the alliance chain. If the number of distribution confirmations reaches the preset threshold, the transaction log is recorded in the block.

[0071] The acquisition node distribution scheme extracts a target node list from a pre-established configuration table to determine a consortium chain node set. According to the target node list, an encryption factor is distributed to the consortium chain nodes to generate a distribution task record. Through the distribution task record, distribution confirmation information of each node is collected, and the number of confirmations is counted. If the number of confirmations reaches a preset threshold, a transaction log is generated, including a node identifier and a timestamp. The transaction log is written into a block, a block hash value is calculated using a hash algorithm, and a block record is determined. According to the block record, the consortium chain state is updated, synchronized to all nodes, and log storage is completed. Through block storage information, the consistency of the transaction log is verified, and the on-chain data confirmation is obtained.

[0072] Exemplarily, in the consortium chain, the distribution of the encryption factor and the recording of the transaction log are implemented. First, the encryption factor is generated through the node distribution scheme. Assuming that the Shamir secret sharing algorithm is used, the key S = 123456 is divided into n = 5 sub-keys, the threshold k = 3, and at least 3 nodes are ensured to cooperate to reconstruct the key. When generating the sub-key, a polynomial f(x) = 123456 + a1x + a2x^2 is used, where a1 = 789 and a2 = 456 are random coefficients, and the modulus p = 1000007 (large prime number). The sub-keys are distributed to the 5 nodes, and f(1) = 124701, f(2) = 126854, f(3) = 130875, f(4) = 136764, and f(5) = 144521 are calculated. The sub-keys are distributed to the nodes after being encrypted by the elliptic curve encryption (ECC, curve secp256k1), the nodes receive and decrypt them, and the signature is verified to ensure data integrity. The distribution confirmation is realized through a smart contract, and the nodes send confirmation transactions to the chain, and the contract counts the number of confirmations. Assuming that the preset threshold is 3, when 3 or more confirmations are received (for example, nodes 1, 2, and 3 return confirmations), the contract triggers the recording of the transaction log. The log includes a timestamp (2025-08-13 02:07:00), a transaction ID (hash value such as 0xabc123), sub-key indexes (1, 2, and 3), and node IDs (N1, N2, and N3). If the number of confirmations is less than 3, the contract waits for a timeout (set to 60 seconds) and retries the distribution. When recording the log, the transaction data is hashed by SHA-256 to generate a block hash, and is added to a block (height 10086). If nodes 4 and 5 have not confirmed due to network delay, the system analyzes the delay log and adjusts the priority of the next distribution to ensure network stability.

[0073] In step S104, the transaction log is extracted from the block, and for an authorized user request, a multi-party computation protocol is used to collect the factors of each node to obtain a preliminary reconstructed data set.

[0074] The transaction log is obtained from the block, the structured transaction data is extracted by using a log analysis algorithm, and a transaction log set is obtained. Through a multi-party computing protocol, factor collection instructions are sent to each distributed node to obtain node factor data and generate a node factor set. A user authority verification mechanism is used, and if an authorized user request is received, the user identity is verified and the user access authority is determined. According to the transaction log set and the node factor set, a data reconstruction algorithm is executed to generate a preliminary reconstructed data set. Through a privacy protection mechanism, the preliminary reconstructed data set is encrypted to obtain an encrypted reconstructed data set. A data integrity verification algorithm is used, and if the encrypted reconstructed data set passes the integrity check, the final reconstructed data set is output. According to the final reconstructed data set, a data distribution index is generated to determine the data distribution path.

[0075] For example, when extracting transaction logs from blocks, the getLogs method of the blockchain node API interface (such as web3.js of Ethereum) can be called to specify the block range (such as block height 1000000 to 1000010), filter the event logs of a specific smart contract address (such as 0x1234...abcd), and obtain JSON format log data containing transaction hash, timestamp (such as 2025-08-13 02:07:00), and event parameters (such as transfer amount 100.5 ETH). After extraction, the log data needs to be parsed into a structured data set, including fields such as transaction ID, sender, receiver, amount, etc., and stored in a local database (such as MongoDB). For authorized user requests, the user identity can be verified through the OAuth2.0 protocol to generate an access token (such as a 256-bit JWT token), ensuring that only authorized users (such as public key 0x5678...efgh) can access log data. Use multi-party computing protocol (such as SecureMulti-PartyComputation based on Shamir secret sharing algorithm) to collect node factors, assuming that 3 nodes (N1, N2, N3) hold factors x1=5, x2=10, x3=15, the protocol calculates the shared secret s=30 through Lagrange interpolation (calculation formula: s=Σ(xi*Li(0)), where Li is the Lagrange basis function), ensuring data privacy. When the preliminary reconstructed data set is generated, the node factors are combined with the transaction logs, and the K-means clustering algorithm (set K=3) is used to classify transaction data, based on amount and timestamp characteristics, to generate cluster centers (such as C1:50.2ETH,02:00;C2:150.7ETH,02:05;C3:10.3ETH,02:10). The analysis process includes verifying the intra-cluster variance (such as 0.25ETH^2) to evaluate the quality of classification, and if the variance is greater than the threshold value 0.5, adjust the K value and re-cluster. The reconstructed data set is stored in CSV format, containing transaction ID, amount, cluster label, etc., facilitating subsequent business analysis.

[0076] Step S105, integrity check is performed according to the preliminary reconstructed data set. If the check hash value matches the original digest, the complete data is output as verified.

[0077] The input reconstructed data set is obtained, and the data set content is obtained by parsing its structure. The hash value of the reconstructed data set is calculated using a hash algorithm, and the calculation result is obtained. The original data digest is obtained from the storage medium, and the digest content is determined. If the calculated hash value is consistent with the original data digest, the data integrity is confirmed, and the verification passed state is obtained. According to the verification passed state, the complete data in the reconstructed data set is extracted, and the output data is obtained. The output data is formatted by the data processing module, and the final output result is obtained. The final output result is saved to the specified storage location using the storage mechanism, and the storage confirmation is obtained.

[0078] For example, assume that there is a preliminary reconstructed data set containing 1000 records, each record having a user ID, transaction amount and timestamp, stored in JSON format, and the file size is 2MB. Integrity check first needs to calculate the hash of the data set to verify whether it matches the original digest. The SHA-256 algorithm is used to hash the data set, and the specific implementation is to read the JSON file by byte stream, input it into the SHA-256 hash function, and generate a 256-bit hash value, for example, "8f434346648f6b96df89dda901c5176b10a6d83961dd3c1ac88b59b2dc327aa4". Assuming that the original digest value is given by the data provider and stored in the verification file, it is the same hash value. The verification process is implemented by the hashlib library of Python, which reads the data set file, calculates its hash value, and compares it with the original digest bit by bit. If they are completely consistent, it is confirmed that the data set has not been tampered with, and the integrity is passed. Then, the integrity of the data set is analyzed, the number of records is checked to see if it is 1000, the fields are checked to see if they contain ID, amount and timestamp, and the proportion of missing values is checked to see if it is less than 1%. Through the script statistics, it is found that all record fields are complete, there are no missing values, and the total number of records matches the expected value. Finally, the complete data verified is output in JSON format, containing all 1000 records, and written directly into a new file "verified_data.json". If the hash value does not match, for example, the calculated value is "9a5b" and the original digest is "8f43", an exception is triggered, a log is recorded and output is stopped. Through this process, the data integrity is ensured.

[0079] Step S106, the verified complete data is obtained, the source trace query is performed, the embedded identifier is extracted and compared with the on-chain record, and if the identifier is consistent, a trace report is generated.

[0080] The data passed by the verification is obtained, the data cleaning technology is used to extract the complete data set from the data passed by the verification, and the structured data is obtained. According to the structured data, the source trace information is queried, the distributed database retrieval technology is used to locate the relevant source information, and the source trace data set is obtained. The embedded identifier is extracted from the source trace data set, the feature extraction algorithm is used to separate the embedded identifier, and the identifier set is obtained. For the comparison between the identifier set and the on-chain record, the hash comparison algorithm is used, and if the hash values are consistent, the identifier consistency is determined. According to the identifier consistency, the integrity of the on-chain record is verified, and if the record is complete, the consistency verification result is generated. The consistency verification result is used in combination with the source trace data set to generate the trace result, and the structured trace information is output. Through the structured trace information, the data serialization technology is used to generate the final trace output, and the storable trace record is obtained.

[0081] For example, when obtaining the complete data passed by the verification, first, the records containing timestamps, product IDs and source information are extracted from the data source (such as a supply chain database) through an API interface, and it is assumed that the obtained data set contains 1000 records, each record including a product ID (such as P001), a production date (such as 2025-01-01 08:00:00) and a supplier code (such as S123). The SHA-256 algorithm is used to calculate the hash of the fields of each record to generate a unique identifier (such as hash(P001+2025-01-01+S123)=a1b2c3), and the hash value stored in the database is compared, and if the matching rate reaches more than 99%, it is considered that the data integrity verification is passed. Then, for the source trace query, the system calls the smart contract interface to query the transaction records associated with the product ID from the blockchain (such as Ethereum), and it is assumed that the on-chain records of P001 contain 10 blocks with block heights from 10000 to 10010, each block recording the information of suppliers, transporters and timestamps. When extracting the embedded identifier, the metadata field of the on-chain record is parsed to obtain the embedded digital signature (such as a 64-byte signature generated by ECDSA), and the public key is used to decrypt and verify the signature validity, and it is assumed that the verification pass rate is 98%. Then, the consistency of the embedded identifier and the on-chain record is compared, the Euclidean distance of the hash values of the two is calculated, and if the distance is less than 0.01, it is determined to be consistent. Finally, the trace report is generated, the report contains the product ID, the source path (such as supplier S123→transporter T456→retailer R789), the timestamp and the consistency score (such as 99.5%), and is output in JSON format, stored in a distributed file system (such as IPFS), and an access link (such as ipfs: / / QmX) is generated.

[0082] In step S107, the data attribution information is parsed from the trace report, the zero-knowledge proof is used to verify the privacy compliance, and the final shared output result is determined.

[0083] The original data is obtained from the traceability report, the data ownership information is extracted through an analysis algorithm, and a structured ownership data set is obtained. For the structured ownership data set, a zero-knowledge proof protocol is used to perform privacy compliance verification to determine the ownership data that passes the verification. If the ownership data that passes the verification meets the preset compliance standards, the data is encrypted to generate an encrypted ownership data set. According to the encrypted ownership data set, a secure multi-party computation protocol is used to generate a shared output result to obtain preliminary shared data. The key fields are extracted from the preliminary shared data, and a hash function is used to process the final shared output hash value. For the final shared output hash value, a digital signature technology is used for authentication to obtain the authenticated shared output result. The authenticated shared output result is stored in a distributed storage system to generate a traceable storage identifier.

[0084] For example, when analyzing data ownership information from a traceability report, natural language processing technology combined with regular expression analysis of structured documents can be used.

[0085] For example, assume that the traceability report is in JSON format and contains the fields "data ID:001, ownership:Enterprise A, timestamp:2023-10-01". The JSON is parsed using the Python json.loads() function to extract the ownership field, and the code implementation is as follows: data=json.loads(report); ownership=data[’ownership’], which obtains "Enterprise A". To verify privacy compliance, a zero-knowledge proof protocol zk-SNARK is used, and the specific implementation is to construct a polynomial P(x)=x^2+2x+1 to prove that the data ownership is within the set {Enterprise A, Enterprise B} without revealing the specific ownership. The proof is generated using the libsnark library, and the input is the ownership hash value (e.g., the SHA-256 generated hash of Enterprise A: a1b2c3). The verifier only knows the legality of the ownership, and the computational complexity is O(logn), where n is the size of the set, and the verification time is approximately 0.1 seconds. When generating the final shared output result, a differential privacy algorithm is used to add noise to protect the data. Assuming that the original data is access volume 1000, a Laplace noise (scale parameter b=10) is added to generate a noise value ε~Lap(0,10), and the shared output 1002.3 is obtained. The analysis process is as follows: parsing ensures accurate data ownership extraction, zero-knowledge proof guarantees privacy compliance, differential privacy protects output data, and the three steps form a closed-loop logic. The parsed ownership information provides input for the proof, the proof result determines the compliance of the shared data, and the final output meets the privacy protection requirements.

[0086] The embodiment also discloses a public health sensitive data sharing system based on a consortium chain, comprising:

[0087] The data digest binding module is configured to obtain patient records and detection reports from the medical institution node, calculate original data digests by using a hash function, and obtain binding information with embedded identifiers.

[0088] The factor encryption storage module is configured to generate a data factor sequence according to the binding information, encrypt each factor by using elliptic curve encryption, and determine a node allocation scheme for dispersed storage.

[0089] The node distribution confirmation module is configured to distribute encrypted factors to multiple nodes in the alliance chain after obtaining the node allocation scheme, and determine whether the number of distribution confirmations reaches a preset threshold, and record transaction logs into a block if the number of distribution confirmations reaches the preset threshold.

[0090] The data reconstruction module is configured to extract transaction logs from the block, collect node factors by using a multi-party computing protocol for an authorized user request, and obtain a preliminary reconstructed data set.

[0091] The integrity verification module is configured to perform integrity verification according to the preliminary reconstructed data set, and output complete data with verification passed if the verification hash value matches the original digest.

[0092] The source tracing module is configured to obtain complete data with verification passed, extract embedded identifiers and compare on-chain records for a source tracing query, and determine whether to generate a tracing report if the identifiers are consistent.

[0093] The privacy verification module is configured to parse data ownership information from the tracing report, verify privacy compliance by using zero-knowledge proof, and determine a final shared output result.

[0094] On the other hand, the embodiment also provides an electronic device, which includes a memory, a processor, and a computing program stored in the memory and executable on the processor, and the processor implements the method when executing the computing program.

[0095] On the other hand, the embodiment also provides a computer-readable storage medium, which stores a computer program, and the computer program implements the method when executed by a processor.

[0096] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A public health sensitive data sharing method based on a consortium chain, characterized in that, The method comprises the following steps: Obtaining patient records and test reports from medical institution nodes, generating a data digest carrying an embedded identifier based on a hash function; Decomposing the original data into a data factor sequence according to the data digest, encrypting each data factor using an elliptic curve encryption algorithm to form an encrypted factor set; Distributing the encrypted factors among multiple nodes of a consortium chain according to the encrypted factor set, and writing a transaction log into a block when the number of distribution confirmations reaches a preset threshold; In response to an access request of an authorized user, collecting encrypted factors from each node through a multi-party computation protocol and reconstructing a preliminary reconstructed data set; Performing an integrity check on the preliminary reconstructed data set, and if the hash value is consistent with the data digest, outputting the complete data that has passed the integrity verification; According to the integrity-verified complete data, extracting the embedded identifier and comparing it with the on-chain record, if the identifiers are consistent, generating a traceability report; Analyzing the data ownership information in the traceability report, verifying the privacy compliance using a zero-knowledge proof protocol, and outputting the final shared result.

2. The method of claim 1, wherein, The method comprises the following steps: Receiving patient records and test reports from medical institution nodes, extracting structured data therefrom; Calculating the structured data using a hash function to obtain an original data digest; Binding a patient identifier and a timestamp to the original data digest to form an embedded identifier, and generating a data digest carrying the embedded identifier.

3. The method of claim 1, wherein, The method comprises the following steps: Dividing the original data into an ordered data factor sequence based on a preset rule; Encrypting each data factor using an elliptic curve encryption algorithm to obtain the corresponding encrypted factor; Combining the encrypted factors into an encrypted factor set.

4. The method of claim 1, wherein, The method comprises the following steps: Generating a node distribution mapping table according to the encrypted factor set; Distributing the encrypted factors to multiple nodes in the consortium chain according to the node distribution mapping table; Receiving distribution confirmation information returned by each node and counting the number of confirmations; If the number of confirmations reaches a preset threshold, generating a transaction log containing a node identifier and a timestamp, and writing it into a block.

5. The method of claim 1, wherein, The method comprises the following steps: Verifying the identity and access rights of the authorized user; Sending factor collection instructions to each node holding encrypted factors through a multi-party computation protocol; Receiving encrypted factors returned by each node and reconstructing the encrypted factors using a multi-party computation protocol to obtain a preliminary reconstructed data set.

6. The method of claim 1, wherein, The method comprises the following steps: Calculating the hash value of the preliminary reconstructed data set; The calculated hash value is compared with the original data digest; If the comparison results are consistent, the initially reconstructed dataset will be output as the complete data after integrity verification.

7. The method of claim 1, wherein, Based on the complete data that has undergone integrity verification, the embedded identifier is extracted and compared with the on-chain record. If the identifiers match, a traceability report is generated, including: Extract embedded identifiers from complete data that has undergone integrity verification; Query the on-chain records related to this complete data and obtain the on-chain identifier; Compare the embedded identifier with the on-chain identifier for consistency; If the comparison results are consistent, a traceability report will be generated based on the complete data and its on-chain records. 8.A public health sensitive data sharing system based on a consortium chain, characterized in that, include: The data summary binding module is used to generate binding information with embedded identifiers based on patient records and test reports provided by medical institution nodes; The factor encryption storage module is used to split the original data into a data factor sequence according to the binding information, perform elliptic curve encryption on each factor to obtain an encrypted factor set, and determine the allocation scheme of the distributed storage nodes. The node distribution confirmation module is used to distribute encryption factors to multiple nodes in the consortium blockchain, and write the transaction log to the block when the number of distribution confirmations reaches a preset threshold. The data reconstruction module is used to reconstruct the initial dataset based on transaction logs and in response to requests from authorized users, using a multi-party computation protocol. The integrity verification module is used to perform integrity verification on the initial dataset and output the complete data that has passed the verification. The source traceability module is used to generate traceability reports based on the verified complete data; The privacy verification module is used to parse data ownership information based on the traceability report, verify privacy compliance based on zero-knowledge proof, and output the sharing result.

9. An electronic device comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, characterized in that, When the processor executes the computing program, it implements the method of any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. When the computer program is executed by a processor, it implements the method of any one of claims 1-7.