A medical prescription management system and method

CN122907227APending Publication Date: 2026-10-13GUIQIAN INT HOSPITAL MANAGEMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610833868.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-10
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0003]目前,医药处方多采用中心化存储与管理模式,依赖传统数据库与访问控制机制实现数据共享,此类方案存在以下问题:一是数据集中存储易成为攻击目标,存在单点故障与隐私泄露风险;二是权限控制粗放,缺乏动态、细粒度的患者自主授权机制,难以实现最小必要原则下的数据共享;三是操作记录易被篡改或抵赖,处方流转过程缺乏可信溯源能力;因此,如何构建兼具隐私保护、动态授权与全程可追溯的医药处方数据安全管理机制成为了业界面临的难题

Benefits of technology

本申请提供的医药处方管理系统及方法中,首先通过加密注册流程获取注册患者的身份标识和处方相关属性集,进而生成与注册患者绑定的电子处方数据包;对所述电子处方数据包进行基于许可联盟链的多节点分布式存储,得到存储于区块链专用通道的加密数据包,进而通过区块链上的患者端授权智能合约,并根据所述加密数据包生成与医生公钥关联且具有时效性的原始授权令牌;获取医生对患者电子处方的访问请求,基于所述原始授权令牌和所述访问请求中的数字身份证书进行链上多重身份验证,得到身份验证结果,通过区块链上的处方流转智能合约,根据所述身份验证结果为验证通过的访问请求进行处方数据读写操作,进而生成不可篡改的操作记录链;通过区块链事件监听服务对所述操作记录链进行实时事件捕获与哈希锚定以确保处方数据共享过程的可追溯与防抵赖。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122907227A_ABST
    Figure CN122907227A_ABST
Patent Text Reader

Abstract

The application provides a medical prescription management system and method, which generates an electronic prescription data package bound to a registered patient; determines an encrypted data package stored in a special channel of a block chain based on the electronic prescription data package, generates an original authorization token associated with a doctor public key and having a time limit based on the encrypted data package; obtains an access request of the doctor to the electronic prescription of the patient, performs on-chain multiple identity verification based on the original authorization token and a digital identity certificate in the access request, obtains an identity verification result, performs a prescription data read-write operation for the access request that passes the verification based on the identity verification result, and generates an operation record chain that cannot be tampered with; through a block chain event listening service, real-time event capture and hash anchoring are performed on the operation record chain to ensure traceability and anti-fraud of the prescription data sharing process. By adopting the scheme of the application, a medical prescription data security management mechanism with privacy protection, dynamic authorization and whole-process traceability can be constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical data management technology, and more specifically, to a pharmaceutical prescription management system and method. Background Technology

[0002] With the rapid development of medical informatization, electronic prescriptions, as an important component of medical data, have become crucial for improving the efficiency and quality of medical services through their secure management and cross-institutional sharing. However, prescription data involves multiple sensitive factors such as patient privacy, medication safety, and medical liability. How to achieve the secure and efficient flow of prescription data among medical institutions, pharmacies, and regulators while ensuring data privacy and compliance is a core issue that urgently needs to be addressed in the field of medical data management.

[0003] Currently, most pharmaceutical prescriptions adopt a centralized storage and management model, relying on traditional databases and access control mechanisms to achieve data sharing. This approach has the following problems: First, centralized data storage makes it an easy target for attacks, posing a single point of failure and privacy leakage risks; second, access control is coarse, lacking a dynamic, fine-grained patient self-authorization mechanism, making it difficult to achieve data sharing under the principle of minimum necessity; third, operation records are easily tampered with or denied, and the prescription circulation process lacks reliable traceability. Therefore, how to build a pharmaceutical prescription data security management mechanism that combines privacy protection, dynamic authorization, and full traceability has become a challenge for the industry. Summary of the Invention

[0004] This application provides a pharmaceutical prescription management system and method, which can construct a pharmaceutical prescription data security management mechanism that combines privacy protection, dynamic authorization, and full traceability.

[0005] Firstly, this application provides a blockchain-based method for secure management of pharmaceutical prescription data. This method applies blockchain technology to perform hybrid encryption and dynamic authorization of prescription data within a pharmaceutical prescription management system to achieve secure sharing and trusted transfer. The method includes: The system obtains the identity information and prescription-related attribute set of registered patients through an encrypted registration process, and then generates an electronic prescription data package bound to the registered patients. The electronic prescription data packet is distributed and stored in a multi-node manner based on a permissioned consortium blockchain to obtain an encrypted data packet stored in a dedicated blockchain channel. Then, an authorization smart contract is authorized on the patient's end on the blockchain, and an original authorization token with an expiration date associated with the doctor's public key is generated based on the encrypted data packet. The system obtains the doctor's access request to the patient's electronic prescription, performs on-chain multi-factor authentication based on the original authorization token and the digital identity certificate in the access request, obtains the authentication result, and performs prescription data read and write operations for the verified access request through the prescription circulation smart contract on the blockchain, thereby generating an immutable operation record chain. The operation record chain is captured and hashed in real time through a blockchain event monitoring service to ensure the traceability and non-repudiation of the prescription data sharing process.

[0006] In some embodiments, obtaining the registered patient's identity and prescription-related attribute set through an encrypted registration process, and then generating an electronic prescription data package bound to the registered patient, specifically includes: The autonomous sovereign identity service generates decentralized identities for registered patients and issues verifiable digital credentials containing a set of prescription-related attributes. The verifiable digital credential is encrypted using the national cryptographic algorithm to generate ciphertext containing the patient's privacy attributes; The patient's privacy attributes are stored in encrypted form in a distributed storage system to obtain a content-addressable hash fingerprint; The electronic prescription is used to generate a smart contract that binds the content addressing hash fingerprint with the identity of the registered patient, thereby constructing an electronic prescription data package bound to the registered patient.

[0007] In some embodiments, performing multi-node distributed storage based on a permissioned consortium blockchain on the electronic prescription data packet to obtain an encrypted data packet stored in a dedicated blockchain channel specifically includes: Based on the electronic prescription data packet, attribute-based encryption based on the public key set of medical alliance members is performed to generate policy-consistent ciphertext that conforms to the multi-party secure sharing rules; The policy-consistent encrypted text is distributed to the dedicated prescription management channel through a dynamic channel creation mechanism. The endorsement-ordered hybrid consensus mechanism verifies and sorts data transactions within the prescription management dedicated channel, thereby completing state synchronization and obtaining encrypted data packets stored in the blockchain dedicated channel.

[0008] In some embodiments, authorizing a smart contract on the patient's end of the blockchain and generating an original authorization token associated with the doctor's public key and having a time limit based on the encrypted data packet specifically includes: A structured authorization request is initiated to the patient's end via a smart contract authorized through the patient's digital agent; After verifying the patient's digital signature in the structured authorization request through the patient-side authorization smart contract, a minimum access policy for data access is generated based on the encrypted data packet. The least privilege access policy is cryptographically bound to the authorization time window in the structured authorization request to generate a standardized original authorization token. The original authorization token is encrypted using the doctor's asymmetric encryption public key to obtain an original authorization token that is associated with the doctor's public key and has a time limit.

