Blockchain-based electronic medical record tamper-proof and trusted interaction method

Through blockchain technology and differentiated encryption strategies, combined with machine learning and swarm intelligence optimization algorithms, the tampering risks and data island problems of traditional electronic medical record systems are solved, efficient management of electronic medical records and trusted data sharing are achieved, and the data is tamper-proof and access control is refined.

CN120564940BActive Publication Date: 2025-10-03SHENZHEN SENGLING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511048931.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-10-03
Estimated Expiration
2045-07-29

AI Technical Summary

Technical Problem

Traditional electronic medical record systems rely on centralized databases and face the risks of tampering, data silos, and uncontrollable access. It is difficult for patients to effectively determine the scope of data authorization, resulting in over-exposure or insufficient authorization.

Method used

The blockchain-based electronic medical record tamper-proof and trusted interaction method divides electronic medical record data into a core medical data layer, a personal sensitive information layer, and a basic metadata layer, adopts a differentiated encryption strategy and stores it in a distributed storage system, and combines it with hash value storage on the blockchain to achieve off-chain storage and on-chain verification, and uses machine learning and swarm intelligence optimization algorithms to intelligently recommend authorization scopes and minimum data access units.

Benefits of technology

It achieves the immutability and credibility of electronic medical records, simplifies the data access authorization process, improves patients' initiative and controllability in data sharing, solves the security risks and data island problems of traditional medical information systems, and realizes efficient management and trusted data sharing interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120564940B_ABST
    Figure CN120564940B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of information security technology and discloses a blockchain-based electronic medical record tamper-proofing and trusted interaction method; the method includes: obtaining the patient's electronic medical record and dividing it into different data levels; configuring differentiated encryption strategies for different data levels, and performing encryption processing respectively to obtain encrypted data, and storing it in a distributed storage system; performing permission verification when there is a data access request; if the verification passes, access to the corresponding encrypted data in the distributed storage system is allowed; if the verification fails, an authorization scope is intelligently recommended; the access granularity of all data within the authorization scope is refined and analyzed, the minimum data access unit is intelligently recommended, and access to the encrypted data corresponding to the minimum data access unit in the distributed storage system is allowed; the present invention can achieve efficient management of medical data and more trusted data sharing interaction, ensuring the data immutability of electronic medical records and the refinement of access control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and more specifically, to a blockchain-based electronic medical record tamper-proof and trusted interaction method. Background Art

[0002] With the rapid development of medical informatization, electronic medical records have gradually replaced paper medical records and become the core carrier for recording, managing and sharing patient health information in medical activities. However, in the context of increasingly frequent cross-institutional sharing of medical record data, remote diagnosis and treatment, and multi-party collaboration, how to ensure the immutability and trusted interactivity of medical record data has become an important issue in medical information security.

[0003] Traditional medical record systems rely on centralized databases and face problems such as tampering risks, data silos, and uncontrolled access. They cannot support the sharing and use of sensitive health information in a safe, compliant, and transparent manner. To this end, blockchain technology, with its decentralized, tamper-proof, and traceable characteristics, provides a new infrastructure for the storage, anti-counterfeiting, and sharing of electronic medical records. However, simply uploading the hash information of electronic medical records to the chain is not enough to solve the complex data interaction problems in reality. Especially in the medical record sharing scenario, the patient-led authorization mechanism is the core prerequisite for controllable data sharing. When faced with problems such as insufficient professional understanding, weak privacy protection awareness, and complex authorization decisions during the authorization process, patients are often unable to effectively judge which data should be authorized and how large the scope of authorization should be, resulting in problems of over-exposure or insufficient authorization.

[0004] In view of this, the present invention proposes a blockchain-based electronic medical record tamper-proof and trusted interaction method to solve the above problems. Summary of the Invention

[0005] In order to overcome the above-mentioned defects of the prior art and achieve the above-mentioned objectives, the present invention provides the following technical solutions: a blockchain-based electronic medical record tamper-proof and trusted interaction method, comprising:

[0006] Step S1: Obtain the patient's electronic medical record and divide the data in the electronic medical record into different data layers according to data attributes and sensitivity. The data layers include the core medical data layer, the personal sensitive information layer, and the basic metadata layer.

[0007] Step S2: configuring differentiated encryption strategies for different data layers, and encrypting the data in each data layer separately to obtain the encrypted data corresponding to each data layer;

[0008] Step S3: The encrypted data corresponding to each data layer is stored in the distributed storage system. The corresponding hash values ​​are calculated for the encrypted data in the core medical data layer and the personal sensitive information layer respectively, and the corresponding hash values ​​are stored in the blockchain;

[0009] Step S4: When a data access request is made, the accessor is checked for permissions. If the verification passes, the accessor is allowed to access the corresponding encrypted data in the distributed storage system. If the verification fails, the relevant disease data is extracted from the electronic medical record based on the access purpose carried in the data access request, and a comprehensive analysis is performed based on the access purpose to intelligently recommend the authorization scope.

[0010] Step S5: Based on the sensitivity of each data within the authorization scope and the principle of minimum availability, the access granularity of all data within the authorization scope is analyzed in detail, the minimum data access unit is intelligently recommended, and the visitor is allowed to access the encrypted data corresponding to the minimum data access unit in the distributed storage system.

[0011] Furthermore, methods for dividing the data in the electronic medical record into different data levels include:

[0012] Natural language processing technology is used to extract structured data from electronic medical records; data classification standards are formulated, including attribute classification standards, sensitivity classification standards, and hierarchical classification standards; based on the attribute classification standards and sensitivity classification standards, each extracted structured data is labeled with the corresponding data attributes and sensitivity level; based on the data attributes and sensitivity level of each structured data, they are matched and compared with the division standards of each data level in the hierarchical classification standards, and all structured data are divided into corresponding data levels.

[0013] Furthermore, the method for obtaining the encrypted data corresponding to the core medical data layer includes:

[0014] Select a symmetric encryption algorithm, and based on the selected symmetric encryption algorithm, use a random number generator to randomly generate a symmetric key; use the symmetric key and the selected symmetric encryption algorithm to sequentially encrypt the structured data in the core medical data layer to obtain the encrypted data corresponding to the core medical data layer;

[0015] Methods for obtaining encrypted data corresponding to the personal sensitive information layer include:

[0016] Select a homomorphic encryption algorithm and set the corresponding algorithm parameters based on the selected homomorphic encryption algorithm; generate the corresponding public key and private key based on the selected homomorphic encryption algorithm and algorithm parameters; use the public key to encrypt the structured data in the personal sensitive information layer in sequence to obtain the encrypted data corresponding to the personal sensitive information layer.

