Data trusted sharing method based on block chain consensus mechanism

By introducing FROST threshold signature, KZG multinomial commitment, and ML-KEM encryption algorithm, combined with SM4-GCM integrity verification, an electronic medical record sharing method based on blockchain consensus mechanism is constructed. This solves the security risks and performance bottlenecks in cross-institutional data sharing and realizes a highly secure and reliable data sharing process.

CN121462285AInactive Publication Date: 2026-02-03HUNAN YUNHANG EDUCATION TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies lack trusted data storage, access control, and auditing mechanisms in cross-institutional electronic medical record sharing. Centralized platforms are vulnerable to attacks and lack resistance to quantum attacks and flexible and secure key negotiation schemes, resulting in security risks and performance bottlenecks in the data sharing process.

Method used

By employing FROST threshold signature, KZG multinomial commitment, ML-KEM encryption algorithm and SM4-GCM integrity verification technology, a full-process trusted sharing method based on blockchain consensus mechanism is constructed, including data preprocessing, encrypted storage, access authorization and auditing processes, and secure data sharing is achieved through consortium blockchain network.

Benefits of technology

It enhances the security and compliance of cross-institutional medical data sharing, and realizes a data sharing process with strong tamper resistance, high encryption security, strong access control and audit traceability, ensuring the integrity and confidentiality of data on and off the blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121462285A_ABST
    Figure CN121462285A_ABST
Patent Text Reader

Abstract

The invention discloses a trusted data sharing method based on a block chain consensus mechanism. The method comprises the following steps: S1, constructing an alliance chain network; s2, completing KZG polynomial commitment generation, ML-KEM algorithm encryption storage and pointer registration; s3, the data provider medical institution completes an evidence storage transaction of the FROST threshold signature; s4, the target medical institution completes the access request transaction; s5, the data provider medical institution sends a KZG unpacking proof and a data item, the target medical institution obtains a storage pointer and a commitment value, KZG verification check is executed, and after verification is passed, an ML-KEM algorithm is executed for depacking to obtain a session key; and S6, the target medical institution completes the audit transaction, and after the alliance chain network broadcast, the consensus node executes rule verification of the access control contract and the audit contract. The multi-node electronic medical record sharing and tamper-proof evidence storage method is high in performance and traceability, and is suitable for credible circulation of sensitive health data among multiple medical institutions.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data security and blockchain technology, and in particular to a data trusted sharing method based on a blockchain consensus mechanism. BACKGROUND

[0002] Under the background of the rapid development of digital medicine today, electronic medical records, as the core carrier of digital medical services, carry a large amount of sensitive patient information and clinical data. With the increasing frequency of patients' cross-institutional medical behavior, the demand for sharing of electronic medical records among different medical institutions is increasing, especially in the business scenarios of hierarchical diagnosis and treatment, two-way referral, remote consultation, etc., higher requirements for data trusted sharing capabilities are put forward. In the prior art, the cross-institutional circulation of electronic medical records is usually realized by relying on a centralized data platform or data exchange middleware. Although this architecture solves the problem of "information island" to some extent, it also has significant defects: the centralized platform is easy to become an attack target and is difficult to meet the high requirements of medical data on privacy, tamper resistance and auditability; the existing system generally lacks verifiable chain evidence in data access control and sharing behavior audit, and cannot support traceable tracking of data responsibility.

[0003] In the evidence storage and sharing mechanism, traditional methods mostly use static signature for data authentication, and fail to fully introduce threshold signature, zero-knowledge proof and other new cryptographic technologies, resulting in performance bottlenecks and security risks in the system when dealing with high-frequency interactions or multi-node cooperation. The existing blockchain evidence storage technology mainly focuses on transaction-level data consistency, and lacks sufficient support for field-level integrity verification, encryption verification and access audit capabilities of structured medical data in the sharing process. Access authorization and data decryption often use symmetric key or traditional public key encryption mechanism, which lacks the ability to resist quantum attacks and flexible and secure key agreement schemes.

[0004] The existing technology still has a series of technical defects in supporting trusted storage of medical data, cross-institutional access control, secure encryption storage and sharing behavior audit, and it is urgent to introduce a trusted sharing method based on a blockchain consensus mechanism and new cryptographic algorithms to realize the separate management and safe cooperation of data ownership, usage rights and audit rights, and to provide practical technical support for the high-security sharing of sensitive data such as electronic medical records. SUMMARY

[0005] One purpose of the present application is to provide a data trusted sharing method based on a blockchain consensus mechanism, which fully integrates FROST threshold signature, KZG polynomial commitment, ML-KEM encryption algorithm and SM4-GCM integrity verification technology, constructs a full-process trusted mechanism for electronic medical record sharing between medical institutions, and details the collaborative method of key processes such as evidence generation, access authorization, encryption and decryption, and audit chaining, which has the advantages of strong tamper resistance, high encryption security, strong access controllability and audit traceability, and can effectively improve the security and compliance of cross-institutional medical data sharing.

[0006] According to the data trusted sharing method based on the blockchain consensus mechanism, the method comprises the following steps:

[0007] S1, constructing a consortium chain network and completing contract deployment and parameter initialization;

[0008] S2, the data provider medical institution pre-processes the electronic medical record in the multi-node consensus anti-tampering mechanism, completes KZG polynomial commitment generation, ML-KEM algorithm encryption storage and pointer registration;

[0009] S3, the data provider medical institution completes the evidence transaction of FROST threshold signature, and the evidence contract rules are checked by the consensus node after being broadcasted by the consortium chain network;

[0010] S4, the target medical institution completes the access request transaction, and the access control contract rules are checked by the consensus node after being broadcasted by the consortium chain network;

[0011] S5, the data provider medical institution sends KZG unsealing proof and data items, and the target medical institution obtains storage pointers and commitment values according to the access token, reads electronic medical record ciphertext from an off-chain storage node and performs KZG verification check, and obtains a session key by performing ML-KEM algorithm unpacking after verification;

[0012] S6, the target medical institution completes the audit transaction, and the rules of the access control contract and the audit contract are checked by the consensus node after being broadcasted by the consortium chain network.

[0013] Optionally, the contract deployment includes deploying the evidence contract, the access control contract and the audit contract in the consortium chain network, and establishing patient identification and medical event identification coding rules; the patient identification is generated by personal information hashing; and the medical event identification is generated by combining the patient identification and the timestamp.

[0014] The consortium chain network includes a data provider medical institution, a target medical institution and a consensus node;

[0015] The parameter initialization includes initializing KZG polynomial commitment public parameters and configuring a FROST threshold signature group.

[0016] Optionally, the S2 specifically includes:

[0017] S21, the preprocessing includes structured processing and standardized processing; a patient identifier is generated through the structured processing, and a clinic event identifier is generated through the standardized processing; and a timestamp is created;