[0009] In some embodiments, on-chain multi-factor authentication is performed based on the original authorization token and the digital identity certificate in the access request to obtain the authentication result, specifically including: Obtain the doctor's digital identity certificate from the access request and check the validity of the digital identity certificate through the on-chain certificate verification service; The encrypted authorization token is decrypted using the doctor's private key to obtain the original authorization token; The original authorization token is associated and matched with the digital identity certificate to obtain a composite verification assertion that includes identity authenticity and scope of permissions; The validity period of the original authorization token is verified based on the timestamp in the access request, and then the identity verification result is generated by combining the composite verification assertion.

[0010] In some embodiments, prescription data read / write operations are performed on verified access requests through a prescription transfer smart contract on the blockchain based on the authentication result, thereby generating an immutable operation record chain. Specifically, this includes: The prescription circulation smart contract parses the authorization permission set in the identity verification result, and then generates the corresponding on-chain data operation transaction. The on-chain prescription operation transaction is executed and each data operation in the on-chain prescription operation transaction is authenticated, thereby constructing a structured operation record unit corresponding to each data operation; Perform hierarchical hash aggregation on all structured operation record units to generate a block integrity proof; The cryptographic proof of the integrity of the block body is anchored to the block header of the new block, and the new block is connected with the existing blockchain to form an immutable chain of operation records.

[0011] In some embodiments, real-time event capture and hash anchoring of the operation record chain through a blockchain event monitoring service to ensure the traceability and non-repudiation of the prescription data sharing process specifically includes: The operation record chain is monitored in real time by an event-driven listening engine deployed on the blockchain node to capture key business event flows. Structured event logs are generated based on the aforementioned key business event streams; The structured event logs are synchronized and hashed using a distributed timestamp service, thereby forming a tamper-proof audit trail for the entire lifecycle of prescriptions.

[0012] Secondly, this application provides a pharmaceutical prescription management system, which includes a data security management unit, the data security management unit comprising: The acquisition module is used to obtain the identity identifier and prescription-related attribute set of the registered patient through the encrypted registration process, and then generate an electronic prescription data package bound to the registered patient; The processing module is used to perform multi-node distributed storage of the electronic prescription data packet based on a permissioned consortium blockchain to obtain an encrypted data packet stored in a dedicated blockchain channel. Then, it authorizes the smart contract on the patient's end on the blockchain and generates an original authorization token associated with the doctor's public key and with a time limit based on the encrypted data packet. The processing module is used to obtain the doctor's access request to the patient's electronic prescription, perform on-chain multi-factor authentication based on the original authorization token and the digital identity certificate in the access request, obtain the authentication result, and perform prescription data read and write operations for the verified access request through the prescription circulation smart contract on the blockchain according to the authentication result, thereby generating an immutable operation record chain. The execution module is used to capture and hash-anchor the operation record chain in real time through the blockchain event listening service to ensure the traceability and non-repudiation of the prescription data sharing process.

[0013] Thirdly, this application provides a computer device, the computer device including a memory and a processor, the memory storing code, and the processor being configured to acquire the code and execute the above-described blockchain-based medical prescription data security management method.

[0014] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned blockchain-based medical prescription data security management method.

[0015] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects: The prescription management system and method provided in this application first obtain the identity identifier and prescription-related attribute set of the registered patient through an encrypted registration process, and then generate an electronic prescription data package bound to the registered patient; the electronic prescription data package is distributed and stored in a multi-node manner based on a permissioned consortium blockchain to obtain an encrypted data package stored in a dedicated blockchain channel; then, an original authorization token with time expiration associated with the doctor's public key is generated based on the encrypted data package through a patient-side authorization smart contract on the blockchain; the doctor's access request for the patient's electronic prescription is obtained, and on-chain multi-factor authentication is performed based on the original authorization token and the digital identity certificate in the access request to obtain the authentication result; through the prescription circulation smart contract on the blockchain, prescription data read and write operations are performed on the access request that has passed the authentication result, thereby generating an immutable operation record chain; the operation record chain is captured and hashed in real time through a blockchain event monitoring service to ensure the traceability and non-repudiation of the prescription data sharing process.

[0016] Therefore, this application utilizes a blockchain event monitoring service to capture and hash-anchor events in real time on the operation record chain to ensure the traceability and non-repudiation of the prescription data sharing process. Firstly, it determines that the electronic prescription data package can be obtained as a patient-specific data management unit generated on the blockchain for registered patients. The determination of the electronic prescription data package strongly binds the patient's decentralized identity to the encrypted prescription attributes using national cryptographic algorithms, and completes registration on the blockchain through a smart contract. This makes the electronic prescription data package a clearly owned digital asset belonging to the patient, fundamentally transferring ownership and control of prescription data from institutions to patients from a technical perspective, laying a trustworthy foundation for all subsequent data flows based on patient authorization. The electronic prescription data package does not store the original prescription data, but rather an encrypted content-addressed hash fingerprint. This achieves an advanced architecture that separates data from ownership, ensuring that patient privacy data is available but not visible during sharing. Furthermore, the distributed nature of blockchain breaks down data silos between institutions, enabling secure cross-institutional, policy-based data collaboration. Then, the original authorization token is used to obtain a basic authorization credential digitally signed by the patient. This original authorization token is not a static pass, but rather obtained through a patient-side authorization smart contract. It cryptographically binds the patient's authorization intention (i.e., the least privilege access policy) with a designated doctor's public key and a specific authorization time window. This mechanism directly controls access to the prescription data. The data is returned to the patient directly from the centralized institution, effectively preventing unauthorized access and solving the problem of crude access control in existing technologies. It avoids the potential risks associated with traditional long-term authorization, achieving lifecycle management of access permissions. Furthermore, the token is generated by the patient's digital signature, ensuring the non-repudiation of the authorization and providing legal evidence for subsequent audits. Doctors must provide a private key capable of decrypting the token, combined with their digital identity certificate, through multi-factor verification via on-chain smart contracts. This ensures that every data access is based on authentic, valid, and explicitly authorized credentials from the patient, preventing unauthorized access at the source. Only with this trusted starting point of the original authorization token can the generated operation record chain be complete, reliable, and... The immutable nature of the operation record perfectly solves the problem of easy tampering or denial of operation records in existing technologies, and realizes accurate traceability throughout the entire process. Finally, the operation record chain can be determined to obtain an immutable record sequence of operations on prescription data. The operation record chain can be determined by encapsulating each prescription data read and write operation into a structured record unit and using hierarchical hash aggregation and cryptographic anchoring technology to form a tightly linked chain structure in chronological order. This mechanism ensures that every operation of the prescription from issuance, authorization, access to dispensing is permanently and immutably recorded, completely eliminating the possibility of subsequent tampering or denial of operation behavior, and providing a credible audit track with legal evidentiary effect for the full life cycle management of prescription data.In summary, based on the above solutions, a medical prescription data security management mechanism can be constructed that combines privacy protection, dynamic authorization, and full traceability. Attached Figure Description