[0017] Furthermore, the method for verifying the visitor's permissions includes:

[0018] The access credentials in the data access request are verified to determine whether the access credentials are authentic; if the access credentials are invalid, the verification fails; if the access credentials are authentic, the visitor identity information in the data access request is identified to determine whether the visitor is a legal user registered in the electronic medical record access management system; if not a legal user, the verification fails; if it is a legal user, determine whether the electronic medical record access management system has an access authorization record corresponding to the visitor; if no access authorization record exists, the verification fails; if an access authorization record exists, determine whether the current moment is within the valid time range of the access authorization record; if within the valid time range, the verification passes, and the visitor is allowed to access the encrypted data corresponding to its access authorization record in the distributed storage system; if not within the valid time range, the verification fails.

[0019] Furthermore, the method of extracting relevant disease data from the electronic medical record includes:

[0020] Construct a data classification model and input the structured data in the core medical data layer into the data classification model in sequence, and divide the structured data in the core medical data layer into Symptom groups are divided into groups, each of which corresponds to a symptom; the accessed symptoms are obtained according to the access purpose carried in the data access request; the symptom groups corresponding to the accessed symptoms are extracted from the electronic medical records, and the structured data in all extracted symptom groups are used as relevant symptom data.

[0021] Furthermore, the method of constructing a data classification model includes:

[0022] Pre-collection Groups of training samples, each group of training samples includes Training data, which are structured data in electronic medical records;

[0023] The training data in each set of training samples are mapped to corresponding low-dimensional representations through the encoder;

[0024] initialization cluster centers; calculate the soft probability that each training data belongs to each cluster center based on the low-dimensional representation;

[0025] Calculate the target distribution probability of each training data according to the soft probability of each training data;

[0026] Calculate the relative entropy of each training sample based on the target distribution probability of each training data;

[0027] The sum of the relative entropy of each training sample is taken as the total relative entropy. Based on the total relative entropy, the back propagation algorithm is used to calculate the gradient of the model parameters and cluster centers, and the optimizer is used to update the model parameters and cluster centers.

[0028] The data classification model is trained with the goal of minimizing the sum of all total relative entropies. The training is stopped when the sum of the total relative entropies reaches convergence, and the construction of the data classification model is completed.

[0029] Furthermore, the method for intelligently recommending authorization scope includes:

[0030] The authorization scope includes data attributes, access form and effective time range; obtain patient personal information from electronic medical records, and use collaborative filtering algorithm to obtain patient personal information and access symptoms. The first candidate authorization scope of the group; according to the access purpose, the collaborative filtering algorithm is used to obtain Group the second candidate authorization scope; obtain all data attributes, access forms and effective time ranges in the first candidate authorization scope and the second candidate authorization scope, and count the number of each data attribute, access form and effective time range respectively, and mark them as recommended numbers; count the number of data attributes in each group of the first candidate authorization scope and the second candidate authorization scope respectively, and calculate the mean to obtain the average number of types; compare the recommended numbers respectively, and select the one with the largest recommended number The data attributes, the access form with the largest number of recommendations, and the effective time range with the largest number of recommendations are used as the authorization scope of intelligent recommendation; among them, is the average number of species.

[0031] Furthermore, methods for performing detailed analysis on the access granularity of all data within the authorized scope include:

[0032] Different digital labels are set for different sensitivities and marked as sensitive labels; the higher the sensitivity, the larger the corresponding sensitive label; a sensitivity threshold is preset, and all structured data within the authorized scope are marked as candidate data; according to the sensitivity of each candidate data, the corresponding sensitive label is obtained; each sensitive label is compared with the sensitivity threshold, and the candidate data with a sensitive label greater than the sensitivity threshold is marked as refined data, and the candidate data with a sensitive label less than or equal to the sensitivity threshold is not marked; for each refined data, a pre-trained sequence labeling model is used to perform a refinement operation to divide the minimum data unit corresponding to each refined data.

[0033] Furthermore, the step of intelligently recommending the minimum data access unit includes:

[0034] Step S501: Take the candidate data not marked as refined data as the minimum data unit, and randomly combine all the minimum data units to generate Group candidate recommendation set;

[0035] Step S502: The candidate recommendation set is set with increasing numerical labels and marked as candidate labels. The range of candidate labels is used as the search space. The search space is ;

[0036] Step S503: Construct a beetle population, which includes beetles, randomly selected from the search space The value as The beetle position corresponding to the beetle, and For each beetle, set the antenna length and movement step length respectively, and set the number of iterations to 0;

[0037] Step S504: calculating the antenna sampling points of each beetle in the beetle population;

[0038] Step S505: Calculate the access quality index of each antenna sampling point respectively;

[0039] Step S506: updating the beetle position of each beetle based on the access quality index and movement step length of the antenna sampling point corresponding to each beetle;

[0040] Step S507: Compare the number of iterations with a preset iteration threshold. If the number of iterations is greater than or equal to the iteration threshold, proceed to step S508. If the number of iterations is less than the iteration threshold, obtain the degree of oscillation of each beetle, dynamically update the movement step length of each beetle based on the degree of oscillation, increment the number of iterations by one, and return to step S504.

[0041] Step S508: Calculate the access quality index of each beetle in the beetle population, mark the beetle position corresponding to the beetle with the largest access quality index as the best position, mark the candidate label corresponding to the best position as the best label, and use the minimum data units in the candidate recommendation set corresponding to the best label as the minimum data access unit, and perform intelligent recommendation.

[0042] Furthermore, in step S505, the method of calculating the access quality index of each antenna sampling point includes:

[0043] Using the trained Sentence-BERT model, each minimum data unit in the candidate recommendation set corresponding to the candidate label of each antenna sampling point is converted into a corresponding unit vector; different numerical labels are set for different access purposes and marked as purpose labels; the purpose label corresponding to the access purpose in the data access request is obtained, and the unit vector corresponding to each antenna sampling point is used as a set of calculation data, and the calculation data is corresponding to the antenna sampling point one by one; each set of calculation data is input into the trained satisfaction prediction model, and the access satisfaction corresponding to each set of calculation data is predicted, that is, the access satisfaction of each antenna sampling point;

[0044] The sensitivity of all minimum data units corresponding to each antenna sampling point is added up in sequence to obtain the total sensitivity value of each antenna sampling point; a weight set is preset, and the weight set includes weight coefficients corresponding to the access satisfaction and the total sensitivity value; based on the access satisfaction and the total sensitivity value of each antenna sampling point, and combined with the weight set, the access quality index of each antenna sampling point is calculated.