[0018] S22, the KZG polynomial commitment generation specifically includes:

[0019] The preprocessed electronic medical records are grouped into a medical record set in a preset order, SHA-256 hash operation is performed on each electronic medical record in the medical record set respectively, and a corresponding medical record index fingerprint sequence is generated;

[0020] The medical record index fingerprint sequence is input as a data point in a finite field, and a uniquely determined polynomial is constructed based on the Lagrange interpolation method ; the KZG polynomial commitment public parameters are called, and the polynomial is subjected to KZG commitment algorithm, and a corresponding commitment value is output, which is used as an on-chain trusted index identifier of the medical record set.

[0021] S23, the ML-KEM encryption storage and pointer registration specifically include:

[0022] An authenticated secure random number generator is used to generate a random entropy seed and a random initial vector; a session key is generated based on the ML-KEM algorithm and a key identifier is allocated ; SM4-GCM algorithm parameters are set, the patient identifier, the clinic event identifier and the commitment value are used as additional authentication data, the session key and the random initial vector are used to perform SM4-GCM algorithm encryption on the electronic medical record plaintext, and electronic medical record ciphertext and integrity label are output; and encrypted metadata records are generated;

[0023] The write interface of an off-chain storage node is called, the electronic medical record ciphertext and the integrity label and the encrypted metadata records are atomically written, and a storage pointer is obtained; a mapping relationship between the storage pointer and the patient identifier, the clinic event identifier, the commitment value, the key identifier and the timestamp is established in the pointer registration table.

[0024] The atomic writing refers to writing the electronic medical record ciphertext, the integrity label and the encrypted metadata as an indivisible whole into the off-chain storage node

[0025] Optionally, the S3 specifically includes:

[0026] S31, constructing a storage transaction by the data provider medical institution, the storage transaction comprising a patient identifier, a medical event identifier, a commitment value, a storage pointer, a timestamp, an algorithm identifier, a version number, and a key identifier serializing the storage transaction and generating a storage transaction digest;

[0027] S32, initiating a FROST threshold signature process by the data provider medical institution, collecting threshold signature shares and generating a FROST threshold signature by aggregation, and writing the FROST threshold signature into the storage transaction;

[0028] S33, broadcasting the storage transaction to the consortium chain network by the data provider medical institution;

[0029] S34, performing signature verification and field integrity checking on the storage transaction by the consensus node, calling a storage contract for rule checking, reaching an agreement according to a preset consensus algorithm, and completing block packaging;

[0030] The contract checking is a consensus node executing on-chain storage contract logic: rule checking on storage uniqueness, mapping consistency, timestamp validity, and node permissions of the storage transaction, and the rule checking passes to allow writing to the block, otherwise the transaction is rejected. The storage uniqueness refers to that the combination of the same patient identifier and medical event identifier corresponds to only one storage transaction in the consortium chain ledger; the mapping consistency refers to that the mapping relationship between the storage pointer and the patient identifier, medical event identifier, and commitment value registered on the chain remains consistent and is not allowed to be tampered with or reused. The timestamp validity refers to that the timestamp of the storage transaction must comply with the preset format and be later than the timestamp of the existing related storage record, preventing old data from covering new data. The node permission refers to that the medical institution node initiating the storage transaction must be in the consortium chain registration whitelist and have a legal storage operation qualification.

[0031] The preset consensus algorithm is a practical Byzantine fault tolerance algorithm PBFT, used to ensure agreement on the storage transaction in the consortium chain network.

[0032] S35, writing the storage transaction into a block and updating a distributed ledger by the consensus node.

[0033] Optionally, the S4 specifically comprises:

[0034] S41, constructing an access request transaction by the target medical institution, the access request transaction comprising a patient identifier, an access range, an access period, a target medical institution identifier, an algorithm identifier, a version number, and a key identifier, serializing the access request transaction and generating an access request transaction digest;

[0035] S42, initiate the FROST threshold signature process by the target medical institution, generate the FROST threshold signature, and write the FROST threshold signature into the access request transaction;

[0036] S43, broadcast the access request transaction to the consortium chain network by the target medical institution;

[0037] S44, perform signature verification and field integrity check on the access request transaction by the consensus node, call the access control contract for rule check, and perform rule check on the access range and access period according to the on-chain authorization strategy and target medical institution identity verification;

[0038] S45, generate the access token by the access control contract and write the access token in the consortium chain network, record the mapping relationship between the access token, the patient identifier, the access range, the access period, and the target medical institution identifier, and complete block packaging according to the preset consensus algorithm;

[0039] S46, return the index position and commitment value to the target medical institution by the access control contract.

[0040] Optionally, the S5 specifically includes:

[0041] S51, generate the KZG unseal proof according to the index position by the data provider medical institution, and send the KZG unseal proof and the data item to the target medical institution; the data item refers to the fingerprint value in the medical record index fingerprint sequence;

[0042] S52, verify the validity and authorized range of the access token by the target medical institution, and obtain the storage pointer and commitment value according to the access token;

[0043] S53, call the read interface of the off-chain storage node by the target medical institution, and obtain the electronic medical record ciphertext, integrity label, and encrypted metadata record according to the storage pointer;

[0044] S54, perform KZG verification check by the target medical institution, confirm the consistency of the data item and the commitment value according to the commitment value, index position, and KZG unseal proof, enter the decryption process when consistent, and terminate the process and mark verification failure when inconsistent;

[0045] S55, when consistent, obtain the key encapsulation data corresponding to the key identifier by the target medical institution and perform ML-KEM algorithm unencapsulation to obtain the session key;

[0046] S56, performing GCM integrity tag verification: according to the random initial vector in the encrypted metadata record, the target medical institution uses the SM4-GCM algorithm and the session key to decrypt the electronic medical record ciphertext and verify the integrity tag, and outputs the electronic medical record plaintext when the verification is passed, and terminates the decryption result when the verification fails.

[0047] Optionally, the S6 specifically comprises:

[0048] S61, constructing an audit transaction by the target medical institution, the audit transaction comprising an access token, a target medical institution identifier, a timestamp, a KZG verification check result, a GCM integrity tag verification result and an algorithm identifier, a version number, a key identifier, serializing the audit transaction and generating an audit transaction digest;

[0049] S62, initiating a FROST threshold signature process by the target medical institution, collecting threshold signature shares and aggregating to generate a FROST threshold signature, and writing the FROST threshold signature into the audit transaction;

[0050] S63, broadcasting the audit transaction to the consortium chain network by the target medical institution;

[0051] S64, performing signature verification and field integrity check on the audit transaction by the consensus node, performing validity check on the access token identifier and the timestamp according to the access control contract and performing rule check according to the authorization strategy, and performing rule check on the record format and record range of the audit transaction field according to the audit contract;

