Education medical data dynamic authority control system based on block chain
By leveraging blockchain technology, combined with behavioral awareness, dynamic risk assessment, and cross-chain hash lock secure channels, the issues of flexibility and security in access management during cross-institutional sharing of educational and medical data have been resolved, enabling efficient, secure data sharing and compliant auditing.
Patent Information
- Application Number
- CN202511635327.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-13
AI Technical Summary
In existing technologies, when educational and medical data are shared across institutions, static access control lacks flexibility, and dynamic access control and cross-chain security channel mechanisms lack coordination, resulting in insecure and inefficient data sharing.
The system employs a blockchain-based dynamic access control system for education and healthcare data. Through a behavior perception and dynamic risk assessment module, a dual access mapping and dynamic control engine module, and a cross-chain hash lock secure channel module, it achieves precise dynamic access control and atomic secure transmission.
It enables dynamic and precise access control and secure transmission of educational and medical data during cross-chain sharing, meeting the security and efficiency requirements of cross-domain data sharing, and improving the auditability and privacy protection of data access.
Smart Images

Figure CN121530645A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchain data security and access control, and particularly to an education and medical data dynamic permission control system based on a blockchain. BACKGROUND
[0002] Under the background of digital education and medical collaboration, there is an increasing demand for sharing cross-domain data such as student health records, growth and development data, and special medical needs. Such data is usually scattered in different information systems of educational institutions and medical institutions, involving a large amount of sensitive personal information, and poses high requirements for data security and privacy protection. Blockchain technology has been explored for application in building a trusted data sharing platform due to its decentralized, tamper-proof, and traceable characteristics.
[0003] In the prior art, patent application CN110289056A discloses a medical data sharing system and method based on a blockchain, which standardizes data writing through a smart contract and builds a flat-sharing mechanism for alliance members on the premise of privacy data desensitization. Although this solution lays the foundation for data interconnection, its access control model relies on pre-set static roles and attributes, making it difficult to adapt to dynamic changes in data user behavior patterns or data access context environments, and the permission policy lacks flexibility. In addition, another patent application CN118921200A proposes a trust-based access control method based on user behavior archives, which dynamically updates user permissions according to environmental values and other factors through a TBAC model, achieving more granular permission allocation. However, this type of dynamic permission management solution often lacks deep coordination with cross-chain secure channel mechanisms when exchanging data across different blockchain systems, making it difficult to ensure atomicity and security of data exchange under dynamic permission adjustment.
[0004] Therefore, there is an urgent need for an innovative technical solution to address the core problems of insufficient flexibility of static permission management in cross-institution data sharing scenarios and the disconnection between dynamic permission control and cross-chain secure transmission mechanisms in the prior art. This problem hinders the efficient and smooth sharing and application of education and medical data under the premise of security and controllability.
[0005] In summary, the prior art has not effectively solved the coordination problem between dynamic permission control and secure channel establishment in the context of cross-chain sharing of education and medical data. The present application aims to propose a system that deeply integrates behavior sensing, dynamic permission mapping, and cross-chain atomic exchange technology to overcome the above-mentioned deficiencies. SUMMARY
[0006] The purpose of the present application is to make up for the deficiencies of the prior art, and provide a blockchain-based education and medical data dynamic permission control system, which establishes a dynamic behavior baseline and calculates a risk score through a behavior perception and dynamic risk assessment module, realizes static predefinition and dynamic adjustment of permissions in combination with a dual permission mapping and dynamic control engine module, and builds a cross-chain secure exchange channel in combination with a cross-chain hash lock secure channel module, so as to realize dynamic permission accurate control and atomic security transmission when education and medical data are shared across chains, and make up for the deficiencies of the prior art, such as lack of flexibility of static permissions, lack of dynamic permissions, and lack of cross-chain security cooperation.
[0007] The present application provides the following technical solutions to solve the above technical problems: a blockchain-based education and medical data dynamic permission control system, comprising a behavior perception and dynamic risk assessment module, a dual permission mapping and dynamic control engine module, and a cross-chain hash lock secure channel module;
[0008] The behavior perception and dynamic risk assessment module is used to collect multi-source behavior data of users, and a dynamic behavior baseline is established through a machine learning model, and a dynamic risk score of a user data access request is calculated based on the baseline;
[0009] The dual permission mapping and dynamic control engine module comprises a basic permission mapping unit and a behavior adaptive permission mapping unit, the basic permission mapping unit predefines static permissions according to user roles and attributes, the behavior adaptive permission mapping unit adjusts user permissions in real time according to the dynamic risk score, and automatically executes permission decisions through a smart contract;
[0010] The cross-chain hash lock secure channel module is used to establish a secure data exchange channel between different blockchain systems, the cross-chain hash lock secure channel module generates a hash lock containing a random number and a hash value, and combines the hash lock with a time lock to ensure the atomicity of data exchange;
[0011] The output of the behavior perception and dynamic risk assessment module is connected to the input of the dual permission mapping and dynamic control engine module, and the output of the dual permission mapping and dynamic control engine module controls the access strategy execution of the cross-chain hash lock secure channel module.
[0012] Further, the behavior perception and dynamic risk assessment module comprises a multi-source data acquisition unit, a dynamic behavior baseline learning unit, and a real-time risk assessment unit;
[0013] The multi-source data acquisition unit continuously acquires user behavior data, including access patterns, operation contexts, and data lifecycle operations;
[0014] The dynamic behavior baseline learning unit uses a time series analysis model to learn user historical behavior data, and generates a personalized normal behavior baseline, which is dynamically updated through the following formula:
[0015]
[0016] where B t represents the dynamic behavior baseline value at current time t, B t-1 represents the baseline value at previous time, a is the smoothing coefficient and takes the value range of 0 to 1, n is the number of behavior data features, w i is the weight coefficient of the i-th behavior feature, X i,t is the normalized value of the i-th behavior feature at time t;
[0017] The real-time risk assessment unit compares the current behavior data of the user with the dynamic behavior baseline, and calculates a dynamic risk score, which is input to the behavior adaptive permission mapping unit.
[0018] Further, the real-time risk assessment unit calculates the dynamic risk score through a risk assessment model, which integrates multi-dimensional behavior deviation;
[0019] The dynamic risk score is calculated by the following formula:
[0020]
[0021] where R represents the dynamic risk score, m is the number of current behavior features, D j is the measured value of the j-th current behavior feature, B j is the dynamic behavior baseline value of the j-th behavior feature, β is the average deviation coefficient, γ is the maximum deviation coefficient, and β and γ are determined by model training;
[0022] The real-time risk assessment unit divides the dynamic risk score into low-risk, medium-risk and high-risk levels, and outputs it to the behavior adaptive permission mapping unit to trigger corresponding permission adjustment.
[0023] Further, the behavior adaptive permission mapping unit in the dual permission mapping and dynamic control engine module performs permission mapping according to the dynamic risk score;
[0024] The behavior adaptive permission mapping unit defines permission adjustment strategies, including permission downgrade, enhanced authentication or temporary freeze;
[0025] Permission mapping is implemented by the following function:
[0026]
[0027] where P a represents the behavior adaptive permission, R is the dynamic risk score, P b is the basic permission, T l is the low-risk threshold, Th is a high-risk threshold, M d represents a permission downgrade operation, represents that the permission is empty, i.e., temporarily frozen;
[0028] The output of the behavior-adaptive permission mapping unit is automatically executed on the blockchain through a smart contract, ensuring the non-tamperability of the permission decision.
[0029] Further, the automatic execution of the permission decision by the dual permission mapping and dynamic control engine module includes:
[0030] The smart contract is deployed on the blockchain and contains permission logic code and state storage;
[0031] When a user initiates a data access request, the smart contract receives the output of the behavior-adaptive permission mapping unit, verifies the user's identity and permission state, and generates an access control instruction;
[0032] The execution of the smart contract includes a permission verification step and a policy application step. The permission verification step matches the access rules based on the user attributes and the dynamic risk score, and the policy application step allows or denies data access according to the matching result;
[0033] The execution result of the smart contract is recorded in the blockchain distributed ledger, forming an unalterable audit trail.
[0034] Further, the cross-chain hash lock secure channel module includes a hash lock generation unit and an atomic exchange unit;
[0035] The hash lock generation unit creates a random number R and calculates its hash value H when a cross-chain data access request is made, generating a hash lock structure that contains the hash value H of the random number R, access policy parameters, and time lock parameters;
[0036] The atomic exchange unit verifies the hash lock structure on the target blockchain and checks the submission of the random number R within the time lock window;
[0037] The atomicity of data exchange is guaranteed through the following protocol:
[0038] If the random number R is submitted correctly within the time lock window, the target blockchain releases the encrypted data to the requester;
[0039] If it is not submitted or submitted incorrectly within the time limit, the data exchange is automatically rolled back.
[0040] Further, the atomic exchange unit realizes the atomicity of data exchange through cross-chain smart contracts;
[0041] The cross-chain smart contract defines a data exchange state machine, including an initial state, a locked state, a completed state, and a rollback state.
[0042] The data exchange process follows a hash time-lock protocol, in which the time-lock parameter T sets the maximum waiting time;
[0043] The atomic exchange unit synchronizes the state on the request blockchain and the target blockchain, ensuring the consistency of transactions on both chains;
[0044] The atomic exchange unit also includes a data encryption unit that encrypts sensitive data using the request public key, and only releases the decryption key after verifying the random number R.
[0045] Further, the system also includes an audit and traceability module, which is integrated with the behavior perception and dynamic risk assessment module, the dual permission mapping and dynamic control engine module, and the cross-chain hash lock secure channel module;
[0046] The audit and traceability module collects the operation logs and state changes of each module, and stores the log data in hash form in the blockchain;
[0047] The audit and traceability module provides a zero-knowledge proof verification interface, allowing auditors to verify data access compliance without exposing the original data;
[0048] The audit and traceability module ensures the integrity and non-repudiation of the logs through the blockchain consensus mechanism, supporting the tracing of data usage tracks.
[0049] Compared with the prior art, the blockchain-based education and medical data dynamic permission control system has the following beneficial effects:
[0050] Firstly, the present application collects user multi-source behavior data through the behavior perception and dynamic risk assessment module, establishes a dynamic behavior baseline using a machine learning model and calculates a dynamic risk score; in combination with the dual permission mapping and dynamic control engine module, the static permissions are predefined according to the user role attributes, and the permissions are adjusted in real time according to the dynamic risk score and the permission decisions are automatically executed through the smart contract; then, in cooperation with the cross-chain hash lock secure channel module, a cross-chain secure data exchange channel is established, and the hash lock and time lock are combined to ensure the atomicity of data exchange, thereby realizing the dynamic permission precise control and secure transmission of education and medical data in the cross-chain sharing process, and meeting the security and efficiency requirements of cross-domain data sharing.
[0051] Secondly, the application collects operation logs and state changes of each module of behavior perception, permission control and cross-chain exchange through the integrated audit and traceability module, and stores the log data in the form of hash in the block chain; at the same time, a zero-knowledge proof verification interface is provided, which allows the auditors to verify the data access compliance without exposing the original data, and relies on the block chain consensus mechanism to ensure the log integrity and non-repudiation, in addition, the smart contract automatically records the permission decision and access operation track, forming an unalterable audit track, thereby effectively improving the auditability and privacy protection level of education and medical data access, meeting the data supervision and compliance requirements.
[0052] Other advantages, objects, and features of the application will be set forth in part in the following specification taken in conjunction with the accompanying drawings, and in part will become apparent to those skilled in the art from a consideration of the following specification and drawings, or can be learned from practice of the application. BRIEF DESCRIPTION OF DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings from these drawings without creative labor.
[0054] Figure 1 The operation flowchart of the present application;
[0055] Figure 2 The system module cooperation and data flow diagram of the present application;
[0056] Figure 3 The dynamic permission control logic diagram of the present application. DETAILED DESCRIPTION
[0057] In order to further illustrate the technical means and effects adopted by the present application to achieve the predetermined application purpose, the specific embodiments, structures, features and effects according to the present application will be described in detail below in combination with the drawings and preferred embodiments.
[0058] Embodiment one
[0059] As Figure 2 and Figure 3The embodiment aims to provide a specific implementation scheme of a blockchain-based dynamic permission control system for medical education data, which is suitable for cross-chain sharing of student health data between educational institutions and medical institutions. By deploying a behavior perception and dynamic risk assessment module, a dual permission mapping and dynamic control engine module, a cross-chain hash lock secure channel module, and an audit and traceability module, real-time perception of user behavior, dynamic risk assessment, adaptive adjustment of permissions, and atomic secure exchange of cross-chain data are realized, while ensuring the auditability and privacy of data access. The problems of insufficient flexibility of static permissions and lack of cross-chain security collaboration in the prior art are solved, meeting the security and compliance requirements of medical education data sharing.
[0060] The embodiment is based on a consortium chain architecture to build the system, which includes educational institution nodes, medical institution nodes, and regulatory agency nodes. Each node maintains the consistency of the ledger through a consensus mechanism. The specific implementation of each module of the system is as follows:
[0061] The implementation of the behavior perception and dynamic risk assessment module is as follows:
[0062] The behavior perception and dynamic risk assessment module is deployed on the edge computing layer of each consortium chain node to collect user behavior data in real time, establish a dynamic behavior baseline, and calculate a risk score. It includes a multi-source data acquisition unit, a dynamic behavior baseline learning unit, and a real-time risk assessment unit, which are implemented as follows:
[0063] The implementation of the multi-source data acquisition unit is as follows:
[0064] The multi-source data acquisition unit is connected to the information system log interface of educational institutions and medical institutions and deploys behavior capture components to continuously collect behavior data when users initiate data access requests. The types of collected behavior data include three categories: 1) access mode data, such as data access time, frequency, and access node location; 2) operation context data, such as device identification, operating system type, and network protocol during access; and 3) data lifecycle operation data, such as data reading, querying, and downloading operation types. After standardization processing, the collected data is transmitted to the dynamic behavior baseline learning unit. The data transmission process uses TLS protocol encryption to ensure transmission security.
[0065] The implementation of the dynamic behavior baseline learning unit is as follows:
[0066] The dynamic behavior baseline learning unit uses a long short-term memory time series analysis model to learn historical behavior data transmitted by the multi-source data acquisition unit, generates a user's personalized normal behavior baseline, and dynamically updates the baseline at a preset period. The baseline update is realized through the following formula:
[0067]
[0068] wherein, B t represents the dynamic behavior baseline value at the current time t, used to represent the normal behavior reference of the user in the current time window; B t-1 represents the dynamic behavior baseline value of the previous time window, ensuring the continuity of baseline updating; a is a smoothing coefficient, with a value range of 0 to 1, which balances the influence of historical baseline and current behavior data on the new baseline. When a tends to 1, the historical baseline weight is higher, and the baseline updating is more gentle, which is suitable for users with stable behavior patterns. When a tends to 0, the current behavior data weight is higher, and the baseline updating is more sensitive, which is suitable for users with dynamic behavior patterns; n is the number of behavior data features, corresponding to the type of behavior data collected by the multi-source data collection unit. For example, when collecting three types of data: access time, frequency, and operation type, n = 3; w i is the weight coefficient of the i-th behavior feature, which is obtained by training the LSTM model. The training process takes the relevance of behavior data and subsequent risk events as the objective function, so that features with high relevance get higher weights, and features with low relevance get lower weights; X i,t is the normalized value of the i-th behavior feature at time t. The original behavior data is converted to the [0, 1] interval by the Min-Max normalization method, eliminating the influence of different feature dimension differences on baseline calculation. For example, the access frequency is converted from the original unit of "times / day" to a dimensionless value in the [0, 1] interval.
[0069] The implementation of the real-time risk assessment unit is as follows:
[0070] The real-time risk assessment unit receives the current behavior data of the user transmitted by the multi-source data collection unit and the dynamic behavior baseline value output by the dynamic behavior baseline learning unit, calculates the dynamic risk score through the risk assessment model, and quantifies the risk level of the current access request. The risk score calculation is realized by the following formula:
[0071]
[0072] wherein, R is the dynamic risk score, with a value range of 0 to 1. The higher the score, the higher the risk level of the current access request; m is the number of current behavior features, which is consistent with n in the dynamic behavior baseline learning unit, to ensure that the feature dimensions match; D j is the measured value of the j-th current behavior feature, i.e. the actual collection value of the j-th behavior data when the user initiates the current access request; B j is the dynamic behavior baseline value of the j-th behavior feature, which is consistent with D jThe one-to-one correspondence is a criterion for judging whether the current behavior is abnormal; β is the average deviation coefficient, and γ is the maximum deviation coefficient, both of which are obtained by training historical risk event data, and the training process aims to improve the prediction accuracy of risk scores on actual risk events. For example, when the average deviation contributes more to risk prediction, β takes a higher value, and when the extreme deviation contributes more to risk prediction, γ takes a higher value, and β + γ = 1 is satisfied to ensure the rationality of risk score calculation; is the average deviation of the current behavior characteristics from the baseline, reflecting the deviation degree of the overall behavior; is the maximum deviation of the current behavior characteristics from the baseline, reflecting the extreme deviation degree of a single feature.
[0073] The real-time risk assessment unit divides the dynamic risk score into three levels: low risk, medium risk, and high risk, where T l is the low risk threshold, and T h is the high risk threshold, both of which are determined by ROC curve analysis of historical risk events to ensure the accuracy of risk classification, and the classification results are transmitted in real time to the dual permission mapping and dynamic control engine module.
[0074] The implementation of the dual permission mapping and dynamic control engine module is as follows:
[0075] The dual permission mapping and dynamic control engine module is deployed on the core node of the alliance chain, and realizes permission control through the dual mapping of basic permissions and adaptive permissions, including a basic permission mapping unit, a behavior adaptive permission mapping unit, and a smart contract component, which are implemented as follows:
[0076] The implementation of the basic permission mapping unit is as follows:
[0077] The basic permission mapping unit predefines static permissions based on user roles and attributes, and realizes the association of roles and permissions through a permission configuration table. User roles include teachers of educational institutions, doctors of medical institutions, and personnel of regulatory agencies, and user attributes include affiliated institutions, job levels, and authorized periods. For example, the basic permission configuration of the medical institution doctor role is "read student health records and query growth and development data", and the basic permission configuration of the educational institution teacher role is "read student growth and development data and query special medical needs data". The basic permission configuration table is stored in the distributed ledger of the blockchain, and only the regulatory agency node is allowed to modify it through the multi-signature mechanism to ensure the security and stability of the basic permissions.
[0078] The implementation of the behavior adaptive permission mapping unit is as follows:
[0079] The behavior adaptive permission mapping unit receives the risk classification result output by the real-time risk assessment unit, combines the static permissions of the basic permission mapping unit, and adjusts the user permissions in real time through a permission mapping function. The permission adjustment strategy includes three types of permission downgrade, enhanced authentication, and temporary freezing. The permission mapping is implemented through the following function:
[0080]
[0081] wherein, P a is the behavior adaptive permission, i.e., the final user permission after adjustment; R is the dynamic risk score, which serves as the basis for permission adjustment; P b is the basic permission, i.e., the static permission predefined by the basic permission mapping unit; T l is the low-risk threshold, T h is the high-risk threshold, which is consistent with the threshold in the real-time risk assessment unit; M d is the permission downgrade operation, i.e., removing the high-risk operation permission from the basic permission, for example, when the risk is medium, removing the "download student health record" permission from the basic permission of the doctor role, while retaining the "read" permission; represents that the permission is empty, i.e., temporarily freezing all user permissions, triggered when the risk is high, to prevent malicious access.
[0082] When the risk level is low, the user permission remains the basic permission P b , and the pre-authorized operation can be normally executed; when the risk level is medium, the permission downgrade operation is executed, and the user permission is the intersection of the basic permission and the downgrade operation P b ∩M d , and the enhanced authentication is triggered at the same time. After verification, the remaining permissions can be executed; when the risk level is high, the user permission is temporarily frozen, and the user needs to submit a permission recovery application to the affiliated institution, and the permission is reset after the application is approved.
[0083] The implementation of the smart contract component is as follows:
[0084] The smart contract component is written in Solidity language and deployed on all nodes of the consortium chain, including permission logic code and state storage module, used to automatically execute the permission decision output by the behavior adaptive permission mapping unit. When the user initiates a data access request, the smart contract executes the following process:
[0085] First, identity verification: the smart contract receives the user's digital certificate, verifies the validity and unexpired status of the certificate, and confirms the legality of the user's identity;
[0086] Second, permission verification: the smart contract reads P aand the current access operation type of the user, match the preset access rule, and determine whether the current operation meets the permission requirement;
[0087] Third step, policy application: if the permission verification passes, the smart contract generates an "access allowed" instruction to authorize the user to perform the operation; if the permission verification fails, an "access denied" instruction is generated, and the reason for the denial is recorded;
[0088] Fourth step, log recording: the smart contract stores the identity verification result, permission verification result, access instruction, and operation time in the form of key-value pairs in the distributed ledger of the blockchain, forming an unalterable audit trail. The ledger record is only allowed to be queried by the regulatory agency node, ensuring privacy.
[0089] The implementation of the cross-chain hash lock secure channel module is as follows:
[0090] The cross-chain hash lock secure channel module is deployed on the gateway nodes of different alliance chains to establish a secure channel for cross-chain data exchange, including a hash lock generation unit and an atomic exchange unit, which are implemented as follows:
[0091] The implementation of the hash lock generation unit is as follows:
[0092] When the user initiates a cross-chain data access request, the hash lock generation unit performs the following operations:
[0093] First step, generate random number R: use a cryptographically secure pseudo-random number generator to generate a random number R with a length of 256 bits to ensure unpredictability;
[0094] Second step, calculate hash value H: use the SHA-256 hash algorithm to hash the random number R to obtain the hash value H = SHA-256(R), which is used for subsequent cross-chain verification;
[0095] Third step, generate hash lock structure: the hash lock structure includes the hash value H, access policy parameters, and time lock parameters, where the access policy parameters are the P a , and the time lock parameter T is the maximum waiting time, which is used to limit the time window of data exchange.
[0096] The implementation of the atomic exchange unit is as follows:
[0097] The atomic exchange unit coordinates the transactions of the request blockchain and the target blockchain through the cross-chain smart contract to ensure the atomicity of data exchange, and the specific implementation process is as follows:
[0098] First step, state initialization: the cross-chain smart contract sets the data exchange state to "initial state", and the request blockchain node sends the access request and hash lock structure to the target blockchain node;
[0099] Second step, hash lock verification: the atomic exchange unit of the target blockchain node receives the hash lock structure, verifies whether the access policy parameters meet the authorization requirements, and if so, updates the state to "locked state", and stores the encrypted target data in the cross-chain smart contract;
[0100] Third step, random number submission: the requestor blockchain node submits a random number R to the target blockchain node within the time window corresponding to the time lock parameter T;
[0101] Fourth step, data release or rollback: the atomic exchange unit of the target blockchain node calculates the hash value of the submitted random number R, and if it is consistent with H in the hash lock structure and within the time window, updates the state to "completed state", releases the decryption key, and the requestor node uses the private key to decrypt the key to obtain the target data; if the random number R is not submitted within the time window or the hash value corresponding to R is not consistent with H, the state is updated to "rollback state", the stored encrypted data is deleted, the data exchange is terminated, and the atomicity of the cross-chain transaction is ensured.
[0102] The atomic exchange unit also includes a data encryption unit that uses an asymmetric encryption algorithm to encrypt the target data, with the encryption public key being the public key of the requestor node, ensuring that only the requestor node can decrypt the data and protecting the privacy of cross-chain data transmission.
[0103] The implementation of the audit and traceability module is as follows:
[0104] The audit and traceability module is integrated with the above three modules and deployed on the regulatory node of the consortium chain to realize data access audit and traceability, and the specific implementation is as follows:
[0105] The audit and traceability module collects the collection logs of the behavior perception module, the permission decision logs of the permission control module, and the exchange logs of the cross-chain exchange module in real time, and stores them in the blockchain distributed ledger after hash processing, ensuring that the logs cannot be tampered with. The module provides a zero-knowledge proof verification interface, which can be used by the regulatory agency to initiate a verification request to the module when auditing data access compliance. The module generates a zero-knowledge proof that the log data meets the compliance requirements and does not expose sensitive information in the original logs. At the same time, the module supports log query based on the blockchain ledger, and the regulatory agency can query the data usage trajectory according to user identification, operation time, etc. to realize full-process traceability.
[0106] In summary, the embodiment realizes dynamic permission control and secure exchange in the education and medical data cross-chain sharing scenario by deploying the behavior perception and dynamic risk assessment module, the dual permission mapping and dynamic control engine module, the cross-chain hash lock secure channel module, and the audit and traceability module. The calculation model of dynamic behavior baseline and risk score ensures the accuracy of risk assessment, the dual permission mapping mechanism realizes flexible adjustment of permissions, the cross-chain hash lock and atomic exchange guarantee the security and atomicity of data exchange, and the audit and traceability module meets the compliance requirements.
[0107] Embodiment Two
[0108] As shown in the embodiment one, the embodiment two elaborates the specific steps of the education and medical data dynamic permission control system based on blockchain when it works, and the specific steps are as follows: Figure 1
[0109] 1. User initiates data access request:
[0110] The user submits a data access request to the system through the client application, and the request contains user identity information and target data identification.
[0111] 2. Behavior perception and dynamic risk assessment module performs real-time monitoring:
[0112] The multi-source data acquisition unit automatically captures the user's current behavior data, including access time, access frequency, operation type, device information, and network context.
[0113] The dynamic behavior baseline learning unit calls the user's historical behavior data to generate or update the personalized behavior baseline as a reference for normal behavior.
[0114] The real-time risk assessment unit compares the current behavior data with the behavior baseline, calculates the dynamic risk score, and divides the risk level into low risk, medium risk, or high risk.
[0115] 3. Dual permission mapping and dynamic control engine module makes permission decision:
[0116] The basic permission mapping unit loads the pre-defined static permissions according to the user's role and attributes.
[0117] The behavior adaptive permission mapping unit receives the dynamic risk score and adjusts the user's permissions according to the risk level:
[0118] Low risk: maintain basic permissions.
[0119] Medium risk: perform permission downgrade or trigger enhanced authentication.
[0120] High risk: temporarily freeze all permissions.
[0121] Smart contract component automatically executes permission decisions: verifies user identity, matches permission rules, and generates "allow access" or "deny access" instructions.
[0122] 4. Cross-chain hash lock secure channel module handles cross-chain data exchange:
[0123] If the permission decision is "allow access" and involves cross-chain data, the hash lock generation unit creates a random number and corresponding hash value to construct a hash lock structure.
[0124] Atomic exchange unit coordinates data exchange between requestor blockchain and target blockchain:
[0125] Target blockchain verifies hash lock structure and locks encrypted data.
[0126] Requestor submits correct random number within time window, target blockchain releases decryption key; otherwise, data exchange is automatically rolled back.
[0127] Data encryption unit encrypts sensitive data using public key to ensure only the requestor can decrypt.
[0128] 5. Audit and traceability module records and verifies operations:
[0129] Audit and traceability module collects operation logs from each module and stores log hash values in blockchain distributed ledger.
[0130] Provides zero-knowledge proof interface, allowing auditors to verify data access compliance without revealing original data.
[0131] Supports regulatory agency queries of data usage trajectory to achieve full-process traceability.
[0132] 6. System returns access results:
[0133] User receives access results: successfully obtains data or receives denial notification.
[0134] All operation results and logs are recorded on the blockchain to ensure tamper-proof and auditable.
[0135] Through the above steps, the system realizes dynamic permission control, secure exchange, and compliance audit of education and medical data in cross-chain sharing scenarios, solving the problems of insufficient flexibility of static permissions and lack of cross-chain security collaboration.
[0136] The above merely describes the preferred embodiments of the present application, and is not intended to limit the present application in any form. Although the present application has been disclosed with the preferred embodiments as above, it is not intended to limit the present application. Any person skilled in the art can make some changes or modifications to the above disclosed technical content to obtain equivalent embodiments with equivalent changes, as long as the changes or modifications do not deviate from the technical solution of the present application. Any modification, change, equivalent change and modification of the above embodiments made according to the technical essence of the present application still belong to the scope of the technical solution of the present application.
Claims
1. A blockchain-based dynamic permission control system for educational medical data, characterized in that, The system comprises a behavior perception and dynamic risk assessment module, a dual permission mapping and dynamic control engine module, and a cross-chain hash lock secure channel module. The behavior perception and dynamic risk assessment module is used to collect multi-source behavior data of users, and to establish a dynamic behavior baseline through a machine learning model, based on which a dynamic risk score of a user data access request is calculated. The dual permission mapping and dynamic control engine module comprises a basic permission mapping unit and a behavior adaptive permission mapping unit. The basic permission mapping unit predefines static permissions according to user roles and attributes. The behavior adaptive permission mapping unit adjusts user permissions in real time according to the dynamic risk score, and automatically executes permission decisions through a smart contract. 2.The blockchain-based dynamic permission control system for educational medical data according to claim 1, wherein, The cross-chain hash lock secure channel module is used to establish a secure data exchange channel between different blockchain systems. The cross-chain hash lock secure channel module generates a hash lock containing a random number and a hash value, and combines it with a time lock to ensure the atomicity of data exchange. The output of the behavior perception and dynamic risk assessment module is connected to the input of the dual permission mapping and dynamic control engine module. wherein B t represents the dynamic behavior baseline value at the current time t, B t-1 represents the baseline value at the previous time, a is a smoothing coefficient and takes a value ranging from 0 to 1, n is the number of behavior data features, w i is the weight coefficient of the i-th behavior feature, X i,t is the normalized value of the i-th behavior feature at time t; The output of the dual permission mapping and dynamic control engine module controls the access policy execution of the cross-chain hash lock secure channel module. 3.The blockchain-based dynamic permission control system for educational medical data according to claim 2, wherein, The behavior perception and dynamic risk assessment module comprises a multi-source data collection unit, a dynamic behavior baseline learning unit, and a real-time risk assessment unit. The multi-source data collection unit continuously collects user behavior data, including access patterns, operation context, and data lifecycle operations. wherein R represents a dynamic risk score, m is the number of current behavior characteristics, D j is a measured value of the jth current behavior characteristic, B j is a dynamic behavior baseline value of the jth behavior characteristic, β is an average deviation coefficient, γ is a maximum deviation coefficient, and β and γ are determined through model training; The dynamic behavior baseline learning unit uses a time series analysis model to learn user historical behavior data and generates a personalized normal behavior baseline. 4.The blockchain-based dynamic permission control system for educational medical data according to claim 1, wherein, The baseline is dynamically updated through the following formula: The real-time risk assessment unit compares user current behavior data with the dynamic behavior baseline and calculates a dynamic risk score, which serves as the input of the behavior adaptive permission mapping unit. The real-time risk assessment unit calculates a dynamic risk score through a risk assessment model that integrates multi-dimensional behavior biases. where P a represents behavioral adaptive permissions, R is a dynamic risk score, P b is a base permission, T l is a low risk threshold, T h is a high risk threshold, M d represents a permission downgrade operation, represents a permission is null i.e. temporarily frozen; The dynamic risk score is calculated through the following formula:
5. The blockchain-based dynamic permission control system for educational medical data according to claim 1, wherein, The real-time risk assessment unit divides the dynamic risk score into low-risk, medium-risk, and high-risk levels, and outputs them to the behavior adaptive permission mapping unit to trigger corresponding permission adjustments. The behavior adaptive permission mapping unit in the dual permission mapping and dynamic control engine module performs permission mapping according to the dynamic risk score. The behavior adaptive permission mapping unit defines permission adjustment strategies, including permission downgrade, enhanced authentication, or temporary freezing. Permission mapping is implemented through the following function: The output of the behavior adaptive permission mapping unit is automatically executed on the blockchain through a smart contract, ensuring the non-tamperability of permission decisions. The smart contract in the dual permission mapping and dynamic control engine module automatically executes permission decisions, including: The smart contract is deployed on the blockchain and contains permission logic code and state storage. When a user initiates a data access request, the smart contract receives the output of the behavior adaptive permission mapping unit, verifies the user's identity and permission status, and generates access control instructions. The execution of the smart contract comprises a permission verification step and a policy application step, the permission verification step matches the user attribute with the dynamic risk score to access the rule, and the policy application step allows or rejects data access according to the matching result; The execution result of the smart contract is recorded in the blockchain distributed ledger, forming an unalterable audit trail.
6. The blockchain-based dynamic permission control system for educational medical data according to claim 1, wherein, The cross-chain hash lock secure channel module includes a hash lock generation unit and an atomic exchange unit; The hash lock generation unit creates a random number R and calculates its hash value H when a cross-chain data access request is made, generating a hash lock structure that contains the hash value H of the random number R, access policy parameters and time lock parameters; The atomic exchange unit verifies the hash lock structure on the target blockchain and checks the submission of the random number R within the time lock window; The atomicity of data exchange is guaranteed by the following protocol: If the random number R is submitted correctly within the time lock window, the target blockchain releases the encrypted data to the requester; If it is not submitted or submitted incorrectly, the data exchange is automatically rolled back.
7. The blockchain-based dynamic permission control system for educational medical data according to claim 6, wherein, The atomic exchange unit realizes the atomicity of data exchange through cross-chain smart contracts; The cross-chain smart contract defines a data exchange state machine, including an initial state, a locked state, a completed state and a rollback state; The data exchange process follows the hash time lock protocol, where the time lock parameter T sets the maximum waiting time; The atomic exchange unit synchronizes the state on the requester blockchain and the target blockchain to ensure the consistency of transactions on both chains; The atomic exchange unit also includes a data encryption unit that encrypts sensitive data using the requester's public key and releases the decryption key only after verifying the random number R. 8.The blockchain-based dynamic permission control system for educational medical data according to claim 1, wherein, The system also includes an audit and traceability module, which is integrated with the behavior perception and dynamic risk assessment module, the dual permission mapping and dynamic control engine module, and the cross-chain hash lock secure channel module; The audit and traceability module collects operation logs and state changes of each module and stores the log data in hash form in the blockchain; The audit and traceability module provides a zero-knowledge proof verification interface, allowing auditors to verify data access compliance without exposing the original data; The audit and traceability module ensures the integrity and non-repudiation of the log through the blockchain consensus mechanism, supporting the traceability of data usage tracks.
Citation Information
Patent Citations
Medical data sharing system and method based on block chain
CN110289056A
Trust access control method based on user behavior file
CN118921200A