[0045] The technical effects and advantages of the blockchain-based electronic medical record tamper-proof and trusted interaction method of the present invention are as follows:

[0046] By fine-grainedly dividing electronic medical records into a core medical data layer, a personal sensitive information layer, and a basic metadata layer, the security needs of different types of data can be more accurately identified and managed. Differentiated encryption strategies are adopted for different data layers, which not only meets the security protection needs of different data layers but also takes into account system performance and availability, achieving an optimal balance between data security and system efficiency. Encrypted data is stored in a distributed storage system, while the hash value of key data is stored on the blockchain, forming a hybrid architecture of off-chain storage and on-chain verification, effectively preventing data tampering and ensuring the integrity and credibility of electronic medical records. Based on machine learning and swarm intelligence optimization algorithms, intelligent recommendations for authorization scopes and minimum data access units are simultaneously implemented, greatly simplifying the complex data access authorization process, effectively solving the problem of patients' difficulty in determining reasonable authorization scopes, and improving patients' initiative and controllability in data sharing. This effectively solves the security risks and data silos faced by traditional medical information systems, realizes efficient management of medical data and more reliable data sharing interactions, ensures the immutability of electronic medical record data and refined access control. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is a flowchart of the blockchain-based electronic medical record tamper-proof and trusted interaction method according to Example 1 of the present invention. DETAILED DESCRIPTION

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0049] Example 1

[0050] See also Figure 1 As shown, the blockchain-based electronic medical record tamper-proof and trusted interaction method described in this embodiment includes:

[0051] Step S1: Obtain the patient's electronic medical record and divide the data in the electronic medical record into different data layers according to data attributes and sensitivity. The data layers include the core medical data layer, the personal sensitive information layer, and the basic metadata layer.