[0017] Figure 1 This is an exemplary flowchart illustrating a blockchain-based method for secure management of pharmaceutical prescription data according to some embodiments of this application; Figure 2 This is a flowchart illustrating the operation of determining encrypted data packets according to some embodiments of this application; Figure 3 This is an exemplary flowchart illustrating the determination of an operation record chain according to some embodiments of this application; Figure 4 This is a schematic diagram of the structure of a data security management unit according to some embodiments of this application; Figure 5 This is an internal structural diagram of a computer device that implements a blockchain-based method for secure management of pharmaceutical prescription data, according to some embodiments of this application. Detailed Implementation

[0018] To better understand the technical solution of this application, the technical solution of this application will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] refer to Figure 1 The figure is an exemplary flowchart of a blockchain-based pharmaceutical prescription data security management method according to some embodiments of this application. The blockchain-based pharmaceutical prescription data security management method mainly includes the following steps: In step 101, the identity identifier and prescription-related attribute set of the registered patient are obtained through an encrypted registration process, thereby generating an electronic prescription data package bound to the registered patient.

[0020] In some embodiments, obtaining the registered patient's identity and prescription-related attribute set through an encrypted registration process, and then generating an electronic prescription data package bound to the registered patient, can be achieved through the following steps: The autonomous sovereign identity service generates decentralized identities for registered patients and issues verifiable digital credentials containing a set of prescription-related attributes. The verifiable digital credential is encrypted using the national cryptographic algorithm to generate ciphertext containing the patient's privacy attributes; The patient's privacy attributes are stored in encrypted form in a distributed storage system to obtain a content-addressable hash fingerprint; The electronic prescription is used to generate a smart contract that binds the content addressing hash fingerprint with the identity of the registered patient, thereby constructing an electronic prescription data package bound to the registered patient.

[0021] It should be noted that in this application, the electronic prescription generation smart contract is a dedicated, automatically executing program code deployed on a permissioned consortium blockchain. Its core function is to act as a trusted and neutral registration authority, creating and initializing a unique electronic prescription data management unit for each registered patient on the blockchain. Specifically, it receives the patient's decentralized identity and the content-addressed hash fingerprint of their medical attribute certificate, and binds these two together in an immutable, one-to-one strong manner. Simultaneously, it creates and initializes the core data structure of the electronic prescription data package. Since the execution result of this electronic prescription generation smart contract—the creation and ownership of the prescription—is permanently recorded on the distributed ledger and witnessed by the consortium blockchain network, it possesses the characteristics of immutability, traceability, and public verifiability. It is the starting point and trust anchor of the entire solution, undisputedly defining the ownership of prescription data in the digital world through code logic and creating the basic framework for managing this data, thereby achieving a fundamental shift towards a patient-centric data control model.

[0022] In practice, generating decentralized identity identifiers for registered patients and issuing verifiable digital credentials containing prescription-related attribute sets through a sovereign identity service can be achieved in the following way: Prescription-related attributes of registered patients, including structured data such as basic health records, drug allergy history, and chronic disease records, can be obtained through a medical data collection interface. After standardization, a prescription-related attribute set is formed. Then, the identity identifier is registered and verified through a distributed identity resolution protocol. Finally, the sovereign identity service provider uses its digital signature private key to digitally sign the prescription-related attribute set, generating a verifiable digital credential with a complete trust chain. The sovereign identity service employs… A cryptographic system based on national cryptographic algorithms generates asymmetric key pairs, where the private key is kept independently by the patient, and the public key serves as the mathematical basis for identity verification. The centralized identity identifier is a unique digital identity identifier for registered patients in the medical prescription management system. This centralized identity identifier establishes the registered patient's principal status in the ownership of prescription data, providing an immutable identity traceability basis for all subsequent data operations. The verifiable digital certificate is a structured data set containing prescription-related information of the registered patient and digitally signed by an authoritative institution. This verifiable digital certificate enables the portability of the registered patient's medical attributes and real-time cross-institutional verification, solving the trust establishment problem in the flow of medical data.

[0023] In specific implementation, the verifiable digital certificate is encrypted using the national cryptographic algorithm to generate ciphertext with patient privacy attributes. This can be achieved in the following way: First, the verifiable digital certificate can be encrypted using the national commercial cryptographic algorithm SM4 to generate an initial ciphertext data block. Then, the symmetric encryption key is encrypted using the public key of the medical regulatory agency using the national commercial cryptographic algorithm SM2 to form an encryption key package. Next, the initial ciphertext data block and the encryption key package are encapsulated and assembled into complete ciphertext with patient privacy attributes according to a preset data structure specification. The ciphertext with patient privacy attributes is ciphertext data after the verifiable digital certificate is encrypted using the national cryptographic algorithm. This ciphertext with patient privacy attributes ensures that sensitive medical information cannot be interpreted by unauthorized parties even if the data is intercepted in a distributed storage environment, thus achieving data usability without visibility.

[0024] In specific implementation, storing the encrypted patient privacy attributes in a distributed storage system to obtain a content-addressed hash fingerprint can be achieved in the following way: The storage system can adopt a decentralized distributed storage architecture to divide the encrypted patient privacy attributes into fixed-size data blocks. Each data block generates a unique cryptographic hash value through a content-addressing algorithm as its storage identifier. Then, the cryptographic hash values ​​of all data blocks are constructed into a Merkle tree structure to generate a root hash as a proof of the integrity of the complete dataset. The storage proof and network location information of all data blocks are recorded to generate a content-addressed hash fingerprint. The content-addressed hash fingerprint is a unique identity fingerprint obtained by cryptographic hashing the encrypted patient privacy attributes in the distributed storage system. It can transform large amounts of encrypted privacy data into a fixed-length digest that can be efficiently verified on the blockchain. At the same time, it can make the fingerprint immediately invalid when the encrypted data is tampered with, thus ensuring the integrity of the data.

[0025] It should be noted that in this application, the electronic prescription data package is a patient-specific data management unit generated on the blockchain for registered patients. It includes the registered patient's identity identifier, content-addressed hash fingerprint, and initial data structure. This electronic prescription data package can aggregate dispersed patient identities, attribute encrypted text, and prescription records into a digital asset with clear ownership, providing a trusted data container for building prescription management throughout the patient's entire lifecycle. Specifically, the content-addressed hash fingerprint is bound to the registered patient's identity identifier through an electronic prescription book generation smart contract. The construction of the electronic prescription data package bound to the registered patient can be achieved in the following way: the electronic prescription book generation smart contract first verifies the validity of the registered patient's identity identifier and the authenticity of the digital signature, confirming that the registered patient has the legal authority to create an electronic prescription book, and then verifies... The availability and integrity of data corresponding to content-addressed hash fingerprints in the distributed storage system are verified by recalculating the Merkle tree root hash and comparing it with the records in the storage certificate. After successful verification, a new electronic prescription book is created on the blockchain. This electronic prescription book contains the registered patient's identity identifier, content-addressed hash fingerprint, creation timestamp, and initial state value. The internal data structure of the electronic prescription book is initialized, including a prescription record index table built based on the Merkle tree and an initially empty dynamic authorization policy matrix. The corresponding state initialization proof is generated, resulting in an electronic prescription data package bound to the registered patient. Finally, the complete electronic prescription data package is submitted to the blockchain distributed ledger, and the newly created electronic prescription data package serves as the basic identity credential and data access entry point for the corresponding registered patient to participate in subsequent prescription management business.