[0052] S65, when the contract verification fails, marking the corresponding evidence state as frozen by the access control contract and triggering an alarm, and when the contract verification passes, recording the access token identifier, the target medical institution identifier, the timestamp, the KZG verification result and the GCM integrity tag verification result by the audit contract, and establishing an associated mapping with the commitment value and the index position;

[0053] S66, writing the audit transaction into a block by the consensus node and updating the distributed ledger.

[0054] The beneficial effects of the present application are:

[0055] The present application introduces the FROST threshold signature mechanism, realizes the signature authentication of the evidence transaction, the access request transaction and the audit transaction in the consortium chain network without a central trust node, effectively improves the fault tolerance and cooperability of the signature process. Secondly, combined with the KZG polynomial commitment and the unsealing proof technology, the electronic medical record fingerprint data is structured and verified in the data sharing process, the consistency check between the on-chain commitment value and the off-chain actual data is realized, and the verifiability of the data sharing process is enhanced.

[0056] The one-time session key generated by adopting the ML-KEM algorithm is matched with the SM4-GCM algorithm to complete the encryption and decryption of the electronic medical record and the integrity tag check, and the confidentiality and integrity of the data in the off-chain transmission process are effectively realized.

[0057] The multi-node consensus mechanism based on the PBFT consensus algorithm and the contract rule check process ensure the tamper resistance and non-repudiation of the evidence storage, access and audit operation in the blockchain network, and provide a complete, closed-loop and traceable technical path for the cross-institution trusted sharing of the electronic medical record. BRIEF DESCRIPTION OF DRAWINGS

[0058] The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of the specification, illustrate embodiments of the application and are used to explain the application, and do not constitute a limitation on the application. In the drawings:

[0059] Figure 1 The overall flowchart of the data trusted sharing method based on the blockchain consensus mechanism proposed by the application is shown in the figure;

[0060] Figure 2 The multi-node consensus tamper-proof mechanism structure diagram of the data trusted sharing method based on the blockchain consensus mechanism proposed by the application is shown in the figure;

[0061] Figure 3 The alliance chain network architecture and node role diagram of the data trusted sharing method based on the blockchain consensus mechanism proposed by the application is shown in the figure. DETAILED DESCRIPTION

[0062] The application will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, and only illustrate the basic structure of the application in a schematic manner, and therefore only show the components related to the application.

[0063] REFERENCE Figures 1-3 A data trusted sharing method based on a blockchain consensus mechanism, comprising the following steps:

[0064] S1, constructing an alliance chain network and completing contract deployment and parameter initialization;

[0065] S2, the data provider medical institution pre-processes the electronic medical record in the multi-node consensus tamper-proof mechanism, completes KZG polynomial commitment generation, ML-KEM algorithm encryption storage and pointer registration;

[0066] S3, the data provider medical institution completes the evidence storage transaction of the FROST threshold signature, and after being broadcast by the alliance chain network, the consensus node executes the evidence storage contract rule check;

[0067] S4, the target medical institution completes the access request transaction, and after being broadcasted through the alliance chain network, the consensus node executes the access control contract rule check;

[0068] S5, the data provider medical institution sends the KZG unsealing proof and the data item, and the target medical institution obtains the storage pointer and the commitment value according to the access token, reads the electronic medical record ciphertext from the off-chain storage node and executes the KZG verification check, and after verification, executes the ML-KEM algorithm to obtain the session key.

[0069] S6, the target medical institution completes the audit transaction, and after being broadcasted through the alliance chain network, the consensus node executes the access control contract and the audit contract rule check.

[0070] The present application provides a data trusted sharing method based on a blockchain consensus mechanism, after constructing an alliance chain network and completing contract deployment and parameter initialization, the data provider medical institution preprocesses the electronic medical record in the multi-node consensus anti-tampering mechanism, completes KZG polynomial commitment generation, ML-KEM algorithm encryption storage and pointer registration, and generates a FROST threshold signature storage transaction, and the consensus node executes the storage contract rule check; after the target medical institution completes the access request transaction and the consensus node executes the access control contract rule check, the data provider medical institution sends the KZG unsealing proof and the data item, and the target medical institution obtains the storage pointer and the commitment value according to the access token, reads the electronic medical record ciphertext from the off-chain storage node and executes the KZG verification check, and after verification, utilizes the ML-KEM algorithm to obtain the session key. Finally, the target medical institution completes the audit transaction and the consensus node executes the access control contract and the audit contract rule check, realizing the trustworthiness and integrity of the data sharing process.

[0071] In the present embodiment, the contract deployment includes deploying the storage contract, the access control contract and the audit contract in the alliance chain network, establishing the patient identification and the medical event identification coding rule; the patient identification is generated by personal information hash; and the medical event identification is generated by combining the patient identification and the timestamp.

[0072] The alliance chain network includes a data provider medical institution, a target medical institution and a consensus node;

[0073] The parameter initialization includes initializing the KZG polynomial commitment public parameter, and configuring the FROST threshold signature group.

[0074] The application completes contract deployment and parameter initialization in a consortium chain network, the deployed contract includes a record storage contract, an access control contract and an audit contract, and coding rules of patient identification and medical event identification are established, wherein the patient identification is generated by performing a hash operation on personal information, and the medical event identification is obtained by combining the patient identification and a timestamp; the consortium chain network is composed of a data provider medical institution, a target medical institution and a consensus node, and the initialization stage further includes generation of KZG polynomial commitment public parameters and configuration of a FROST threshold signature group.

[0075] In the embodiment, the S2 specifically includes:

[0076] S21, the preprocessing includes structured processing and standardized processing; the patient identification is generated by the structured processing, the medical event identification is generated by the standardized processing, and a timestamp is created;

[0077] The structured processing includes:

[0078] The patient basic information fields including an ID card number, a medical insurance number, a name and a birth date are extracted from the electronic medical record original text; the patient basic information fields are spliced with a random salt value to form a preprocessing string; and the SHA-256 hash operation is performed on the preprocessing string to generate the patient identification;

[0079] The standardized processing includes:

[0080] The patient identification, the medical institution code, the department code, the medical type code and the medical time field obtained by the structured processing are uniformly formatted, the medical time field is converted into the ISO8601 standard time format of UTC, and the medical institution code and the department code are mapped into a unified coding system; the patient identification, the medical institution code, the department code, the medical type code and the standardized time field are spliced in a preset order to form a standardized string, and a serial number or a random number is added as a conflict resolution parameter; the SHA-256 hash operation is performed on the standardized string to generate the medical event identification; at the same time of generating the medical event identification, the current time is obtained by the medical institution node calling the clock after security time calibration, and is recorded as a creation timestamp in the ISO8601 format of UTC.

[0081] S22, the specific steps of the KZG polynomial commitment generation include:

[0082] The preprocessed electronic medical records are grouped into a medical record set in a preset order, and the SHA-256 hash operation is performed on each electronic medical record in the medical record set to generate a corresponding medical record index fingerprint sequence;

[0083] The medical record index fingerprint sequence is input as a data point in a finite field, and a unique polynomial is constructed based on the Lagrange interpolation method ; call KZG polynomial commitment public parameters, and the polynomial Execute the KZG commitment algorithm, output the corresponding commitment value, used as the on-chain trusted index identifier of the medical record set.

[0084] Lagrange interpolation construction polynomial :

[0085] ;

[0086] ;

[0087] is the number of medical record index fingerprint sequences, is the index subscript, is the variable of the polynomial, the horizontal coordinate of the medical record index fingerprint sequence, is the vertical coordinate of the medical record index fingerprint sequence, is the Lagrange basis function;

[0088] Execute the KZG commitment algorithm, output the corresponding commitment value :

[0089] ;

[0090] is the group generator, is a random secret value selected in the trusted setting stage, called the trapdoor parameter; denotes the highest degree of the polynomial, is the coefficient of the th power term in the polynomial , is part of the public parameter, called the pre-computed power generator; generate the public parameter in the initialization stage;

[0091] S23, the ML-KEM encryption storage and pointer registration specific steps include:

[0092] Use an authenticated secure random number generator to generate a random entropy seed and a random initial vector; generate a session key based on the ML-KEM algorithm and assign a key identifier ; Set the SM4-GCM algorithm parameters, use the session key , the patient identifier, the medical event identifier and the commitment value as additional authentication data, and use the random initial vector to encrypt the electronic medical record plaintext using the SM4-GCM algorithm, output the electronic medical record ciphertext and the integrity label:

[0093] ;

[0094] ;

[0095] plaintext electronic medical record is ; the session key is ; the random initial vector is ; the additional authentication data is the output ciphertext is ; the output integrity tag is ;

[0096] and generates an encrypted metadata record;

[0097] The encrypted metadata record contains algorithm identification, version number, key identification , random initial vector and timestamp; the algorithm identification in the encrypted metadata record is used to mark the type and mode of the adopted cryptographic algorithm, and the version number is used to mark the version information of the encryption algorithm implementation or protocol;

[0098] Call the write interface of the off-chain storage node, and atomically write the electronic medical record ciphertext, integrity tag and encrypted metadata record to obtain a storage pointer; in the pointer registration table, the mapping relationship between the storage pointer, patient identification, medical event identification, commitment value, key identification and timestamp is established.

[0099] The present application proposes a data trusted sharing method based on a blockchain consensus mechanism, aiming at the preprocessing process of electronic medical record data, the patient basic information field is extracted through structured processing and a random salt value is introduced to perform hash calculation to generate a patient identification, the standardized string containing medical institution code, department code, medical type code and standardized time field is constructed through standardized processing to generate medical event identification and creation timestamp; further, the medical record set is constructed as a medical record index fingerprint sequence, a unique polynomial is constructed based on Lagrange interpolation, and a commitment value is generated by calling the public parameters of KZG polynomial commitment; then, an entropy seed and an initial vector are generated by using an authenticated secure random number generator, a session key is generated by combining the ML-KEM algorithm and SM4-GCM encryption parameters are set, the patient identification, medical event identification and commitment value are used as additional authentication data to encrypt the electronic medical record, the electronic medical record ciphertext and integrity tag are output, and the encrypted metadata containing algorithm identification, version number, key identification and timestamp are recorded, and the ciphertext, integrity tag and encrypted metadata are atomically written to the off-chain storage node to generate a storage pointer and establish a pointer registration mapping relationship, laying a foundation for subsequent trusted indexing and secure decryption.

[0100] In the present embodiment, the S3 specifically includes:

[0101] S31, constructing a storage transaction by the data provider medical institution, the storage transaction comprising a patient identifier, a medical event identifier, a commitment value, a storage pointer, a timestamp, an algorithm identifier, a version number, and a key identifier serializing the storage transaction and generating a storage transaction digest;

[0102] The serialization is to convert each key field of the storage transaction into a byte string according to a uniform order and a uniform coding rule, and splice them into a continuous data stream, to provide standardized input for subsequent hashing and signature.

[0103] S32, initiating a FROST threshold signature process by the data provider medical institution, collecting threshold signature shares and aggregating to generate a FROST threshold signature, and writing the FROST threshold signature into the storage transaction;

[0104] S33, broadcasting the storage transaction to the consortium chain network by the data provider medical institution;

[0105] S34, signature verification and field integrity check of the storage transaction by the consensus node, calling the storage contract for rule check, reaching an agreement according to the preset consensus algorithm and completing block packaging;

[0106] The contract check is the consensus node executing the on-chain storage contract logic: rule check on the storage uniqueness, mapping consistency, timestamp validity and node permission of the storage transaction, and the rule check passes to allow writing to the block, otherwise the transaction is rejected. The storage uniqueness means that the combination of the same patient identifier and medical event identifier corresponds to only one storage transaction in the consortium chain ledger; the mapping consistency means that the mapping relationship between the storage pointer and the patient identifier, medical event identifier and commitment value registered on the chain remains consistent and is not allowed to be tampered with or reused. The timestamp validity means that the timestamp of the storage transaction must comply with the preset format and be later than the timestamp of the existing related storage record, to prevent old data from covering new data. The node permission means that the medical institution node initiating the storage transaction must be in the consortium chain registration whitelist, with legal storage operation qualification.

[0107] The preset consensus algorithm is the practical Byzantine fault tolerance algorithm PBFT, used to ensure agreement on the storage transaction in the consortium chain network.

[0108] In the field integrity check process, the key fields in the storage transaction are serialized according to a preset order, and a field hash value is calculated using a hash function; the consensus node compares the field hash value with the commitment value registered in the storage transaction to confirm that the key fields have not been tampered with; at the same time, the consensus node checks whether the storage pointer, timestamp, key identifier, etc. are consistent with the mapping in the pointer registration table, to ensure the integrity and consistency of the storage transaction in the cross-institution sharing process.

[0109] The signature verification is based on a FROST threshold signature verification algorithm, and the threshold signature carried by the storage evidence transaction is , and the consensus node performs a verification equation:

[0110] ;

[0111] wherein, is an aggregated commitment, is an aggregated signature scalar, is a group public key configured in a parameter initialization phase, is a challenge value calculated based on a group commitment , a group public key and a message digest , is a preset hash function, and the signature verification passes when the verification equation is true.

[0112] S35, writing the storage evidence transaction into a block by the consensus node and updating a distributed ledger.