[0052] Electronic medical records (EMRs) are a collection of various health information and medical documents generated by patients during their medical treatment, recorded and stored electronically. They are a digitized version of traditional paper medical records. They include basic information (such as the patient's name, gender, and age), medical records (such as admission records, surgical records, and course records), examination results (such as laboratory tests, medical images, and electrocardiograms), and medical order information (such as prescriptions, treatment plans, and nursing records). A patient's EMR is obtained through the hospital's internal EMR system.

[0053] Data attributes refer to the semantic categories of various data in electronic medical records in medical services, such as identity information (information that can uniquely identify the patient), medical diagnosis information (clinical data related to disease diagnosis), examination and testing information (data related to examinations and tests), treatment and medication information (information related to treatment behavior and medication use), time information (related to the time points of events such as medical consultations and hospitalizations), etc.

[0054] Sensitivity indicates the impact of various data in electronic medical records on privacy security or medical security, such as high sensitivity, medium sensitivity, low sensitivity, and non-sensitive;

[0055] The core medical data layer contains key medical information directly related to the patient's health status and disease diagnosis and treatment process, such as diagnostic results, medical images, surgical records, medication records, genetic information, etc.; the personal sensitive information layer contains information that can directly or indirectly identify personal identity, such as ID number, social security number, home address, contact information, etc.; the basic metadata layer contains auxiliary information used to support medical record management, system operation and data organization, which itself does not directly involve patient diagnosis or treatment or identity identification, such as consultation date, department information, doctor information, etc.

[0056] Methods for dividing data in electronic medical records into different data levels include:

[0057] Natural language processing techniques (such as named entity recognition and dictionary matching) are used to extract structured data from electronic medical records. Structured data refers to data with a fixed format that can be clearly represented as a field-value pair and can be directly stored in a database. For example, a field may be the patient's name, with a value of "Zhang San"; a field may be the chief symptom, with values ​​of "fever" and "cough"; a field may be an X-ray, with a value of "chest X-ray," etc.

[0058] Formulate data classification standards, which include attribute classification standards, sensitivity classification standards, and hierarchical classification standards. Data classification standards are formulated by technical personnel in this field based on compliance with medical industry standards, combined with actual business scenarios, data usage requirements, and relevant laws and regulations. Among them, attribute classification standards are used to clarify the data attributes corresponding to different structured data; sensitive classification standards are used to determine the sensitivity levels corresponding to different structured data; hierarchical classification standards are used to specify the division standards corresponding to different data hierarchies. The division standards are the data attribute range and sensitivity range corresponding to each data hierarchical level. The data attribute range is used to specify the data attributes contained in each data hierarchical level, and the sensitivity range is used to specify the sensitivity level contained in each data hierarchical level.

[0059] According to the attribute classification standard and the sensitivity classification standard, each extracted structured data is labeled with the corresponding data attributes and sensitivity level; according to the data attributes and sensitivity level of each structured data, it is matched and compared with the division standards of each data level in the hierarchical classification standard, and all structured data are divided into corresponding data levels.

[0060] Step S2: configuring differentiated encryption strategies for different data levels, and encrypting the data in each data level respectively to obtain encrypted data corresponding to each data level.

[0061] Methods for obtaining encrypted data corresponding to the core medical data layer include:

[0062] Those skilled in the art select a suitable symmetric encryption algorithm, such as AES, DES, 3DES, ChaCha20, etc., based on the security requirements, industry standards, and system performance requirements of the structured data in the core medical data layer; based on the selected symmetric encryption algorithm, a cryptographically secure random number generator is used to randomly generate a symmetric key; wherein, a cryptographically secure random number generator is a tool that can generate highly unpredictable, highly random random numbers suitable for security scenarios such as encryption; using the symmetric key and the selected symmetric encryption algorithm, the structured data in the core medical data layer are encrypted in sequence to obtain the encrypted data corresponding to the core medical data layer.

[0063] Methods for obtaining encrypted data corresponding to the personal sensitive information layer include:

[0064] Those skilled in the art select a suitable homomorphic encryption algorithm based on the privacy protection requirements and system availability requirements of the structured data in the personal sensitive information layer; homomorphic encryption algorithms include partial homomorphic encryption and fully homomorphic encryption, partial homomorphic encryption such as Paillier, RSA, etc., and fully homomorphic encryption such as BGV, CKKS, TFHE, etc.; based on the selected homomorphic encryption algorithm, those skilled in the art set the corresponding algorithm parameters according to the actual application scenario, and the algorithm parameters include but are not limited to key length, polynomial order, ciphertext modulus, etc.; based on the selected homomorphic encryption algorithm and algorithm parameters, the corresponding public key and private key are generated; the public key is used to encrypt the structured data in the personal sensitive information layer in sequence to obtain the encrypted data corresponding to the personal sensitive information layer; the private key is used to decrypt the encrypted data corresponding to the personal sensitive information layer.

[0065] It should be noted that since the data in the basic metadata layer has low sensitivity, frequent access and high real-time requirements, it is usually not encrypted. Therefore, the encrypted data corresponding to the basic metadata layer is the original structured data in the basic metadata layer.

[0066] It should be understood that the reasons for configuring differentiated encryption strategies for different data tiers are:

[0067] The data in the core medical data layer and the personal sensitive information layer differ significantly in sensitivity, usage scenarios, and system performance requirements. Data in the core medical data layer typically requires frequent access and real-time processing, placing high demands on encryption and decryption efficiency. To ensure efficient system operation, symmetric encryption algorithms with fast computational speed and low resource consumption are typically selected to meet data security requirements while ensuring system performance is not significantly impacted.

[0068] Data in the personal sensitive information layer often contains information with higher privacy protection requirements. This type of data not only requires encryption protection, but also needs to be verifiable and usable under specific conditions, such as duplicate patient identification and clinical trial matching. Ordinary symmetric encryption algorithms cannot support such operations, so homomorphic encryption algorithms that support direct processing on ciphertext are selected to ensure that data can still be effectively processed in an encrypted state, thereby achieving a higher level of privacy protection. At the same time, homomorphic encryption algorithms are more computationally complex and have a higher performance overhead than symmetric encryption algorithms, and are generally only used in the more sensitive personal sensitive information layer.

[0069] Therefore, the adoption of differentiated encryption strategies not only fully considers the security protection needs of different data layers, but also takes into account the performance and availability of the system, achieving the best balance between data security and system efficiency.

[0070] Step S3: The encrypted data corresponding to each data layer is stored in the distributed storage system, the corresponding hash values ​​are calculated for the encrypted data in the core medical data layer and the personal sensitive information layer, and the corresponding hash values ​​are stored in the blockchain.

[0071] A distributed storage system refers to a data storage architecture that splits and stores data on multiple physical nodes to achieve high availability, high reliability, and high scalability. In this embodiment, the distributed storage system serves as the main storage medium for encrypted data and can be deployed in a medical institution's private cloud (i.e., a data storage system built and operated by the medical institution itself, with the data completely controlled within the hospital or medical unit and not relying on an external cloud service provider), a regional health platform (i.e., a shared platform led by the government or the Health Commission, used to integrate data resources from hospitals within the jurisdiction and achieve cross-hospital and cross-district collaboration), or a trusted third-party cloud service environment (i.e., using cloud storage and computing services provided by well-known domestic and foreign cloud service providers (such as Alibaba Cloud, Huawei Cloud, Tencent Cloud, Amazon AWS, and Microsoft Azure) to deploy medical applications and data).

[0072] The hash values ​​corresponding to the encrypted data in the core medical data layer and the personal sensitive information layer are calculated using standard hash algorithms, such as SHA-256, SHA-3, BLAKE2, etc.

[0073] Blockchain is a decentralized, tamper-proof, and traceable distributed ledger technology. Each block stores a certain number of data records and is connected to the previous block through cryptography to form a chain structure.

[0074] It should be noted that this embodiment not only stores the encrypted data corresponding to each data layer in the distributed storage system, but also calculates the hash value corresponding to the encrypted data and stores it in the blockchain, realizing a hybrid architecture design with off-chain storage and on-chain verification. This hybrid architecture design significantly improves the storage and access efficiency of the system while ensuring data security, and has the following advantages:

[0075] On the one hand, distributed storage systems offer high throughput and scalability, making them suitable for storing large-scale electronic medical records and supporting high-frequency access. On the other hand, blockchains only store hash values, effectively reducing on-chain storage pressure and enabling integrity verification of encrypted data through their tamper-proof nature. Specifically, any unauthorized modification of encrypted data in a distributed storage system will cause the hash value to change, making it impossible to match the original hash value recorded in the blockchain, thereby identifying data tampering.

[0076] Therefore, this hybrid architecture design can balance efficient data management and strict security control, and is suitable for medical sensitive data scenarios that require both fast access and guaranteed integrity and credibility.

[0077] Step S4: When there is a data access request, the visitor's permissions are verified; if the verification passes, the visitor is allowed to access the corresponding encrypted data in the distributed storage system; if the verification fails, the relevant disease data is extracted from the electronic medical record based on the access purpose carried in the data access request, and a comprehensive analysis is performed in combination with the access purpose to intelligently recommend the authorization scope.

[0078] A data access request refers to an access request issued by a visitor (such as a doctor, researcher, or other user who needs to obtain electronic medical records) to a distributed storage system to obtain the electronic medical records of a specific patient; the data access request includes the visitor's identity information (such as the organization to which they belong, user ID, etc.), access credentials (such as passwords, tokens, digital certificates, etc., used for identity authentication), the purpose of the access (such as the diagnosis and treatment plan formulation for tuberculosis patients, scientific research data analysis of complications of diabetic patients, clinical research related to Alzheimer's disease, etc.) and the access time (that is, the effective time range of the access right, for example, after the permission verification is passed, the visitor can access the requested electronic medical records within 24 hours).

[0079] Methods for verifying visitor permissions include:

[0080] The access credentials in the data access request are verified to determine whether the access credentials are authentic; if the access credentials are invalid, the verification fails; if the access credentials are authentic, the visitor identity information in the data access request is identified to determine whether the visitor is a registered legal user in the electronic medical record access management system (i.e., a comprehensive system that implements identity authentication, permission verification, and authorization policy management); if not, the verification fails; if it is a legal user, determine whether the electronic medical record access management system has an access authorization record corresponding to the visitor; if no access authorization record exists, the verification fails; if an access authorization record exists, determine whether the current moment is within the valid time range of the access authorization record (i.e., the specific time interval in which the visitor is authorized to access the electronic medical record); if it is within the valid time range, the verification passes, and the visitor is allowed to access the encrypted data corresponding to its access authorization record in the distributed storage system; if it is not within the valid time range, the verification fails.

[0081] Methods for extracting relevant disease data from electronic medical records include:

[0082] Construct a data classification model and input the structured data in the core medical data layer into the data classification model in sequence, and divide the structured data in the core medical data layer into There are symptom groups, each of which corresponds to one symptom. is an integer greater than 0; according to the access purpose carried in the data access request, the access symptoms are obtained, and the access symptoms are specific symptoms included in the access purpose; the symptom groups corresponding to the access symptoms are extracted from the electronic medical records, and the structured data in all extracted symptom groups are used as relevant symptom data.

[0083] Methods for building data classification models include:

[0084] Pre-collection Groups of training samples, each group of training samples includes training data, which are structured data in electronic medical records. and are all integers greater than 1; the training data in each set of training samples are mapped to the corresponding low-dimensional representation through the encoder , ;in, The parameters are The encoder, For the training data, ;initialization Cluster centers , ; Calculate the soft probability of each training data belonging to each cluster center based on the low-dimensional representation; the expression of soft probability is:

[0085] ;

[0086] Where, For the The training data belongs to The soft probability of a cluster, Representation of low dimensional representation and cluster centers The Euclidean distance between is the degree of freedom (preferably 1 in this embodiment), ;

[0087] According to the soft probability of each training data, the target distribution probability of each training data is calculated. The expression of the target distribution probability is: Where, No. The training data belongs to The target distribution probability of each cluster;

[0088] Calculate the relative entropy of each training sample based on the target distribution probability of each training data;

[0089] The expression of relative entropy is: Where, is the relative entropy;

[0090] The sum of the relative entropy of each training sample is taken as the total relative entropy. Based on the total relative entropy, the back propagation algorithm is used to calculate the gradient of the model parameters and cluster centers, and the optimizer (such as Adam) is used to update the model parameters and cluster centers.

[0091] The data classification model is trained with the goal of minimizing the sum of all total relative entropies. The training is stopped when the sum of the total relative entropies reaches convergence, and the construction of the data classification model is completed.

[0092] Methods for intelligently recommending authorization scopes include:

[0093] The authorization scope includes data attributes, access mode (such as online browsing, download access, etc.) and effective time range; obtain patient personal information from electronic medical records. Patient personal information is specific information reflecting the patient's identity characteristics and background, such as age, gender, previous medical history, etc.; based on the patient's personal information and the access symptoms, a collaborative filtering algorithm is used to obtain The first candidate authorization scope of the group; according to the access purpose, the collaborative filtering algorithm is used to obtain The second candidate authorization scope of the group; among them, and are all integers greater than 1; obtain all data attributes, access forms, and valid time ranges in the first candidate authorization scope and the second candidate authorization scope, and count the number of each data attribute, access form, and valid time range respectively, and mark them as recommended numbers; count the number of data attributes in each group of the first candidate authorization scope and the second candidate authorization scope respectively, and calculate the mean to obtain the average number of types; compare the recommended numbers respectively, and select the one with the largest recommended number The data attributes, the access form with the largest number of recommendations, and the effective time range with the largest number of recommendations are used as the authorization scope of intelligent recommendation; among them, is the average number of species.

[0094] Step S5: Based on the sensitivity of each data within the authorization scope and the principle of minimum availability, the access granularity of all data within the authorization scope is analyzed in detail, the minimum data access unit is intelligently recommended, and the visitor is allowed to access the encrypted data corresponding to the minimum data access unit in the distributed storage system.

[0095] The principle of minimum availability means that during the data access and authorization process, only the minimum data permissions required to complete their specific access purpose are provided to the visitor, avoiding the exposure of any redundant or unnecessary data, thereby maximizing the protection of data privacy and security.

[0096] Methods for fine-grained analysis of access granularity for all data within the authorized scope include:

[0097] Different digital labels are set for different sensitivities and marked as sensitive labels; the higher the sensitivity, the larger the corresponding sensitive label; for example, the high-sensitivity sensitive label is 10, the medium-sensitivity sensitive label is 8, the low-sensitivity sensitive label is 4, and the non-sensitive sensitive label is 0; a preset sensitivity threshold is set in advance by a technician in this field according to actual conditions; all structured data within the authorization scope are marked as candidate data; according to the sensitivity of each candidate data, the corresponding sensitive label is obtained; each sensitive label is compared with the sensitivity threshold respectively, and the candidate data with a sensitive label greater than the sensitivity threshold is marked as refined data, indicating that a finer-grained division is required, and the candidate data with a sensitive label less than or equal to the sensitivity threshold is not marked, indicating that a finer-grained division is not required; for each refined data, a pre-trained sequence labeling model is used for refinement operation to divide the minimum data unit corresponding to each refined data for more accurate permission control and data protection; the sequence labeling model is an existing technology, such as conditional random fields, hidden Markov models, pre-trained language models fine-tuned in the medical field combined with conditional random fields, etc.

[0098] The steps of intelligently recommending the minimum data access unit include:

[0099] Step S501: Take the candidate data not marked as refined data as the minimum data unit, and randomly combine all the minimum data units to generate Group candidate recommendation set, is an integer greater than 1, and each candidate recommendation set includes at least one minimum data unit;

[0100] Step S502: The candidate recommendation set is set with increasing numerical labels and marked as candidate labels. The range of candidate labels is used as the search space. The search space is ;

[0101] Step S503: Construct a beetle population, which includes beetles, randomly selected from the search space The value as The beetle position corresponding to each beetle (ie, the beetle position corresponds to the candidate label one by one), and Each beetle sets the antenna length and moving step length respectively. , set the number of iterations to 0;

[0102] Step S504: calculating the antenna sampling points of each beetle in the beetle population;

[0103] Step S505: Calculate the access quality index of each antenna sampling point respectively;

[0104] Step S506: updating the beetle position of each beetle based on the access quality index and movement step length of the antenna sampling point corresponding to each beetle;

[0105] Step S507: Compare the number of iterations with a preset iteration threshold. If the number of iterations is greater than or equal to the iteration threshold, proceed to step S508. If the number of iterations is less than the iteration threshold, obtain the degree of oscillation of each beetle, dynamically update the movement step length of each beetle based on the degree of oscillation, increment the number of iterations by one, and return to step S504.

[0106] Step S508: Calculate the access quality index of each beetle in the beetle population, mark the beetle position corresponding to the beetle with the largest access quality index as the best position, mark the candidate label corresponding to the best position as the best label, and use the minimum data units in the candidate recommendation set corresponding to the best label as the minimum data access unit, and perform intelligent recommendation.

[0107] In the above step S503, the antenna length and the moving step length are both real numbers greater than 0, and are preset by those skilled in the art according to actual conditions;

[0108] In the above step S504, the method of respectively calculating the antenna sampling points of each beetle in the beetle population includes:

[0109] The antenna sampling points include the left antenna sampling point and the right antenna sampling point;

[0110] The expression of the left antenna sampling point is: ;

[0111] The expression of the right antenna sampling point is: ;

[0112] Where, Indicates the During the iteration The left antennae of the beetle were sampled. Indicates the During the iteration The sampling point of the right antenna of the beetle, Indicates the During the iteration The beetle position of the beetle, Indicates the The length of the beetle's antennae;

