Large-scale electronic medical record access control method based on block chain

Through distributed storage and encryption mechanisms, combined with multi-layer analysis mechanisms and neural network models, the problems of high storage costs, reduced performance and privacy leakage in large-scale electronic medical record data access control are solved, and data security and access control are achieved.

CN120162823APending Publication Date: 2025-06-17BINZHOU MEDICAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510245182.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

In the access control of large-scale electronic medical record data, the blockchain's storage costs are high, the performance is degraded, and the open and transparent characteristics may lead to data privacy leakage.

Method used

Through distributed storage and encryption mechanisms, classified storage and encrypted electronic medical record data, a multi-layer analysis mechanism is built to judge access behavior, use neural network models to perform in-depth behavior analysis, and access control is carried out according to risk levels.

Benefits of technology

Ensure the security and privacy of electronic medical record data, optimize storage resources, reduce storage costs, and improve the accuracy and efficiency of access control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120162823A_ABST
    Figure CN120162823A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data access control, in particular to a block chain-based large-scale electronic medical record access control method, which comprises the following steps of: performing distributed storage and encryption on electronic medical record data; the access behavior judgment of the electronic medical record data is realized by constructing a multi-layer analysis mechanism; according to the analysis results of the neural network model on the access behaviors, access control rules are formulated to carry out access control on different analysis results, and the access control comprises normal behavior access control, abnormal behavior access control and risk behavior access control; through the distributed storage and encryption mechanism of the block chain technology, the security and privacy of the electronic medical record data are ensured, the data are classified, stored and encrypted according to the privacy level, and sensitive data leakage is avoided; accurate judgment of the access behavior is realized through a multi-layer analysis mechanism, the neural network model is introduced, access behavior judgment rules can be automatically learned and optimized, and the judgment accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data access control, and specifically to a method for accessing and controlling large-scale electronic medical records based on blockchain. Background Art

[0002] With the increasing development of electronic information technology, the amount of electronic data is increasing day by day. However, in the access control of large-scale electronic medical record data, the following problems are faced:

[0003] Electronic medical record data is usually very large, and storing it on the blockchain will occupy a large amount of on-chain space. Especially for public blockchains, the storage cost is relatively high. At the same time, when it comes to sensitive medical information, the public and transparent characteristics of the blockchain may lead to data privacy leakage;

[0004] In large-scale medical applications, frequent access and update operations may lead to a decline in the performance of the blockchain system, affecting the response speed and throughput of the system. Traditional access control mechanisms are difficult to meet the access requirements of large-scale electronic medical record data and are prone to performance bottlenecks. Summary of the Invention

[0005] In view of the above existing problems, the present invention is proposed.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: A method for accessing and controlling large-scale electronic medical records based on blockchain, including the following steps,

[0007] Distributed storage and encryption of electronic medical record data, specifically:

[0008] Distribute the electronic medical record data for storage on multiple nodes, classify and store different types of electronic medical record data according to the privacy level. At the same time, use encryption technology to encrypt the medical record data on all nodes;

[0009] Judging the access behavior of electronic medical record data by constructing a multi-layer analysis mechanism, specifically:

[0010] Set the access role set of electronic medical record data, and set different access permissions for the roles in the role set. At the same time, use the multi-layer analysis mechanism to judge the access behavior of electronic medical record data, and also include,

[0011] The multi-layer analysis mechanism is constructed by two layers of behavior analysis, including basic behavior analysis and in-depth behavior analysis. Basic behavior analysis is to analyze the behavior according to the user's permissions. In-depth behavior analysis is to perform secondary behavior analysis on users who pass the basic behavior analysis using deep learning algorithms;

[0012] According to the analysis results of the neural network model for access behaviors, access control is performed on different analysis results by formulating access control rules, including normal behavior access control, abnormal behavior access control, and risk behavior access control.

[0013] As a preferred solution of the blockchain-based large-scale electronic medical record access control method described in the present invention, wherein: the classification storage of different categories of electronic medical record data according to the privacy level is specifically as follows:

[0014] The electronic medical record data of routine medical records is stored through the first layer, and the electronic medical record data of sensitive medical records is stored through the second layer, specifically:

[0015] The first layer is encrypted and stored through the symmetric encryption algorithm AES-128, and the second layer is encrypted and stored through the symmetric encryption algorithm AES-256;