[0113] The present application proposes a data trusted sharing method based on a blockchain consensus mechanism. In the data chaining process, a medical institution as a data provider constructs a storage evidence transaction containing fields of patient identification, medical event identification, commitment value, storage pointer, etc., and completes serialization through a unified order and coding rule to generate a storage evidence transaction digest. Then, a FROST threshold signature process is initiated, the signature shares are aggregated and written into the transaction, and then broadcast to the consortium chain network. The consensus node performs signature verification, field integrity check and storage evidence contract rule check. The rule check includes storage uniqueness, mapping consistency, timestamp validity and node permission verification to ensure the legality and tamper-proof ability of each storage evidence transaction. The field integrity check is ensured by comparing the hash value of the key field with the commitment value, combined with the mapping check of the pointer registration table to ensure the consistency in the cross-institution sharing process. The consensus mechanism based on the practical Byzantine fault tolerance algorithm PBFT completes transaction consensus and writes into a block, updates a distributed ledger, and forms a chain-based verifiable trusted storage evidence record.

[0114] In the present embodiment, the S4 specifically comprises:

[0115] S41, constructing an access request transaction by the target medical institution, the access request transaction including patient identification, access range, access period, target medical institution identification, algorithm identification, version number, key identification, serializing the access request transaction and generating an access request transaction digest;

[0116] S42, initiating a FROST threshold signature process by the target medical institution, generating a FROST threshold signature, and writing the FROST threshold signature into the access request transaction.

[0117] S43, broadcasting, by the target medical institution, the access request transaction to the consortium chain network;

[0118] S44, signature verification and field integrity check of the access request transaction by the consensus node, calling the access control contract for rule check, and performing rule check on the access range and access period according to the on-chain authorization strategy and target medical institution identity verification;

[0119] The rule check of the access control contract includes:

[0120] Receiving and parsing the field set of the access request transaction, extracting the patient identifier, access range, access period, target medical institution identifier, algorithm identifier, version number, key identifier, and access request digest;

[0121] According to the preset field order and coding rule, complete the field integrity check result receiving, confirm that the access request transaction has passed the signature verification and field integrity check of the consensus node;

[0122] Query whether the target medical institution identifier exists in the consortium chain registration whitelist in the access control contract, and check the target medical institution authority;

[0123] According to the on-chain authorization strategy and strategy version, perform rule matching on the access range and access period, check whether the access range is within the authorized set, and check whether the access period is within the allowed period;

[0124] Retrieving the index position set corresponding to the patient identifier and commitment identifier in the on-chain inventory record, generating or selecting an index position, and checking the consistency of the access range and the index position;

[0125] Check the uniqueness constraint of the access token, retrieve the list of unexpired access tokens, and prevent duplicate issuance for the same patient identifier, the same target medical institution identifier, the same access range, and the same access period;

[0126] Generate an access token and establish a mapping relationship between the access token and the patient identifier, target medical institution identifier, access range, access period, index position, and commitment identifier;

[0127] Write the access token into the block, record the generation timestamp of the access token, the algorithm identifier, the version number, and the key identifier;

[0128] Return the index position and commitment identifier to the target medical institution for subsequent access to the electronic medical record ciphertext and KZG verification.

[0129] S45, generating an access token by the access control contract and writing the access token in the alliance chain network, recording the mapping relationship between the access token and the patient identification, the access range, the access deadline and the target medical institution identification, and reaching an agreement and completing block packaging according to a preset consensus algorithm;

[0130] S46, returning the index position and the commitment value to the target medical institution by the access control contract.

[0131] The application proposes a data trusted sharing method based on a blockchain consensus mechanism, wherein an access control link ensures that the source of an access request is trusted and the content is complete by constructing an access request transaction and embedding a FROST threshold signature. The access request transaction is generated by a target medical institution and broadcast to an alliance chain network, and after signature verification and field integrity check by a consensus node, an access control contract is called for permission verification and strategy matching, combined with a registration whitelist, an authorization strategy and an access range check mechanism, to determine the access permission on the chain. At the same time, the system retrieves the index position according to the patient identification and the commitment value, and prevents repeated issuance of access tokens, finally generates an access token and maps it with access meta information to write it into a block, and returns the index position and the commitment value to the target medical institution, providing a trusted positioning basis for subsequent medical record ciphertext reading and KZG verification.

[0132] In the embodiment, the S5 specifically includes:

[0133] S51, generating a KZG unseal proof by the data provider medical institution according to the index position, and sending the KZG unseal proof and the data item to the target medical institution; the data item refers to a fingerprint value in a medical record index fingerprint sequence;

[0134] The generation of the KZG unseal proof includes:

[0135] The data provider medical institution obtains a polynomial representation and a commitment value for calculation from the KZG polynomial commitment generation stage, and confirms that the KZG polynomial commitment public parameter is in a valid state;

[0136] The data provider medical institution positions the corresponding data item according to the index position, and completes the coding and normalization of the data item and the index position;

[0137] The data provider medical institution takes the polynomial f(x), the index position and the data item as inputs, calculates the quotient polynomial q(x), so that f(x) and the data item satisfy the division relationship at the index position;

[0138] The data provider medical institution performs commitment operation on the quotient polynomial q(x) based on the KZG polynomial commitment public parameter, to generate the KZG unseal proof;

[0139] S52, verify the validity and authorization range of the access token by the target medical institution, obtain the storage pointer and commitment value according to the access token;

[0140] S53, call the read interface of the off-chain storage node by the target medical institution, obtain the electronic medical record ciphertext, integrity label and encrypted metadata record according to the storage pointer;

[0141] S54, perform KZG verification check by the target medical institution, confirm the consistency of the data item and the commitment value according to the commitment value, index position and KZG unsealing proof, and enter the decryption process when consistent, and terminate the process and mark the verification failure when inconsistent;

[0142] S55, when consistent, obtain the key encapsulation data corresponding to the key identifier by the target medical institution and perform ML-KEM algorithm unencapsulation to obtain the session key;

[0143] The specific steps of the ML-KEM algorithm unencapsulation include:

[0144] Retrieving the key encapsulation data corresponding to the key identifier from the chain by the target medical institution according to the key identifier KeyID in the encrypted metadata record;

[0145] Taking the key encapsulation data and the ML-KEM public parameter registered in the parameter initialization phase as input, performing the decoding step of the ML-KEM unencapsulation algorithm to restore the temporary seed material;

[0146] Calling the pseudo-random function expansion module of ML-KEM based on the temporary seed material by the target medical institution to generate a candidate session key;

[0147] The target medical institution performs consistency check on the integrity label of the unencapsulation process, compares the candidate session key with the check vector, and confirms the candidate session key as a valid session key when the check passes, and determines that the unencapsulation fails and discards the candidate session key when the check fails;

[0148] When the check passes, output the session key by the target medical institution, and establish a temporary binding relationship between the session key and the access token of the current access request for subsequent SM4-GCM decryption operation.