[0026] In step 102, the electronic prescription data packet is distributed and stored in a multi-node manner based on a permissioned consortium blockchain to obtain an encrypted data packet stored in a dedicated blockchain channel. Then, an authorization smart contract is authorized on the patient's end on the blockchain, and an original authorization token with time expiration is generated based on the encrypted data packet and associated with the doctor's public key.

[0027] In some embodiments, reference Figure 2 The figure is a flowchart illustrating the operation of determining encrypted data packets according to some embodiments of this application. In this application, the encrypted data packets stored in the blockchain dedicated channel are obtained by performing multi-node distributed storage based on a permissioned consortium blockchain on the electronic prescription data packets. This can be achieved by the following steps: Based on the electronic prescription data packet, attribute-based encryption based on the public key set of medical alliance members is performed to generate policy-consistent ciphertext that conforms to the multi-party secure sharing rules; The policy-consistent encrypted text is distributed to the dedicated prescription management channel through a dynamic channel creation mechanism. The endorsement-ordered hybrid consensus mechanism verifies and sorts data transactions within the prescription management dedicated channel, thereby completing state synchronization and obtaining encrypted data packets stored in the blockchain dedicated channel.

[0028] In specific implementation, the generation of policy-consistent ciphertext that conforms to multi-party secure sharing rules by performing attribute-based encryption based on the public key set of medical alliance members on the electronic prescription data packet can be achieved in the following way: An attribute-based encryption algorithm can be used, with the identity information of medical alliance members as the encrypted attribute set. Logical conditions for data decryption are defined through an access policy tree. The structured data in the electronic prescription data packet is converted into a standardized data format. The master key of the attribute-based encryption algorithm is used to encrypt the data, generating an initial ciphertext component. Then, according to a preset access policy, the public key information of medical alliance members is embedded into the ciphertext structure to form a policy-consistent ciphertext that conforms to multi-party secure sharing rules. The encryption process integrates a data integrity protection mechanism, generating a data integrity check value through a hash algorithm to ensure that the ciphertext is not tampered with during subsequent transmission and processing. Furthermore, the entire encryption operation is completed in a trusted execution environment, ensuring the security of the key material and the verifiability of the encryption process. Finally, the policy-consistent ciphertext serves as the data input source for the channel distribution phase. This policy-consistent ciphertext is generated based on attribute-based encryption technology and features fine-grained access control policies. It dynamically binds data encryption with access permissions, enabling one-time encryption and multi-party decryption according to the policy, thereby avoiding the risks of repeated encryption and key transmission in traditional schemes.

[0029] It should be noted that the dynamic channel creation mechanism in this application is a technical method for constructing logically isolated data channels on demand based on a permissioned consortium blockchain architecture. Its core function is to dynamically construct independent privacy-protected subnets for designated medical participants in a unified physical blockchain network environment according to the specific business needs of prescription circulation. By configuring channel member policies, access control rules and data encryption parameters in real time, it can achieve secure sharing of prescription data among authorized hospitals, pharmacies and regulatory agencies, while strictly isolating the data access boundaries between different prescription businesses. This ensures the scalability and flexibility of cross-institutional data collaboration while protecting the privacy of medical data.

[0030] In specific implementation, the distribution of the policy-consistent ciphertext to the dedicated prescription management channel through a dynamic channel creation mechanism can be achieved in the following way: First, a channel configuration policy can be formulated based on medical business needs, clarifying the identity permissions and data access rules of the channel participants; then, a channel configuration block containing a list of member organizations, anchor node configurations, and access control policies is generated through the channel configuration manager, and the sorting service is used to distribute and synchronize the configuration information of the system channel. During the channel initialization phase, each participating organization starts the corresponding node service according to the channel configuration information, establishes a point-to-point network communication connection, and forms an isolated dedicated prescription management channel network environment. The policy-consistent ciphertext is transmitted through the channel data transmission. The input interface is injected into a dedicated channel, and a data replication mechanism is established among the nodes within the channel to ensure that all authorized nodes can obtain a complete data copy. During the channel creation process, a data privacy protection mechanism is also established. Through channel-level data isolation, it is ensured that prescription information is shared only among authorized organizations. Finally, the configured prescription management dedicated channel serves as an isolated execution environment for data consensus verification. The prescription management dedicated channel is a logically isolated data channel built on a permissioned consortium blockchain specifically for prescription management. This dedicated channel can establish an independent privacy protection domain for prescription data in a physically shared blockchain network, ensuring that medical business data flows securely among authorized organizations and remains invisible to the outside world.

[0031] In specific implementation, the verification and sorting of data transactions within the prescription management dedicated channel based on the endorsement-ordering hybrid consensus mechanism, thereby completing state synchronization and obtaining encrypted data packets stored in the blockchain dedicated channel, can be achieved in the following way: First, the endorsement policy verification phase requires that transactions storing policy-consistent ciphertext must obtain endorsement signatures from a preset number of organizational nodes. Each endorsement node simulates the execution of transactions and generates read-write set verification results. Verified transactions are submitted to the sorting service node for global sorting according to time order and transaction hash, eliminating state discrepancies between different nodes. Then, the sorted transaction batches are packaged into new data blocks and broadcast within the prescription management dedicated channel through a block distribution protocol. Each organization... After receiving a new block, the ledger node executes a multi-stage state verification process, including transaction validity checks, read-write set conflict detection, and endorsement policy compliance verification, ensuring that all transactions comply with preset business rules. The verified block is then appended to the local blockchain ledger, while the world state database is updated. A state replication mechanism ensures the consistency of data states across all nodes within the channel, resulting in an encrypted data packet stored in the dedicated blockchain channel that has undergone complete consensus verification. This encrypted data packet is a globally consistent distributed ledger formed within the dedicated blockchain channel. It provides an immutable storage basis for encrypted prescription data, and the ledger's state synchronization mechanism ensures that all authorized nodes obtain a consistent data view in real time.

[0032] It should be noted that the endorsement and ordering hybrid consensus mechanism in this application is a distributed consensus protocol designed based on a permissioned consortium blockchain architecture that separates transaction endorsement verification from transaction ordering. Its core function is to decouple the business logic verification of prescription data transactions from transaction order consensus into two independent stages. First, the designated endorsement node verifies the legality of the smart contract execution result and signs and endorses it. Then, the dedicated ordering node arranges the endorsed transactions in chronological order and packages them into blocks. Finally, while ensuring that prescription operations comply with medical business rules, it achieves high throughput and strong consistency of the distributed system, thereby effectively solving the balance problem between business compliance verification and system performance efficiency in medical data sharing scenarios.