[0016] For the encrypted electronic medical record data, it is stored layer by layer, specifically:

[0017] Set the electronic medical record data set as D = {D1, D2,.., D n}, where D i represents the i-th electronic medical record data. For each electronic medical record data D i , it is encrypted according to the privacy level of each data item, then there is, where, represents the routine medical record information in the i-th electronic medical record data and is encrypted and stored through the symmetric encryption algorithm AES-128, represents the sensitive medical record information in the i-th electronic medical record data and is encrypted and stored through the symmetric encryption algorithm AES-256.

[0018] As a preferred solution of the blockchain-based large-scale electronic medical record access control method described in the present invention, wherein: the data encryption of the medical record data on all nodes by using encryption technology is specifically as follows:

[0019] For the encrypted data, hierarchical storage is performed, then there is,

[0020] Routine medical record layer,

[0021]

[0022] Sensitive medical record layer,

[0023]

[0024] where S1 represents the data storage level for storing routine medical record data, and S2 represents the data storage level for storing sensitive medical record data;

[0025] For regular medical record information, if the current regular medical record information is frequently accessed during the current patient's treatment, the encryption intensity of the current regular medical record information is increased, and the current medical record data is promoted from the regular storage level to the sensitive medical record level for storage;

[0026] For sensitive medical record information, if the current sensitive medical record information has not been accessed during the current patient's treatment, the encryption intensity of the current sensitive information is reduced, and the current medical record data is demoted from the sensitive storage level to the regular medical record level for storage.

[0027] As a preferred solution of the blockchain-based large-scale electronic medical record access control method described in the present invention, wherein: different access permissions are set for the roles in the role set

[0028] Set the access role set R,

[0029] R = {r1, r2,..., r n}

[0030] wherein, R represents the constructed role set, and r i represents different roles in the role set, including doctors, patients, and data security staff;

[0031] At the same time, set the electronic medical record access permission set corresponding to each role, then there is,

[0032] P = {P1, P2,..., P n}

[0033] wherein, p represents the electronic medical record data access permission set corresponding to each set role, including viewing medical records, modifying medical records, and management permissions, and p i represents the electronic medical record data access permission corresponding to the role r i ;

[0034] According to the set access role set and permission set, the relationship mapping between roles and permissions is realized through a mapping function, specifically:

[0035] M: R → 2 P

[0036] wherein, M represents the mapping between roles and permissions, that is, for each role r ∈ R, a corresponding permission subset P r ∈ P, and P r represents the permission set corresponding to the role r, and the specific relationship mapping is as follows:

[0037] M(patient) = {view case}, indicating that the patient can only view their own medical records;

[0038] M(Doctor) = {View medical records, Modify medical records}, indicating that a doctor can view and modify medical records;

[0039] M(Nurse) = {View medical records}, indicating that a nurse can only view a patient's medical records and cannot modify them;

[0040] M(Data security staff) = {All permissions}, indicating that data security staff have all operation permissions.

[0041] As a preferred solution of the blockchain-based large-scale electronic medical record access control method described in the present invention, wherein: the basic behavior analysis is as follows:

[0042] Set the behavior feature set B of the electronic medical record data access user,

[0043] B = {b1, b2,..., b k}

[0044] where B represents the constructed behavior feature set, and b i represents the behavior feature in the behavior feature set, including access frequency, access time, access duration, access type, and abnormal behavior;

[0045] For the accessed electronic medical record data, when the electronic medical record data is accessed, capture the user role r of the current access user t ;

[0046] For the captured user role r of the current access user t , through the constructed mapping relationship between roles and permissions, obtain the permissions M corresponding to the user role of the current access user t ;

[0047] At the same time, detect the access record of the accessed electronic medical record data, and match the detected access record with the permissions M corresponding to the user role of the current access user t . If the access record of the electronic medical record data is below the permissions M corresponding to the user role of the current access user t ;

[0048] If the access record of the electronic medical record data exceeds the permissions M corresponding to the user role of the current access user t , then analyze the access behavior of the current user through in-depth behavior analysis.

[0049] As a preferred solution of the blockchain-based large-scale electronic medical record access control method described in the present invention, wherein: the secondary behavior analysis using deep learning algorithms is as follows:

[0050] Nonlinear mapping of the hidden layer,

[0051] h = ReLU(W1·B t + b1)