[0113] In the above step S505, the method of calculating the access quality index of each antenna sampling point includes:

[0114] Using the trained Sentence-BERT model, each minimum data unit in the candidate recommendation set corresponding to the candidate label of each antenna sampling point is converted into a corresponding unit vector; the Sentence-BERT model is an existing technology, and the specific training process is not described in detail here; different digital labels are set for different access purposes and marked as purpose labels; the purpose label corresponding to the access purpose in the data access request is obtained, and the unit vector corresponding to each antenna sampling point is used as a set of calculation data, and the calculation data is one-to-one corresponding to the antenna sampling point; each set of calculation data is input into the trained satisfaction prediction model, and the access satisfaction corresponding to each set of calculation data is predicted, that is, the access satisfaction of each antenna sampling point;

[0115] The sensitivity of all minimum data units corresponding to each antenna sampling point is added in sequence to obtain the total sensitivity value of each antenna sampling point; a weight set is preset, and the weight set includes weight coefficients corresponding to the access satisfaction and the total sensitivity value. The weight set is pre-set by technical personnel in this field according to actual conditions; based on the access satisfaction and the total sensitivity value of each antenna sampling point, and combined with the weight set, the access quality index of each antenna sampling point is calculated.

[0116] The expression of access quality index is: ;

[0117] Where, For access quality indicators, For visit satisfaction, is the total sensitive value, is the weight coefficient of access satisfaction, is the weight coefficient of the total sensitive value.

[0118] The prediction model is a deep learning model, and the training process of the prediction model includes:

[0119] Pre-collection Set different groups of calculation data, and set the corresponding access satisfaction for each group of calculation data in turn. is an integer greater than 1; the calculated data and the corresponding access satisfaction are converted into a corresponding set of feature vectors; the access satisfaction corresponding to the calculated data is collected by those skilled in the art in the process of historically recommending the minimum data access unit. Different sets of calculation data are analyzed in turn to evaluate the corresponding access satisfaction. Different groups of calculation data are set in turn to set the corresponding access satisfaction;

[0120] Each set of feature vectors is used as the input of the satisfaction prediction model. The satisfaction prediction model takes a set of predicted access satisfaction corresponding to each set of calculated data as the output, and the actual access satisfaction corresponding to each set of calculated data as the prediction target. The actual access satisfaction is the pre-set access satisfaction corresponding to the calculated data. The training goal is to minimize the sum of the prediction errors of all calculated data. The calculation formula of the prediction error is: ,in is the prediction error, To calculate the group number of the eigenvector corresponding to the data, For the The predicted access satisfaction corresponding to the group calculation data, For the The actual access satisfaction corresponding to the group calculation data is trained; the satisfaction prediction model is trained until the sum of the prediction errors reaches convergence.

[0121] In the above step S506, the method for updating the beetle position of each beetle includes:

[0122] ;

[0123] Where, Indicates the updated The beetle position of the beetle, Indicates the During the iteration The beetle's step length, Indicates the During the iteration The visit quality index of the beetle corresponding to the right antenna sampling point, Indicates the During the iteration The visit quality index of the left antenna sampling point of the beetle is represents a symbolic function;

[0124] when hour, ;

[0125] when hour, ;

[0126] when hour, .

[0127] In the above step S507, the oscillation degree represents the total number of times the beetle searches for direction changes during the entire iteration process; for example, the beetle During the iteration, there is , indicating that the beetle's search direction is right; During the iteration, there is , indicating that the beetle's search direction is left; therefore, the beetle's search direction changes, and the oscillation degree is 1;

[0128] The method of dynamically updating the moving step length of each beetle based on the degree of oscillation includes:

[0129] ;

[0130] Where, Indicates the number of seconds after dynamic update The beetle's step length, represents the inertia factor, Indicates the response factor, in this embodiment, , , Indicates the The oscillation factor during the iteration process; Where, Indicates the The degree of oscillation during the iteration, represents the oscillation threshold, Indicates the control factor, in this embodiment, , is an exponential function; the oscillation threshold and the iteration threshold are both preset by those skilled in the art according to actual conditions.

[0131] It should be noted that the step of intelligently recommending the minimum data access unit is an intelligent swarm optimization algorithm designed based on the antennae characteristics of beetles. The candidate labels are replaced by the beetle positions in order to transform the original discrete data set selection problem into a continuous search optimization problem. The evaluation and selection of different candidate recommendation sets are simulated by moving in continuous space, making the search process more flexible and optimizing. At the same time, the integration of the behavioral characteristics of beetles in nature using antennae to perceive the environment helps to achieve efficient exploration of the search space, improve the efficiency of discovering the optimal candidate recommendation set, and maintain the diversity of solutions. Among them, beetles have a sensitive antennae perception system. Therefore, the algorithm simulates the beetle's perception of the surrounding environment by calculating the access quality index of the antennae sampling points. The higher the access quality index (that is, the better the candidate recommendation set), the more likely it is to guide the beetle to move in that direction, and vice versa.

[0132] At the same time, the core mechanism of the algorithm lies in antennae sampling, position updating and movement step updating. By setting antennae sampling points on the left and right sides of the current position, it perceives the environmental quality in different directions and determines the next movement direction and step size accordingly. In the algorithm implementation, effective exploration in the search space is achieved by continuously updating the beetle's position, and the introduction of the oscillation degree enables the algorithm to dynamically adjust the movement step size according to the convergence of the search process, maintaining a larger exploration range in the early stage of the algorithm, and gradually reducing the step size for fine search in the later stage, achieving a balance between global exploration and local development.

[0133] It should be understood that the purpose of adopting the intelligent swarm optimization algorithm designed based on the antennae characteristics of beetles is to provide an adaptive optimization method for the recommendation of minimum data access units by simulating the antennae perception and movement decision-making mechanism of beetles, which can protect data privacy to the greatest extent while meeting the access purpose; in addition, the mechanism of dynamically adjusting the moving step size through the degree of oscillation further enhances the adaptability and effectively balances the exploration and development of the search space; thereby ensuring that the final recommended minimum data access unit not only meets the authorization scope requirements but also follows the minimum availability principle, providing effective support for the secure sharing and refined access control of electronic medical records.

[0134] After the patient receives the minimum data access unit recommended by the intelligent system, he / she decides whether to accept the recommendation. If he / she accepts the recommendation, the visitor is allowed to access the encrypted data corresponding to the minimum data access unit in the distributed storage system. If he / she does not accept the recommendation, the patient independently selects the minimum data access unit from all minimum data units and authorizes the visitor to access it.