[0149] S56, perform GCM integrity label check: use SM4-GCM algorithm and session key to decrypt and check the integrity label of the electronic medical record ciphertext according to the random initial vector in the encrypted metadata record by the target medical institution, output the electronic medical record plaintext when the check passes, and terminate the decryption result usage and mark the process failure when the check fails.

[0150] ; ;

[0151] : integrity tag stored with the ciphertext : integrity tag recalculated at decryption, for comparison with ;

[0152] In the decryption process, the target medical institution first decrypts the electronic medical record ciphertext using the session key and the random initial vector to obtain a candidate plaintext; then recalculates the integrity tag, compares the tag with the stored integrity tag, and if the two are consistent, confirms that the decrypted plaintext is valid and outputs the original text of the electronic medical record; if the two are not consistent, it means that the data may have been tampered with during transmission or storage, and the decryption result is rejected.

[0153] The present application proposes a data trusted sharing method based on a blockchain consensus mechanism, which adopts a combination of KZG unseal proof and ML-KEM algorithm in the data decryption and consistency verification link to ensure the integrity and confidentiality of the electronic medical record ciphertext in the cross-institution access process. Specifically, the data provider medical institution generates a KZG unseal proof according to the index position and sends it to the target medical institution together with the data item; the target medical institution verifies the validity of the access token, calls the off-chain storage node to obtain the electronic medical record ciphertext and encrypted metadata, performs KZG verification to confirm the matching relationship between the data item and the commitment value, and performs the ML-KEM unpacking process to restore the session key after passing the verification. Subsequently, the target medical institution performs SM4-GCM algorithm decryption operation based on the restored session key and the random initial vector recorded in the encrypted metadata, and completes GCM integrity check by comparing the stored integrity tag with the recalculated tag, thereby realizing the trusted restoration of the original text of the electronic medical record.

[0154] In this embodiment, the S6 specifically includes:

[0155] S61, the target medical institution constructs an audit transaction, the audit transaction including an access token, a target medical institution identifier, a timestamp, a KZG verification check result, a GCM integrity tag check result and an algorithm identifier, a version number, a key identifier, the audit transaction is serialized and an audit transaction digest is generated;

[0156] S62, the target medical institution initiates a FROST threshold signature process, collects threshold signature shares and aggregates to generate a FROST threshold signature, and writes the FROST threshold signature into the audit transaction;

[0157] S63, the target medical institution broadcasts the audit transaction to the consortium chain network;

[0158] S64, signature verification and field integrity check of the audit transaction by the consensus node, validity check of the access token and timestamp according to the access control contract, and rule check according to the authorization strategy, and rule check of the record format and record range of the audit transaction according to the audit contract;

[0159] The specific steps of the rule check of the record format and record range of the audit transaction field according to the audit contract include:

[0160] Receiving the audit transaction and extracting the field set: after receiving the audit transaction submitted by the target medical institution, the consensus node calls the verification entry function of the audit contract, and automatically extracts the field set in the audit transaction, including the access token, target medical institution identifier, timestamp, KZG verification check result, GCM integrity tag check result, algorithm identifier, version number and key identifier.

[0161] Performing field format verification procedures, including:

[0162] Checking whether the fields are complete to ensure that all required fields have been filled in and no missing fields are allowed;

[0163] Checking whether the field data type and length meet the definition, such as whether the timestamp is a legal UTC time format, whether the access token is a 256-bit hash value, and whether the KZG and GCM result fields are of Boolean type;

[0164] Checking the encoding specification of the field value, such as whether Base64 or Hex encoding is used, and whether there are illegal characters;

[0165] Checking whether the serialized field order is consistent with the system template to avoid format disorder or signature verification avoidance.

[0166] Performing field record range legality check, including:

[0167] Timestamp range check: checking whether the timestamp is earlier than the current system time and later than the timestamp corresponding to the access request transaction to prevent old transaction forgery;

[0168] Access token uniqueness and validity check: according to the token state table maintained by the access control contract, confirming that the access token is currently in the state of "issued and not expired", and has not been submitted repeatedly;

[0169] Logical consistency check of KZG and GCM verification results: if either of the two fields is "false", it is marked as abnormal access, and the abnormal access record path in the audit contract is triggered;

[0170] Medical institution permission range check: according to the alliance chain registration whitelist and authorization strategy, it is judged whether the target medical institution has the audit submission permission;

[0171] Algorithm identification and version number legality verification: confirm that the submitted algorithm identification and version number have been registered in the parameter initialization stage, to prevent submission of unrecorded algorithm versions.

[0172] Generate verification results and feedback verification status: if all rules are passed, the audit contract generates a "legal" identification, allowing the transaction to be written to the block and updating the distributed ledger; if the verification fails, output "illegal" identification and terminate the subsequent write process, while triggering the access control contract to freeze the access token and related evidence state for traceability and exception handling.

[0173] S65, when the contract verification fails, the access control contract marks the corresponding evidence state as frozen and triggers an alarm, and when the contract verification passes, the audit contract records the access token identification, target medical institution identification, timestamp, KZG verification result and GCM integrity tag verification result Access summary and establish an associated mapping with the commitment value and index position;

[0174] S66, the consensus node writes the audit transaction to the block and updates the distributed ledger.

[0175] The FROST threshold signature process specifically includes:

[0176] The data provider medical institution generates a signature input based on the corresponding transaction summary, wherein the transaction summary is the evidence transaction summary in S31, the access request transaction summary in S42, and the audit transaction summary in S62; based on the selected threshold t and the signature node set S, reference the group public key of the FROST threshold signature group and each signature node public key share configured in the parameter initialization stage;

[0177] Each signature node in the signature node set S generates a random number pair and calculates the corresponding random commitment pair, and sends the random commitment pair to the data provider medical institution;

[0178] The data provider medical institution confirms the signature node set S and the random commitment pair, calculates the binding factor of each signature node based on the signature context, the signature node set and the random commitment pair, calculates the effective commitment of each signature node and obtains the group commitment;

[0179] The data provider medical institution calculates the challenge value based on the group commitment, the group public key and the message digest, and distributes the challenge value and the corresponding binding factor to each signature node in the set S;

[0180] Each signature node in the set S calculates the Lagrange coefficient based on the signature node set, combines the private key share, the random number pair, the binding factor and the challenge value to generate a fragmented signature, and returns the fragmented signature to the data provider medical institution;

[0181] The data provider medical institution performs consistency verification on each shard signature, aggregates the shard signatures passing the verification to generate a FROST threshold signature, and obtains a threshold signature result composed of a group commitment and an aggregated signature scalar;

[0182] The storage transaction, the access request transaction and the audit transaction all follow the general mode of "transaction construction-FROST threshold signature-broadcast-consensus verification-contract verification-block writing" in the processing flow, and the difference is that the field composition, the called contract and the result output of the three types of transactions are different, thereby forming a complete data trusted sharing closed loop.