[0052] where W1 and b1 respectively represent the weight matrix and the bias term of the hidden layer, ReLU represents the activation function, B t represents the input access behavior feature, and h represents the non-linear mapping result of the hidden layer;

[0053] Based on the non-linear mapping result of the hidden layer, a deep analysis of the access behavior is performed, and then

[0054]

[0055] where W2 and b2 respectively represent the weight matrix and the bias term of the output layer, sigmoid represents the activation function of the output layer, h represents the non-linear mapping result of the hidden layer, represents the behavior prediction result for the input access behavior feature.

[0056] As a preferred solution of the blockchain-based large-scale electronic medical record access control method described in the present invention, wherein: the risk behavior access control realizes access control by introducing risk levels, specifically as follows:

[0057] The first-level risk, the second-level risk, and the third-level risk are respectively set, and the set risk level is matched according to the output result of the risk behavior in the neural network model, then

[0058] The output result of the neural network model under normal behavior is set as The output result of the neural network model under abnormal behavior is The output result of the neural network model under risk behavior is

[0059] The matching of the risk level is realized according to the output result of the risk behavior in the neural network model, then

[0060] If the output result of the neural network model satisfies the formula it means that the risk level matched by the current risk behavior is the first-level risk level;

[0061] If the output result of the neural network model satisfies the formula it means that the risk level matched by the current risk behavior is the second-level risk level;

[0062] If the output result of the neural network model satisfies the formula it means that the risk level matched by the current risk behavior is the third-level risk level.

[0063] As a preferred solution of the blockchain-based large-scale electronic medical record access control method of the present invention, specifically: access control of risk behaviors is performed according to the matched risk levels, specifically:

[0064] For access behaviors with a first-level risk level, the user can normally access the access data permitted by the permissions corresponding to their role. At this time, all access behaviors of the current user are recorded and real-time monitored. The access behaviors are continuously monitored. If the user's access behaviors cause the risk level to rise, the access permissions of the current user are restricted. If the user's access behaviors trigger abnormal behaviors, the access behaviors of the current user are rejected and their access permissions are deleted;

[0065] For access behaviors with a second-level risk level, the user can access non-sensitive data in the electronic medical record data. For the access to sensitive data, the subsequent access behaviors of the current user need to be continuously monitored. If the monitoring result shows that the risk level continues to rise, the access to sensitive data is stopped. Otherwise, the access permissions for sensitive data are maintained;

[0066] For access behaviors with a third-level risk level, the user is prohibited from accessing sensitive data. For the access permissions to non-sensitive data, the secondary authentication of the identity is first triggered. If the authentication result is consistent with the current access role, it means that the identity authentication is passed, and the user is allowed to access non-sensitive data. The access behaviors to non-sensitive data are continuously monitored. If the risk level rises during the user's access to non-sensitive data, all access permissions to the electronic medical record data of the current user are immediately stopped.

[0067] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the blockchain-based large-scale electronic medical record access control method are implemented.

[0068] A computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the blockchain-based large-scale electronic medical record access control method are implemented.

[0069] The beneficial effects of the present invention:

[0070] Through the distributed storage and encryption mechanism of blockchain technology, the present invention ensures the security and privacy of electronic medical record data, classifies and encrypts data according to the privacy level, and avoids the leakage of sensitive data;

[0071] By dynamically adjusting the encryption intensity and storage level, the use of storage resources is optimized, the storage cost is reduced, and the storage strategy is flexibly adjusted according to the access frequency and sensitivity of the data, thereby improving the storage efficiency;

[0072] Through a multi-layer analysis mechanism (basic behavior analysis and in-depth behavior analysis), accurate judgment of access behavior is achieved. By introducing a neural network model, it can automatically learn and optimize the access behavior judgment rules, improving the accuracy of judgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings. Among them:

[0074] Figure 1 It is a schematic structural diagram of the overall method steps of the large-scale electronic medical record access control method based on blockchain of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0075] To make the above objects, features, and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings of the specification. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0076] Many specific details are set forth in the following description to facilitate a thorough understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0077] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation manner of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that mutually excludes other embodiments.

[0078] The present invention is described in detail in conjunction with the schematic diagrams. When describing the embodiments of the present invention in detail, for ease of explanation, the cross-sectional views showing the device structure will be enlarged locally out of proportion, and the schematic diagrams are only examples and should not limit the protection scope of the present invention herein. In addition, in actual production, three-dimensional spatial dimensions including length, width, and depth should be included.