[0135] By fine-grainedly dividing electronic medical records into a core medical data layer, a personal sensitive information layer, and a basic metadata layer, this embodiment can more accurately identify and manage the security requirements of different types of data. Differentiated encryption strategies are adopted for different data layers, which not only meets the security protection requirements of different data layers but also takes into account system performance and availability, achieving an optimal balance between data security and system efficiency. Encrypted data is stored in a distributed storage system, while hash values ​​of key data are stored on the blockchain, forming a hybrid architecture with off-chain storage and on-chain verification, effectively preventing data tampering and ensuring the integrity and credibility of electronic medical records. Based on machine learning and swarm intelligence optimization algorithms, intelligent recommendations for authorization scopes and minimum data access units are simultaneously implemented, significantly simplifying the complex data access authorization process, effectively addressing the difficulty patients face in determining appropriate authorization scopes, and improving their initiative and control over data sharing. This effectively addresses the security risks and data silos faced by traditional medical information systems, enabling efficient management of medical data and more reliable data sharing interactions, ensuring the immutability of electronic medical records and refined access control.

[0136] Example 2

[0137] This application also provides an electronic device. The electronic device may include one or more processors and one or more memories. The memories may store computer-readable code that, when executed by the one or more processors, may execute the blockchain-based electronic medical record tamper-proofing and trusted interaction method described above.

[0138] The method or system according to the embodiment of the present application can also be implemented with the aid of the architecture of the electronic device shown in this application. The electronic device may include a bus, one or more CPUs, ROM, RAM, a communication port connected to a network, input / output, a hard disk, etc. The storage device in the electronic device, such as a ROM or a hard disk, can store the blockchain-based electronic medical record tamper-proof and trusted interaction method provided in this application. Furthermore, the electronic device may also include a user interface. Of course, the architecture shown in this application is only exemplary. When implementing different devices, one or more components in the electronic device shown in this application may be omitted according to actual needs.

[0139] Example 3

[0140] As shown, one embodiment of the present application discloses a computer-readable storage medium. The computer-readable storage medium stores computer-readable instructions. When executed by a processor, the computer-readable instructions can execute the blockchain-based electronic medical record tamper-proofing and trusted interaction method according to the embodiments of the present application, as described with reference to the above figures. The storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, and flash memory.

[0141] Furthermore, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the present application provides a non-transitory machine-readable storage medium storing machine-readable instructions capable of being executed by a processor to perform the instructions corresponding to the steps of the method provided herein, such as the blockchain-based electronic medical record tamper-proofing and trusted interaction method. When executed by a central processing unit (CPU), this computer program performs the functions defined in the method of the present application.

[0142] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will be able to modify the technical solutions described in the foregoing embodiments or to substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

[0143] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0144] In the description of the present invention, it should be understood that the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0145] In the description of the present invention, unless otherwise specified, "plurality" means two or more.

[0146] In the description of the present invention, “several” means one or more, and “a large number” means two or more.

[0147] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0148] The formulas in this manual are all dimensionless and calculated using numerical values. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters and thresholds in the formulas are set by technicians in this field based on actual conditions.

[0149] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.

Claims

1. Blockchain-based electronic medical record tamper-proof and trusted interaction method, characterized by: include: Step S1: Obtain the patient's electronic medical record and divide the data in the electronic medical record into different data layers according to data attributes and sensitivity. The data layers include the core medical data layer, the personal sensitive information layer, and the basic metadata layer. Step S2: configuring differentiated encryption strategies for different data layers, and encrypting the data in each data layer separately to obtain the encrypted data corresponding to each data layer; Step S3: The encrypted data corresponding to each data layer is stored in the distributed storage system. The corresponding hash values ​​are calculated for the encrypted data in the core medical data layer and the personal sensitive information layer respectively, and the corresponding hash values ​​are stored in the blockchain; Step S4: When there is a data access request, the accessor is checked for permissions; If the verification passes, the visitor is allowed to access the corresponding encrypted data in the distributed storage system; If the verification fails, the system will extract relevant disease data from the electronic medical record based on the access purpose contained in the data access request, conduct a comprehensive analysis based on the access purpose, and intelligently recommend the authorization scope; Step S5: Based on the sensitivity of each data within the authorization scope and the principle of minimum availability, the access granularity of all data within the authorization scope is analyzed in detail, and the minimum data access unit is intelligently recommended. The visitor is allowed to access the encrypted data corresponding to the minimum data access unit in the distributed storage system; The steps of intelligently recommending the minimum data access unit include: Step S501: extract structured data from electronic medical records and mark each structured data with a corresponding sensitive label; mark all structured data within the authorized scope as candidate data, and mark candidate data with a sensitivity label greater than a preset sensitivity threshold as refined data; divide each refined data into corresponding minimum data units, and use candidate data not marked as refined data as minimum data units, randomly combine all minimum data units, and generate Group candidate recommendation set; Step S502: The candidate recommendation set is set with increasing numerical labels and marked as candidate labels. The range of candidate labels is used as the search space. The search space is ; Step S503: Construct a beetle population, which includes beetles, randomly selected from the search space The value as The beetle position corresponding to the beetle, and For each beetle, set the antenna length and movement step length respectively, and set the number of iterations to 0; Step S504: calculating the antenna sampling points of each beetle in the beetle population; Step S505: Calculate the access quality index of each antenna sampling point respectively; Step S506: updating the beetle position of each beetle based on the access quality index and movement step length of the antenna sampling point corresponding to each beetle; Step S507: Compare the number of iterations with a preset iteration threshold. If the number of iterations is greater than or equal to the iteration threshold, proceed to step S508. If the number of iterations is less than the iteration threshold, obtain the degree of oscillation of each beetle, dynamically update the movement step length of each beetle based on the degree of oscillation, increment the number of iterations by one, and return to step S504. Step S508: Calculate the access quality index of each beetle in the beetle population, mark the beetle position corresponding to the beetle with the largest access quality index as the best position, mark the candidate label corresponding to the best position as the best label, and use the minimum data units in the candidate recommendation set corresponding to the best label as the minimum data access unit, and perform intelligent recommendation.

2. The blockchain-based electronic medical record tamper-proof and trusted interaction method according to claim 1 is characterized in that: Methods for dividing data in electronic medical records into different data levels include: Natural language processing technology is used to extract structured data from electronic medical records; data classification standards are formulated, including attribute classification standards, sensitivity classification standards, and hierarchical classification standards; based on the attribute classification standards and sensitivity classification standards, each extracted structured data is labeled with the corresponding data attributes and sensitivity level; based on the data attributes and sensitivity level of each structured data, they are matched and compared with the division standards of each data level in the hierarchical classification standards, and all structured data are divided into corresponding data levels.