[0033] In some embodiments, the process of generating an original authorization token associated with the doctor's public key and having an expiration date through a patient-side authorization smart contract on the blockchain, based on the encrypted data packet, can be achieved through the following steps: A structured authorization request is initiated to the patient's end via a smart contract authorized through the patient's digital agent; After verifying the patient's digital signature in the structured authorization request through the patient-side authorization smart contract, a minimum access policy for data access is generated based on the encrypted data packet. The least privilege access policy is cryptographically bound to the authorization time window in the structured authorization request to generate a standardized original authorization token. The original authorization token is encrypted using the doctor's asymmetric encryption public key to obtain an original authorization token that is associated with the doctor's public key and has a time limit.

[0034] It should be noted that in this application, the patient digital agent is secure client software running on the patient's mobile terminal or in a trusted computing environment. As a unified management terminal for the patient's digital identity and medical data sovereignty, it provides end-to-end cryptographic support for the prescription authorization process by securely storing the patient's asymmetric encryption key pair and decentralized identity identifier. It not only digitally signs authorization requests to confirm their authenticity and integrity but also interacts with blockchain smart contracts through standardized interfaces, encapsulating complex cryptographic operations into simple user interactions. Ultimately, while ensuring that the patient's private key never leaves the local secure environment, it enables the patient to access prescription data. Fine-grained control of permissions and convenient authorization management; the patient-side authorization smart contract is an autonomous program code deployed on the medical consortium blockchain. Its core function is to build a trusted authorization intermediary between patients and medical data users. It verifies the authenticity of the authorization intention by verifying the patient's digital signature, verifies the ownership of the patient's data by querying the encrypted data packet, and automatically generates a least-privilege access policy based on preset rules. Finally, it produces an encrypted original authorization token, thereby transforming the cumbersome manual authorization approval process in traditional medical scenarios into an immutable, clearly defined, and automatically executed digital protocol. While protecting the patient's privacy sovereignty, it greatly improves the efficiency and security of prescription data sharing.

[0035] In specific implementation, initiating a structured authorization request to the patient-side authorization smart contract through the patient's digital agent can be achieved in the following way: First, the patient's digital agent initiates a structured authorization request to the patient-side authorization smart contract. This structured authorization request includes: the doctor's asymmetric encryption public key, the authorization time window, and the patient's digital signature, assembled according to a predefined data structure, containing necessary fields such as request headers, business parameters, and digital signatures, ensuring that the system can correctly parse and process each parameter; then, the patient's digital agent uses the patient's private key to perform digital signature calculation on the request parameters in a local secure environment, ensuring the integrity and non-repudiation of the request; finally, the structured authorization request is transmitted to the patient-side authorization smart contract through the application programming interface of the blockchain network. During transmission, an end-to-end encryption protection mechanism can be used to prevent data leakage. The structured authorization request is a standardized authorization application data packet conforming to a predefined format, containing the doctor's asymmetric encryption public key, the authorization time window, and the patient's digital signature. This structured authorization request can standardize complex medical authorization parameters, providing a unified and parsable input interface for the automated processing of smart contracts.

[0036] In specific implementation, after verifying the patient's digital signature in the structured authorization request through the patient-side authorization smart contract, the least privilege access strategy for data access based on the encrypted data packet can be implemented in the following way: Upon receiving the structured authorization request, the patient-side authorization smart contract first performs a standardization check on the request format, including field integrity checks and data format verification. Then, it uses the structured authorization request that passes the initial verification as input data for digital signature verification. The digital signature verification process uses the patient's public key to decrypt the signature value and compares it with the hash value of the request data to ensure that the request indeed originates from a legitimate patient identity and has not been tampered with. After successful verification... The patient authorizes a smart contract to query encrypted data packets on the blockchain to obtain the ownership status and usage permission configuration of the patient's electronic prescription data packets. Based on the query results and the patient's specific authorization requirements, the policy engine adopts an attribute-based access control model to combine the patient's medical needs with data security requirements, generating a least-privilege access policy for data access. The least-privilege access policy is a refined permission rule that specifies the scope of data that can be accessed, the types of operations that can be performed, and related constraints during the data access process. This least-privilege access policy follows the principle of minimizing permissions, which can meet the needs of diagnosis and treatment while minimizing the risk of exposure of the patient's privacy data.

[0037] In specific implementation, the least privilege access policy is cryptographically bound to the authorization time window in the structured authorization request to generate a standardized original authorization token. This can be achieved in the following way: Digital signature technology can be used to inseparably associate the least privilege access policy with the authorization time window in the structured authorization request, ensuring that the authorization automatically expires after the time window ends. Specifically, the least privilege access policy is first serialized into a standard data format, and then combined with the authorization time window parameters to form a data block to be signed. The patient's digital agent uses the patient's private key to perform digital signature calculation on the data block, generating a legally valid electronic signature to sign the data block. The signed data block is then encapsulated according to the standard format of the authorization token to obtain a standardized original authorization token. The original authorization token is a basic authorization credential signed by the patient's digital signature, containing components such as a token header, policy payload, and digital signature. This original authorization token cryptographically solidifies the patient's authorization intention and can provide trusted source data for the subsequent generation of encrypted tokens.

[0038] It should be noted that in this application, the original authorization token is the final authorization credential encrypted with the doctor's public key. This original authorization token can ensure that prescription data can only be accessed by the target doctor through encrypted binding, thereby protecting the confidentiality of the authorization credential during transmission and storage. Specifically, the original authorization token is encrypted using the doctor's asymmetric encryption public key to obtain an original authorization token associated with the doctor's public key and with a time limit. This can be achieved in the following way: during the encryption process, a randomly generated symmetric key can be used to encrypt the token data, and then the public key extracted from the doctor's digital certificate can be used to encrypt and protect the original authorization token, forming a hybrid encryption security system to ensure that only the doctor holding the corresponding private key can decrypt and obtain the token content. After encryption, the integrity verification calculation is performed on the encrypted data to generate a verification value for data verification during subsequent decryption, and the encrypted original authorization token is used as the original authorization token associated with the doctor's public key and with a time limit.

[0039] In step 103, the doctor's access request for the patient's electronic prescription is obtained. On-chain multi-factor authentication is performed based on the original authorization token and the digital identity certificate in the access request to obtain the authentication result. Through the prescription circulation smart contract on the blockchain, prescription data read and write operations are performed on the verified access request according to the authentication result, thereby generating an immutable operation record chain.

[0040] It should be noted that in this application, the access request is a structured data packet containing encrypted identity credentials and operational intent, initiated by the doctor to the blockchain network after obtaining authorization from the patient. This access request can integrate the three independent processes of traditional identity authentication, authorization verification, and business operation into a one-time on-chain atomic operation, thereby significantly improving the efficiency and reliability of prescription circulation while ensuring the security of medical data. In specific implementation, obtaining the doctor's access request to the patient's electronic prescription can be achieved in the following way: the doctor can initiate the access request process through the authenticated digital identity credentials he holds, and initiate an access request to the blockchain network through a secure medical data access interface; in the request assembly stage, the encrypted authorization token obtained by the doctor in the previous authorization process, the digital identity certificate issued by a legitimate certificate authority, and the data packet containing encrypted identity credentials and operational intent can be assembled. A complete access request data packet is formed by structurally encapsulating the millisecond request timestamp and the access operation type for the specified electronic prescription data packet. This access request data is then transmitted to the prescription circulation smart contract deployed in the permissioned consortium blockchain network via the blockchain client's application programming interface. During this process, a transport layer security protocol can be used to ensure the integrity and confidentiality of the data transmission. After receiving the access request data packet, the prescription circulation smart contract performs a standardization check on the request format of the access request data packet, including verifying the completeness of required fields, the compliance of data format, and the consistency of basic logic, to ensure that the request conforms to the preset business rules. The access request data packet that has passed the integrity check is then temporarily stored in the blockchain's pending transaction pool and serves as the doctor's access request for the patient's electronic prescription.