[0079] At the same time, in the description of the present invention, it should be noted that the terms "first", "second", or "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.

[0080] Unless otherwise clearly defined and limited in the present invention, the terms "installation, connection, and coupling" shall be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may also be a mechanical connection, an electrical connection, or a direct connection, or may be indirectly connected through an intermediate medium, or may be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0081] Example 1

[0082] Referring to Figure 1 , an embodiment of the present invention provides a large-scale electronic medical record access control method based on blockchain, including the following steps:

[0083] S1: Distributed storage and encryption of electronic medical record data.

[0084] Specifically, the distributed storage and encryption of the electronic medical record data is based on the distributed storage technology of blockchain. The electronic medical record data is stored on multiple nodes, and different categories of electronic medical record data are classified and stored according to the privacy level. At the same time, encryption technology is used to encrypt the medical record data on all nodes. The specific implementation is as follows:

[0085] For the electronic medical records in the medical database, according to the privacy level, the electronic medical records are divided into multiple categories, specifically:

[0086] The electronic medical records are divided into routine medical record data and sensitive medical record data. The routine medical record data includes diagnosis records and routine physical examination results. The sensitive medical record data includes genetic information, allergy history, treatment plans, and surgical records;

[0087] According to the divided categories of electronic medical records, the electronic medical records are stored in layers, then there is:

[0088] The electronic medical record data of the routine medical records is stored through the first layer, and the electronic medical record data of the sensitive medical records is stored through the second layer. Specifically:

[0089] The first layer is encrypted and stored through the symmetric encryption algorithm AES-128, and the second layer is encrypted and stored through the symmetric encryption algorithm AES-256;

[0090] For the electronically stored medical record data after hierarchical encryption, it is stored layer by layer. Specifically:

[0091] Set the electronic medical record data set as D = {D1, D2,.., D n}, where D i represents the i-th electronic medical record data. For each electronic medical record data D i, encrypt according to the privacy level of each data item, then there is, Among them, represents the general medical record information in the i-th electronic medical record data, which is encrypted and stored through the symmetric encryption algorithm AES-128. represents the sensitive medical record information in the i-th electronic medical record data, which is encrypted and stored through the symmetric encryption algorithm AES-256;

[0092] For the encrypted data, perform hierarchical storage, then there is,

[0093] General medical record layer,

[0094]

[0095] Sensitive medical record layer,

[0096]

[0097] Among them, S1 represents the data storage level for storing general medical record data, and S2 represents the data storage level for storing sensitive medical record data.

[0098] It should be noted that in order to further improve the security of electronic medical records and improve the data storage efficiency, according to the access frequency and sensitivity of medical record data, dynamically adjust the encryption strength of the storage level, specifically:

[0099] For general medical record information, if the current general medical record information is frequently accessed during the current patient's treatment, increase the encryption strength of the current general medical record information, and promote the current medical record data from the general storage level to the sensitive medical record level for storage;

[0100] For sensitive medical record information, if the current sensitive medical record information has not been accessed during the current patient's treatment, reduce the encryption strength of the current sensitive information, and reduce the current medical record data from the sensitive storage level to the general medical record level for storage.

[0101] It should be noted that by using different strengths of encryption for data with different privacy levels, the high cost of all data using high-strength encryption is avoided, the storage resources are optimized, and through the dynamic adjustment of the storage encryption strategy, the encryption strength and storage level are dynamically adjusted according to data sensitivity and access frequency, making access control more flexible and intelligent.

[0102] S2: Implement the access behavior judgment of electronic medical record data by constructing a multi-layer analysis mechanism.

[0103] Specifically, the determination of the access behavior of the electronic medical record data is to set the access role set of the electronic medical record data, set different access permissions for the roles in the role set, and at the same time, use a multi-layer analysis mechanism to realize the determination of the access behavior of the electronic medical record data. The specific implementation is as follows:

[0104] Set the access role set R,

[0105] R = {r1, r2,..., r n}

[0106] Among them, R represents the constructed role set, and r i represents different roles in the role set, including doctors, patients, and data security staff;

[0107] At the same time, set the electronic medical record access permission set corresponding to each role, then there is,

[0108] P = {P1, P2,..., P n}

[0109] Among them, p represents the electronic medical record data access permission set corresponding to each set role, including viewing medical records, modifying medical records, and management permissions, and p i represents the electronic medical record data access permission corresponding to the role r i ;