[0183] The application proposes a data trusted sharing method based on a blockchain consensus mechanism, introduces an audit transaction mechanism in the access behavior record and abnormal handling link, and guarantees the traceability and tamper resistance of the access process through joint verification of the access control contract and the audit contract. Specifically, the target medical institution constructs an audit transaction containing access tokens, verification results, timestamps and other information after completing data access, and ensures its non-repudiation through FROST threshold signature, and then broadcasts the audit transaction to the alliance chain network. The consensus node performs signature verification and field integrity verification, and checks the validity of the access token and the logical reasonableness of the timestamp according to the access control contract, and checks the record format and field range according to the audit contract. When the verification fails, the access control contract freezes the related storage state and triggers an alarm; when the verification passes, the audit contract records the access summary information and establishes a mapping with the commitment value and the index position, and finally the consensus node writes the audit transaction into the block and updates the distributed ledger.

[0184] Embodiment 1:

[0185] In order to verify the feasibility and performance advantage of the application in practical application, the application is deployed in a certain medical data sharing simulation platform to simulate the interaction scene of multiple medical institution nodes, target medical institution nodes and consensus nodes. The platform is configured to include 20 medical institution nodes and 10 consensus nodes, and the contract deployment, parameter initialization and communication environment configuration are completed through the construction of an alliance chain network. In the simulation process, the system running environment uses the same hardware platform to ensure the fairness of the comparison results.

[0186] In the experimental stage, 5000 standardized electronic medical records were selected as test data, including outpatient cases, inpatient cases and image data. The data provider medical institution performs structured and standardized processing on electronic medical records to generate patient identification and treatment event identification, and constructs a trusted index based on KZG polynomial commitment. The session key is generated by the ML-KEM algorithm, the encryption and integrity tag generation are completed by the SM4-GCM algorithm, and the evidence transaction is written by combining the multi-node consensus tamper-proof mechanism. When accessing, the target medical institution needs to complete the access request verification through the FROST threshold signature, and then the access control contract is called by the consensus node to perform rule checking, and the index position and commitment value are returned. In the decryption stage, the target medical institution performs KZG verification check and recovers the session key based on ML-KEM unpacking, and then completes decryption and integrity check through SM4-GCM, finally realizes the secure sharing of cross-node data.

[0187] In order to highlight the performance advantages of the present application, we compared the present application scheme with the traditional centralized scheme based on RSA-OAEP+AES-CBC in the same platform environment, focusing on testing four indicators of encryption time, decryption time, encryption cost and decryption cost. The measurement unit of encryption and decryption time is millisecond (ms), and the cost is quantified by calculating the average processing overhead (including computing resources and bandwidth consumption) per thousand medical records. The experimental results are shown in Table 1 as follows:

[0188] Table 1 Comparison of encryption and decryption performance under simulation platform

[0189] Indicator category Traditional RSA-OAEP+AES-CBC scheme The method of the present application (KZG+ML-KEM+SM4-GCM+ consensus tamper-proof mechanism) Average encryption time 6.82 ms 3.15 ms Average decryption time 7.26 ms 3.48 ms Encryption cost 1.00 (standardized) 0.42 Decryption cost 1.00 (standardized) 0.45 Tamper detection rate 91.7% 100% Audit traceability rate 65.4% 100%

[0190] From the experimental results in Table 1, it can be seen that in terms of encryption and decryption time, the present application method is significantly better than the traditional scheme, with a processing delay reduction of about 50%. In terms of encryption and decryption cost, since the present application uses ML-KEM instead of RSA-OAEP for key encapsulation, and combines the hardware acceleration characteristics of SM4-GCM, the overall computing and communication overhead is reduced to 40%-45% of the traditional scheme. In terms of tamper detection, the present application combines KZG polynomial commitment and multi-node consensus tamper-proof mechanism to ensure that there is no tampering throughout the data transmission and storage, while the traditional scheme still has nearly 8% of the data missing or tampered in the cross-node simulation. In terms of access audit traceability, the present application realizes 100% access behavior traceability by writing audit transactions into the alliance chain ledger, while the comparison scheme has a traceability rate of less than 70% in the absence of distributed contract support.

[0191] Through the simulation experiment, it can be confirmed that the electronic medical record encryption and decryption time is significantly shortened, the processing cost is greatly reduced, tampering detection and access audit tracing are fully covered, and higher security and efficiency are exhibited in medical data sharing application under the support of the tamper-proof mechanism of the multi-node consensus.

[0192] The above merely describes a preferred 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 make equivalent replacements or changes within the technical scope disclosed by the present application and according to the technical solutions and inventive concept of the present application, which should be covered within the protection scope of the present application.

Claims

