Medical data security sharing method based on intelligent data scheduling and distributed storage
Patent Information
- Application Number
- CN202510247982.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2026-10-30
AI Technical Summary
集中式存储架构存在单点故障风险,并且容易受到数据泄露和未授权访问的威胁,难以满足医疗数据高安全性要求
[0014](1)通过同态加密和属性基加密技术,对医疗数据进行加密分片存储,确保数据即使被截取也无法直接读取,同时结合区块链存储访问授权信息,实现不可篡改的访问控制,提高数据共享过程中的安全性和隐私保护水平。(2)采用数据调度引擎,根据数据请求方的权限级别和传输路径优化策略,计算数据访问优先级并优化数据存储和传输路径,结合历史访问数据调整缓存和调度权重,提高访问速度,同时减少冗余数据传输,降低系统资源消耗。(3)通过哈希链与完整性校验机制,对医疗数据进行哈希签名和比对存储记录,确保数据在共享和传输过程中未被篡改。同时,基于区块链的访问日志记录,使所有数据交互可追溯,保障数据的真实性和可信性。(4)结合区块链和智能合约技术,构建权限管理框架,实现跨机构间的数据共享权限验证,确保只有获得授权的用户可以访问相应的数据。该机制不仅提升数据互操作性,还减少了传统数据共享方式中因权限管理不当导致的信息泄露或访问受限问题。
Smart Images