[0110] According to the set access role set and permission set, realize the relationship mapping between roles and permissions through a mapping function. Specifically:

[0111] M: R → 2 P

[0112] Among them, M represents the mapping between roles and permissions, that is, for each role r ∈ R, a corresponding permission subset P r ∈ P, and P r represents the permission set corresponding to the role r. The specific relationship mapping is as follows:

[0113] M(patient) = {view case}, indicating that the patient can only view their own medical records;

[0114] M(doctor) = {view case, modify medical record}, indicating that the doctor can view and modify medical records;

[0115] M(nurse) = {view case}, indicating that the nurse can only view the patient's medical records and cannot modify them;

[0116] M(data security staff) = {all permissions}, indicating that the data security staff has all operation permissions.

[0117] Further, the determination of the access behavior of electronic medical record data using the neural network algorithm is achieved by constructing a multi-layer analysis mechanism for user behavior analysis, and the specific implementation is as follows:

[0118] Before conducting behavior analysis, set the behavior feature set B of the users accessing electronic medical record data,

[0119] B = {b1, b2,..., b k}

[0120] where B represents the constructed behavior feature set, and b i represents the behavior features in the behavior feature set, including access frequency, access time, access duration, access type, and abnormal behavior;

[0121] Based on the constructed behavior feature set, conduct behavior analysis on the users accessing electronic medical record data, and the specific analysis is as follows:

[0122] The behavior analysis of users is achieved through the constructed multi-layer analysis mechanism, specifically as follows:

[0123] The multi-layer analysis mechanism is constructed by two layers of behavior analysis, including basic behavior analysis and in-depth behavior analysis. Basic behavior analysis conducts behavior analysis according to the user's permissions, and in-depth behavior analysis conducts secondary behavior analysis on users who pass the basic behavior analysis using deep learning algorithms. Through two-level behavior analysis, comprehensive behavior analysis of electronic medical record access users can be achieved, and the specific analysis is as follows:

[0124] Basic behavior analysis layer,

[0125] For the accessed electronic medical record data, capture the user role r of the current access user while the electronic medical record data is being accessed t ;

[0126] For the captured user role r of the current access user t , obtain the permissions M corresponding to the user role of the current access user through the constructed mapping relationship between roles and permissions t ;

[0127] At the same time, detect the access records of the accessed electronic medical record data, and match the detected access records with the permissions M corresponding to the user role of the current access user t If the access record of the electronic medical record data is below the permissions M corresponding to the user role of the current access user t Specifically: if the access record of the electronic medical record data is being modified, and the permissions corresponding to the user role of the current access user allow the user to have modification behavior for the medical record data, it indicates that the current user's behavior is normal;

[0128] If the access record of the electronic medical record data exceeds the permission M corresponding to the user role of the current access user t , then the access behavior of the current user is analyzed through in-depth behavior analysis, as follows:

[0129] For the access behavior feature B of the electronic medical record data passing through the basic behavior analysis layer t , the analysis and judgment of the access behavior are realized by using the neural network method, and the specific implementation is as follows:

[0130] The access behavior analysis and judgment are carried out by constructing a feedforward neural network model. The feedforward neural network model includes an input layer, a hidden layer, and an output layer. Then,

[0131] The extracted access behavior features are input from the input layer as the input quantity of the model. The expression ability of the network is enhanced through non-linear mapping in the hidden layer. Finally, the access behavior analysis and judgment are carried out according to the non-linear mapping result, as follows:

[0132] Non-linear mapping of the hidden layer

[0133] h = ReLU(W1·B t + b1)

[0134] where W1 and b1 respectively represent the weight matrix and bias term of the hidden layer, ReLU represents the activation function, B t represents the input access behavior feature, and h represents the non-linear mapping result of the hidden layer;

[0135] The in-depth analysis of the access behavior is carried out according to the non-linear mapping result of the hidden layer. Then,

[0136]

[0137] where W2 and b2 respectively represent the weight matrix and bias term of the output layer, sigmoid represents the activation function of the output layer, h represents the non-linear mapping result of the hidden layer, represents the behavior prediction result for the input access behavior feature;

[0138] The neural network model is optimized by using historical access data, and then the accurate analysis and judgment of the access behavior under the current access feature are realized. Specifically:

[0139] Based on the current input behavior feature, the same behavior feature and the corresponding behavior judgment are found from the historical database, and the loss function is constructed to optimize the neural network model. Then,

[0140]

[0141] where, Represents the behavior prediction result for the access behavior characteristics of the input, and y represents the behavior judgment result corresponding to the same characteristics as the current input in the historical database. Represents the loss function result, which is used to optimize the neural network model. Specifically:

[0142] Set the loss threshold L T , by inputting multiple user access feature data and calculating the loss function results under each access data By comparing the loss threshold with the loss function results, the optimization of the neural network model is achieved. Then,

[0143] If the comparison result satisfies the formula It indicates that the current neural network model is fully optimized, and the access behavior judgment result of the current neural network model for electronic medical record data is accurate;

[0144] If the comparison result satisfies the formula It indicates that the current neural network model is not fully optimized, and the access behavior judgment result of the current neural network model for electronic medical record data is inaccurate. The weight matrix of the neural network model is readjusted until the neural network model is fully optimized.

[0145] It should be noted that for the fully optimized neural network model, the real-time access behavior characteristics of electronic medical record data are analyzed and judged using the fully optimized neural network model. Specifically:

[0146] Set the abnormal behavior judgment threshold y T , and perform behavior analysis and judgment according to the set abnormal behavior judgment threshold. Then,

[0147] If the output result of the neural network model satisfies the formula It indicates that the access behavior of the current electronic medical record data input to the neural network model is an abnormal access behavior;

[0148] If the output result of the neural network model satisfies the formula It indicates that the access behavior of the current electronic medical record data input to the neural network model is a normal access behavior.

[0149] S3: Perform access control according to the access behavior of electronic medical record data.

[0150] Specifically, the access control according to the access behavior of electronic medical record data is to perform access control on normal behaviors and abnormal behaviors respectively according to the judgment results of the neural network model for access behaviors. The specific implementation is as follows:

[0151] Access control for normal behaviors,

[0152] For users with normal behavior r normal , allow all normal behavior actions of the current user under the corresponding permissions of the role;

[0153] Access control for normal behavior,

[0154] For users with abnormal behavior r abnormal , reject all abnormal behavior actions of the current user;

[0155] For users with risk behavior r venture , risk behaviors include that the user frequently accesses electronic medical record data, the time for the user to access electronic medical record data exceeds the time limit, and the user accesses electronic medical record data at unconventional times. Access control is implemented by introducing risk levels, specifically:

[0156] Set the first-level risk, second-level risk, and third-level risk respectively. The set risk level is matched according to the output result of the risk behavior in the neural network model. Then,

[0157] Set the output result of the neural network model under normal behavior as The output result of the neural network model under abnormal behavior is The output result of the neural network model under risk behavior is

[0158] Match the risk level according to the output result of the risk behavior in the neural network model. Then,

[0159] If the output result of the neural network model satisfies the formula It means that the risk level matched by the current risk behavior is the first-level risk level;

[0160] If the output result of the neural network model satisfies the formula It means that the risk level matched by the current risk behavior is the second-level risk level;

[0161] If the output result of the neural network model satisfies the formula It means that the risk level matched by the current risk behavior is the third-level risk level.

[0162] Perform access control for risk behaviors according to the matched risk level, specifically:

[0163] For access behaviors at the first-level risk level, the user can normally access the access data allowed by the permissions corresponding to their role. At this time, record all access behaviors of the current user and conduct real-time monitoring. Continuously monitor the access behavior. If the user's access behavior causes the risk level to rise, restrict the access permissions of the current user. If the user's access behavior triggers abnormal behavior, reject the access behavior of the current user and delete their access permissions;

[0164] For access behaviors with a secondary risk level, users can access non-sensitive data in the electronic medical record data. For access to sensitive data, the subsequent access behaviors of the current user need to be continuously monitored. If the monitoring result shows that the risk level continues to rise, the access to sensitive data will be stopped; otherwise, their access rights to sensitive data will be maintained.

[0165] For access behaviors with a tertiary risk level, users are prohibited from accessing sensitive data. For the access rights to non-sensitive data, secondary authentication of the identity is first triggered. If the authentication result is consistent with the current access role, it indicates that the identity authentication is passed, and they are allowed to access non-sensitive data. The access behaviors to non-sensitive data are continuously monitored. If the risk level rises during the process of the user accessing non-sensitive data, all access rights of the current user to the electronic medical record data will be immediately stopped.