[0041] In some embodiments, on-chain multi-factor authentication based on the original authorization token and the digital identity certificate in the access request can be achieved by the following steps: Obtain the doctor's digital identity certificate from the access request and check the validity of the digital identity certificate through the on-chain certificate verification service; The encrypted authorization token is decrypted using the doctor's private key to obtain the original authorization token; The original authorization token is associated and matched with the digital identity certificate to obtain a composite verification assertion that includes identity authenticity and scope of permissions; The validity period of the original authorization token is verified based on the timestamp in the access request, and then the identity verification result is generated by combining the composite verification assertion.

[0042] It should be noted that in this application, the on-chain certificate verification service is a decentralized identity verification infrastructure deployed on the medical consortium blockchain. Its core function is to replace the traditional centralized certificate authority verification mechanism. Through smart contracts, it automatically executes the full lifecycle verification of digital certificates. Specifically, it verifies the credibility of the certificate issuer by querying the certificate registry on the blockchain, ensures the certificate is valid by synchronously updating the certificate revocation list in real time, and compares the certificate validity period with the blockchain timestamp. Ultimately, it provides real-time, transparent, and tamper-proof proof of identity for prescription data access without relying on third-party certification authorities, fundamentally eliminating the risk of illegal entities impersonating medical identities to access sensitive prescription data.

[0043] In specific implementation, obtaining the doctor's digital identity certificate in the access request and verifying its validity through the on-chain certificate verification service can be achieved in the following way: the on-chain certificate verification service deployed on the blockchain can be invoked to perform multi-dimensional checks on the validity of the doctor's digital identity certificate in the access request. This includes verifying whether the issuer of the digital identity certificate is a trusted certificate authority, ensuring the integrity of the certificate chain, querying the certificate revocation list, or checking in real time through an online status protocol whether the digital identity certificate has been revoked. Simultaneously, the validity period of the digital identity certificate is compared with the current blockchain time. Finally, the verified valid digital identity certificate is used as the basic credential for subsequent permission matching. The digital identity certificate is an electronic credential issued by a trusted certificate authority to prove the doctor's legal practice status. This digital identity certificate provides a credible and standardized identity carrier for on-chain identity verification, ensuring the authenticity and legality of the prescription operator's identity.

[0044] In specific implementation, the encrypted authorization token is decrypted based on the doctor's private key to obtain the original authorization token. This can be achieved in the following way: After confirming the validity of the digital identity certificate, the encrypted authorization token can be decrypted to restore its original content and obtain the original authorization token. During the decryption process, the asymmetric decryption private key paired with the public key of the access requester (i.e., the doctor) can be used for calculation and executed in a secure cryptographic environment to ensure that the key material is not leaked. After successful decryption, the obtained original authorization token can be structurally parsed and digitally signed to confirm that the original authorization token has not been tampered with during transmission and storage and was indeed issued by a legitimate patient-end authorized smart contract, thereby obtaining a standardized authorization token that can be further parsed and is genuinely valid.

[0045] In specific implementation, associating and matching the original authorization token with the digital identity certificate to obtain a composite verification assertion containing identity authenticity and permission scope can be achieved in the following way: the minimum access policy set by the patient carried in the original authorization token can be associated and matched with attributes such as the doctor's professional role, affiliated institution, and clinical permissions embedded in the digital identity certificate. That is, an attribute-based access control model is used to perform logical operations to determine whether the doctor's identity role meets the conditions set in the access policy, such as whether he / she is the attending physician specified in the token, thereby generating a composite verification assertion that simultaneously contains identity authenticity determination and specific permission scope. The composite verification assertion is an intermediate verification conclusion generated after associating and matching the doctor's identity attributes with the patient's authorization policy. This composite verification assertion can integrate the scattered identity verification and permission verification results into a unified judgment basis, providing complete contextual information for the final authorization decision.

[0046] It should be noted that in this application, the identity verification result is the final judgment generated after comprehensively considering the authenticity of the doctor's identity, the degree of permission matching, and the validity of the timeliness of the request to access the patient's prescription data. This identity verification result integrates three judgment dimensions: verification status, permission scope, and timeliness status. As the sole authorization basis for whether the prescription circulation smart contract will execute subsequent data read and write operations, it can provide a structured judgment conclusion with multiple security dimensions for prescription data access control, ensuring that each data operation is based on a complete trust chain assessment. In specific implementation, the validity period of the original authorization token is verified based on the timestamp in the access request, and then combined with... The composite verification assertion can generate the authentication result in the following way: the validity period of the original authorization token can be verified based on the precise timestamp carried in the access request to ensure that the current time is within the valid time window of the patient's authorization. This time verification mechanism is combined with the aforementioned composite verification assertion and input into the final authentication result generation logic. That is, if the original authorization token is within the validity period and the composite assertion determines that the identity is genuine and the permissions match, then a "verification passed" result is generated; otherwise, if any condition is not met, a "verification failed" result is generated and the specific reason for failure is recorded. Finally, a structured authentication result is output.

[0047] In some embodiments, reference Figure 3 The diagram is an exemplary flowchart illustrating the determination of an operation record chain according to some embodiments of this application. In this application, the prescription data read and write operations are performed based on the authentication result of the prescription transfer smart contract on the blockchain, thereby generating an immutable operation record chain. This can be achieved through the following steps: In step 1031, the authorization permission set in the identity verification result is parsed through the prescription circulation smart contract, thereby generating the corresponding on-chain data operation transaction; In step 1032, the on-chain prescription operation transaction is executed and each data operation in the on-chain prescription operation transaction is authenticated, thereby constructing a structured operation record unit corresponding to each data operation; In step 1033, hierarchical hash aggregation is performed on all structured operation record units to generate a block integrity proof; In step 1034, the cryptographic proof of the block body integrity is anchored to the block header of the new block, and the new block is connected with the existing blockchain to form an immutable operation record chain.

[0048] In specific implementation, the generation of corresponding on-chain data operation transactions by parsing the authorization permission set in the identity verification result through the prescription circulation smart contract can be achieved in the following way: During the prescription data read and write operation phase, the prescription circulation smart contract first performs structured parsing of the authorization permission set in the identity verification result, identifies the authorized data access scope and executable operation type, and then generates the corresponding on-chain prescription operation transaction based on the parsing result. This transaction contains the allowed access electronic prescription data fields and executable operations, such as reading, issuing, or status updating, as well as related constraints. The on-chain data operation transaction transforms complex medical data operations into atomic operation instructions for indivisible blockchain transactions. This data operation transaction ensures that each prescription read and write strictly follows the authorized scope and has transaction consistency.

