Clinical data statistical management analysis method based on block chain
By adopting blockchain technology in the clinical data management system, data security, efficiency and interoperability issues are solved, and efficient and secure clinical data management and analysis are achieved.
Patent Information
- Application Number
- CN202411208246.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The existing clinical data management system has data security threats, efficiency bottlenecks, heterogeneous databases and data format interoperability problems, and cannot effectively manage and analyze massive data, especially under high load conditions, and lacks unified data standards and Cross-platform exchange mechanism.
Using blockchain-based clinical data statistics management analysis methods, data security is achieved through hierarchical storage, sharding technology, homomorphic encryption, federated learning, adaptive consensus mechanism, cross-chain interoperability protocol and semantic analysis technologies, etc. Efficiency and standardization management and analysis.
It significantly improves data security and privacy, improves the efficiency and scalability of the system in massive data processing, ensures the semantic consistency and transparency of data in heterogeneous systems, simplifies user operations, and improves data analysis. Efficiency and system management stability.
Smart Images

Figure CN119249473A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and specifically to a clinical data statistical management and analysis method based on blockchain. Background Art
[0002] In the modern medical field, the management and analysis of clinical data plays an extremely important role in medical decision-making, scientific research progress and patient treatment. With the popularization of digital medical systems and the increase in the amount and complexity of clinical data, how to effectively manage, share and analyze data has become a challenge for medical informatization. The existing clinical data management and analysis systems have the following problems:
[0003] Traditional clinical data management systems mostly use centralized storage methods, which makes the system vulnerable to cyber attacks and poses a risk of data leakage. In addition, the existing system uses simple encryption measures during data transmission and storage, which cannot fully cope with complex security threats.
[0004] With the exponential growth of medical data, traditional centralized data processing systems have shown obvious efficiency bottlenecks when dealing with massive amounts of data. In addition, traditional consensus mechanisms cannot be flexibly adjusted under different network load conditions, resulting in system performance degradation under high load conditions, and unable to guarantee the efficient operation and scalability of the system in complex environments;
[0005] In the existing medical information system, there are a variety of heterogeneous databases and data formats. The problems of data sharing and interoperability between different systems are prominent. There is a lack of unified data standards and effective cross-platform data exchange mechanisms. Data exchange between different systems often requires a complex conversion process, which can easily lead to inconsistent data semantics.
[0006] Therefore, those skilled in the art provide a clinical data statistical management and analysis method based on blockchain to solve the problems raised in the above background technology. Summary of the invention
[0007] In view of the shortcomings of the prior art, the present invention provides a clinical data statistical management and analysis method based on blockchain to solve the problems raised in the above background technology.
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions: A clinical data statistical management and analysis method based on blockchain, comprising the following steps: S1, collecting clinical data from sources such as hospitals, clinics, and patient devices, and using a hierarchical storage algorithm to classify the data according to its sensitivity, frequent access, and size;
[0009] S2. Apply sharding technology to divide the blockchain into different data fragments for processing, and use homomorphic encryption algorithm to encrypt the data;
[0010] S3. Patients can set the scope and duration of access to their data and access rights through smart contracts, and introduce revocable anonymity technology to allow disclosure of some data;
[0011] S4. Use federated learning algorithms to allow medical institutions to train models without sharing original data, and use homomorphic encryption technology to encrypt and calculate on-chain data;
[0012] S5. Introduce an adaptive consensus mechanism to dynamically adjust the consensus algorithm according to the network status, and record and update data changes in real time through smart contracts to automatically generate audit reports;
[0013] S6. Use advanced cross-chain interoperability protocols to standardize data from various medical systems through semantic analysis and ontology matching algorithms;
[0014] S7. Develop a simple and easy-to-use user interface that hides complex encryption and data management operations, and use automatic optimization algorithms to dynamically adjust blockchain configuration based on user needs and system load;
[0015] S8. Use the distributed computing power of the blockchain network to conduct statistical analysis on the data on the chain and generate clinical research reports;
[0016] S9. Use automated deployment algorithms to simplify the system installation and maintenance process, and dynamically adjust system parameters based on actual usage through continuous performance monitoring and adaptive maintenance algorithms.
[0017] Preferably, in the step S1, the hierarchical storage algorithm step:
[0018] a. Assume that the clinical data set to be processed is D = {d 1 , d 2 , ..., d n}, where each data item d i Has the following properties:
[0019] Sensitivity S(d i ): defined as the sensitivity level of the data;
[0020] Access frequency F(d i ): defined as the expected number of accesses or access frequency of the data;
[0021] Data size γ·|d i |: defined as the size of the data item;
[0022] b. Calculate a comprehensive score for each data item through a weighted scoring function to evaluate its storage location. The algorithm formula of the weighted scoring function is:
[0023] P(d i)=α·S(d i )+β·F(d i )+γ·|d i |,
[0024] Among them, α, β, γ are predefined weight parameters;
[0025] c. Hierarchical decision rules:
[0026] According to the comprehensive score P(d i ) Classify and store data:
[0027] On-chain storage: If P(d i ) is higher than a certain threshold T high , then the data is stored on the blockchain;
[0028] ifP(d i )≥T high , then stored i On-chain,
[0029] Off-chain storage: If P(d i ) is lower than a certain threshold T low , then the data is stored in the distributed storage system off-chain;
[0030] ifP(d i )≤T low , then stored i off-chain,
[0031] Hybrid storage: If T low <P(d i )<T high , a hybrid storage strategy is adopted, where some data is stored on-chain and some data is stored off-chain;
[0032] iT low <P(d i )<T high , then stored i using hybrid storage.
[0033] Preferably, in the step S2, the formulas of the sharding technology and the homomorphic encryption algorithm are as follows:
[0034] The data sharding algorithm:
[0035] Assume that a data set D is to be divided into multiple data segments D = {D 1 , D 2 , ..., D m}, where each fragment D iCan be stored and processed independently;
[0036] The basic steps of data sharding are:
[0037] Data partitioning: Use hash function H to map data item d into different fragments D i superior;
[0038] H(d)modm=i,
[0039] Where H(d) is the hash value of data item d, m is the number of fragments, and i represents the fragment D to which d is assigned. i ;
[0040] Fragment storage: Different fragments D i Stored in different shards of the blockchain.
[0041] Preferably, the homomorphic encryption algorithm:
[0042] Homomorphic encryption allows direct computation on ciphertext without decryption. Assume that encryption function E and decryption function D are used, and the operator are operations supported by homomorphic encryption;
[0043] Basic properties of homomorphic encryption:
[0044] Encryption: For each data fragment D i Encryption is performed;
[0045] C i =E(D i ),
[0046] Among them, C i is the encrypted ciphertext;
[0047] Ciphertext calculation: Encrypted data fragment C i Operate without decryption;
[0048]
[0049] Among them, C i,j is the ciphertext after the operation, and D i +D j is the corresponding plaintext operation.
[0050] Decryption: When necessary, decrypt the result to obtain the calculated plaintext;
[0051] D(C i,j )=D(E(D i +D j ))=D i +D j .
[0052] Preferably, in step S4, the federated learning algorithm is a distributed machine learning method that allows multiple participants to jointly train a global model without sharing original data. Assume that there are n participants, and each participant i has a local data set D i and local model parameters W i ;
[0053] The basic steps of federated learning are:
[0054] Local model update: Each participant trains the model on the local dataset and updates the local model parameters:
[0055]
[0056] Where η is the learning rate, L i is the loss function, is the gradient of the loss function;
[0057] Global model aggregation: The federated learning server collects the local model parameters of the participants and aggregates them into a global model w (t +1) :
[0058]
[0059] Where n is the number of parties;
[0060] The server updates the global model parameters w (t+1) Distribute to all participants and enter the next round of training;
[0061] The homomorphic encryption allows calculations to be performed on encrypted data without decryption, assuming that E(.) is the encryption function, D(.) is the decryption function, and supports additive homomorphism;
[0062] Basic properties of homomorphic encryption:
[0063] Encryption: local model parameters W i To encrypt:
[0064] C i =E(w i ),
[0065] Among them, C i are the encrypted model parameters.
[0066] Encrypted model aggregation: Aggregate encrypted model parameters without decrypting them:
[0067]
[0068] Preferably, in step S5, the goal of the adaptive consensus mechanism is to dynamically adjust the consensus algorithm according to the network status to optimize system performance and security. The adaptive consensus algorithm formula is:
[0069] Define the state variable S(t) to represent the network state at time t. The state variable S(t) includes the following factors:
[0070] N(t): the number of nodes participating in the consensus;
[0071] T(t): the transaction volume in the network;
[0072] L(t): network load;
[0073] Define the optimization function Q(S(t)) and the optimal consensus algorithm C(t) based on the state variables:
[0074]
[0075] Among them, Q(S(t)) is in the form of a weighted sum function, which weights the contribution of different consensus algorithms to system performance and security:
[0076] Q(S(t))=α·f PoW (N(t), T(t), L(t))+β·f Pos (N(t), T(t), L(t))+γ·f DFT (N(t), T(t),
[0077] Among them, α, β, γ are weight parameters for adjusting the importance of each consensus algorithm, and f PoW , f PoS , f DFT Indicates the performance and security scores of each consensus algorithm state.
[0078] Preferably, in step S6, the goal of the cross-chain interoperability protocol is to achieve data exchange and intercommunication between different blockchains. The basic steps of the cross-chain operation are:
[0079] Data locking: Lock the hash value H(D) of data D on blockchain A as a certificate to ensure that the data cannot be tampered with on chain A:
[0080] Lock A (D) = H(D),
[0081] Cross-chain verification: Verify the hash value H(D) of data D on blockchain B to ensure that the state of the data on chain A is correctly recorded:
[0082] Verify B (H(D))=True,
[0083] Data unlocking and transmission: Once the verification is passed, the data is unlocked and transmitted on blockchain B:
[0084] Unlock B (D) = D,
[0085] Cross-chain protocol formula: Assume f A→B (D) represents the data transmission function from chain A to chain B, and its formula is as follows:
[0086]
[0087] Preferably, in step S6, a semantic analysis and ontology matching algorithm is used to standardize data in different systems, and the algorithm formula is:
[0088] Semantic mapping: Define the mapping relationship between ontologies A , O B ), which maps the data concept C of chain A A Transformed into data concept C of chain B B :
[0089] M(C A , O A →O B )=C B ,
[0090] Matching degree calculation: By calculating the matching degree function Sim(C A , C B ), to measure the semantic similarity between concepts:
[0091]
[0092] Standardized data transmission: In the process of cross-chain data transmission, the data concept C of chain A is mapped according to M. A Transformed into standardized data concept C on chain B B :
[0093] D B =M(D A , O A →O B ).
[0094] Preferably, in step S8, the algorithm steps of distributed computing are:
[0095] Local calculation: each node N i Calculate statistics locally. Suppose we want to calculate the global mean μ. Each node first calculates its local mean μ. i :
[0096]
[0097] Global aggregation: Nodes aggregate their local mean μ i Sent to the aggregation node, which calculates the global mean μ:
[0098]
[0099] Global statistical calculation: For more complex statistics, a two-stage calculation method can be used. First, the local variance is calculated. The post-aggregation is the global variance σ 2 :
[0100]
[0101] Preferably, in step S8, the data statistical analysis formula may use a distributed linear regression model, and its algorithm steps are as follows:
[0102] Local gradient calculation: each node N i Calculate the gradient g on its local data i :
[0103]
[0104] Among them, X i and i is node N i Local data on ;
[0105] Global gradient aggregation: nodes aggregate their local gradients g i Sent to the aggregation node and aggregated into the global gradient g:
[0106]
[0107] Parameter update: Use the global gradient to update the regression coefficient β:
[0108] β (t+1) =β (t) -ηg,
[0109] Where η is the learning.
[0110] The present invention provides a clinical data statistical management and analysis method based on blockchain, which has the following beneficial effects:
[0111] 1. The present invention can effectively protect sensitive clinical data by combining layered storage algorithms, homomorphic encryption technology and revocable anonymity technology, ensuring the security and privacy of data during transmission and storage. At the same time, patients can finely control data access rights through smart contracts and safely disclose part of the data under specific conditions, thereby further improving data privacy protection.
[0112] 2. The present invention utilizes sharding technology and an adaptive consensus mechanism to significantly improve the efficiency and scalability of the system when processing massive amounts of data. The adaptive consensus mechanism can dynamically adjust the consensus algorithm according to the network status to ensure that the performance and security of the system are always in the best state under different load conditions.
[0113] 3. The present invention realizes data standardization and seamless exchange between different blockchain platforms through cross-chain interoperability protocols and semantic analysis and ontology matching algorithms, ensures the semantic consistency of data in heterogeneous systems, and reduces the complexity of data conversion. At the same time, the automatic audit mechanism records and updates data changes in real time through smart contracts, and automatically generates audit reports to ensure the transparency and traceability of data operations, which helps to meet various compliance requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0115] In order to make the technical personnel in the technical field understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in combination with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a partial embodiment of the present invention, not a complete embodiment. Based on the embodiment of the present invention, other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present invention.
[0116] The present invention is described in detail below in conjunction with the accompanying drawings:
[0117] Example:
[0118] Please refer to the attached Figure 1 , an embodiment of the present invention provides a clinical data statistical management and analysis method based on blockchain, comprising the following steps: S1, collecting clinical data from sources such as hospitals, clinics, and patient devices to classify data according to sensitivity, frequent access, and size using a hierarchical storage algorithm;
[0119] S2. Apply sharding technology to divide the blockchain into different data fragments for processing, and use homomorphic encryption algorithm to encrypt the data;
[0120] S3. Patients can set the scope and duration of access to their data and access rights through smart contracts, and introduce revocable anonymity technology to allow disclosure of some data;
[0121] S4. Use federated learning algorithms to allow medical institutions to train models without sharing original data, and use homomorphic encryption technology to encrypt and calculate on-chain data;
[0122] S5. Introduce an adaptive consensus mechanism to dynamically adjust the consensus algorithm according to the network status, and record and update data changes in real time through smart contracts to automatically generate audit reports;
[0123] S6. Use advanced cross-chain interoperability protocols to standardize data from various medical systems through semantic analysis and ontology matching algorithms;
[0124] S7. Develop a simple and easy-to-use user interface that hides complex encryption and data management operations, and use automatic optimization algorithms to dynamically adjust blockchain configuration based on user needs and system load;
[0125] S8. Use the distributed computing power of the blockchain network to conduct statistical analysis on the data on the chain and generate clinical research reports;
[0126] S9. Use automated deployment algorithms to simplify the system installation and maintenance process, and dynamically adjust system parameters based on actual usage through continuous performance monitoring and adaptive maintenance algorithms.
[0127] Benefits of S1: Through the hierarchical storage algorithm, data is classified according to sensitivity, access frequency and size, which effectively protects sensitive data, reduces the risk of data leakage, prioritizes the processing of high-frequency access data, improves the system's response speed and user experience, reduces the waste of storage resources, and improves the overall storage efficiency of the system; Benefits of S2: Reduce the burden on a single node, improve the system's processing power and scalability; Benefits of S3: Ensure that authorized parties can access specific data, strengthen data security management, and balance data privacy with necessary information sharing needs; Benefits of S4: Avoid the risk of data leakage, while using homomorphic encryption to ensure the privacy of data during the calculation process, improve data utilization and analysis results; Benefits of S5: Ensure the transparency and traceability of data operations, which is helpful for compliance management; Benefits of S6: Ensure data standardization and seamless exchange between different blockchain platforms, reduce the complexity and error rate of data conversion, and enhance data compatibility and cooperation between systems; Benefits of S7: Reduce the complexity of user operations and improve the convenience and efficiency of user use; Benefits of S8: Improve data analysis efficiency, and can efficiently perform data statistical analysis and generate clinical research reports; Benefits of S9: Reduce manual intervention, improve the efficiency of system management, and ensure long-term stability and efficient operation.
[0128] In step S1, the tiered storage algorithm steps are:
[0129] a. Assume that the clinical data set to be processed is D = {d 1 , d 2 , ..., d n}, where each data item d i Has the following properties:
[0130] Sensitivity S(d i): defined as the sensitivity level of the data;
[0131] Access frequency F(d i ): defined as the expected number of accesses or access frequency of the data;
[0132] Data size γ·|d i |: defined as the size of the data item;
[0133] b. Calculate a comprehensive score for each data item through a weighted scoring function to evaluate its storage location. The algorithm formula of the weighted scoring function is:
[0134] P(d i )=α·S(d i )+β·F(d i )+γ·|d i |,
[0135] Among them, α, β, γ are predefined weight parameters;
[0136] c. Hierarchical decision rules:
[0137] According to the comprehensive score P(d i ) Classify and store data:
[0138] On-chain storage: If P(d i ) is higher than a certain threshold T high , then the data is stored on the blockchain;
[0139] ifP(d i )≥T high , then stored i On-chain,
[0140] Off-chain storage: If P(d i ) is lower than a certain threshold T low , then the data is stored in the distributed storage system off-chain;
[0141] ifP(d i )≤T low , then stored i off-chain,
[0142] Hybrid storage: If T low <P(d i )<T high , a hybrid storage strategy is adopted, where some data is stored on-chain and some data is stored off-chain;
[0143] i f T low <P(d i )<Thigh , then stored i using hybrid storage.
[0144] Through the weighted scoring function, the system can calculate a comprehensive score based on the sensitivity, access frequency and data size of the data item, and quantitatively evaluate the storage requirements of each data item. The setting of the weight parameter can be flexibly adjusted according to the specific application scenario, so that the system can make adaptive storage decisions for different types of data;
[0145] Data item d i The comprehensive score is between the low threshold and the high threshold, indicating that the data has certain security requirements and access efficiency. The hybrid storage strategy allows the key part of the data to be stored on the blockchain, while the non-critical part is stored off-chain, taking into account both security and cost-effectiveness.
[0146] In step S2, the formulas for sharding technology and homomorphic encryption algorithm are as follows:
[0147] Data sharding algorithm:
[0148] Assume that a data set D is to be divided into multiple data segments D = {D 1 , D 2 , ..., D m}, where each fragment D i Can be stored and processed independently;
[0149] The basic steps of data sharding are:
[0150] Data partitioning: Use hash function H to map data item d into different fragments D i superior;
[0151] H(d)modm=i,
[0152] Where H(d) is the hash value of data item d, m is the number of fragments, and i represents the fragment D to which d is assigned. i ;
[0153] Fragment storage: Different fragments D i Stored in different shards of the blockchain.
[0154] Through the hash function H(d), the data item d is evenly distributed to the m fragments. Since the hash function has the characteristics of randomization and uniform distribution, and the mapping can ensure that the data is evenly distributed among the fragments, it avoids data concentration in a single fragment, thereby preventing fragment overload or resource waste;
[0155] After the data set is divided into multiple independent fragments and stored in different shards of the blockchain, each fragment can be stored and processed independently. Its distributed processing method greatly improves the processing capacity of the system and enhances the scalability and processing performance of the system when facing large-scale data;
[0156] After the data is divided into multiple fragments, different fragments are stored in different shards, reducing the storage pressure of each shard and optimizing the data access path. Since the storage and computing tasks of each shard are relatively balanced, the system is more efficient in data storage, reading and computing, and the response time is shorter;
[0157] Since data is divided and stored in different shards in the blockchain, even if a shard is attacked or damaged, it will not affect the data in other shards. Its design enhances the system's fault tolerance and data security, ensuring the high availability of the system.
[0158] Homomorphic encryption algorithm:
[0159] Homomorphic encryption allows direct computation on ciphertext without decryption. Assume that encryption function E and decryption function D are used, and the operator are operations supported by homomorphic encryption;
[0160] Basic properties of homomorphic encryption:
[0161] Encryption: For each data fragment D i Encryption is performed;
[0162] C i =E(D i ),
[0163] Among them, C i is the encrypted ciphertext;
[0164] Ciphertext calculation: Encrypted data fragment C i Operate without decryption;
[0165]
[0166] Among them, C i,j is the ciphertext after the operation, and D i +D j is the corresponding plaintext operation.
[0167] Decryption: When necessary, decrypt the result to obtain the calculated plaintext;
[0168] D(C i,j )=D(E(D i +D j ))=D i +D j .
[0169] The encryption formula is used during data storage or transmission. Unauthorized users cannot directly access plaintext data, ensuring the privacy of the data. The encryption process maintains the computability of the data and allows subsequent calculation operations in an encrypted state. The ciphertext calculation formula allows direct operations on the encrypted data. Common calculations can be performed without decrypting the data, which is particularly important for protecting data privacy because the data always remains encrypted during the calculation process. The decryption formula restores the result of the encrypted calculation to plaintext, so that the calculation performed under the ciphertext can eventually be converted into a readable plaintext result, ensuring the practicality of data processing and the correctness and integrity of the data processing process.
[0170] In step S4, the federated learning algorithm is a distributed machine learning method that allows multiple participants to jointly train a global model without sharing the original data. Assume that there are n participants, and each participant i has a local dataset D i and local model parameters W i ;
[0171] The basic steps of federated learning are:
[0172] Local model update: Each participant trains the model on the local dataset and updates the local model parameters:
[0173]
[0174] Where η is the learning rate, L i is the loss function, ΔL i is the gradient of the loss function;
[0175] Global model aggregation: The federated learning server collects the local model parameters of the participants and aggregates them into a global model w (t +1) :
[0176]
[0177] Where n is the number of parties;
[0178] The server updates the global model parameters w (t+1) Distribute to all participants and enter the next round of training;
[0179] Homomorphic encryption allows computation to be performed on encrypted data without decryption, assuming that E(.) is the encryption function, D(.) is the decryption function, and supports additive homomorphism;
[0180] Basic properties of homomorphic encryption:
[0181] Encryption: local model parameters W i To encrypt:
[0182] C i =E(w i ),
[0183] Among them, C i are the encrypted model parameters.
[0184] Encrypted model aggregation: Aggregate encrypted model parameters without decrypting them:
[0185]
[0186] The local model update formula is used to gradually optimize the model to reduce prediction errors and protect the privacy of data; the global model aggregation formula is used to aggregate the global model parameters, and the server distributes them to the participants for use in the next round of training, thereby gradually optimizing the global model; the homomorphic encryption formula is used to enable the encrypted model parameters to participate in the calculation, so that the federated learning server can perform subsequent aggregation operations even in the encrypted state; the encrypted model aggregation formula is used to complete the necessary aggregation calculations through homomorphic encryption technology, even if the server itself does not have the decryption capability, thereby further protecting the privacy of the participants' data.
[0187] In step S5, the goal of the adaptive consensus mechanism is to dynamically adjust the consensus algorithm according to the network status to optimize system performance and security. The adaptive consensus algorithm formula is:
[0188] Define the state variable S(t) to represent the network state at time t. The state variable S(t) includes the following factors:
[0189] N(t): the number of nodes participating in the consensus;
[0190] T(t): the transaction volume in the network;
[0191] L(t): network load;
[0192] Define the optimization function Q(S(t)) and the optimal consensus algorithm C(t) based on the state variables:
[0193]
[0194] Among them, Q(S(t)) is in the form of a weighted sum function, which weights the contribution of different consensus algorithms to system performance and security:
[0195] Q(S(t))=α·f PoW (N(t), T(t), L(t))+β·f PoS (N(t), T(t), L(t))+γ·f DFT (N(t), T(t),
[0196] Among them, α, β, γ are weight parameters for adjusting the importance of each consensus algorithm, and f PoW , f PoS , f DFT Indicates the performance and security scores of each consensus algorithm state.
[0197] The state variable formula can monitor the state variables to understand the operation of the network in real time, ensuring that the system can maintain optimal performance and security under different conditions; the optimization function formula can dynamically adjust the consensus algorithm so that the system can maintain stable and efficient operation under high or low load conditions; the optimization function form formula allows the system to flexibly adjust the usage ratio of each consensus algorithm according to the real-time network conditions, thereby optimizing the overall performance and security of the system.
[0198] In step S6, the goal of the cross-chain interoperability protocol is to achieve data exchange and intercommunication between different blockchains. The basic steps of cross-chain operation are:
[0199] Data locking: Lock the hash value H(D) of data D on blockchain A as a certificate to ensure that the data cannot be tampered with on chain A:
[0200] Lock A (D) = H(D),
[0201] Cross-chain verification: Verify the hash value H(D) of data D on blockchain B to ensure that the state of the data on chain A is correctly recorded:
[0202] Verify B (H(D))=True,
[0203] Data unlocking and transmission: Once the verification is passed, the data is unlocked and transmitted on blockchain B:
[0204] Unlock B (D) = D,
[0205] Cross-chain protocol formula: Assume f A→B (D) represents the data transmission function from chain A to chain B, and its formula is as follows:
[0206]
[0207] The data locking formula ensures that the status of the data on chain A cannot be tampered with. Its steps establish proof of data integrity to ensure data security and credibility in subsequent cross-chain operations. Subsequent verification steps on chain B will rely on the locked hash value to ensure the correctness of the data; the cross-chain verification formula verifies the hash value of data D on the chain to ensure that the status of the data on chain A has been correctly recorded. It is the core step in the secure transmission of cross-chain data. If the verification fails, data transmission cannot be carried out to prevent data tampering or forgery; the data unlocking and transmission formula marks the successful completion of cross-chain transmission of data and restores the data usage status; the cross-chain protocol formula stipulates that data D will be unlocked and transmitted when its hash value is verified on chain B, otherwise an error will be returned and the transmission will be terminated, ensuring the security and reliability of cross-chain data transmission, ensuring the correctness and consistency of data, and avoiding the risk of human intervention.
[0208] In step S6, semantic analysis and ontology matching algorithm is used to standardize data in different systems. The algorithm formula is:
[0209] Semantic mapping: Define the mapping relationship between ontologies A , O B ), which maps the data concept C of chain A A Transformed into data concept C of chain B B :
[0210] M(C A , O A →O B )=C B ,
[0211] Matching degree calculation: By calculating the matching degree function Sim(C A , C B ), to measure the semantic similarity between concepts:
[0212]
[0213] Standardized data transmission: In the process of cross-chain data transmission, the data concept C of chain A is mapped according to M. A Transformed into standardized data concept C on chain B B :
[0214] D B =M(D A , O A →O B ).
[0215] The semantic mapping formula ensures that concepts remain consistent across different systems during cross-chain data transmission, which is crucial for data exchange between heterogeneous blockchain platforms. It enables the system to accurately convert data on chain A into standardized data concepts on chain B, avoiding ambiguity in data understanding. The matching degree calculation formula helps the system identify the semantically closest concept pairs, thereby improving the accuracy of data conversion during cross-chain transmission and reducing data errors or ambiguities caused by concept mismatches. The standardized data transmission formula ensures that the system correctly interprets and uses cross-chain data on the target chain through standardized data transmission, avoiding transmission errors or data loss due to differences in data formats and semantics between different chains.
[0216] In step S8, the algorithm steps of distributed computing are:
[0217] Local calculation: each node N i Calculate statistics locally. Suppose we want to calculate the global mean μ. Each node first calculates its local mean μ. i :
[0218]
[0219] Global aggregation: Nodes aggregate their local mean μ i Sent to the aggregation node, which calculates the global mean μ:
[0220]
[0221] Global statistical calculation: For more complex statistics, a two-stage calculation method can be used. First, the local variance is calculated. The post-aggregation is the global variance σ 2 :
[0222]
[0223] The role of the local calculation formula is that each node only processes the local data set without the need to share data, which helps to protect data privacy and avoid the bottleneck problem caused by centralizing data in a fixed location for processing; the role of the global aggregation formula is that each node independently calculates and summarizes the results, avoiding the centralized transmission and processing of large amounts of data, thereby improving the efficiency and scalability of global statistical calculations; the role of the global statistical calculation formula is to calculate the local variance and local mean in steps, and then perform global aggregation, reducing data transmission and computing overhead while maintaining a high degree of accuracy, which helps to reduce errors caused by directly calculating global statistics in distributed systems.
[0224] In step S8, the data statistical analysis formula can use a distributed linear regression model, and its algorithm steps are as follows:
[0225] Local gradient calculation: each node Ni Calculate the gradient g on its local data i :
[0226]
[0227] Among them, X i and i is node N i Local data on ;
[0228] Global gradient aggregation: nodes aggregate their local gradients g i Sent to the aggregation node and aggregated into the global gradient g:
[0229]
[0230] Parameter update: Use the global gradient to update the regression coefficient β:
[0231] β (t+1) =β (t) -ηg,
[0232] Where η is the learning rate.
[0233] The role of the local gradient calculation formula is to calculate the gradient locally, so that the node can participate in the training of the global model while protecting data privacy, which is particularly important for the processing of sensitive data; the role of the global gradient aggregation formula is to aggregate the local gradients calculated by each node to form a global gradient g. The system can comprehensively consider the impact of the node's local data on the model and ensure that the global model can correctly reflect the structure and characteristics of the data set; the role of the parameter update formula is to use the global gradient to update the regression coefficient and optimize the model so that it can fit the data more accurately. The learning rate controls the step size of the parameter update and affects the speed and stability of the model convergence.
[0234] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A clinical data statistical management and analysis method based on blockchain, characterized in that: The steps include: S1, collecting clinical data from sources such as hospitals, clinics, and patient devices to classify data based on sensitivity, frequent access, and size using a tiered storage algorithm; S2. Apply sharding technology to divide the blockchain into different data fragments for processing, and use homomorphic encryption algorithm to encrypt the data; S3. Patients can set the scope and duration of access to their data and access rights through smart contracts, and introduce revocable anonymity technology to allow disclosure of some data; S4. Use federated learning algorithms to allow medical institutions to train models without sharing original data, and use homomorphic encryption technology to encrypt and calculate on-chain data; S5. Introduce an adaptive consensus mechanism to dynamically adjust the consensus algorithm according to the network status, and record and update data changes in real time through smart contracts to automatically generate audit reports; S6. Use advanced cross-chain interoperability protocols to standardize data from various medical systems through semantic analysis and ontology matching algorithms; S7. Develop a simple and easy-to-use user interface that hides complex encryption and data management operations, and use automatic optimization algorithms to dynamically adjust blockchain configuration based on user needs and system load; S8. Use the distributed computing power of the blockchain network to conduct statistical analysis on the data on the chain and generate clinical research reports; S9. Use automated deployment algorithms to simplify the system installation and maintenance process, and dynamically adjust system parameters based on actual usage through continuous performance monitoring and adaptive maintenance algorithms.
2. According to a blockchain-based clinical data statistical management and analysis method according to claim 1, it is characterized in that: In the step S1, the hierarchical storage algorithm steps are: a. Assume that the clinical data set to be processed is D = {d1, d2, ..., d n }, where each data item d i Has the following properties: Sensitivity S(d i ): defined as the sensitivity level of the data; Access frequency F(d i ): defined as the expected number of accesses or access frequency of the data; Data size γ·|d i |: defined as the size of the data item; b. Calculate a comprehensive score for each data item through a weighted scoring function to evaluate its storage location. The algorithm formula of the weighted scoring function is: P(d i )=α·S(d i )+β·F(d i )+γ·|d i |, Among them, α, β, γ are predefined weight parameters; c. Hierarchical decision rules: According to the comprehensive score P(d i ) Classify and store data: On-chain storage: If P(d i ) is higher than a certain threshold T high , then the data is stored on the blockchain; ifP(d i )≥T high ,then stored i on-chain, Off-chain storage: If P(d i ) is lower than a certain threshold T low , then the data is stored in the distributed storage system off-chain; ifP(d i )≤T low ,then stored i off-chain, Hybrid storage: If T low <P(d i )<T high , a hybrid storage strategy is adopted, where some data is stored on-chain and some data is stored off-chain; ifT low <P(d i )<T high ,then stored i usinghybrid storage。 3. According to a blockchain-based clinical data statistical management and analysis method according to claim 1, it is characterized in that: In the S2 step, the formulas of the sharding technology and homomorphic encryption algorithm are as follows: The data sharding algorithm: Assume that a data set D is to be divided into multiple data segments D = {D1, D2, ..., D m }, where each fragment D i Can be stored and processed independently; The basic steps of data sharding are: Data partitioning: Use hash function H to map data item d into different fragments D i superior; H(d)modm=i, Where H(d) is the hash value of data item d, m is the number of fragments, and i represents the fragment D to which d is assigned. i ; Fragment storage: Different fragments D i Stored in different shards of the blockchain.
4. According to a blockchain-based clinical data statistical management and analysis method according to claim 3, it is characterized in that: The homomorphic encryption algorithm: Homomorphic encryption allows direct computation on ciphertext without decryption. Assume that encryption function E and decryption function D are used, and operator ⊕ is an operation supported by homomorphic encryption. Basic properties of homomorphic encryption: Encryption: For each data fragment D i Encryption is performed; C i =E(D i ), Among them, C i is the encrypted ciphertext; Ciphertext calculation: Encrypted data fragment C i Operate without decryption; C i,j =C i ⊕C j =E(D i )⊕E(D j )=E(D i +D j ), Among them, C i,j is the ciphertext after the operation, and D i +D j is the corresponding plaintext operation. Decryption: When necessary, decrypt the result to obtain the calculated plaintext; D(C i,j )=D(E(D i +D j ))=D i +D j 。 5. According to a blockchain-based clinical data statistical management and analysis method according to claim 1, it is characterized in that: In step S4, the federated learning algorithm is a distributed machine learning method that allows multiple participants to jointly train a global model without sharing the original data. Assume that there are n participants, and each participant i has a local data set D i and local model parameters W i ; The basic steps of federated learning are: Local model update: Each participant trains the model on the local dataset and updates the local model parameters: Where η is the learning rate, L i is the loss function, is the gradient of the loss function; Global model aggregation: The federated learning server collects the local model parameters of the participants and aggregates them into a global model w (t+1) : Where n is the number of parties; The server updates the global model parameters w (t+1) Distribute to all participants and enter the next round of training; The homomorphic encryption allows calculations to be performed on encrypted data without decryption, assuming that E(.) is the encryption function, D(.) is the decryption function, and supports additive homomorphism; Basic properties of homomorphic encryption: Encryption: local model parameters W i To encrypt: C i =E(w i ), Among them, C i are the encrypted model parameters. Encrypted model aggregation: Aggregate encrypted model parameters without decrypting them:
6. According to a blockchain-based clinical data statistical management and analysis method according to claim 1, it is characterized in that: In the step S5, the goal of the adaptive consensus mechanism is to dynamically adjust the consensus algorithm according to the network status to optimize system performance and security. The adaptive consensus algorithm formula is: Define the state variable S(t) to represent the network state at time t. The state variable S(t) includes the following factors: N(t): the number of nodes participating in the consensus; T(t): the transaction volume in the network; L(t): network load; Define the optimization function Q(S(t)) and the optimal consensus algorithm C(t) based on the state variables: Among them, Q(S(t)) is in the form of a weighted sum function, which weights the contribution of different consensus algorithms to system performance and security: Q(S(t))=α·f PoW (N(t),T(t),L(t))+β·f PoS (N(t),T(t),L(t))+γ·f DFT (N(t),T(t), Among them, α, β, γ are weight parameters for adjusting the importance of each consensus algorithm, and f PoW , f PoS , f DFT Indicates the performance and security scores of each consensus algorithm state.
7. According to a blockchain-based clinical data statistical management and analysis method according to claim 1, it is characterized in that: In step S6, the goal of the cross-chain interoperability protocol is to achieve data exchange and intercommunication between different blockchains. The basic steps of cross-chain operation are: Data locking: Lock the hash value H(D) of data D on blockchain A as a certificate to ensure that the data cannot be tampered with on chain A: Lock A (D)=H(D), Cross-chain verification: Verify the hash value H(D) of data D on blockchain B to ensure that the state of the data on chain A is correctly recorded: Verify B (H(D))=True, Data unlocking and transmission: Once the verification is passed, the data is unlocked and transmitted on blockchain B: Unlock B (D)=D, Cross-chain protocol formula: Assume f A→B (D) represents the data transmission function from chain A to chain B, and its formula is as follows:
8. According to a blockchain-based clinical data statistical management and analysis method according to claim 1, it is characterized in that: In step S6, semantic analysis and ontology matching algorithm is used to standardize data in different systems, and its algorithm formula is: Semantic mapping: Define the mapping relationship between ontologies A , O B ), which maps the data concept C of chain A A Transformed into data concept C of chain B B : M(C A ,O A →O B )=C B , Matching degree calculation: By calculating the matching degree function Sim(C A ,C B ), to measure the semantic similarity between concepts: Standardized data transmission: In the process of cross-chain data transmission, the data concept C of chain A is mapped according to M. A Transformed into standardized data concept C on chain B B : D B =M(D A ,O A →O B )。 9. According to a blockchain-based clinical data statistical management and analysis method according to claim 1, it is characterized in that: In step S8, the algorithm steps of distributed computing are: Local calculation: each node N i Calculate statistics locally. Suppose we want to calculate the global mean μ. Each node first calculates its local mean μ. i : Global aggregation: Nodes aggregate their local mean μ i Sent to the aggregation node, which calculates the global mean μ: Global statistical calculation: For more complex statistics, a two-stage calculation method can be used. First, the local variance is calculated. The post-aggregation is the global variance σ 2 :
10. A clinical data statistical management and analysis method based on blockchain according to claim 1, characterized in that: In step S8, the data statistical analysis formula may use a distributed linear regression model, and the algorithm steps are as follows: Local gradient calculation: each node N i Calculate the gradient g on its local data i : Among them, X i and i is node N i Local data on ; Global gradient aggregation: nodes aggregate their local gradients g i Sent to the aggregation node and aggregated into the global gradient g: Parameter update: Use the global gradient to update the regression coefficient β: b (t+1) =b (t) -hg, Where η is the learning rate.
Citation Information
Patent Citations
Electronic medical record access control method based on block chain
CN110321721A
Multi-center collaborative clinical research network platform
CN116434896A
Block chain privacy protection method and system based on homomorphic encryption algorithm and zero-knowledge proof protocol
CN116915379A
Federal learning privacy protection system and method based on block chain and privacy computing technology
CN117852068A
Breast cancer clinical data analysis diagnosis and treatment platform based on artificial intelligence large language model
CN118016280A
Cited By
Method and system for hierarchical storage of block chain data in urban update field
CN119537382A
A method and system for hierarchical storage of blockchain data in the field of urban renewal
CN119537382B
Order data processing method and system based on block chain
CN119624590A