[0166] Furthermore, if the above functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0167] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.

[0168] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection (electronic device) having one or more wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.

[0169] In addition, in order to provide a concise description of the exemplary embodiments, all features of the actual embodiments may not be described (i.e., those features that are not relevant to the currently contemplated best mode of carrying out the invention or those features that are not relevant to the implementation of the invention).

[0170] It should be understood that in the development of any actual implementation, as in any engineering or design project, numerous specific implementation decisions may be made. Such development efforts may be complex and time-consuming, but for those of ordinary skill in the art who benefit from this disclosure, without undue experimentation, such development efforts will be routine work in design, manufacturing, and production.

[0171] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A large-scale electronic medical record access control method based on blockchain, characterized by: The following steps are included: Distributed storage and encryption of electronic medical record data, specifically: Distribute electronic medical record data on multiple nodes for storage, and classify and store different types of electronic medical record data according to privacy levels. At the same time, use encryption technology to encrypt medical record data on all nodes. The access behavior judgment of electronic medical record data is realized by building a multi-layer analysis mechanism, specifically: Set up a set of access roles for electronic medical record data, and set different access permissions for the roles in the role set. At the same time, use a multi-layer analysis mechanism to implement access behavior judgment for electronic medical record data, including: The multi-layer analysis mechanism is constructed by two layers of behavior analysis, including basic behavior analysis and deep behavior analysis. Basic behavior analysis is to analyze behavior based on user permissions, and deep behavior analysis is to use deep learning algorithms to perform secondary behavior analysis on users who have passed basic behavior analysis. According to the analysis results of the neural network model on access behavior, access control is performed on different analysis results by formulating access control rules, including normal behavior access control, abnormal behavior access control and risky behavior access control.

2. The large-scale electronic medical record access control method based on blockchain as claimed in claim 1, characterized in that: The classification and storage of different types of electronic medical record data according to privacy levels are as follows: The electronic medical record data of routine medical records are stored in the first level, and the electronic medical record data of sensitive medical records are stored in the second level, specifically: The first level is encrypted and stored using the symmetric encryption algorithm AES-128, and the second level is encrypted and stored using the symmetric encryption algorithm AES-256; For the layered encrypted electronic medical record data, it is stored layer by layer, specifically: Assume that the electronic medical record data set is D = {D1, D2, .., D n }, where D i Represents the i-th electronic medical record data. For each electronic medical record data D i , encrypted according to the privacy level of each data item, then, in, represents the routine medical record information in the i-th electronic medical record data, which is encrypted and stored using the symmetric encryption algorithm AES-128. Represents the sensitive medical record information in the i-th electronic medical record data, which is encrypted and stored using the symmetric encryption algorithm AES-256.

3. The large-scale electronic medical record access control method based on blockchain as claimed in claim 2, characterized in that: The specific details of using encryption technology to encrypt the medical record data on all nodes are as follows: For tiered storage of encrypted data, we have: Routine medical records layer, Sensitive medical records layer, Among them, S1 represents the data storage level for storing routine medical record data, and S2 represents the data storage level for storing sensitive medical record data; For routine medical record information, if the current routine medical record information is frequently accessed during the current patient's treatment, the encryption strength of the current routine medical record information will be increased, and the current medical record data will be upgraded from the regular storage level to the sensitive medical record level for storage; For sensitive medical record information, if the current sensitive medical record information has not been accessed during the current patient's treatment, the encryption strength of the current sensitive information will be reduced, and the current medical record data will be reduced from the sensitive storage level to the regular medical record level for storage.

4. The large-scale electronic medical record access control method based on blockchain as claimed in claim 3 is characterized by: Setting different access permissions for roles in a role collection Set the access role set R, R={r1,r2,...,r n} Among them, R represents the constructed role set, r i Represents different roles in the role set, including doctors, patients, and data security staff; At the same time, set the electronic medical record access permission set corresponding to each role, then: P={P1,P2,...,P n } Among them, p represents the set of electronic medical record data access permissions corresponding to each role, including viewing medical records, modifying medical records, and management permissions. i Represents the role r i Corresponding access rights to electronic medical record data; According to the set access role set and permission set, the relationship mapping between roles and permissions is realized through the mapping function, specifically: M:R→2 P Among them, M represents the mapping between roles and permissions, that is, each role r∈R corresponds to a permission subset P r ∈P,P r Represents the permission set corresponding to role r. The specific relationship mapping is as follows: M(patient) = {View Cases}, indicating that the patient can only view his or her own medical records; M(doctor) = {view case, modify medical record}, ​​indicating that the doctor can view and modify medical records; M(Nurse) = {View Cases}, which means that nurses can only view the patient's medical records but cannot modify them; M (data security staff) = {all permissions}, indicating that the data security staff has all operation permissions.