[0049] In specific implementation, the execution of the on-chain prescription operation transaction and the authentication of each data operation within the on-chain prescription operation transaction, thereby constructing a structured operation record unit corresponding to each data operation, can be achieved in the following way: An authorized node in the blockchain network can execute the on-chain prescription operation transaction. During execution, read and write operations are performed on the encrypted prescription data copy, and the identity of the initiator of each data operation is verified through a digital signature mechanism to ensure the legitimacy of the operation source. After each data operation is completed, key elements such as operation type, timestamp, executor identity, operation object identifier, and data state change snapshot are captured. These key elements are then encapsulated into a structured operation record unit according to a predefined structure, resulting in a structured operation record unit for each data operation. The structured operation record unit is a standardized data block that encapsulates all dimensions of information for a single data operation. This structured operation record unit can create a complete file for each prescription operation, including the operation context, executor identity, and data change status, enabling refined auditing and tracing of the operation behavior.

[0050] In specific implementation, hierarchical hash aggregation is performed on all structured operation record units to generate a block integrity proof. This can be achieved in the following way: an incremental Merkle tree structure can be used to perform hierarchical hash aggregation on all structured operation record units. Specifically, each operation unit is treated as a leaf node, and its hash value is calculated. Adjacent node hashes are merged through recursive hash operations to generate the parent node hash, until a single Merkle tree root hash value is finally formed. This root hash value is then used as the block integrity proof. The block integrity proof is a Merkle tree root hash value that provides an independently verifiable cryptographic digest for all operation records within the block. This block integrity proof enables efficient batch verification and ensures that any record tampering will be detected immediately.

[0051] It should be noted that in this application, the operation record chain is an immutable record sequence of operations performed on prescription data. This operation record chain is arranged in chronological order and cryptographically linked, providing a legally valid and credible operation history for the lifecycle of prescription data. Specifically, the cryptographic anchoring of the block body integrity proof to the block header of the new block and connecting the new block with the existing blockchain to form an immutable operation record chain can be achieved in the following way: the block body integrity proof can be written into the block header data structure of the new block, completing the cryptographic anchoring of the integrity proof and the block header, so that any tampering with the operation record unit will cause a change in the root hash value and thus be detected. Then, the new block is connected with the existing blockchain in chronological order to form a linked chain structure, thereby obtaining an immutable operation record chain.

[0052] In step 104, the operation record chain is captured and hashed in real time through a blockchain event monitoring service to ensure the traceability and non-repudiation of the prescription data sharing process.

[0053] In some embodiments, the real-time event capture and hash anchoring of the operation record chain through a blockchain event monitoring service to ensure the traceability and non-repudiation of the prescription data sharing process can be achieved through the following steps: The operation record chain is monitored in real time by an event-driven listening engine deployed on the blockchain node to capture key business event flows. Structured event logs are generated based on the aforementioned key business event streams; The structured event logs are synchronized and hashed using a distributed timestamp service, thereby forming a tamper-proof audit trail for the entire lifecycle of prescriptions.

[0054] In specific implementation, an event-driven listening engine deployed on blockchain nodes monitors the operation record chain in real time to capture key business event streams. This can be achieved as follows: the event-driven listening engine employs an asynchronous event processing architecture, continuously scanning newly generated operation record chain blocks in the blockchain network. It identifies key business operations related to prescription management through predefined event triggering rules, including prescription creation events, permission change events, and drug dispensing events. Upon detecting a target event, the event-driven listening engine immediately captures a complete event data packet, including the event type, trigger block height, transaction hash, and addresses of relevant participants. The event data packet undergoes preliminary filtering and deduplication to obtain a clean key business event stream. This key business event stream is a continuous sequence of events reflecting changes in the core operations of prescription data, captured in real time from the operation record chain. This key business event stream enables real-time perception and monitoring of all key business activities throughout the prescription lifecycle, providing complete original event material for subsequent auditing.

[0055] In specific implementation, generating structured event logs based on the key business event flow can be achieved in the following way: Business-meaning feature dimensions can be extracted from the business event flow, including: operation type features, participant identity features, time features, and data object features. These features are standardized and reconstructed according to a unified data format and encoding rules, assembling into structured log entries. Each entry contains complete event description information and adds management information, such as log sequence number and version identifier, ultimately generating a standardized, machine-readable structured event log. The structured event log is a unified format record representing changes in the core operations of prescription data. This structured event log transforms heterogeneous operation events into a standardized, machine-readable data format, providing standardized input data for subsequent hash calculations and anchoring processing.

[0056] In specific implementation, the structured event logs are synchronized and hashed using a distributed timestamp service to form a tamper-proof prescription lifecycle audit trail. This can be achieved as follows: First, a consensus-based timestamp service assigns authoritative, non-repudiable time proofs to the structured event logs. Then, a cryptographic hash algorithm processes the timestamped structured event logs to generate a unique event hash value for each event. Next, each event hash value is anchored to its corresponding unique drug traceability code to establish an inseparable association, forming hash-traceability code pairing data. This pairing data is then packaged into a new blockchain network in chronological order by the sorting service nodes. The newly generated audit blocks are then synchronized to the dedicated audit nodes of medical regulatory agencies in real time via a peer-to-peer network protocol. This ensures that regulatory agencies can obtain complete prescription operation records in real time. By leveraging the chain structure and cryptographic characteristics of blockchain, a tamper-proof audit trail is constructed across the entire chain from drug production and prescription issuance to drug dispensing. Ultimately, this forms a trustworthy audit system for the entire lifecycle of prescriptions with legal evidentiary value. The prescription lifecycle audit trail refers to an immutable record sequence formed by anchoring all event hash values ​​and drug traceability codes. This prescription lifecycle audit trail can construct a tamper-proof evidence chain from prescription creation to drug dispensing, providing a complete and legally valid evidence system for regulatory audits and dispute tracing.

[0057] In another aspect, in some embodiments, this application provides a pharmaceutical prescription management system, which includes a data security management unit, as referenced. Figure 4 The figure is a schematic diagram of the structure of a data security management unit according to some embodiments of this application. The data security management unit 400 includes: an acquisition module 401, a processing module 402, and an execution module 403, which are described below: The acquisition module 401 in this application is mainly used to acquire the identity identifier and prescription-related attribute set of the registered patient through the encrypted registration process, and then generate an electronic prescription data packet bound to the registered patient. Processing module 402, in this application, is mainly used to perform multi-node distributed storage of the electronic prescription data packet based on a permissioned consortium blockchain, obtain an encrypted data packet stored in a dedicated blockchain channel, and then authorize a smart contract on the patient's end on the blockchain, and generate an original authorization token associated with the doctor's public key and with a time limit based on the encrypted data packet; It should be noted that the processing module 402 in this application is also used to obtain the doctor's access request to the patient's electronic prescription, perform on-chain multi-factor authentication based on the original authorization token and the digital identity certificate in the access request, obtain the authentication result, and perform prescription data read and write operations for the verified access request through the prescription circulation smart contract on the blockchain according to the authentication result, thereby generating an immutable operation record chain. The execution module 403 in this application is mainly used to perform real-time event capture and hash anchoring on the operation record chain through the blockchain event listening service to ensure the traceability and non-repudiation of the prescription data sharing process.