1. A data trusted sharing method based on a blockchain consensus mechanism, characterized in that, It comprises the following steps: S1, constructing a consortium chain network and completing contract deployment and parameter initialization; S2, the data provider medical institution pre-processes the electronic medical record in the multi-node consensus anti-tampering mechanism, completes KZG polynomial commitment generation, ML-KEM algorithm encryption storage and pointer registration; S3, the data provider medical institution completes the FROST threshold signature storage transaction, which is broadcasted by the consortium chain network and then verified by consensus node A according to the storage contract rules; S4, the target medical institution completes the access request transaction, which is broadcasted by the consortium chain network and then verified by consensus node B according to the access control contract rules; S5, the data provider medical institution sends the KZG unsealing certificate and the data item, and the target medical institution obtains the storage pointer and the commitment value according to the access token, reads the electronic medical record ciphertext from the off-chain storage node and performs KZG verification check, and executes the ML-KEM algorithm unpacking to obtain the session key after verification; S6, the target medical institution completes the audit transaction, which is broadcasted by the consortium chain network and then verified by consensus node C according to the access control contract and the audit contract rules. 2.The data trusted sharing method based on the blockchain consensus mechanism according to claim 1, characterized in that, The contract deployment comprises deploying the storage contract, the access control contract and the audit contract in the consortium chain network, and establishing the patient identification and the just-visit event identification coding rules; The patient identification is generated by a personal information hash algorithm; The just-visit event identification is generated by combining the patient identification and the timestamp; The consortium chain network comprises the data provider medical institution, the target medical institution and the consensus node; The parameter initialization comprises initializing the KZG polynomial commitment public parameter. 3.The data trusted sharing method based on the blockchain consensus mechanism of claim 1, characterized in that, The S2 specifically comprises: S21, the preprocessing comprises structured processing and standardized processing; the patient identification is generated by structured processing, the just-visit event identification is generated by standardized processing, and a timestamp is created; The specific steps of the KZG polynomial commitment generation comprise: The pre-processed electronic medical records are arranged in a preset order to form a medical record set, and SHA-256 hash operation is performed on each electronic medical record in the medical record set to generate a corresponding medical record index fingerprint sequence; The medical record index fingerprint sequence is input as a data point in a finite field, and a uniquely determined polynomial is constructed based on Lagrange interpolation ; call KZG polynomial commitment public parameters, and the polynomial Perform the KZG commitment algorithm, and output the corresponding commitment value; The specific steps of the ML-KEM encryption storage and pointer registration comprise: A secure random number generator is used to generate a random initial vector; Generating a session key based on an ML-KEM algorithm and assigning a key identification ; Setting SM4-GCM algorithm parameters, taking the patient identification, clinic event identification and commitment value as additional authentication data, using the session key Encrypting the electronic medical record text with the SM4-GCM algorithm with a random initial vector, outputting the electronic medical record ciphertext and integrity label; and generating an encrypted metadata record; Call the write interface of the storage node under the call chain, atomically write the electronic medical record ciphertext, the integrity label and the encrypted metadata record to obtain a storage pointer; in the pointer registration table, establish the mapping relationship between the storage pointer, the patient identifier, the treatment event identifier, the commitment value, the key identifier and the timestamp and the mapping relationship of the timestamp. 4.The data trusted sharing method based on the blockchain consensus mechanism of claim 1, wherein, The S3 specifically comprises: S31, constructing a storage transaction by the data provider medical institution, the storage transaction comprising a patient identifier, a medical event identifier, a commitment value, a storage pointer, a timestamp, an algorithm identifier, a version number, and a key identifier serializing the storage transaction and generating a storage transaction digest; S32, the data provider medical institution initiates the FROST threshold signature process, collects the threshold signature shares and aggregates to generate the FROST threshold signature, and writes the FROST threshold signature into the storage transaction; S33, the data provider medical institution broadcasts the storage transaction to the consortium chain network; S34, the consensus node A performs signature verification and field integrity check on the storage transaction, calls the storage contract for rule check, reaches an agreement according to the preset consensus algorithm and completes block packaging; The calling of the storage contract for rule check is that the consensus node A executes the on-chain storage contract logic: the storage uniqueness, mapping consistency, timestamp validity and node permission of the storage transaction are checked according to the rules, and the writing into the block is allowed if the rule check is passed, otherwise the transaction is rejected; The preset consensus algorithm is a practical Byzantine fault tolerance algorithm PBFT, which is used for guaranteeing consensus of the stored evidence transaction in the alliance chain network. S35, writing the stored evidence transaction into a block by the consensus node A and updating a distributed ledger. 5.The data trusted sharing method based on the blockchain consensus mechanism according to claim 1, characterized in that, The S4 specifically comprises: S41, constructing an access request transaction by the target medical institution, the access request transaction comprising a patient identifier, an access range, an access deadline, a target medical institution identifier, an algorithm identifier, a version number, and a key identifier, serializing the access request transaction, and generating an access request transaction digest; S42, initiating a FROST threshold signature process by the target medical institution, generating a FROST threshold signature, and writing the FROST threshold signature into the access request transaction; S43, broadcasting the access request transaction to the alliance chain network by the target medical institution; S44, performing signature verification and field integrity check on the access request transaction by the consensus node B, calling an access control contract for rule check, and performing rule check on the access range and the access deadline according to an on-chain authorization strategy and target medical institution identity verification; S45, generating an access token by the access control contract and writing the access token into the alliance chain network, recording a mapping relationship between the access token and the patient identifier, the access range, the access deadline, and the target medical institution identifier, reaching consensus and completing block packaging according to a preset consensus algorithm; S46, returning an index position and a commitment value to the target medical institution by the access control contract. 6.The data trusted sharing method based on the blockchain consensus mechanism according to claim 1, characterized in that, The S5 specifically comprises: S51, generating a KZG unseal proof by the data provider medical institution according to the index position, and sending the KZG unseal proof and a data item to the target medical institution; the data item refers to a fingerprint value in a medical record index fingerprint sequence; S52, verifying the validity and authorized range of the access token by the target medical institution, obtaining a storage pointer and a commitment value according to the access token; S53, calling a read interface of an off-chain storage node by the target medical institution, obtaining an electronic medical record ciphertext, an integrity label, and encrypted metadata records according to the storage pointer; S54, performing KZG verification check by the target medical institution, confirming the consistency of the data item and the commitment value according to the commitment value, the index position, and the KZG unseal proof, entering a decryption process when consistent, and terminating the process and marking verification failure when inconsistent; S55, when consistent, obtaining key encapsulation data corresponding to the key identifier by the target medical institution and performing ML-KEM algorithm unencapsulation to obtain a session key; S56, performing GCM integrity label check: decrypting the electronic medical record ciphertext using SM4-GCM algorithm and the session key according to the random initial vector in the encrypted metadata records by the target medical institution, and checking the integrity label, outputting the electronic medical record original text when the check passes, and terminating the decryption result usage and marking the process failure when the check fails.

7. The data trusted sharing method based on the blockchain consensus mechanism according to claim 1, characterized in that, The S6 specifically comprises: S61, constructing an audit transaction by the target medical institution, the audit transaction comprising an access token, a target medical institution identifier, a timestamp, a KZG verification check result, a GCM integrity label check result, an algorithm identifier, a version number, and a key identifier, serializing the audit transaction, and generating an audit transaction digest; S62, the target medical institution initiates the FROST threshold signature process, collects threshold signature shares and aggregates to generate a FROST threshold signature, and writes the FROST threshold signature into an audit transaction; S63, the target medical institution broadcasts the audit transaction to the consortium chain network; S64, the consensus node C performs signature verification and field integrity check on the audit transaction, performs validity check on the access token identifier and timestamp according to the access control contract, and performs rule check according to the authorization strategy, and performs rule check on the record format and record range of the audit transaction field according to the audit contract; S65, when the contract verification fails, the access control contract marks the corresponding evidence storage state as frozen and triggers an alarm, and when the contract verification passes, the audit contract records the access summary of the access token identifier, the target medical institution identifier, the timestamp, the KZG verification result and the GCM integrity tag check result, and establishes an associated mapping with the commitment value and the index position; S66, the consensus node C writes the audit transaction into a block and updates the distributed ledger. 8.The data trusted sharing method based on the blockchain consensus mechanism of claim 1, characterized in that, The multi-node consensus tamper-proof mechanism includes a data provider medical institution, a target medical institution and a consensus node, combines KZG polynomial commitment, ML-KEM algorithm, SM4-GCM algorithm and FROST threshold signature, executes the evidence storage contract, access control contract and audit contract in the consortium chain network, and completes consistency confirmation relying on the preset consensus algorithm.

Citation Information

Cited By

  • Block chain oracle machine-based trusted data space data interaction method

    CN122001560A

  • A blockchain oracle-based trusted data space data interaction method

    CN122001560B

  • Intelligent contract implementation method and system based on trusted data space

    CN122204564A