5. The large-scale electronic medical record access control method based on blockchain as claimed in claim 4 is characterized by: The basic behavior analysis is as follows: Set the behavioral feature set B of users accessing electronic medical record data, B={b1,b2,...,b k } Among them, B represents the constructed behavioral feature set, b i Indicates the behavior features in the behavior feature set, including access frequency, access time, access duration, access type, and abnormal behavior; For the accessed electronic medical record data, when the electronic medical record data is accessed, the user role rt of the current accessing user is captured; For the captured user role rt of the current access user, the permission M corresponding to the user role of the current access user is obtained through the mapping relationship between the constructed role and the permission t ; At the same time, the access record of the accessed electronic medical record data is detected, and the detected access record is compared with the permission M corresponding to the user role of the current access user. t Match, if the access record of the electronic medical record data is in the permission M corresponding to the user role of the current access user t under; If the access record of the electronic medical record data exceeds the permission M corresponding to the user role of the current access user t , the current user's access behavior is analyzed through deep behavioral analysis.

6. The large-scale electronic medical record access control method based on blockchain as claimed in claim 5 is characterized by: The secondary behavior analysis using the deep learning algorithm is specifically as follows: Nonlinear mapping of hidden layers, h=ReLU(W1·B t +b1) Among them, W1 and b1 represent the weight matrix and bias term of the hidden layer respectively, ReLU represents the activation function, and B t represents the input access behavior characteristics, and h represents the nonlinear mapping result of the hidden layer; According to the nonlinear mapping results of the hidden layer, we can conduct a deep analysis of the access behavior. Among them, W2 and b2 represent the weight matrix and bias term of the output layer respectively, sigmoid represents the activation function of the output layer, and h represents the nonlinear mapping result of the hidden layer. Indicates the behavior prediction result for the input access behavior features.

7. The large-scale electronic medical record access control method based on blockchain as claimed in claim 6 is characterized by: The risk behavior access control is implemented by introducing risk levels, as follows: Set the first-level risk, second-level risk and third-level risk respectively, and set the risk level to match the output results of the neural network model according to the risk behavior, then, The output of the neural network model under normal behavior is set to The output of the neural network model under abnormal behavior is The output of the neural network model under risk behavior is According to the output results of the neural network model in risk behavior, the risk level is matched, then, If the output result of the neural network model satisfies the formula Indicates that the risk level matched by the current risk behavior is the first-level risk level; If the output result of the neural network model satisfies the formula Indicates that the risk level matched by the current risk behavior is the secondary risk level; If the output result of the neural network model satisfies the formula Indicates that the risk level matched by the current risk behavior is level three risk level.

8. The large-scale electronic medical record access control method based on blockchain as claimed in claim 7 is characterized in that: Access control of risky behaviors is performed based on the matching risk level, specifically: For access behaviors at the first-level risk level, users can normally access the access data allowed by the permissions corresponding to their roles. At this time, all access behaviors of the current user are recorded and monitored in real time. The access behaviors are continuously monitored. If the user's access behavior causes the risk level to rise, the current user's access rights are restricted. If the user's access behavior triggers abnormal behavior, the current user's access behavior is denied and his access rights are deleted. For access behaviors at the second-level risk level, users can access non-sensitive data in the electronic medical record data. For access to sensitive data, it is necessary to continuously monitor the subsequent access behaviors of the current user. If the monitoring result shows that the risk level continues to rise, the access to sensitive data will be stopped. Otherwise, the access rights to sensitive data will be maintained. For access behaviors at the third risk level, users are prohibited from accessing sensitive data. For access rights to non-sensitive data, the secondary identity authentication is first triggered. If the authentication result is consistent with the current access role, it means that the identity authentication is passed and the user is allowed to access non-sensitive data. The access behavior to non-sensitive data is continuously monitored. If the risk level increases during the user's access to non-sensitive data, all electronic medical record data access rights of the current user will be immediately stopped.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.