[0058] The modules in the aforementioned prescription management system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0059] In another embodiment, this application provides a computer device, which may be a server, and its internal structure diagram may be as follows. Figure 5 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data for a blockchain-based method for secure management of pharmaceutical prescription data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program can implement a blockchain-based method for secure management of pharmaceutical prescription data.

[0060] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0061] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described embodiment of the blockchain-based pharmaceutical prescription data security management method.

[0062] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps described in the above embodiment of the blockchain-based pharmaceutical prescription data security management method.

[0063] In one embodiment, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps described in the embodiment of the blockchain-based pharmaceutical prescription data security management method.

[0064] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0065] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0066] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A blockchain-based method for secure management of pharmaceutical prescription data, which applies blockchain technology to perform hybrid encryption and dynamic authorization of prescription data in a pharmaceutical prescription management system to achieve secure sharing and trusted transfer, characterized in that: The method includes the following steps: The system obtains the identity information and prescription-related attribute set of registered patients through an encrypted registration process, and then generates an electronic prescription data package bound to the registered patients. The electronic prescription data packet is distributed and stored in a multi-node manner based on a permissioned consortium blockchain to obtain an encrypted data packet stored in a dedicated blockchain channel. Then, the patient-side authorization smart contract on the blockchain is used to generate an original authorization token that is associated with the doctor's public key and has a time limit based on the encrypted data packet. The system obtains the doctor's access request to the patient's electronic prescription, performs on-chain multi-factor authentication based on the original authorization token and the digital identity certificate in the access request, obtains the authentication result, and performs prescription data read and write operations for the verified access request through the prescription circulation smart contract on the blockchain, thereby generating an immutable operation record chain. The operation record chain is captured and hashed in real time through a blockchain event monitoring service to ensure the traceability and non-repudiation of the prescription data sharing process.

2. The method as described in claim 1, characterized in that, The encrypted registration process obtains the registered patient's identity and prescription-related attribute set, and then generates an electronic prescription data package bound to the registered patient. Specifically, this includes: The autonomous sovereign identity service generates decentralized identities for registered patients and issues verifiable digital credentials containing a set of prescription-related attributes. The verifiable digital credential is encrypted using the national cryptographic algorithm to generate ciphertext containing the patient's privacy attributes; The patient's privacy attributes are stored in encrypted form in a distributed storage system to obtain a content-addressable hash fingerprint; The electronic prescription is used to generate a smart contract that binds the content addressing hash fingerprint with the identity of the registered patient, thereby constructing an electronic prescription data package bound to the registered patient.

3. The method as described in claim 1, characterized in that, The electronic prescription data packet is distributed across multiple nodes based on a permissioned consortium blockchain to obtain an encrypted data packet stored in a dedicated blockchain channel. Specifically, this includes: Based on the electronic prescription data packet, attribute-based encryption based on the public key set of medical alliance members is performed to generate policy-consistent ciphertext that conforms to the multi-party secure sharing rules; The policy-consistent encrypted text is distributed to the dedicated prescription management channel through a dynamic channel creation mechanism. The endorsement-ordered hybrid consensus mechanism verifies and sorts data transactions within the prescription management dedicated channel, thereby completing state synchronization and obtaining encrypted data packets stored in the blockchain dedicated channel.

4. The method as described in claim 1, characterized in that, The process of authorizing a smart contract on the patient's end of the blockchain and generating an original authorization token associated with the doctor's public key and having a time limit based on the encrypted data packet specifically includes: A structured authorization request is initiated to the patient's end via a smart contract authorized through the patient's digital agent; After verifying the patient's digital signature in the structured authorization request through the patient-side authorization smart contract, a minimum access policy for data access is generated based on the encrypted data packet. The least privilege access policy is cryptographically bound to the authorization time window in the structured authorization request to generate a standardized original authorization token. The original authorization token is encrypted using the doctor's asymmetric encryption public key to obtain an original authorization token that is associated with the doctor's public key and has a time limit.

5. The method as described in claim 1, characterized in that, Based on the original authorization token and the digital identity certificate in the access request, on-chain multi-factor authentication is performed to obtain the authentication result, which specifically includes: Obtain the doctor's digital identity certificate from the access request and check the validity of the digital identity certificate through the on-chain certificate verification service; The encrypted authorization token is decrypted using the doctor's private key to obtain the original authorization token; The original authorization token is associated and matched with the digital identity certificate to obtain a composite verification assertion that includes identity authenticity and scope of permissions; The validity period of the original authorization token is verified based on the timestamp in the access request, and then the identity verification result is generated by combining the composite verification assertion.

6. The method as described in claim 1, characterized in that, Through a smart contract for prescription transfer on the blockchain, prescription data read and write operations are performed on access requests that have passed the identity verification based on the aforementioned identity verification result, thereby generating an immutable chain of operation records. Specifically, this includes: The prescription circulation smart contract parses the authorization permission set in the identity verification result, and then generates the corresponding on-chain data operation transaction. The on-chain prescription operation transaction is executed and each data operation in the on-chain prescription operation transaction is authenticated, thereby constructing a structured operation record unit corresponding to each data operation; Perform hierarchical hash aggregation on all structured operation record units to generate a block integrity proof; The cryptographic proof of the integrity of the block body is anchored to the block header of the new block, and the new block is connected with the existing blockchain to form an immutable chain of operation records.

7. The method as described in claim 1, characterized in that, To ensure the traceability and non-repudiation of prescription data sharing, the blockchain event monitoring service is used to capture events and hash the operation record chain in real time. This specifically includes: The operation record chain is monitored in real time by an event-driven listening engine deployed on the blockchain node to capture key business event flows. Structured event logs are generated based on the aforementioned key business event streams; The structured event logs are synchronized and hashed using a distributed timestamp service, thereby forming a tamper-proof audit trail for the entire lifecycle of prescriptions.

8. A pharmaceutical prescription management system, comprising a data security management unit, characterized in that, The data security management unit includes: The acquisition module is used to obtain the identity identifier and prescription-related attribute set of the registered patient through the encrypted registration process, and then generate an electronic prescription data package bound to the registered patient; The processing module is used to perform multi-node distributed storage of the electronic prescription data packet based on a permissioned consortium blockchain to obtain an encrypted data packet stored in a dedicated blockchain channel. Then, it authorizes the smart contract on the patient's end on the blockchain and generates an original authorization token associated with the doctor's public key and with a time limit based on the encrypted data packet. The processing module is used to obtain the doctor's access request to the patient's electronic prescription, perform on-chain multi-factor authentication based on the original authorization token and the digital identity certificate in the access request, obtain the authentication result, and perform prescription data read and write operations for the verified access request through the prescription circulation smart contract on the blockchain according to the authentication result, thereby generating an immutable operation record chain. The execution module is used to capture and hash-anchor the operation record chain in real time through the blockchain event listening service to ensure the traceability and non-repudiation of the prescription data sharing process.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the blockchain-based pharmaceutical prescription data security management method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the blockchain-based pharmaceutical prescription data security management method as described in any one of claims 1 to 7.