3. The blockchain-based electronic medical record tamper-proof and trusted interaction method according to claim 2 is characterized in that: Methods for obtaining encrypted data corresponding to the core medical data layer include: Select a symmetric encryption algorithm, and based on the selected symmetric encryption algorithm, use a random number generator to randomly generate a symmetric key; use the symmetric key and the selected symmetric encryption algorithm to sequentially encrypt the structured data in the core medical data layer to obtain the encrypted data corresponding to the core medical data layer; Methods for obtaining encrypted data corresponding to the personal sensitive information layer include: Select a homomorphic encryption algorithm and set the corresponding algorithm parameters based on the selected homomorphic encryption algorithm; generate the corresponding public key and private key based on the selected homomorphic encryption algorithm and algorithm parameters; use the public key to encrypt the structured data in the personal sensitive information layer in sequence to obtain the encrypted data corresponding to the personal sensitive information layer.

4. The blockchain-based electronic medical record tamper-proof and trusted interaction method according to claim 3 is characterized in that: Methods for verifying visitor permissions include: The access credentials in the data access request are verified to determine whether the access credentials are authentic; if the access credentials are invalid, the verification fails; if the access credentials are authentic, the visitor identity information in the data access request is identified to determine whether the visitor is a legal user registered in the electronic medical record access management system; if not a legal user, the verification fails; if it is a legal user, determine whether the electronic medical record access management system has an access authorization record corresponding to the visitor; if no access authorization record exists, the verification fails; if an access authorization record exists, determine whether the current moment is within the valid time range of the access authorization record; if within the valid time range, the verification passes, and the visitor is allowed to access the encrypted data corresponding to its access authorization record in the distributed storage system; if not within the valid time range, the verification fails.

5. The blockchain-based electronic medical record tamper-proof and trusted interaction method according to claim 4 is characterized in that: Methods for extracting relevant disease data from electronic medical records include: Construct a data classification model and input the structured data in the core medical data layer into the data classification model in sequence, and divide the structured data in the core medical data layer into Symptom groups are divided into groups, each of which corresponds to a symptom; the accessed symptoms are obtained according to the access purpose carried in the data access request; the symptom groups corresponding to the accessed symptoms are extracted from the electronic medical records, and the structured data in all extracted symptom groups are used as relevant symptom data.

6. The blockchain-based electronic medical record tamper-proof and trusted interaction method according to claim 5 is characterized in that: Methods for building data classification models include: Pre-collection Groups of training samples, each group of training samples includes Training data, which are structured data in electronic medical records; The training data in each set of training samples are mapped to corresponding low-dimensional representations through the encoder; initialization cluster centers; calculate the soft probability that each training data belongs to each cluster center based on the low-dimensional representation; Calculate the target distribution probability of each training data according to the soft probability of each training data; Calculate the relative entropy of each training sample based on the target distribution probability of each training data; The sum of the relative entropy of each training sample is taken as the total relative entropy. Based on the total relative entropy, the back propagation algorithm is used to calculate the gradient of the model parameters and cluster centers, and the optimizer is used to update the model parameters and cluster centers. The data classification model is trained with the goal of minimizing the sum of all total relative entropies. The training is stopped when the sum of the total relative entropies reaches convergence, and the construction of the data classification model is completed.

7. The blockchain-based electronic medical record tamper-proof and trusted interaction method according to claim 6 is characterized in that: Methods for intelligently recommending authorization scopes include: The authorization scope includes data attributes, access form and effective time range; obtain patient personal information from electronic medical records, and use collaborative filtering algorithm to obtain patient personal information and access symptoms. The first candidate authorization scope of the group; according to the access purpose, the collaborative filtering algorithm is used to obtain Group the second candidate authorization scope; obtain all data attributes, access forms and effective time ranges in the first candidate authorization scope and the second candidate authorization scope, and count the number of each data attribute, access form and effective time range respectively, and mark them as recommended numbers; count the number of data attributes in each group of the first candidate authorization scope and the second candidate authorization scope respectively, and calculate the mean to obtain the average number of types; compare the recommended numbers respectively, and select the one with the largest recommended number The data attributes, the access form with the largest number of recommendations, and the effective time range with the largest number of recommendations are used as the authorization scope of intelligent recommendation; among them, is the average number of species.

8. The blockchain-based electronic medical record tamper-proof and trusted interaction method according to claim 7 is characterized in that: Methods for fine-grained analysis of access granularity for all data within the authorized scope include: Different digital labels are set for different sensitivities and marked as sensitive labels; the higher the sensitivity, the larger the corresponding sensitive label; a sensitivity threshold is preset, and all structured data within the authorized scope are marked as candidate data; according to the sensitivity of each candidate data, the corresponding sensitive label is obtained; each sensitive label is compared with the sensitivity threshold, and the candidate data with a sensitive label greater than the sensitivity threshold is marked as refined data, and the candidate data with a sensitive label less than or equal to the sensitivity threshold is not marked; for each refined data, a pre-trained sequence labeling model is used to perform a refinement operation to divide the minimum data unit corresponding to each refined data.

9. The blockchain-based electronic medical record tamper-proof and trusted interaction method according to claim 8 is characterized in that: In step S505, the method of calculating the access quality index of each antenna sampling point includes: Using the trained Sentence-BERT model, each minimum data unit in the candidate recommendation set corresponding to the candidate label of each antenna sampling point is converted into a corresponding unit vector; different numerical labels are set for different access purposes and marked as purpose labels; the purpose label corresponding to the access purpose in the data access request is obtained, and the unit vector corresponding to each antenna sampling point is used as a set of calculation data, and the calculation data is corresponding to the antenna sampling point one by one; each set of calculation data is input into the trained satisfaction prediction model, and the access satisfaction corresponding to each set of calculation data is predicted, that is, the access satisfaction of each antenna sampling point; The sensitivity of all minimum data units corresponding to each antenna sampling point is added up in sequence to obtain the total sensitivity value of each antenna sampling point; a weight set is preset, and the weight set includes weight coefficients corresponding to the access satisfaction and the total sensitivity value; based on the access satisfaction and the total sensitivity value of each antenna sampling point, and combined with the weight set, the access quality index of each antenna sampling point is calculated.

Citation Information

Patent Citations

  • Two-dimensional sonar array rarefaction method based on beetle antennae search algorithm

    CN116466334A

  • Visual database analysis method and system

    CN119357229A