Figure CN123013177A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data security technology, and in particular to a method for secure sharing of medical data based on intelligent data scheduling and distributed storage. Background Technology
[0002] In existing technologies, the storage and sharing of medical data primarily relies on centralized databases or cloud storage architectures. Hospitals and medical institutions typically store patient information through internal servers or third-party cloud services and use standardized interfaces for data interaction. Data access permissions are usually managed by role-based access control (RBAC) or access control lists (ACLs), while some systems introduce data encryption technologies and logging mechanisms to enhance data security. Furthermore, to improve the traceability and sharing efficiency of medical data, some systems are attempting to combine blockchain technology and artificial intelligence to optimize data management and access strategies.
[0003] Existing medical data sharing technologies still face numerous challenges. Centralized storage architectures are susceptible to single points of failure and vulnerable to data breaches and unauthorized access, failing to meet the high security requirements of medical data. Traditional access control mechanisms struggle to achieve fine-grained permission management in dynamic sharing environments, limiting cross-institutional data sharing. Furthermore, insufficient optimization of data transmission paths can lead to increased access latency, impacting the real-time nature of data interaction. Existing data integrity verification methods are ineffective in preventing data tampering during cross-institutional sharing and lack reliable traceability mechanisms.
[0004] Therefore, it is necessary to develop a method for secure sharing of medical data based on intelligent data scheduling and distributed storage. Summary of the Invention
[0005] This application provides a method for secure sharing of medical data based on intelligent data scheduling and distributed storage to improve the security of medical data.
[0006] This application provides a method for secure sharing of medical data based on intelligent data scheduling and distributed storage, including:
[0007] Acquire medical data and label the data according to patient category, disease type and sensitivity level based on preset rules to generate a structured label dataset, which includes data classification labels and access control information;
[0008] Based on the structured tag dataset, a data scheduling engine is used to calculate data access priority, optimize the transmission path, and generate a medical data scheduling scheme according to the data requester's permission level and transmission path optimization strategy. The generated medical data scheduling scheme includes storage location, access permissions, and caching strategy.
[0009] According to the medical data scheduling scheme, the data is stored in multiple distributed storage nodes, and encrypted sharding technology is used for storage. Access permissions are controlled based on homomorphic encryption and attribute-based encryption, and an encrypted storage index table is generated.
[0010] Based on the encrypted storage index table, an access management framework is constructed, and blockchain is used to store data access authorization information. Smart contracts are used to define access rules and record access logs.
[0011] During data interaction, a hash chain is used to verify the integrity of medical data. The hash value is calculated and compared with the stored record. If they match, access is allowed; otherwise, access is denied and an abnormal alarm is triggered to ensure that the data has not been tampered with.
[0012] Based on the access logs, historical access data is analyzed using data request optimization strategies to adjust cache and scheduling weights, optimize data access routes, improve the security and efficiency of sharing, and reduce system load.
[0013] The beneficial effects of the technical solution provided in this application include:
[0014] (1) By using homomorphic encryption and attribute-based encryption technologies, medical data is encrypted and fragmented for storage, ensuring that even if the data is intercepted, it cannot be directly read. Simultaneously, blockchain storage of access authorization information enables tamper-proof access control, improving security and privacy protection during data sharing. (2) A data scheduling engine is employed to calculate data access priority and optimize data storage and transmission paths based on the data requester's permission level and transmission path optimization strategy. Historical access data is used to adjust caching and scheduling weights, improving access speed while reducing redundant data transmission and lowering system resource consumption. (3) Through hash chain and integrity verification mechanisms, medical data is hash-signed and compared for storage records, ensuring that the data is not tampered with during sharing and transmission. Simultaneously, blockchain-based access logs make all data interactions traceable, guaranteeing the authenticity and trustworthiness of the data. (4) Combining blockchain and smart contract technologies, a permission management framework is constructed to achieve cross-institutional data sharing permission verification, ensuring that only authorized users can access the corresponding data. This mechanism not only improves data interoperability but also reduces information leakage or access restrictions caused by improper permission management in traditional data sharing methods. Attached Figure Description
[0015] Figure 1 This is a flowchart of a medical data secure sharing method based on intelligent data scheduling and distributed storage provided in the first embodiment of this application. Detailed Implementation
[0016] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0017] The first embodiment of this application provides a method for secure sharing of medical data based on intelligent data scheduling and distributed storage. Please refer to... Figure 1 This figure is a schematic diagram of the first embodiment of this application. The following is in conjunction with... Figure 1 The first embodiment of this application provides a detailed description of a method for secure sharing of medical data based on intelligent data scheduling and distributed storage.
[0018] Step S101: Acquire medical data and label the data according to patient category, disease type and sensitivity level based on preset rules to generate a structured label dataset, which includes data classification labels and access control information.
[0019] In step S101, raw medical data first needs to be obtained from the medical data management system, electronic medical record system, laboratory information system, or other medical information storage platform. Raw medical data may include, but is not limited to, patient basic information, medical records, examination reports, imaging data, laboratory test data, medication records, and treatment plans. During data acquisition, standardized data interfaces (such as HL7, DICOM) or API-based data acquisition methods can be used to ensure the standardization and usability of the data format.
[0020] After acquiring medical data, it needs to be classified and labeled according to pre-defined rules. These pre-defined rules can be set by hospitals or medical institutions based on business needs, legal and regulatory requirements, and privacy policies, and can include multiple classification dimensions. First, classification can be by patient category, including inpatients, outpatients, and emergency patients; second, by disease type, such as cardiovascular diseases, respiratory diseases, and endocrine diseases; third, classification can be by data sensitivity level, such as general data, privacy data, and highly sensitive data, with different security strategies employed in subsequent processing for data of different sensitivity levels. Furthermore, the classification criteria can be further refined by considering factors such as data source and data format.
[0021] Based on data classification, medical data is tagged. Tagging can be performed using automated rule matching, machine learning models, or manual annotation. The tagging results should be stored as structured data for subsequent computation and scheduling. Each medical data record will be associated with one or more data classification tags; for example, a blood glucose test report might be tagged with "laboratory test data," "diabetes," or "highly sensitive data."
[0022] After labeling is complete, a structured labeled dataset needs to be generated. This dataset contains data classification labels and access control information. Access control information includes access permission settings for each piece of data, such as which user groups (e.g., doctors, nurses, administrators) or which medical institutions can access the data, whether anonymization and sharing are allowed, and whether it can be used for research purposes. Access control information can be set based on internal hospital access policies or cross-institutional sharing protocols and stored as metadata in the structured labeled dataset.
[0023] Finally, the generated structured tagged dataset is stored in a database or distributed storage system for subsequent data scheduling and access control. Standardized data formats (such as JSON, XML, and CSV) can be used during storage to improve system compatibility and support fast indexing and retrieval. Through these steps, the acquisition, classification, tagging, and access permission settings of medical data are completed, laying the foundation for subsequent data scheduling, encrypted storage, and secure sharing.
[0024] Furthermore, the acquisition of medical data, and the labeling of the data according to patient category, disease type, and sensitivity level based on preset rules to generate a structured labeled dataset, includes:
[0025] Raw data was extracted from multiple medical data sources, and the data was standardized in format.
[0026] Patient information is automatically classified based on semantic analysis and medical knowledge graphs, and the sensitivity level of the data is calculated by combining a dynamic risk assessment model.
[0027] In the process of data tagging, a cross-dimensional, multi-level tagging system is established so that the same data can be presented with different tag combinations according to different usage scenarios to meet diverse access control needs.
[0028] By leveraging machine learning models to optimize label assignment strategies, key features in the data are automatically identified, and classification criteria are dynamically adjusted based on access history.
[0029] In the acquisition and processing of medical data, it is essential to ensure data standardization, accurate classification, and flexible access control to guarantee security and privacy protection while sharing data. To achieve this, raw data must first be extracted from multiple medical data sources, including hospital electronic medical record systems, medical imaging storage systems, laboratory testing data platforms, and patient-uploaded health data. During data extraction, data in different formats needs to be structurally transformed to conform to unified data storage standards. For example, standardized data models can be used to process text medical records, imaging data, and laboratory test results to ensure data compatibility across different systems.
[0030] After standardizing the format, patient information needs to be automatically classified based on semantic analysis and medical knowledge graphs. Semantic analysis is used to parse key medical terms in the data, such as diagnostic results, prescription information, and medical history records, and match them with a pre-defined medical classification system to ensure consistency in data classification. Medical knowledge graphs serve as an auxiliary tool to help identify relationships between data, such as whether a patient's past medical history is related to their current condition, or whether certain disease categories have similar treatment pathways. This process can effectively improve the automation level of data classification while reducing classification errors caused by subjective judgment. Furthermore, to further enhance data security, a dynamic risk assessment model is needed to calculate the sensitivity level of the data. This model can comprehensively consider the degree of patient privacy involved in the data, the scarcity of medical data, and potential security risks. For example, genetic data involving patients with rare diseases may have an extremely high sensitivity level, while ordinary physical examination reports may be considered low-sensitivity data.
[0031] In the process of data tagging, it is necessary to establish a multi-dimensional, multi-level tagging system so that the same data can be adapted to different tag combinations in different application scenarios. This means that data tags should not only include basic patient categories and disease types, but also information such as access permissions, data sources, time dimensions, and applicable research directions. For example, a set of medical imaging data may primarily focus on lesion categories and image types in a clinical diagnostic scenario, while in a medical research scenario, it may focus more on different tag information such as patient demographics and disease stages. By constructing a multi-level tagging system, data management can be made more flexible, while avoiding the problem of limited data sharing due to overly simplistic tag classification.
[0032] Furthermore, to enhance the intelligence of tag allocation, machine learning models need to be introduced to optimize the tag allocation strategy. This model can automatically learn the access patterns of different user groups based on a large amount of existing historical access records, identifying which features are most critical for data classification. For example, the model can analyze the different ways doctors, researchers, and insurance institutions use medical data, thereby optimizing the tag segmentation logic so that the same data can be more accurately matched to the access needs of different users. In addition, the system can dynamically adjust classification criteria, automatically optimizing tag settings based on changes in data access history. For example, if the access frequency of a certain type of data increases significantly within a specific time period, the system can automatically adjust its access permissions or sensitivity levels to adapt to access needs at different stages.
[0033] Through this series of steps, it can be ensured that medical data meets security requirements while also taking into account the accuracy of data classification and the flexibility of access permissions during the sharing process, thereby achieving efficient and secure medical data management.
[0034] Step S102: Based on the structured tag dataset, using the data scheduling engine, calculate the data access priority according to the data requester's permission level and transmission path optimization strategy, optimize the transmission path, and generate a medical data scheduling scheme, including storage location, access permissions, and caching strategy.
[0035] In step S102, based on the structured labeled dataset, the data scheduling engine is used to calculate the access requirements for medical data and formulate optimized data distribution and sharing strategies to ensure the security, efficiency, and real-time nature of data access. First, the identity and permissions of the data requester need to be authenticated. The data requester may be a doctor, nurse, or administrator within the hospital, or a medical researcher or third-party healthcare provider from another institution. Through access control information, the system verifies the requester's identity and matches their permission level to determine the scope of data they can access.
[0036] After confirming access permissions, the system needs to calculate the priority of data access. This priority can be calculated based on multiple factors, including the importance and urgency of the data, the visitor's role, historical access records, and network resource load. For example, an emergency room doctor's request for a patient's latest test report should have higher priority than a regular researcher's request for historical data. The system can dynamically adjust the order of data access through predefined rules or machine learning-based models to calculate weights.
[0037] After determining access priorities, the system needs to optimize data transmission paths to reduce data access latency and improve transmission efficiency. The core of optimization lies in selecting the optimal data access path by considering the storage location of the medical data, the network topology, and the current network load. For locally stored data, access can be provided directly through the high-speed internal network; for remotely stored data, factors such as data transmission bandwidth, latency, and the availability of storage nodes need to be considered to select a suitable transmission channel.
[0038] Furthermore, when generating a data scheduling scheme, the data scheduling engine also needs to comprehensively consider storage location, access permissions, and caching strategies. The selection of storage location should be based on the data access frequency and the distribution of storage nodes. High-frequency access data can be preferentially stored on low-latency storage nodes, while long-term archived data can be stored on high-capacity storage nodes. Access permission management needs to be integrated with an access control system to ensure that only authorized users can access specific data. Caching strategies should be formulated based on data access patterns. Frequently accessed data can be cached locally or at the edge to reduce redundant transmissions and improve data access speed.
[0039] Ultimately, the data scheduling engine will generate a complete medical data scheduling plan and store it within the system to guide subsequent data storage, transmission, and access processes. This plan not only includes data storage location, access permissions, and caching strategies, but can also be dynamically adjusted based on system operation to adapt to different use cases and improve the stability and security of data access.
[0040] Furthermore, based on the structured labeled dataset, the data scheduling engine calculates data access priority, optimizes the transmission path, and generates a medical data scheduling scheme according to the data requester's permission level and transmission path optimization strategy, including:
[0041] Based on the data requester's access history, permission level, and current system load status, the urgency of the request is dynamically calculated, and the access priority is adjusted in combination with data sensitivity.
[0042] During the transmission path optimization process, the available bandwidth of storage nodes, network congestion, and data redundancy distribution are comprehensively considered. A dynamic weight allocation strategy is adopted to calculate the optimal transmission path in order to reduce data access latency and improve network stability.
[0043] When generating a medical data scheduling scheme, a storage location allocation strategy is set for different data requests, and a data caching mechanism is combined to allocate multi-layer caches for frequently accessed data, thereby improving the overall processing efficiency of data requests.
[0044] In the secure sharing of medical data, data access scheduling needs to consider multiple factors, including the data requester's permission level, historical access records, data sensitivity, and the current system load. Through intelligent calculations by a data scheduling engine, precise access priority control and efficient transmission path optimization can be achieved, ensuring data provides a good access experience while meeting security policies. The entire data scheduling process is based on structured labeled datasets, ensuring clear data classification and explicit access permissions. It also dynamically adjusts data transmission and storage paths using multi-level optimization strategies to improve the security and efficiency of data access.
[0045] When calculating data access priority, the system dynamically assesses the urgency of the current request based on the requester's access history, permission level, and current system load. Access history analysis includes the types of data the user has accessed in the past, their frequency, and the distribution of access times. This information helps determine if the current request aligns with the user's normal access patterns. If a user previously primarily accessed low-sensitivity basic medical data but suddenly requests access to highly sensitive patient genetic data, the system may lower their access priority or even trigger additional authentication steps. Permission levels are determined based on the user's identity information; for example, doctors, researchers, or insurance institutions may have different data access permissions. Even if multiple users request the same data simultaneously, the user with the higher permission level may have priority access. The current system load also affects access priority. When system resources are strained, high-priority data requests may be prioritized, while low-priority requests may be delayed or buffered. Data sensitivity further influences priority calculation. For example, medical data involving personal privacy may require stricter access controls, and even with high-level permissions, additional approval may be necessary in certain circumstances.
[0046] After determining access priorities, the system needs to optimize data transmission paths to reduce access latency and improve network stability. During transmission path optimization, the system comprehensively considers the available bandwidth of storage nodes, network congestion, and the distribution of data redundancy. The available bandwidth of storage nodes determines the maximum data transmission rate. When data requests are large, the system prioritizes storage nodes with sufficient bandwidth for data distribution. Network congestion is a significant factor affecting data access speed. The system monitors the load of each network node in real time to avoid transmitting data on congested network paths, thereby reducing data transmission latency. The distribution of data redundancy also affects transmission path optimization. Some data fragments may be stored on multiple nodes. To improve the reliability and stability of data access, the system prioritizes the storage node closest to the requester and with the lowest load for data transmission, rather than using a fixed storage location. To further improve access efficiency, the system employs a dynamic weight allocation strategy to dynamically adjust the transmission priority of different paths, ensuring that data is transmitted in the optimal way and guaranteeing efficient data access.
[0047] When generating a medical data scheduling plan, the system optimizes access priorities and transmission paths to set storage location allocation strategies for different data requests. Combined with a data caching mechanism, this further improves data access efficiency. Storage location allocation considers not only the current storage location of the data but also its access frequency for dynamic adjustment. For example, for frequently accessed data, the system may add copies of the data to multiple nodes to reduce the access pressure on a single storage node, while improving data redundancy and availability. For infrequently accessed data, the system may adopt more space-saving strategies, such as storing the complete data only on specific storage nodes and temporarily generating a cache when data is requested, thus reducing storage resource consumption.
[0048] In formulating its data caching strategy, the system employs a multi-layered caching mechanism, automatically adjusting the cache level based on data access frequency and request patterns. Frequently accessed data is stored in a high-priority cache layer, allowing requesters to quickly retrieve the data, while infrequently accessed data is stored in a lower-priority cache layer, only being loaded into the high-priority cache when necessary. This mechanism not only improves the response speed of data requests but also effectively reduces the load on storage nodes, enhancing the overall stability and scalability of the system.
[0049] Through the steps described above, the data scheduling engine can achieve efficient access and optimized transmission of medical data while ensuring data security. The system can dynamically calculate access priorities based on the requester's permissions, access history, and data sensitivity, and optimize data transmission paths in conjunction with network load conditions. Simultaneously, through storage location allocation strategies and multi-layered caching mechanisms, the overall efficiency of data access is improved, ensuring efficient management and secure sharing of medical data in a distributed storage environment.
[0050] Step S103: According to the medical data scheduling scheme, the data is stored in multiple distributed storage nodes, and encrypted sharding technology is used for storage. Access permissions are controlled based on homomorphic encryption and attribute-based encryption, and an encrypted storage index table is generated.
[0051] In step S103, medical data needs to be stored on multiple distributed storage nodes according to the data storage locations determined by the data scheduling scheme to ensure high availability and low latency access, while preventing single points of failure from affecting data access. To ensure data security, the data needs to be encrypted and fragmented before storage, so that even if a storage node is attacked or data is leaked, attackers cannot piece together and reconstruct the complete medical information.
[0052] First, the medical data is sharded. Sharding can be based on fixed-size divisions or intelligent partitioning based on content characteristics, ensuring that sensitive information is distributed across different storage nodes. Each data shard requires encryption, using methods including homomorphic encryption and attribute-based encryption. Homomorphic encryption allows specific computations to be performed directly while the data is encrypted, ensuring queries and analysis can be performed without decryption, thus improving privacy protection. Attribute-based encryption ensures that data can only be decrypted by users with specific access criteria; for example, only users with specific medical roles or permissions can decrypt and use the relevant medical data.
[0053] The encrypted data shards are allocated to different storage nodes according to a data scheduling scheme and stored in a distributed storage system. Each storage node can be a local server, remote cloud storage, a decentralized storage system (such as IPFS), or a blockchain storage module. A storage index needs to be recorded during data storage for subsequent retrieval. The storage index needs to include the shard's identification information, the storage node address, the encryption key management strategy, and the data recovery method. To improve system reliability, some high-priority data can be redundantly stored, allowing for complete data recovery even in the event of node failure.
[0054] To ensure the effectiveness of data access control, the storage index also needs to record permission information, including which users or user groups are authorized to request decryption, whether data forwarding is permitted, and whether multi-factor authentication is required. The storage index table is generated after storage is completed and stored in the access control system to ensure that user identities can be correctly verified and that the corresponding decryption keys and data retrieval paths are provided during data access. The entire storage process must guarantee data consistency and integrity. Distributed transaction management or consensus mechanisms can be used to ensure data synchronization across all storage nodes, preventing data loss or access errors.
[0055] Furthermore, according to the medical data scheduling scheme, the data is stored on multiple distributed storage nodes, stored using encrypted sharding technology, and access permissions are controlled based on homomorphic encryption and attribute-based encryption to generate an encrypted storage index table, including:
[0056] Calculate the encryption fragmentation factor F according to the following formula 1. s This factor determines how many shards the data should be divided into to optimize storage security, efficiency, and accessibility:
[0057]
[0058] Here, H(D) is the entropy value of the medical data D, representing the information complexity of the data. It is typically calculated using Shannon entropy, which indicates the information complexity, or the degree of uncertainty, of the data. A higher entropy value means the data contains more information; therefore, appropriately increasing the number of shards can improve data storage security. The calculation formula is as follows:
[0059]
[0060] Wherein P(d) i ) is a data segment d in medical data. i The probability of occurrence. The higher the entropy value, the more complex the data, requiring stronger sharding and encryption strategies.
[0061] L node This refers to the available storage capacity of the target storage node, typically measured in GB or TB. A larger available storage capacity generally means the system will use fewer shards to reduce storage overhead and improve access efficiency.
[0062] R is the number of data replicas, representing the number of redundant copies of data stored on different storage nodes, measuring the redundancy of data distribution. As R increases, data reliability improves, but storage and encryption costs also increase. The impact is balanced by taking the logarithm of R.
[0063] A represents the access frequency of medical data D, which can be obtained through access log statistics.
[0064] A th This is an access frequency threshold used to determine whether a piece of data is frequently accessed. If A is much higher than A... th If this is the case, the data will be allocated fewer shards to reduce access latency and enhance the caching strategy. This value can be set using empirical data.
[0065] α, β, γ, λ are optimization parameters; generally, α = 1.0, β = 0.5, γ = 1.5, and λ = 0.1 can be taken to obtain better fragmentation balance.
[0066] Based on the calculated encryption fragmentation factor F s Determine the number of data shards for the medical data, and assign each data shard D. i Perform homomorphic encryption or attribute-based encryption.
[0067] After determining the data sharding strategy for medical data, the storage structure needs to be specifically divided based on the calculated encryption sharding factor. The encryption sharding factor considers factors such as the information complexity of the data itself, the available capacity of storage nodes, data redundancy, and access frequency. By evaluating this factor, it is possible to reasonably determine how many shards the data should be divided into, achieving an optimal balance between security, access efficiency, and data redundancy. A simple method is to perform a integer operation on the encryption sharding factor to obtain the number of shards.
[0068] Once the number of shards is determined, the system divides the medical data into multiple smaller data units, each stored independently on a distributed storage node. Sharding not only facilitates distributed access but also improves the controllability of data sharing, allowing different users to access only specific data fragments based on their permission levels, rather than the entire medical dataset. This process effectively reduces the risk of data leakage while enhancing the scalability and reliability of the storage system.
[0069] After data fragmentation is completed, each fragment needs to be encrypted to ensure that it is not subject to unauthorized access during transmission, storage, and access. At this point, homomorphic encryption or attribute-based encryption techniques can be selected for encryption based on the data's access control policy.
[0070] Homomorphic encryption allows data to be computed and processed while encrypted without prior decryption, making it particularly suitable for scenarios involving medical data analysis, statistics, and cross-institutional sharing. For example, in some applications, hospitals or research institutions may need to conduct disease trend analysis or train artificial intelligence models without exposing patient privacy data; homomorphic encryption can ensure data security while supporting data computation. However, homomorphic encryption has a significant computational overhead, so it is typically suitable for data fragments that are frequently accessed and require computation.
[0071] Attribute-based encryption is primarily used for fine-grained access control. Under this encryption mechanism, decryption permissions are determined by user attributes, rather than a fixed encryption key. For example, the system can be pre-defined so that only users with specific roles, such as researchers with medical research permissions or doctors in specific departments, can decrypt and read specific categories of medical data. Attribute-based encryption provides a more flexible access control mechanism and ensures that even if data fragments are intercepted, only users meeting the decryption criteria can correctly recover the data.
[0072] In practice, encryption methods can be selected appropriately based on the data's sensitivity level, access patterns, and computational needs. For example, for data with low access frequency but high privacy requirements, attribute-based encryption can be prioritized to ensure that only authorized users can decrypt and access it. For data that needs to be computed in an encrypted state, such as patient statistics or data from cross-institutional collaborative analysis, homomorphic encryption can be prioritized to prevent data exposure during computation.
[0073] After encryption, the system generates key management and storage index information, and distributes the encrypted data in fragments to different storage nodes to ensure secure storage and efficient management. This way, even if a storage node is attacked or data is leaked, attackers cannot directly decrypt the data, thus guaranteeing the security of medical data in a distributed storage environment.
[0074] Based on the encryption result, calculate the access control function P(D) for the data fragmentation. i The access control function (U) is used to determine the access permissions of different users to data fragments, wherein the access control function is calculated according to the following formula 2:
[0075]
[0076] Among them, A j The set of attributes that user U possesses, including identity, affiliated organization, and authentication method;
[0077] S j Data sharding D i The set of attributes that must be satisfied for the set security level;
[0078] f(A j ,S j ) is an attribute matching function. If the user attributes meet the data sharding access strategy, it returns a positive weight; otherwise, it returns zero.
[0079] w j For user attribute A j Accessing data shards D i The importance weight is dynamically adjusted according to the access strategy; for example, if the identity attribute is more important, it can be assigned a higher weight, and the recommended value range is 0.1 to 1.0.
[0080] E(D i ) represents the encryption complexity of data sharding;
[0081] δ is a system dynamic adjustment parameter, typically set to 0.5, to balance the impact of attribute matching and encryption complexity on access permissions.
[0082] The attribute matching function is calculated according to the following formula 3:
[0083]
[0084] Among them, A j S is the set of attributes possessed by user U. j Data sharding D i The set of attributes that must be satisfied for the set security level; A j ∩S j This represents the number of attributes in the user attribute set that meet the data security level requirements; |S j | represents the total number of all attributes required for the data security level. The function takes a value of 1 when all attributes are met, and a value between 0 and 1 when only some attributes are met.
[0085] The encryption complexity of the data fragments is calculated according to the following formula 4:
[0086]
[0087] Where q represents the data shard D i The total number of encryption methods used, including homomorphic encryption, attribute-based encryption, and multi-party secure computation encryption;
[0088] T p (D i ) represents data fragment D i The computation time required under encryption method p, in milliseconds, can be obtained through experimental measurement or estimation of the encryption algorithm complexity.
[0089] η pThis represents the contribution weight of encryption method p to the encryption complexity. Its value is usually between 0.1 and 1.0 to ensure that the influence of different encryption methods is adjustable.
[0090] φ p This is a computational efficiency adjustment factor for encryption method p, reflecting the computational resource consumption of this encryption method relative to other encryption methods; for example, homomorphic encryption typically has high computational complexity, therefore φ p A larger value can be taken. φ p The recommended value range is 1.0 to 5.0.
[0091] C i Representative data shard D i The length of the encryption key used is in bits, such as 128 bits, 256 bits, etc.
[0092] C th This is a preset key complexity threshold. When the key length exceeds this threshold, the increase in encryption complexity slows down. A typical value is 128.
[0093] κ and v are optimization adjustment parameters. It is recommended to set κ = 1.0 and v = 0.05 to achieve a balanced adjustment of computational complexity.
[0094] Based on the calculation result of the access control function, an encrypted storage index table is generated, wherein the encrypted storage index table records each data fragment D. i The storage location, encryption method, authorized user attribute rules, and key distribution strategy.
[0095] After encrypting the medical data fragments, it is necessary to further determine data access permissions and establish corresponding storage management mechanisms to ensure secure and controllable data access. Access permission management relies on the calculation results of an access control function, which comprehensively considers factors such as user identity attributes, data security level requirements, and encryption complexity, ultimately determining the access weight for a specific data fragment. Based on this calculation result, an encrypted storage index table can be constructed, enabling the system to efficiently manage the access to encrypted data while ensuring that only users meeting the access conditions can successfully decrypt and use the data.
[0096] Generating the encrypted storage index table is a crucial step. It records the storage location of each data shard, ensuring rapid location of target data in a distributed storage environment. Since medical data is typically stored across multiple storage nodes, the index table needs to accurately record the specific storage node address of each data shard. This allows the system to quickly locate the corresponding shard and perform decryption when a user requests data. Furthermore, considering the dynamic nature of the storage environment, such as changes in storage node status, network bandwidth limitations, or data migration needs, the index table must also have update and synchronization mechanisms to guarantee data availability and access efficiency.
[0097] In addition to storage location information, the encrypted storage index table also needs to record in detail the encryption method used for each data shard. Since different data shards may choose different encryption algorithms based on their security requirements—for example, homomorphic encryption can be used for medical data requiring computation, while attribute-based encryption is suitable for fine-grained access control—the index table must explicitly indicate the specific encryption technology used for each data shard. This information is crucial for decryption operations, as the system needs to invoke the appropriate decryption algorithm based on the data type requested by the user to ensure that the data can be correctly recovered. Furthermore, recording the encryption method facilitates subsequent adjustments to security policies; for example, when encryption algorithms are upgraded or policies change, the corresponding data encryption rules can be quickly updated based on the index table.
[0098] To achieve granular access control, the encrypted storage index table also needs to include attribute rules for authorized users. Different medical data may have different access permissions set for different user groups; for example, some data may be restricted to doctors in specific departments, while other data may be accessible to medical researchers under certain conditions. The index table stores these access rules and performs permission matching when a user requests data. Specifically, the access control rules for each data fragment are compared with the user's attribute set. Based on the preset access control policy, the system determines whether the user has sufficient permissions to decrypt the data fragment. If the user's attributes meet the data access requirements, the system grants access permission and provides the decryption key; otherwise, the access request is denied to prevent unauthorized users from accessing sensitive medical information.
[0099] Building upon this foundation, the encrypted storage index table also serves as a key management tool, ensuring secure data decryption. Since different users may have different access levels, key distribution needs to be dynamically adjusted based on user identity attribute rules. The index table records the encryption key corresponding to each data fragment, as well as the key distribution strategy, ensuring that only users with the appropriate access permissions can obtain the necessary decryption key. For example, for data encrypted using attribute bases, the index table associates the user's attribute set and distributes the corresponding decryption key to the user when the decryption conditions are met. For homomorphically encrypted data, the system provides the corresponding encryption computation path based on computational needs, without directly providing the decryption key. This mechanism effectively prevents key misuse and leakage, ensuring the security and controllability of data in a distributed environment.
[0100] In summary, the encrypted storage index table is not only a crucial component of data storage management but also the core of data security strategies. It enables the system to quickly locate target data by recording the storage location of data fragments; ensures correct algorithm execution for data decryption by identifying encryption methods; achieves granular access control through storage-authorized user attribute rules; and ensures secure decryption and use of data through key distribution strategies. The combination of all these functions allows the distributed storage and secure sharing of medical data to meet efficiency requirements while possessing robust security measures, ensuring data security, traceability, and flexible access control in multi-user environments.
[0101] Step S104: Based on the encrypted storage index table, construct an access management framework; use blockchain to store data access authorization information, use smart contracts to define access rules, and record access logs.
[0102] In step S104, a permission management framework needs to be built based on the encrypted storage index table to ensure controlled access to medical data and to verify and manage access requests across institutions or roles. First, a permission allocation mechanism needs to be established, which determines the access permissions for different users or systems based on the classification, sensitivity level, and accessor identity attributes of the medical data. Access permissions can be divided based on roles, such as doctors, nurses, researchers, and administrators, or based on organizations, such as different hospitals, research institutions, or government regulatory agencies. Furthermore, fine-grained permissions can be set for different types of medical data; for example, laboratory test data, imaging data, and diagnostic reports may be subject to different access strategies.
[0103] In building a permission management framework, access permission information needs to be associated with an encrypted storage index table to ensure the system can verify user permissions based on access requests and decide whether to grant access. To guarantee the transparency and immutability of permission management, data access authorization information needs to be stored on a blockchain. The distributed ledger nature of blockchain allows all access permission changes to be auditable and ensures all access decisions are based on verifiable data. The authorization information for each access request can be stored in the blockchain using a hash signature and combined with smart contracts for automated permission verification.
[0104] Smart contracts are used to define access rules and execute permission verification. The logic of a smart contract includes, but is not limited to, identity authentication, permission checks, data access logging, and blocking of abnormal access. When a user requests access to medical data, the system invokes the smart contract for identity verification and checks whether the user has the corresponding data access permissions. If the verification passes, the smart contract allows access and records the access on the blockchain; if the verification fails, access is denied and an abnormal alarm mechanism is triggered. Furthermore, smart contracts can also implement dynamic permission management, such as automatically adjusting access permissions under specific circumstances or limiting the validity period of data access based on time windows.
[0105] Within the access control framework, an access log system is also required to record and store all data access requests. Access logs should include the user's identity, access time, type of data accessed, access method (read, write, or share), access source, and access result (success or failure). Access logs can also be stored on a blockchain to ensure their immutability and support subsequent compliance audits and access tracing.
[0106] Through the above methods, the access control framework not only ensures the security of data access but also enhances the credibility of cross-institutional data sharing, making the use of medical data controllable, transparent, and compliant, thereby providing a foundation for subsequent data interaction and integrity verification.
[0107] Furthermore, based on the encrypted storage index table, a permission management framework is constructed, and blockchain is used to store data access authorization information. Smart contracts are used to define access rules and record access logs, including:
[0108] Extract the storage location, encryption method, and access control information of the data fragments from the encrypted storage index table;
[0109] Based on the access control information, access permission rules are set for each data fragment, and access keys are generated according to user attributes;
[0110] Access rules and key management information are stored on the blockchain, and smart contracts are used to perform permission verification.
[0111] When a user requests access to data, the smart contract is invoked to compare the user's attributes with the permission rules. If they match, access is authorized and the corresponding decryption key is provided; otherwise, access is denied.
[0112] Record access operations and update access logs to ensure the traceability and security of data access.
[0113] In the secure sharing of medical data, ensuring that data access permission management is both strictly controllable and efficient is crucial. Therefore, in addition to establishing an encrypted data storage index table, a further access management framework needs to be constructed to ensure the compliance, security, and traceability of data access. This access management framework uses blockchain technology to store data access authorization information, defines access rules through smart contracts, and records access logs, giving the entire data access process tamper-proof security and supporting cross-institutional data sharing needs.
[0114] First, the storage location, encryption method, and access control information of the data shards are extracted from the encrypted storage index table. The encrypted storage index table contains detailed information about all data shards, including which distributed storage nodes the shards are stored on, what encryption method is used to protect the data, and what access permission policy applies to each data shard. The purpose of extracting this information is to further define access management rules, ensuring that subsequent access control accurately matches the corresponding data storage and security policies.
[0115] After obtaining access control information for data shards, access permission rules need to be set for each data shard based on its security level and sensitivity, and access keys need to be generated according to user attributes. The formulation of access permission rules is based on compliance requirements for data access. For example, some data shards may only allow access to doctors in specific departments, while other data shards may need to meet stricter privacy protection requirements, such as requiring decryption access only after multi-factor authentication. User attributes are defined, including identity, professional role, affiliated institution, and authentication method. These attributes are used to dynamically calculate access permissions when data requests are made. The generation of access keys is a crucial step, ensuring that only users who meet the permission requirements can obtain the correct decryption key to access specific data shards.
[0116] To ensure the immutability of access control management, access rules and key management information are stored on the blockchain. The distributed ledger nature of the blockchain ensures that all access control information is tamper-proof, maintaining the integrity and traceability of access authorization records even when medical data is shared among multiple institutions. Smart contracts serve as the core mechanism for executing access control management when storing access rules. Smart contracts automatically execute preset access management logic, such as verifying whether user attributes meet access requirements, calculating the user's access level, and determining whether a data decryption key should be provided to the user. Furthermore, smart contracts can dynamically adjust access permissions, automatically increasing or decreasing them based on factors such as the user's historical access behavior, the security level of the accessed device, and the trustworthiness of the data request source.
[0117] When a user requests access to data, the system invokes a smart contract to verify permissions. The smart contract compares the user's attributes with the access rules stored in the blockchain to ensure the access request complies with security policies. If the user's attributes meet the access rules, the smart contract authorizes access and provides the corresponding decryption key, enabling the user to decrypt the corresponding data fragment; otherwise, the access request is rejected, and the system does not provide any key information, ensuring that unauthorized access cannot occur. The execution process of the smart contract is automated, and its transparency ensures that the permission management process can be verified, avoiding security risks caused by human intervention.
[0118] During data access, all access operations are recorded in detail and the access logs are updated in real time. This log information includes access time, requesting user, accessed data fragments, and detailed authorization steps, ensuring that all access behavior is traceable. Access logs are not only stored locally but also synchronized to the blockchain, making them immutable and ensuring that system administrators or auditing agencies can check the compliance of data access at any time. If abnormal access behavior is detected, such as the same user requesting multiple highly sensitive data within a short period, or access attempts from an untrusted network environment, the system can trigger a security alert, restrict the user's access permissions, or even require additional authentication to enhance security.
[0119] The establishment of this comprehensive access control framework not only ensures secure access to medical data but also enhances the transparency and credibility of data sharing. Blockchain technology provides a decentralized storage architecture, enabling cross-institutional data sharing, while the automated access control mechanism of smart contracts significantly reduces the risk of human intervention, ensuring that data access is executed entirely according to preset rules. Simultaneously, the immutability of access logs ensures the compliance of data access, enabling efficient sharing and use of medical data while meeting privacy and security requirements.
[0120] Furthermore, the storage of access permission rules and key management information on the blockchain, and the execution of permission verification using smart contracts, includes:
[0121] Extract the storage location and encryption method of the data fragments from the encrypted storage index table, and generate a unique access token for each data fragment based on the access control information. This token is bound to the user identity, access permission level and hash identifier of the data fragment.
[0122] When storing data, the smart contract calculates the validity period and scope of application of the token according to the preset permission policy, and writes the token into the blockchain to ensure that the access permissions cannot be tampered with.
[0123] When a user submits an access request, the smart contract verifies the validity of the token and, in conjunction with the historical access records stored on the blockchain, dynamically adjusts the permission allocation to prevent abnormal access.
[0124] For data sharing involving multiple organizations, smart contracts use a distributed consensus mechanism to verify cross-organizational access requests, allowing only organizations that meet the permission rules to access the target data, and storing a complete record of access authorization on the blockchain to ensure the traceability and security of data sharing.
[0125] In ensuring the secure sharing of medical data, access control must be strictly managed, possessing immutability, traceability, and dynamic adjustment capabilities. To achieve this, in addition to an encrypted storage index table, a further access management mechanism needs to be built. This mechanism stores access rules and key management information on the blockchain and utilizes smart contracts to execute access verification. The entire process encompasses the generation, storage, and verification of access tokens, as well as the management of cross-institutional data sharing, ensuring the secure flow of medical data within a controlled environment.
[0126] First, when establishing access permissions, the storage location and encryption method used for each data shard need to be extracted from the encrypted storage index table. The encrypted storage index table contains information about the physical distribution of the data and indicates the encryption algorithm used for that data shard, such as homomorphic encryption or attribute-based encryption. This information provides the foundation for subsequent access control, ensuring that access permission management is tightly integrated with the data storage method. After extracting the storage information, a unique access token needs to be generated for each data shard based on the access control information. The access token is the core credential for data access authentication; it not only contains the data shard's identification information but is also bound to the user's identity, access permission level, and the data shard's hash identifier to ensure the legitimacy and security of access operations. The access token binding mechanism ensures that each user must use their exclusive token when accessing data, and this token can only be used to access authorized data shards, preventing unauthorized data leakage.
[0127] During the data storage phase, the smart contract calculates the validity period and scope of application for the generated access token based on a preset permission policy. The validity period of the access token can be dynamically adjusted according to the data's security level, the user's identity category, and the data's sensitivity. For example, for highly sensitive medical records, the token may have a shorter validity period and require the user to re-authenticate on each access. For less sensitive data, the token's validity period can be appropriately extended to reduce the system overhead of repeated authentication. The scope of application refers to the access operations permitted by the token, including data read permissions, decryption permissions, and computation permissions. The smart contract calculates the final access token based on this information and writes it to the blockchain to ensure the immutability of access permission records. Once the token is recorded on the blockchain, any subsequent access request will be verified based on this token, and any attempt to tamper with or forge an access request will be automatically rejected by the system.
[0128] When a user submits an access request, the smart contract first verifies the validity of the submitted access token. This verification process includes checking if the token is still valid, if it matches the current user's identity, and if the token's permission scope meets the requirements of the current access request. In addition, the smart contract analyzes the user's access patterns based on historical access records stored on the blockchain and dynamically adjusts permission allocation. For example, if a user has consistently only accessed specific categories of data but suddenly attempts to access highly sensitive data shards, the smart contract may determine that the request is abnormal and trigger additional authentication mechanisms, requiring the user to provide additional credentials, such as biometric information or two-factor authentication, to further confirm their access rights. Furthermore, the smart contract scores the user's access behavior. For frequent access to sensitive data, use of unusual devices, or access during unusual time periods, the smart contract can adjust the user's permission level, reducing the scope of their access to prevent potential data breaches.
[0129] In cross-organizational data sharing scenarios, access management needs further expansion to support data access control between different organizations. Smart contracts utilize distributed consensus mechanisms to verify cross-organizational access requests, ensuring that data access follows established security policies and that only organizations meeting the permission rules are allowed to access the target data. For example, in medical research collaborations, only authorized research institutions can access de-identified patient data, while unauthorized institutions, even if they submit access requests, cannot bypass the blockchain's security verification mechanism. Each cross-organizational access operation undergoes confirmation by multiple verification nodes, and the access request is only approved when a majority of consensus nodes recognize the access permission. Furthermore, to ensure the transparency and traceability of data sharing, all access authorization information is stored on the blockchain. The time of each data access, the visitor's identity, the authorizing institution, the data shard identifier, and other information are completely recorded, forming an immutable access history. In this way, any abnormal access or data breach can be quickly traced back to the responsible party through the access logs, ensuring that data sharing complies with privacy protection requirements.
[0130] The entire process ensures secure access to medical data within a distributed storage environment. Furthermore, the combination of blockchain and smart contracts enhances the transparency, security, and traceability of the access control mechanism. The access token binding mechanism ensures that users can only access their authorized data fragments, while the dynamic permission management function of smart contracts allows the system to adjust security policies based on user access behavior, effectively preventing malicious access or data leakage. In addition, in cross-organizational data sharing, smart contracts ensure that data access complies with security and compliance requirements through a distributed consensus mechanism and record all access authorization information on the blockchain, making the entire data sharing process traceable and tamper-proof.
[0131] Furthermore, the step of calling the smart contract to compare user attributes with permission rules when a user requests access to data includes:
[0132] The smart contract maintains a multi-level dynamic access policy, which dynamically adjusts data decryption permissions based on the user's access history, geographical location, device type, and current network security status.
[0133] When a user submits an access request, the smart contract identifies potential abnormal access behavior by calculating the matching degree between the user's access behavior characteristics and historical access patterns, and triggers multi-factor authentication to improve access security.
[0134] For highly sensitive medical data, smart contracts require users to provide additional permission verification, which includes biometric-based secondary authentication or temporary access approval.
[0135] After the smart contract completes the comparison, if the user's permissions match, it generates a one-time data decryption token. The token can only be used in the current session, and the complete permission matching process is stored in the access log for subsequent auditing and tracing.
[0136] In the process of secure access control for medical data, when a user requests access to data, the system needs to call a smart contract to compare the user's attributes with the permission rules to ensure that the data access permissions comply with the preset security policy. As the core mechanism of automated permission management, smart contracts can verify user identity in real time and dynamically adjust access permissions based on the current security status of the access environment, effectively preventing unauthorized access and improving the traceability and security of medical data.
[0137] In the smart contract's permission management system, a multi-level dynamic access policy is used to comprehensively evaluate user access permissions. This policy is not only based on static permission rules but also combines the user's access history, current geographical location, device type, and the security level of the network environment to adjust the user's decryption permissions in real time. Access history analysis includes the types of medical data accessed by the user in the past, access frequency, and access time periods. If a user has only previously accessed low-sensitivity data but suddenly requests access to highly sensitive medical records, the smart contract will increase the permission verification level to prevent potential abnormal access behavior. Geographical location verification is mainly used to prevent abnormal access based on geographical location. For example, if a user's historical access locations are all within a specific medical institution, but suddenly requests access to data from a location far from that institution, the system will mark this as abnormal access and add verification steps. Device type identification is used to determine whether the accessing device is trustworthy. If the user is using a device that has not been previously registered, the smart contract may require additional authentication. Network security status detection involves the network source of the access request, such as whether the access request comes from a trusted network environment, whether there are frequent IP address changes, etc. The smart contract will adjust the access policy based on these factors to ensure that medical data is not leaked due to network attacks or malware infection.
[0138] When a user submits an access request, the smart contract immediately calculates the user's access behavior characteristics and compares them with historical access patterns stored on the blockchain to identify potential abnormal access behavior. If the user's access behavior deviates significantly from historical records, such as continuously requesting multiple sensitive data shards within a short period or submitting access requests on multiple different devices within a short period, the smart contract determines that the access behavior is risky and triggers multi-factor authentication to improve access security. Multi-factor authentication may involve device fingerprint verification, SMS verification code verification, or even requiring the user to perform additional identity authentication to ensure that the current access request is indeed initiated by a legitimate user. For certain high-value medical data, such as patient medical records involving extremely sensitive privacy, the system will further enhance the verification level, such as requiring users to provide biometric verification, such as fingerprint recognition, facial recognition, or voice recognition, to enhance access security. In addition, in some scenarios, the smart contract may trigger a temporary access approval mechanism, such as requiring the user's superior or system administrator to confirm the access request, and data can only be decrypted after approval, thereby further improving data access security.
[0139] After completing permission comparison and security verification, the smart contract generates a one-time data decryption token. This token is only valid for the current session to prevent leakage or theft. Once a user successfully obtains the decryption token, the system strictly restricts its use, ensuring it is only valid for the current data access request and automatically expires after the session ends, thus preventing the abuse of long-term valid access credentials. Simultaneously, all permission matching and verification processes are fully recorded in the access log, ensuring that every data access authorization process is auditable and traceable. The access log includes information such as user identity, access time, data shard identifier, permission verification steps, and the final access result. This log information is stored on the blockchain to ensure the immutability of access records and facilitate future security audits and compliance checks.
[0140] The entire smart contract's access control process employs multi-level dynamic access strategies to achieve precise access control. Combined with security mechanisms such as user access behavior analysis, abnormal access detection, and multi-factor authentication, it ensures the security and compliance of medical data. By automatically generating one-time decryption tokens and recording complete access logs through smart contracts, the system ensures that every data access complies with preset security rules and possesses strong traceability. Even in scenarios involving cross-institutional data sharing, it guarantees strict control over data access permissions, preventing the leakage or misuse of sensitive medical data due to improper access management.
[0141] Step S105: During the data interaction process, a hash chain is used to verify the integrity of medical data. The hash value is calculated and compared with the stored record. If they match, access is allowed; otherwise, access is denied and an abnormal alarm is triggered to ensure that the data has not been tampered with.
[0142] In step S105, data integrity needs to be verified during the medical data interaction process to ensure that the data has not been tampered with and to guarantee its trustworthiness and security. To achieve this goal, a hash value is first calculated for the stored medical data. The hash value can be calculated using a cryptographic hash algorithm, such as SHA-256 or SHA-3, to ensure that the hash value is unique and can effectively detect data integrity. During data storage, the system generates and stores the hash value of the data, and simultaneously records the hash value in a blockchain or independent secure storage for subsequent verification.
[0143] When a data access request is received, the system performs a hash calculation on the requested data and compares the calculated hash value with the stored original hash value. If the two hash values match, it indicates that the data has not been tampered with, and the system allows the accessor to read the data normally, storing the access record in the access log. If the hash values do not match, it indicates that the data may have been tampered with or modified without authorization, and the system will immediately reject the access request and trigger an anomaly alert. The triggering mechanism for anomaly alerts may include sending a notification to the system administrator, logging the abnormal access event, suspending the access rights of specific users, or marking the abnormal event on the blockchain for subsequent auditing and investigation.
[0144] To further enhance the security of integrity verification during data interaction, a hash chain mechanism can be employed. The basic principle of a hash chain is to associate the hash value of each piece of medical data with the hash value of its preceding data block, thus forming a chain structure. This structure ensures that even if a data block is tampered with, the hash values of all subsequent data blocks will change, enabling the system to quickly detect data anomalies.
[0145] For cross-organizational data exchanges, integrity verification can also be combined with zero-knowledge proof (ZKP) technology, allowing data providers to prove the integrity of their data without revealing its specific content. This can prevent data leakage during data exchange while still ensuring that the data has not been tampered with.
[0146] After data verification is complete, the system stores the integrity verification result in the access log and updates the data access records on the blockchain to ensure that all access operations are traceable. When accessing the same data multiple times, the system can reduce redundant calculations and improve verification efficiency by caching the most recent hash value comparison results. Ultimately, this integrity verification mechanism ensures the security of medical data during storage, transmission, and access, avoids medical risks or erroneous decisions caused by data tampering, and provides a reliable foundation for subsequent data optimization and security analysis.
[0147] Furthermore, during the data interaction process, the use of a hash chain to verify the integrity of medical data, calculating hash values and comparing them with stored records, includes:
[0148] Each time data is written, a unique hash value is generated for the data shard, and the hash value is linked with the hash value of the previous data shard using a timestamp to form a continuous hash chain structure.
[0149] When a data access request is triggered, the hash chain value of the current storage is calculated and compared with the hash chain generated during the original storage. If the hash value of any shard changes, it is determined that the data may have been tampered with. The system automatically denies access and triggers a security alert, while recording the abnormal status and locking the suspicious data.
[0150] Ensuring data integrity is paramount in the secure sharing of medical data. To prevent data tampering during storage and transmission, the system employs hash chain technology to verify the integrity of medical data, ensuring its immutability and traceability. During data writing to storage nodes, the system calculates a unique hash value for each data shard. This hash value is a digital digest generated based on the data content; any changes to the data will change its corresponding hash value. To further enhance integrity protection, the system not only calculates the hash value of each data shard but also uses timestamps to link the hash value of the current data shard with the hash value of the previous data shard, forming a continuous hash chain. The hash value of each data shard is stored on a blockchain or other secure storage medium, ensuring that any tampering can be traced. This hash chain mechanism ensures that even if an attacker attempts to tamper with a data shard, the tampering will be immediately detected if the hash value of that shard does not match the hash values of its preceding and following data shards.
[0151] When a user requests access to medical data, the system recalculates the hash chain of the stored data and compares it with the hash chain generated during the original storage. This process not only verifies that the data is completely consistent with its initial storage but also detects whether data corruption or tampering occurred during storage system or network transmission. If the system detects a change in the hash value of any data fragment, indicating that the data may have been tampered with, the system immediately rejects the access request and triggers a security alert. The alert mechanism may include sending anomaly reports to administrators, logging suspicious access, and even automatically initiating data recovery processes when necessary to minimize the impact of data tampering.
[0152] Furthermore, to enhance the system's responsiveness to tampering, it locks abnormal hash chain data to prevent the tampered data from spreading further or being misused in medical decisions. While locking abnormal data, the system records all related access operations, data modification records, and storage paths, and analyzes the access logs to identify potential sources of tampering. If data tampering is detected as being caused by unauthorized access, the system can dynamically adjust access control policies, such as increasing the access verification level for that type of data, temporarily disabling suspicious users, or requiring additional authentication to ensure the security of subsequent access.
[0153] The entire hash chain verification mechanism not only provides data integrity verification but also ensures the security of medical data throughout its entire lifecycle. Whether during data storage, sharing, or access, this mechanism effectively prevents malicious data tampering and can quickly identify problems and take appropriate security measures when data anomalies occur. This design ensures high reliability of medical data, enabling hospitals, research institutions, and other data-sharing parties to collaborate efficiently without worrying about data integrity.
[0154] Furthermore, the method of using a hash chain to verify the integrity of medical data during data interaction, calculating hash values and comparing them with stored records, also includes:
[0155] If data tampering is detected, a distributed tracing mechanism will be used for anomaly analysis, specifically including:
[0156] By combining access logs, all access operations, modification records, and transmission paths involving this data shard can be traced to determine the specific time and access party when the tampering occurred.
[0157] Based on the authorization information stored on the blockchain, it is determined whether there is unauthorized access, and after detecting abnormal patterns, the data access strategy is dynamically adjusted, including raising the access verification level for that data category or requiring multi-factor authentication, to prevent similar tampering from happening again.
[0158] Ensuring data integrity and security is crucial in the sharing of medical data. To further enhance the response capability after data tampering detection, when the system detects data anomalies through hash chain verification, it immediately activates a distributed tracing mechanism to analyze the specific circumstances of the data tampering, accurately pinpoint the source of the problem, and take appropriate security measures. The core of the distributed tracing mechanism lies in accurately determining, through multi-layered data tracing methods, whether data has been maliciously tampered with during storage and transmission, by whom it was tampered with, and whether the tampering involved unauthorized access.
[0159] Upon detecting data tampering, the system first traces all access operations, modification records, and transmission paths involving the data shard by referring to access logs. Access logs contain detailed records of each data access, including the visitor's identity information, access time, data request type, data modification behavior, and the corresponding network address. By analyzing this log information, the system can determine the specific time the data tampering occurred and identify possible accessors. If an access operation involves abnormal modification of data, the system further analyzes its request source, access permissions, and specific operation methods to assess whether the access conforms to normal business processes. Simultaneously, the system also traces the data transmission path between different storage nodes to check for abnormal data transmission behavior, such as data being accessed in an unauthorized network node, or data being tampered with at an intermediate node before being transmitted to the target storage location.
[0160] To further verify whether data tampering involves unauthorized access, the system will perform permission checks based on the authorization information stored on the blockchain. The blockchain records the authorization status of all legitimate data access requests, including which users, organizations, or devices are allowed to access specific categories of data, and whether the access requests have undergone the necessary permission verification. The system will compare this suspicious access with the authorization records on the blockchain to determine whether the access complies with the established security policy. If the access is found to be unauthorized, or the visitor's identity information does not match the pre-stored authorization records, the system will confirm that the data tampering involves unauthorized access and take appropriate security response measures.
[0161] Upon detecting abnormal access patterns, the system dynamically adjusts its data access policies to prevent similar tampering from recurring. Specific adjustments include increasing the access verification level for affected data categories, requiring users accessing such data to provide additional authentication, such as adding biometric identification, time-limited access based on smart contracts, or restricting the range of access devices, to reduce the risk of data tampering. Furthermore, for highly sensitive data categories, the system may further tighten access permissions, temporarily restricting access for certain suspicious users, or requiring manual approval from administrators or system auditors before access is granted, ensuring all access activities comply with security requirements.
[0162] This distributed traceability mechanism not only enables the immediate detection and tracing of the source of data tampering, but also minimizes the risk of data leakage and alteration through blockchain-based authorization verification and dynamic security policy adjustments. This mechanism ensures a high degree of security and traceability of medical data in a shared and distributed storage environment, allowing data managers to effectively address potential security threats and quickly take remedial measures upon detecting anomalies to maintain data integrity and reliability.
[0163] Step S106: Based on the access log, analyze historical access data using data request optimization strategies, adjust cache and scheduling weights, optimize data access routing, improve the security and efficiency of sharing, and reduce system load.
[0164] In step S106, based on the data recorded in the access logs and combined with data request optimization strategies, the efficiency of sharing and accessing medical data needs to be optimized to improve system response speed and security, while reducing overall computational and storage load. First, key information needs to be extracted from the access logs, including the source of data requests, request type, access frequency, data transmission latency, access success rate, and abnormal access situations. This information can be used to analyze different types of user access patterns, identify frequently accessed datasets, and detect possible abnormal access behaviors.
[0165] During data request optimization, machine learning models or statistical analysis methods can be used to identify patterns in historical access data and predict future access demands. The system can adjust data caching strategies based on access frequency and priority, storing frequently accessed data in low-latency cache layers, such as local storage or edge computing nodes, to reduce access to remote distributed storage and improve data retrieval speed. Cache adjustments can employ dynamic caching strategies, where the system automatically caches a type of data near the accessing node when it detects an increase in access frequency, and gradually releases cache space as access frequency decreases to balance storage resource usage.
[0166] Simultaneously, the system needs to adjust its data scheduling strategy based on data traffic analysis results from access logs. For frequently accessed data stored on remote nodes, replicating the data across multiple storage nodes can be considered to reduce data transmission latency and improve access efficiency. Under heavy network load, the system can dynamically select a better transmission path based on current network traffic conditions to avoid congestion and improve the real-time performance of data interaction. Furthermore, during data scheduling, data storage resources can be rationally allocated based on user access permissions and geographical location to ensure efficient sharing of medical data within compliance regulations.
[0167] Regarding access control optimization, the system can identify abnormal access behavior based on the analysis results of access logs, such as multiple access requests for highly sensitive data within a short period of time, or unauthorized users attempting to access restricted data. The system can utilize intelligent access control policies to intercept abnormal access behavior and trigger multi-factor authentication to ensure that only legitimate users can access sensitive data. Furthermore, access control optimization policies can be used to formulate differentiated access permission management rules for different types of data. For example, a faster access path can be provided for frequently accessed public data, while additional verification steps can be added for highly sensitive data to balance data sharing efficiency and security.
[0168] Ultimately, through data request optimization, caching strategy adjustment, and access control optimization, the system can improve the stability and efficiency of data access, reduce network bandwidth consumption, and lower the load on the storage system while ensuring the security of medical data. This optimization process ensures efficient sharing of medical data in different scenarios, while meeting the healthcare industry's requirements for data security, privacy protection, and real-time performance.
[0169] Furthermore, the step of analyzing historical access data based on the access logs using data request optimization strategies includes:
[0170] When analyzing access logs, identify data categories that are accessed frequently over a long period of time, and combine them with user access behavior patterns to predict future access needs and dynamically adjust the data caching storage strategy.
[0171] For the identified high-frequency access data, the system intelligently allocates redundant caches among multiple storage nodes and establishes low-latency access channels on nodes near the physical location of the requester to reduce network latency during cross-regional data transmission.
[0172] For infrequently accessed data, the storage tier is adjusted to migrate the data to a cold storage area, reducing the active storage space occupied. At the same time, a request-triggered dynamic preloading mechanism is supported to quickly restore the data to a high-efficiency storage area when infrequently accessed data is requested, ensuring the balance of data access and the optimized utilization of storage resources.
[0173] In the process of sharing and storing medical data, ensuring efficient data access and the rational utilization of storage resources is crucial. Through continuous analysis of access logs, the system can identify access patterns for different data categories and, combined with historical access behavior, predict future access demands. This allows for optimization of data caching strategies, improving data access efficiency while reducing system load. When analyzing access logs, the system focuses on data categories that are accessed frequently over a long period to determine which data is frequently requested by specific user groups. It also considers user access habits, such as access time, access device, and access location, to predict potential access trends in the near future.
[0174] After identifying frequently accessed data categories, the system intelligently allocates redundant caches across multiple storage nodes to reduce access latency and improve data availability. Specifically, the system automatically selects storage nodes physically close to the data requester to establish low-latency access channels, reducing latency issues caused by cross-regional data transmission. For example, if doctors at a hospital frequently access specific patient image data that was originally stored in a remote data center, the system will establish redundant caches on storage nodes near the hospital. This allows subsequent accesses to load directly from the local cache without repeatedly requesting data from the remote data center, significantly improving access efficiency. Furthermore, the system can dynamically adjust the redundancy of the cache based on the data request frequency, ensuring optimal allocation of storage resources. For instance, when the access frequency of a certain type of data decreases, the system can gradually reduce its cache redundancy; conversely, when data access demand increases, the system can appropriately increase redundant storage to improve data accessibility and speed.
[0175] For infrequently accessed data, the system employs different storage strategies to optimize storage resource utilization. Infrequently accessed data typically doesn't need to be retained in high-performance storage areas; therefore, the system dynamically adjusts the storage tier, migrating such data to cold storage areas. This could involve using storage methods with higher compression ratios or transferring it to lower-cost storage media to reduce storage costs and system load. Simultaneously, to ensure that even infrequently accessed data can be quickly recovered when requested, the system supports a request-triggered dynamic preloading mechanism. When a user requests infrequently accessed data, the system immediately triggers data migration, restoring the data from cold storage areas to high-efficiency storage areas and maintaining high availability for a period to meet potential continuous access needs. For example, if research data has been accessed very infrequently in the past few months but has recently been requested multiple times due to new research needs, the system can automatically adjust its storage strategy, temporarily retaining the data in the cache or main storage area so that subsequent accesses do not incur additional latency from waiting for data loading.
[0176] This data caching optimization strategy ensures a balance between medical data storage and access, enabling the system to efficiently meet high-frequency data requests while rationally allocating storage resources and reducing unnecessary computational and storage overhead. By combining historical access data analysis, intelligent caching allocation strategies, dynamic adjustment of storage tiers, and a request-triggered preloading mechanism, the system can adapt to different access needs, improve the real-time performance and reliability of data sharing, and reduce system load and storage costs, ensuring an optimal balance between efficient access and secure storage of medical data.
[0177] A second embodiment of this application provides an electronic device, the electronic device comprising:
[0178] processor;
[0179] The memory is used to store a program, which, when read and executed by the processor, executes a medical data secure sharing method based on intelligent data scheduling and distributed storage provided in the first embodiment of this application.
[0180] The third embodiment of this application provides a computer-readable storage medium storing a computer program thereon. When the program is executed by a processor, it executes a medical data secure sharing method based on intelligent data scheduling and distributed storage provided in the first embodiment of this application.
[0181] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
Claims
1. A method for secure sharing of medical data based on intelligent data scheduling and distributed storage, characterized in that, include: Acquire medical data and label the data according to patient category, disease type and sensitivity level based on preset rules to generate a structured label dataset, which includes data classification labels and access control information; Based on the structured tag dataset, a data scheduling engine is used to calculate data access priority, optimize the transmission path, and generate a medical data scheduling scheme according to the data requester's permission level and transmission path optimization strategy. The generated medical data scheduling scheme includes storage location, access permissions, and caching strategy. According to the medical data scheduling scheme, the data is stored in multiple distributed storage nodes, and encrypted sharding technology is used for storage. Access permissions are controlled based on homomorphic encryption and attribute-based encryption, and an encrypted storage index table is generated. Based on the encrypted storage index table, an access management framework is constructed, and blockchain is used to store data access authorization information. Smart contracts are used to define access rules and record access logs. During data interaction, a hash chain is used to verify the integrity of medical data. The hash value is calculated and compared with the stored record. If they match, access is allowed; otherwise, access is denied and an abnormal alarm is triggered to ensure that the data has not been tampered with. Based on the access logs, historical access data is analyzed using data request optimization strategies to adjust cache and scheduling weights, optimize data access routes, improve the security and efficiency of sharing, and reduce system load.
2. The method for secure sharing of medical data based on intelligent data scheduling and distributed storage according to claim 1, characterized in that, The process of acquiring medical data and labeling it according to patient category, disease type, and sensitivity level based on preset rules to generate a structured labeled dataset includes: Raw data was extracted from multiple medical data sources, and the data was standardized in format. Patient information is automatically classified based on semantic analysis and medical knowledge graphs, and the sensitivity level of the data is calculated by combining a dynamic risk assessment model. In the process of data tagging, a cross-dimensional, multi-level tagging system is established so that the same data can be presented with different tag combinations according to different usage scenarios to meet diverse access control needs. By leveraging machine learning models to optimize label assignment strategies, key features in the data are automatically identified, and classification criteria are dynamically adjusted based on access history.
3. The medical data secure sharing method based on intelligent data scheduling and distributed storage according to claim 1, characterized in that, Based on the structured tag dataset, the data scheduling engine calculates data access priority, optimizes the transmission path, and generates a medical data scheduling scheme according to the data requester's permission level and transmission path optimization strategy, including: Based on the data requester's access history, permission level, and current system load status, the urgency of the request is dynamically calculated, and the access priority is adjusted in combination with data sensitivity. During the transmission path optimization process, the available bandwidth of storage nodes, network congestion, and data redundancy distribution are comprehensively considered. A dynamic weight allocation strategy is adopted to calculate the optimal transmission path in order to reduce data access latency and improve network stability. When generating a medical data scheduling scheme, a storage location allocation strategy is set for different data requests, and a data caching mechanism is combined to allocate multi-layer caches for frequently accessed data, thereby improving the overall processing efficiency of data requests.
4. The method for secure sharing of medical data based on intelligent data scheduling and distributed storage according to claim 1, characterized in that, According to the medical data scheduling scheme, the data is stored on multiple distributed storage nodes, encrypted sharding technology is used for storage, and access permissions are controlled based on homomorphic encryption and attribute-based encryption. An encrypted storage index table is generated, including: Calculate the encryption fragmentation factor F according to the following formula 1. s : Where H(D) is the entropy value of the medical data D, representing the information complexity of the data; L node R represents the available storage capacity of the target storage node; R represents the number of data replicas, indicating the number of redundant storage copies of data across different storage nodes to measure data distribution redundancy; A represents the access frequency of medical data D; A th α, β, γ, λ are the access frequency thresholds; α, β, γ, λ are the optimization parameters. Based on the calculated encryption fragmentation factor F s Determine the number of data shards for the medical data, and assign each data shard D. i Perform homomorphic encryption or attribute-based encryption. Based on the encryption result, calculate the access control function P(D) for the data fragmentation. i The access control function (U) is used to determine the access permissions of different users to data fragments, wherein the access control function is calculated according to the following formula 2: Among them, A j The set of attributes that user U possesses, including identity, affiliated organization, and authentication method; S j Data sharding D i The set of attributes that the set security level must satisfy; f(A j ,S j This is an attribute matching function. If the user attributes meet the data sharding access strategy, it returns a positive weight; otherwise, it returns zero. j For user attribute A j Accessing data shards D i Importance weights are dynamically adjusted based on access policies; E(D) i ) represents the encryption complexity of data sharding; δ represents the system's dynamic adjustment parameter; where the attribute matching function is calculated according to the following formula 3: Among them, A j S is the set of attributes possessed by user U. j Data sharding D i The set of attributes that must be satisfied for the set security level; The encryption complexity of the data fragments is calculated according to the following formula 4: Where q represents the data shard D i The total number of encryption methods used, including homomorphic encryption, attribute-based encryption, and multi-party computational encryption; T p (D i ) represents data fragment D i The computation time required under encryption method p, in milliseconds; η p φ represents the contribution weight of encryption method p to the encryption complexity. p C is a computational efficiency adjustment factor for encryption method p, reflecting the computational resource consumption of this encryption method relative to other encryption methods; i Representative data shard D i The length of the encryption key used; C th is the preset key complexity threshold; k and v are optimization adjustment parameters; Based on the calculation result of the access control function, an encrypted storage index table is generated, wherein the encrypted storage index table records each data fragment D. i The storage location, encryption method, authorized user attribute rules, and key distribution strategy.
5. The method for secure sharing of medical data based on intelligent data scheduling and distributed storage according to claim 1, characterized in that, Based on the encrypted storage index table, a permission management framework is constructed, and blockchain is used to store data access authorization information. Smart contracts are used to define access rules and record access logs, including: Extract the storage location, encryption method, and access control information of the data fragments from the encrypted storage index table; Based on the access control information, access permission rules are set for each data fragment, and access keys are generated according to user attributes; Access rules and key management information are stored on the blockchain, and smart contracts are used to perform permission verification. When a user requests access to data, the smart contract is invoked to compare the user's attributes with the permission rules. If they match, access is authorized and the corresponding decryption key is provided; otherwise, access is denied. Record access operations and update access logs to ensure the traceability and security of data access.
6. The method for secure sharing of medical data based on intelligent data scheduling and distributed storage according to claim 5, characterized in that, The process of storing access permission rules and key management information on the blockchain and using smart contracts to perform permission verification includes: Extract the storage location and encryption method of the data fragments from the encrypted storage index table, and generate a unique access token for each data fragment based on the access control information. This token is bound to the user identity, access permission level and hash identifier of the data fragment. When storing data, the smart contract calculates the validity period and scope of application of the token according to the preset permission policy, and writes the token into the blockchain to ensure that the access permissions cannot be tampered with. When a user submits an access request, the smart contract verifies the validity of the token and, in conjunction with the historical access records stored on the blockchain, dynamically adjusts the permission allocation to prevent abnormal access. For data sharing involving multiple organizations, smart contracts use a distributed consensus mechanism to verify cross-organizational access requests, allowing only organizations that meet the permission rules to access the target data, and storing a complete record of access authorization on the blockchain to ensure the traceability and security of data sharing.
7. The method for secure sharing of medical data based on intelligent data scheduling and distributed storage according to claim 5, characterized in that, When a user requests access to data, the process of calling a smart contract to compare user attributes with permission rules includes: The smart contract maintains a multi-level dynamic access policy, which dynamically adjusts data decryption permissions based on the user's access history, geographical location, device type, and current network security status. When a user submits an access request, the smart contract identifies potential abnormal access behavior by calculating the matching degree between the user's access behavior characteristics and historical access patterns, and triggers multi-factor authentication to improve access security. For highly sensitive medical data, smart contracts require users to provide additional permission verification, which includes biometric-based secondary authentication or temporary access approval. After the smart contract completes the comparison, if the user's permissions match, it generates a one-time data decryption token. The token can only be used in the current session, and the complete permission matching process is stored in the access log for subsequent auditing and tracing.
8. The method for secure sharing of medical data based on intelligent data scheduling and distributed storage according to claim 1, characterized in that, During the data interaction process, a hash chain is used to verify the integrity of medical data, calculating hash values and comparing them with stored records, including: Each time data is written, a unique hash value is generated for the data shard, and the hash value is linked with the hash value of the previous data shard using a timestamp to form a continuous hash chain structure. When a data access request is triggered, the hash chain value of the current storage is calculated and compared with the hash chain generated during the original storage. If the hash value of any shard changes, it is determined that the data may have been tampered with. The system automatically denies access and triggers a security alert, while recording the abnormal status and locking the suspicious data.
9. The method for secure sharing of medical data based on intelligent data scheduling and distributed storage according to claim 8, characterized in that, The process of using a hash chain to verify the integrity of medical data during data interaction, calculating hash values and comparing them with stored records, also includes: If data tampering is detected, a distributed tracing mechanism will be used for anomaly analysis, specifically including: By combining access logs, all access operations, modification records, and transmission paths involving this data shard can be traced to determine the specific time and access party when the tampering occurred. Based on the authorization information stored on the blockchain, it is determined whether there is unauthorized access, and after detecting abnormal patterns, the data access strategy is dynamically adjusted, including raising the access verification level for that data category or requiring multi-factor authentication, to prevent similar tampering from happening again.
10. The method for secure sharing of medical data based on intelligent data scheduling and distributed storage according to claim 1, characterized in that, The step of analyzing historical access data based on the access logs using data request optimization strategies includes: When analyzing access logs, identify data categories that are accessed frequently over a long period of time, and combine them with user access behavior patterns to predict future access needs and dynamically adjust the data caching storage strategy. For the identified high-frequency access data, the system intelligently allocates redundant caches among multiple storage nodes and establishes low-latency access channels on nodes near the physical location of the requester to reduce network latency during cross-regional data transmission. For infrequently accessed data, the storage tier is adjusted to migrate the data to a cold storage area, reducing the active storage space occupied. At the same time, a request-triggered dynamic preloading mechanism is supported to quickly restore the data to a high-efficiency storage area when infrequently accessed data is requested, ensuring the balance of data access and the optimized utilization of storage resources.
