Decentralized identity label-based drug supply chain supervision method and system
By adopting a regulatory method based on decentralized identity identification in the drug supply chain and using blockchain and other technologies, problems such as data leakage and difficulty in real-time supervision in traditional drug supply chain systems have been solved, and the traceability and security of the drug are achieved throughout the process.
Patent Information
- Application Number
- CN202411701684.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Traditional drug supply chain systems have problems such as data leakage, information silos, difficulty in real-time supervision, difficulty in verifying the authenticity of drugs, and malicious participants, which affect the traceability and safety of drugs.
The drug supply chain supervision method based on decentralized identity identification (DID) is adopted, and the entire process traceability and security of drugs are achieved through the supervision steps of user registration, drug registration and circulation links, and technologies such as blockchain, IPFS, hashed and exogenous trees and smart contracts are used.
It effectively protects the privacy and security of drug transaction data, ensures the traceability of drugs, prevents the emergence of malicious participants, and improves the overall security and regulatory efficiency of the drug supply chain system.
Smart Images

Figure CN119722097A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a drug supply chain supervision method and system based on decentralized identity identification. Background Art
[0002] With the rapid development of information technology, emerging technologies such as blockchain, decentralized identity (DID), verifiable credentials (VC), and verifiable claims (VP) are increasingly being used in supply chain management, especially in the pharmaceutical industry, where drug traceability has become a key means of ensuring drug safety and quality. The pharmaceutical supply chain involves multiple participants, including pharmaceutical factories, distributors, pharmacies, consumers, hospitals, and regulatory agencies. Traditional pharmaceutical supply chain systems often rely on centralized data management methods, which have problems such as information islands and data tampering. Therefore, how to use decentralized technology to ensure the traceability and safety of drugs has become an urgent problem to be solved.
[0003] In the traditional pharmaceutical supply chain, the following four key issues are usually faced: ① In the entire process from drug production to sales, each node (pharmaceutical factory, distributor, pharmacy) will record relevant transaction and identity information. However, these sensitive information often lack effective privacy protection measures and are easily stolen by criminals, resulting in data leakage problems. Such data leakage will not only damage the reputation of the company, but also threaten public health. ② The traditional pharmaceutical supply chain system lacks an effective regulatory mechanism, making it difficult to conduct real-time supervision of each link in the supply chain. When problems occur in the supply chain (such as counterfeit drugs, illegal sales), it is difficult for regulators to trace the responsible party, resulting in an increased risk of counterfeit drugs entering the market. ③ When consumers and downstream distributors purchase drugs, it is often difficult to verify the authenticity of the drug information. In the existing system, drug information is easily tampered with, allowing counterfeit drugs and expired drugs to enter the market, seriously threatening the health and safety of consumers. ④ There may be malicious participants in the supply chain, such as illegal distributors and counterfeit manufacturers. These criminals may defraud profits by forging identity information or tampering with transaction records, thereby disrupting the order of the drug market. Summary of the invention
[0004] The purpose of the present invention is to provide a drug supply chain supervision method and system based on decentralized identity identification, so as to improve the problems existing in the prior art that data is easily leaked and the drug supply link cannot be traced.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] In a first aspect, the present invention provides a drug supply chain supervision method based on decentralized identity identification, including a user registration step, a drug registration step, and a circulation link supervision step;
[0007] In the user registration step, each participating client generates its own decentralized identity DID and DID document, and obtains a verifiable certificate VC signed by the regulator; the participating clients include pharmaceutical factory clients, distributor clients, pharmacy clients, and hospital clients;
[0008] In the drug registration step, the pharmaceutical factory client generates a decentralized identity DID for each batch of drugs. med 、DID med Documentation and VC med ;
[0009] In the circulation link supervision step, the buyer's client generates a one-time traceable address and a buyer's verifiable statement VP, and the buyer's verifiable statement VP is generated by selectively disclosing information through a hash XOR tree structure using the buyer's verifiable certificate VC; the seller's client verifies the validity of the one-time traceable address, the integrity of the buyer's verifiable statement VP, and the validity of the signature in the buyer's verifiable statement VP. If all the verifications are passed, the seller's verifiable certificate VC is used to generate the seller's verifiable statement VP through a hash XOR tree structure and sends it to the buyer's client. The buyer's client verifies the integrity of the seller's verifiable statement VP, and after the verification is passed, the seller's client is notified to update VC med The transaction field in .
[0010] In the embodiment of the present invention, the user registration step includes the following steps:
[0011] S11, each participating client generates its own public and private key pair;
[0012] S12, each participating client generates its own DID i and DID i Documents, DID i Document contains DID i , Public Key PK i , verify the method and service endpoint information, and then DID i The document is first uploaded to the IPFS system so that the IPFS system can generate a content identifier CID i , then CID i With DID i Upload to blockchain, where CID i It is DID i The hash value corresponding to the document;
[0013] S13, each participating client sends an application for a verifiable certificate VC to the regulatory client i The request includes the DID generated by the client of the participant i Documents, registration informationinfoi , Sign the application data with a private key;
[0014] S14, after receiving the request, the regulatory client verifies the DID i DID in Documents i Whether it has been registered in the blockchain, verify whether the signature of the application data is correct, and verify the registration information info i If all the above verifications are passed, the supervisory client returns VC to the participating client. i , VC i Contains the registration information of the participants i , DID of the participant, DID of the supervisor, permission statement, root i, And the signature of the supervisor, where the supervisor's signature includes the root i Signature and registration information of the participants i Signature of root i The registration information of the participants is i The information attributes in the final root value generated by the hash XOR tree structure;
[0015] S15, each client of the participating party receives VC i After that, they are stored in their respective identity wallets.
[0016] In the above scheme, not only the user registration of each participant is realized, the corresponding public and private key pairs, DID documents, and verifiable certificates VC are generated, but also signatures are performed to ensure the authenticity and integrity of the information and ensure information security.
[0017] The drug registration process includes the following steps:
[0018] S21, every time a batch of drugs is produced, the pharmaceutical factory client generates a unique identifier DID for each batch of drugs through the identity wallet med and DID med Documents, DID med Document contains DID med , the pharmaceutical factory's public key, verification method and service endpoint, and DID med The document is uploaded to the IPFS system so that the IPFS system can generate a CID med , and then CID med Upload to blockchain;
[0019] S22, pharmaceutical factory client based on DID med Generate VC for pharmaceutical products med , VC of medicines med Record DID medAs well as drug information, timestamp, and the root generated by the hash XOR tree structure with drug information as the attribute med , Use the pharmaceutical factory private key to root med and signatures for all messages;
[0020] S23, the pharmaceutical factory client sends the signed drug VC med Upload to blockchain.
[0021] The circulation link supervision step includes the supervision sub-steps from the pharmaceutical factory to the distributor, the supervision sub-steps from the distributor to the pharmacy, and the supervision sub-steps from the pharmacy to the consumer; wherein the supervision sub-steps from the pharmaceutical factory to the distributor include the following steps:
[0022] S31, in the process of drugs flowing from the pharmaceutical factory to the distributor, the distributor client generates a one-time traceable address addr3 = {pk_addr3, R3, r3} and a private key sk_addr3 corresponding to the one-time traceable address, where pk_addr3 is the public key corresponding to the one-time traceable address, and r3 is a random number;
[0023] S32, the dealer client selectively discloses the dealer's verifiable certificate VC3 through a hash XOR tree structure, selects the fields to be disclosed, the verification path and the root root3, and generates a verifiable statement VP3 based on the disclosed information. VP3 contains the signature of the dealer client using the dealer's private key;
[0024] S33, when purchasing drugs, the distributor uses the one-time traceable address addr3 and sends the one-time traceable address addr3, VP3 and random number r3 to the pharmaceutical factory client;
[0025] S34, after receiving the information from the distributor client, the pharmaceutical factory client verifies the validity of the one-time traceable address addr3, the integrity of VP3 and the validity of the signature in VP3. If the verification is successful, the pharmaceutical factory client checks whether it has produced the drug corresponding to the disclosure field. If so, the pharmaceutical factory client generates a verifiable statement VP2 from the pharmaceutical factory's VC2 through a hash XOR tree structure. VP2 contains production license, sales license, drug information and a signature made with the pharmaceutical factory's private key, and VP2 and DID med Sent to the distributor client; if the verification fails or the pharmaceutical factory does not have the corresponding drug, the transaction is terminated;
[0026] S35, the distributor client verifies the integrity of VP2. If the verification is successful, the pharmaceutical factory client is notified to upload the transaction information to the smart contract, and the smart contract automatically updates the drug VC. med Transaction field in the VC med and DIDmed The document is uploaded to the blockchain; if verification fails, the transaction is terminated.
[0027] The pharmacy-to-consumer supervision sub-step includes the following steps:
[0028] S51, the consumer client generates a one-time traceable address addr5 = {pk_addr5, R5, r5}, a private key sk_addr5 and DID5 corresponding to the one-time traceable address;
[0029] S52, determine whether the medicine to be purchased is a prescription drug. If it is a prescription drug, the consumer client submits its own DID5, registration information info5 encrypted with the hospital public key, one-time traceable address addr5, and the signature of the application data with the consumer private key to the hospital client, and then proceeds to step S53; if it is an over-the-counter drug, proceed to step S56;
[0030] S53, the hospital client determines whether the consumer has the authority to purchase prescription drugs, and after determining that the consumer has the authority to purchase prescription drugs, sends a verifiable certificate VC5 representing that the consumer can purchase prescription drugs to the consumer client, and then enters step S54; if it is determined that the consumer does not have the authority to purchase prescription drugs, the transaction is terminated;
[0031] S54, the consumer client generates a verifiable statement VP5 based on the information disclosed in VC5, and sends VP5, a one-time traceable address addr5, and a random number r5 to the pharmacy client, and then proceeds to step S55;
[0032] S55, the pharmacy client verifies the validity of the one-time traceable address addr5, the integrity of VP5, and the validity of the signature in VP5, and after verification, sends the pharmacy client's VP4 and the drug DID med Send to the consumer client, and then go to step S58;
[0033] S56, the consumer client sends the one-time traceable address addr5 and the random number r5 to the pharmacy client, and then proceeds to step S57;
[0034] S57, the pharmacy client verifies the validity of the one-time traceable address addr5, and after verification, sends the pharmacy client’s VP4 and the drug DID med Send to the consumer client, and then go to step S58;
[0035] S58, the consumer client verifies the integrity of the pharmacy's VP4. If the verification is successful, the pharmacy client is notified to upload the transaction information to the smart contract, and the smart contract automatically updates the drug VC medTransaction field in the VC med and DID med The document is uploaded to the blockchain; if verification fails, the transaction is terminated.
[0036] In the above scheme, at each circulation link of the drug, both parties of the transaction will be verified to see if they have the corresponding authority. At the same time, information will be transmitted and recorded through a one-time traceable address, which can achieve traceability of the drug circulation link and ensure security. At the same time, it can prevent malicious parties from participating in the transaction, thereby ensuring the traceability and security of the drug supply chain.
[0037] In a second aspect, the present invention provides a system for implementing the above-mentioned drug supply chain supervision method based on decentralized identity identification, including a supervision client and a participant client, wherein the participant client includes a pharmaceutical factory client, a distributor client, a pharmacy client, and a hospital client;
[0038] Each participating client is configured to generate its own decentralized identity DID and DID document during the user registration step, and obtain a verifiable certificate VC signed by the regulator;
[0039] The pharmaceutical factory client is also configured to generate a decentralized identity DID for each batch of drugs during the drug registration step. med 、DID med Documentation and VC med ;
[0040] Each participating client is also configured to generate a one-time traceable address and a verifiable statement VP for the buyer during the circulation supervision step. The verifiable statement VP for the buyer is generated by selectively disclosing information through a hash XOR tree structure using the verifiable certificate VC for the buyer; the seller client verifies the validity of the one-time traceable address, the integrity of the verifiable statement VP for the buyer, and the validity of the signature in the verifiable statement VP for the buyer. If all the verifications are passed, the seller verifiable certificate VC is used to generate the seller verifiable statement VP through a hash XOR tree structure and sends it to the buyer client. After the buyer client verifies the integrity of the seller verifiable statement VP, it notifies the seller client to update the VC. med The transaction field in ;
[0041] Among them, when the drugs flow from pharmaceutical factories to distributors in the circulation link, the pharmaceutical factories are selling prescriptions and the distributors are buying prescriptions; when the drugs flow from distributors to pharmacies in the circulation link, the distributors are selling prescriptions and the pharmacies are buying prescriptions; when the drugs flow from pharmacies to consumers in the circulation link, the pharmacies are selling prescriptions and consumers are buying prescriptions.
[0042] In a third aspect, the present invention provides a computer program product, comprising computer-readable instructions, characterized in that the computer-readable instructions, when executed by a processor, implement the steps of the drug supply chain supervision method based on decentralized identity identification of the present invention.
[0043] In a fourth aspect, the present invention provides a computer-readable storage medium comprising computer-readable instructions, characterized in that the computer-readable instructions, when executed by a processor, implement the steps of the drug supply chain supervision method based on decentralized identity identification of the present invention.
[0044] In a fifth aspect, the present invention provides an electronic device, comprising: a memory storing program instructions; a processor connected to the memory, executing the program instructions in the memory, and implementing the steps of the drug supply chain supervision method based on decentralized identity identification of the present invention.
[0045] Compared with the existing technology, the present invention combines DID, one-time traceable address and hash XOR tree technologies on the basis of the original blockchain technology. It not only realizes the non-tamperability and non-copyability of the traditional solution, but also solves the problems of unregulatory problems and privacy leakage of drug supply chain participants in the traditional drug supply chain solution. It also prevents the emergence of malicious participants (such as illegal dealers and counterfeit manufacturers) and improves the security of the drug supply chain system.
[0046] The specific technical analysis is as follows:
[0047] Blockchain: The application of blockchain technology in the pharmaceutical supply chain can greatly improve the traceability and safety of drugs. By recording information on various links such as drug production, transportation, distribution and sales on the blockchain, the data can be ensured to be tamper-proof and transparent. This not only helps regulators to conduct effective supervision, prevent counterfeit drugs from entering the market, and prevent pharmacies from selling drugs illegally, but also enhances consumers' trust in the source of drugs. In addition, the smart contract function of blockchain can automate the execution of various agreements and transactions in the supply chain, improve efficiency and reduce costs.
[0048] Support for privacy supervision based on DID and traceable one-time addresses: In the drug supply chain solution, in order to improve privacy protection and data security, the present invention uses DID and traceable one-time addresses (TraceableOne-TimeAddress) based on HMAC technology to achieve full-process supervision that supports privacy protection. Each supply chain node in the system (such as pharmaceutical factories, distributors, pharmacies, users, etc.) has a unique DID to identify its identity. In addition, each supply chain node needs to use its own DID to apply for a verifiable certificate VC from the regulator, and the regulator will conduct a qualification review on it. After the review is passed, a verifiable certificate VC signed by the regulator will be issued; everyone can use the regulator's public key to verify the validity of a node VC to prevent malicious participants from impersonating qualifications or forging qualification certificates. At the same time, in order to ensure the privacy of transaction data, the buyer can dynamically generate a traceable one-time address based on HMAC for each transaction (such as drug circulation). These one-time addresses are generated by encrypting the public and private keys associated with the buyer and the public key of the regulator, and each address is only used in one transaction. This mechanism ensures that even if the transaction data is monitored, it is difficult for attackers to trace back to the actual supply chain node through the address, thus protecting the privacy information of the drug buyer. In addition, since the drug buyer uses the public key of the regulator when generating the one-time address, the regulator can use the identity tracing method to supervise the drug buyer to ensure the compliance and auditability of the supply chain. Under this architecture, the regulator uses DID to implement domain-wide identity authentication and qualification authorization, and uses a one-time traceable address for tracking and supervision that supports privacy protection, thereby achieving compliance supervision and privacy protection in the drug circulation process.
[0049] Selective disclosure method based on hash XOR tree: In the pharmaceutical supply chain solution, DID and hash XOR tree are combined to achieve selective disclosure of verifiable credentials (VC) and verifiable presentation (VP). First, a unique DID is assigned to each supply chain node, and its related authentication information is encapsulated into VC. In order to protect data privacy, the hash XOR tree is used to hash each attribute in the VC and organize it into a tree structure. Whenever a node needs to disclose part of the information to other participants (such as regulators), VP can be generated by selectively disclosing part of the node data in the hash XOR tree, showing only the attributes that need to be verified and their proof paths, without leaking other sensitive data. This mechanism not only ensures the integrity and authenticity of the data, but also enhances the privacy protection capability, that is, further enhances security and achieves more flexible verifiable data disclosure. At the same time, it is more efficient and has the advantage of lower computational overhead compared to the hash Merkle tree structure.
[0050] Dynamic supervision of the drug supply chain based on smart contracts: In the existing drug supply chain traceability solutions, only static supervision can be achieved, and dynamic supervision cannot be achieved. The present invention adds a "from...to..." field to the drug VC through a smart contract, and forcibly updates the "from...to..." field every time a drug transaction is made, thereby achieving dynamic traceability and full-process traceability of drug transactions, and can clearly lock in the specific party responsible for violations in the form of a chain of evidence. In addition, when updating the "from...to..." field in the VC, the smart contract will automatically determine the legality of the participant's qualifications and whether the update conditions are met through input information, thereby preventing illegal sales problems, and timely discovering problems such as reflux drugs, which can ensure that drugs can legally and standardizedly re-enter the market or be destroyed as required.
[0051] For other advantages of the present invention, please refer to the relevant description in the embodiment section. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 This is a composition architecture diagram of a drug supply chain supervision system based on decentralized identity identification as an example in an embodiment of the present invention.
[0054] Figure 2 The flowchart of the drug supply chain supervision method based on decentralized identity identification is given as an example in the embodiments.
[0055] Figure 3 This is a detailed flow chart of the user registration steps used as an example in the embodiment.
[0056] Figure 4 Detailed flow chart of the drug registration steps exemplified in the embodiments.
[0057] Figure 5 This is a detailed flow chart of the supervision sub-steps from the pharmaceutical factory to the distributor, as exemplified in the embodiments.
[0058] Figure 6 This is a detailed flow chart of the supervision sub-steps from pharmacy to consumer as an example in the embodiments.
[0059] Figure 7 A block diagram of the components of an electronic device. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0061] See also Figure 1 In this embodiment, a drug supply chain supervision system based on decentralized identity identification is provided, including a supervision client 101, a pharmaceutical factory client 102, a distributor client 103, a pharmacy client 104, a consumer client 105, a hospital client 106, and a server 107 integrating blockchain and IPFS systems. For the convenience of description, the pharmaceutical factory client 102, the distributor client 103, the pharmacy client 104, the consumer client 105, and the hospital client 106 are collectively referred to as participant clients in the following text, that is, unless otherwise specified, when describing the participant client, it means that the pharmaceutical factory client 102, the distributor client 103, the pharmacy client 104, the consumer client 105, and the hospital client 106 all perform the same operation.
[0062] See also Figure 2 The drug supply chain supervision method based on decentralized identity identification implemented based on the above-mentioned drug supply chain supervision system includes user registration steps, drug registration steps, and circulation link supervision steps. In the user registration step, the pharmaceutical factory client 102, the distributor client 103, the pharmacy client 104, and the hospital client 106 respectively generate their own decentralized identity identification (DID) and DID documents (including their own DID, public key, verification method, service endpoint and other information), and obtain a verifiable certificate VC signed by the supervisor. In the drug registration step, the pharmaceutical factory client generates a decentralized identity identification DID for each batch of drugs. med 、DID med Documentation and VC med In the circulation supervision step, the buyer's client generates a one-time traceable address and a buyer's verifiable statement VP, which is generated by the buyer's verifiable certificate VC through a hash XOR tree structure to selectively disclose information; the seller's client verifies the validity of the one-time traceable address, the integrity of the buyer's verifiable statement VP and the validity of the signature in the buyer's verifiable statement VP. If all the verifications are passed, the seller's verifiable certificate VC is used to generate the seller's verifiable statement VP through a hash XOR tree structure and sent to the buyer's client. The buyer's client verifies the integrity of the seller's verifiable statement VP, and after the verification is passed, the seller's client is notified to update VC med The transaction field in .
[0063] It is easy to understand that the concepts of selling prescriptions and buying prescriptions are relative. When drugs flow from pharmaceutical factories to distributors, pharmaceutical factories are selling prescriptions and distributors are buying prescriptions; when drugs flow from distributors to pharmacies, distributors are selling prescriptions and pharmacies are buying prescriptions; when drugs flow from pharmacies to consumers, pharmacies are selling prescriptions and consumers are buying prescriptions.
[0064] See also Figure 3 , the user registration step may specifically include the following steps:
[0065] S11, the supervisory client and the participating client generate their own public and private key pairs respectively.
[0066] When generating a public-private key pair, a i , b i , calculate A i =a i ·G, B i =b i G, and then obtain the public key PK i =(A i ,B i ), private key sk i =(a i ,b i ), G is the prime number base point on the elliptic curve, the elliptic curve equation is y^2=x^3+7(mod p), p is a prime number. i, , b i Belong to Z N * , Z N * It refers to the multiplication group modulo N, which consists of all integers that are relatively prime to N, that is, Z N * Contains all integers that have multiplicative inverses modulo N. i is the first half of the long-term public key of user i, B i is the second half of the long-term public key of user i, a i is the first half of the long-term private key of user i, b i The second half of user i’s long-term private key.
[0067] Here and in the following text, i refers to the user number, such as regulator (i=1), pharmaceutical factory (i=2), distributor (i=3), pharmacy (i=4), consumer (i=5), and hospital (i=6).
[0068] S12, the client of the participant (i>=2 and i!=5, excluding consumers) generates its own DID through the identity wallet i and DID i Documents, DID iThe document contains its own DID i , Public Key PK i , verify the method and service endpoint information, and then DID i The document is first uploaded to the IPFS system so that the IPFS system can generate a content identifier CID i , then CID i With DID i Upload to blockchain, where CID i It is DID i The hash value corresponding to the document.
[0069] S13, the client of the participant (i>=2 and i!=5, excluding consumers) sends an application for a verifiable certificate VC to the supervisory client i The request contains the DID generated by the client of the participant i Documents, registration informationinfo i , use the participating party’s private key to sign the application data.
[0070] Registration information corresponding to different usersinfo i For example, the registration information of a pharmaceutical factory may include the factory name, factory address, types of drugs produced, legal representative, production license, and sales license. The registration information of a distributor may include the legal person, address, wholesale license, and sales license. The registration information of a pharmacy may include the store name, address, licensed pharmacist, legal representative, wholesale license, and retail license.
[0071] S14, after receiving the request from the participant client, the supervisory client verifies the DID i DID in Documents i Whether it has been registered in the blockchain, verify whether the signature of the application data is correct, and verify the registration information info i If all the above verifications are passed, the supervisory client returns VC to the participating client. i , VC i Contains the registration information of the participants i , DID of the participant, DID of the supervisor, permission statement, root i , and the signature of the supervisor, which includes the signature of the root i Signature and registration information of the participants i Signature of root i The registration information of the participants is i Information attribute attr ij The final root value generated by the hash XOR tree structure.
[0072] If any of the verifications fail, the supervisor client will not return VC to the participant client. i , and then the participants cannot perform subsequent operations, so as to prevent malicious participants from disrupting the market order.
[0073] The above operation of verifying whether the signature of the application data is correct is to i The document checks the public key of the participant and verifies the signature with the public key of the participant to ensure that the request content has not been tampered with.
[0074] S15, the client of the participant receives VC i After that, they are stored in their respective identity wallets.
[0075] The client receives the VC i This means that you have the relevant licensing qualifications and can carry out corresponding operations, such as producing drugs, wholesaling drugs, and selling drugs.
[0076] See also Figure 4 , the drug registration process may include the following steps:
[0077] S21, every time a batch of drugs is produced, the pharmaceutical factory client generates a unique identifier DID for each batch of drugs through the identity wallet med and DID med Documents, DID med Document contains DID med , the pharmaceutical factory's public key, verification method, and service endpoint information, and DID med The document is uploaded to the IPFS system so that the IPFS system can generate a CID med , and then CID med Upload to blockchain.
[0078] S22, pharmaceutical factory client based on DID med Generate VC for pharmaceutical products med , VC of medicines med Record DID med As well as drug information (drug name, manufacturer, production address, drug level, production batch, production time, expiration date and other detailed information of the drug), timestamp and root generated by hash XOR tree structure with drug information as attribute med , Use the pharmaceutical factory private key to root med and signatures for all messages.
[0079] S23, the pharmaceutical factory client sends the signed drug VC med Upload to the blockchain to ensure that drug information is publicly available throughout the supply chain.
[0080] In addition, in order to ensure the data security and authority management of drugs during the circulation process, smart contracts are used to control drug VC med The smart contract defines the rights of each client in the drug circulation process. Only the authorized client can update the VC of the drug. med .
[0081] The supervision steps in the circulation link include the supervision sub-steps from pharmaceutical factory to distributor, the supervision sub-steps from distributor to pharmacy, and the supervision sub-steps from pharmacy to consumer.
[0082] See also Figure 5 The supervision sub-steps from pharmaceutical factory to distributor can include the following steps:
[0083] S31, in the process of drugs flowing from the pharmaceutical factory to the distributor, the distributor client generates a one-time traceable address addr3 = {pk_addr3, R3, r3} and a private key sk_addr3 corresponding to the one-time traceable address, pk_addr3 is the public key corresponding to the one-time traceable address, and r3 is a random number.
[0084] S32, the dealer client selectively discloses the verifiable certificate VC3 signed by the regulator in its identity wallet through a hash XOR tree structure, selects the fields to be disclosed (such as the drug information and wholesale license to be wholesaled, etc.), the verification path and the root root3, and generates a verifiable statement VP3 based on the disclosed information. VP3 contains the signature of the dealer client using the dealer's private key.
[0085] S33, when purchasing drugs, the distributor uses the one-time traceable address addr3 and sends the one-time traceable address addr3, VP3 and random number r3 to the pharmaceutical factory client.
[0086] S34, after receiving the information from the distributor client, the pharmaceutical factory client verifies the validity of the one-time traceable address addr3, the integrity of VP3 and the validity of the signature in VP3. If the verification is successful (indicating that the distributor is qualified to wholesale drugs), the pharmaceutical factory client checks whether it has produced the drugs corresponding to the disclosure field. If so, the pharmaceutical factory client generates a verifiable statement VP2 through a hash XOR tree structure from the VC2 signed by the regulator in its identity wallet. VP2 contains production license, sales license, drug information and a signature made with the private key of the pharmaceutical factory. The drug information includes the drug name, manufacturer, production address, drug level, production batch, production time, and expiration date. VP2 and DID med Sent to the distributor client. If the verification fails or the pharmaceutical factory does not have the corresponding drug, the transaction is terminated.
[0087] S35, the distributor client verifies the integrity of VP2. If the verification is successful, the pharmaceutical factory client is notified to upload the transaction information to the smart contract, and the smart contract automatically updates the drug VC. med The transaction fields in the list are as follows: add “from: pharmaceutical factory address, to: distributor’s one-time traceable address, signature: pharmaceutical factory signature, timestamp: update timestamp”, and add the updated VC med and DID med The document is uploaded to the blockchain. If the verification fails, the transaction is terminated.
[0088] The process of drugs flowing from distributors to pharmacies is basically the same as above, but the distributors play the role of the pharmaceutical factory and the pharmacies play the role of the distributors. Specifically, the sub-steps of supervision from distributors to pharmacies can include the following steps:
[0089] S41, in the process of drugs flowing from distributors to pharmacies, the pharmacy client generates a one-time traceable address addr4 = {pk_addr4, R4, r4} and a private key sk_addr4 corresponding to the one-time traceable address.
[0090] S42, the pharmacy client selectively discloses the verifiable certificate VC4 signed by the regulator in its identity wallet through a hash XOR tree structure, selects the fields to be disclosed (such as information on drugs to be wholesaled and wholesale licenses, etc.), verification path and root root4 and other information, and generates a verifiable statement VP4 based on the disclosed information. VP4 contains the signature of the pharmacy client using the pharmacy private key.
[0091] S43, when purchasing drugs, the pharmacy uses the one-time traceable address addr4 and sends the one-time traceable address addr4, VP4 and random number r4 to the dealer client.
[0092] S44, after receiving the information sent by the pharmacy client, the dealer client verifies the validity of the one-time traceable address addr4, the integrity of VP4 and the validity of the signature in VP4. If the verification is successful (indicating that the pharmacy is qualified to wholesale drugs), the dealer client checks whether it has stored drugs corresponding to the disclosure field. If so, the dealer client generates a verifiable statement VP3 through a hash XOR tree structure from the VC3 signed by the regulator in its identity wallet. VP3 contains sales permission and drug information, and VP3 and DID med Sent to the pharmacy client. If the verification fails or the distributor does not have the corresponding drug, the transaction is terminated.
[0093] S45, the pharmacy client verifies the integrity of VP3. If the verification is successful, the dealer client is notified to upload the transaction information to the smart contract, and the smart contract automatically updates the drug VC med The transaction fields in the list are as follows: add "from: dealer address, to: pharmacy one-time traceable address, signature: dealer signature, timestamp: update timestamp" to the list, and add the updated VC med and DID med The document is uploaded to the blockchain. If the verification fails, the transaction is terminated.
[0094] See also Figure 6 The supervision sub-steps from pharmacy to consumer can include the following steps:
[0095] S51, in order to protect the anonymity and privacy of consumers and achieve controllability, the consumer client generates a one-time traceable address addr5 = {pk_addr5, R5, r5}, a private key sk_addr5 and DID5 corresponding to the one-time traceable address.
[0096] The consumer's DID is not generated in the user registration step, but is generated in this step, which can further effectively protect the privacy of consumer information.
[0097] S52, determine whether the medicine to be purchased is a prescription drug. If it is a prescription drug, the consumer client submits its own DID5, registration information info5 encrypted with the hospital public key, a one-time traceable address addr5, and a signature of the application data with the consumer's private key to the hospital client, and then proceeds to step S53; if it is an over-the-counter drug, proceed to step S56.
[0098] The registration information info5 generally includes name, age, medical insurance information, and symptom information.
[0099] S53, the hospital client determines whether the consumer has the authority to purchase prescription drugs, and after determining that the consumer has the authority to purchase prescription drugs, sends a verifiable certificate VC5 representing that the prescription drugs can be purchased to the consumer client, and then enters step S54. If it is determined that the consumer does not have the authority to purchase prescription drugs, the transaction is terminated.
[0100] The hospital client determines whether the consumer has the authority to purchase prescription drugs by verifying whether the DID5, registration information (because the registration information contains the consumer's symptoms, such as diseases that can purchase prescription drugs) and signature (to ensure that the data has not been tampered with) are correct. If all are correct, it is determined that the consumer has the authority to purchase prescription drugs, otherwise, the consumer does not have the authority to purchase prescription drugs.
[0101] During the user registration step, the hospital registers the DID with the regulator, and after approval by the regulator, it issues a VC representing a business license to the hospital. After obtaining the VC, the hospital can issue VC to consumers to qualify them to purchase prescription drugs, which not only achieves effective supervision of the regulator over the hospital, but also achieves effective supervision of consumers' purchase of prescription drugs.
[0102] S54, the consumer client generates a verifiable statement VP5 based on the information disclosed in VC5, and sends its own VP5, one-time traceable address addr5 and random number r5 to the pharmacy client, and then enters step S55.
[0103] S55, the pharmacy client verifies the validity of the one-time traceable address addr5, the integrity of VP5, and the validity of the signature in VP5, and after the verification is passed, the pharmacy client's VP4 and the drug DID med Send to the consumer client, and then go to step S58;
[0104] S56, the consumer client sends the one-time traceable address addr5 and the random number r5 to the pharmacy client, and then proceeds to step S57.
[0105] S57, the pharmacy client verifies the validity of the one-time traceable address addr5, and after verification, sends the pharmacy client’s VP4 and the drug DID med Send to the consumer client, and then go to step S58.
[0106] S58, the consumer client verifies the integrity of the pharmacy's VP4. If the verification is successful, the pharmacy client is notified to upload the transaction information to the smart contract, and the smart contract automatically updates the drug VC med The transaction fields in the list are as follows: add "from: pharmacy address, to: consumer's one-time traceable address, signature: pharmacy signature, timestamp: update timestamp" and add the updated VC med and DID med The document is uploaded to the blockchain. If the verification fails, the transaction is terminated.
[0107] In the above steps, each participating client selects a random number r when generating a one-time traceable address. i , based on the HMAC-SHA256 algorithm to calculate a one-time traceable address:
[0108] h1:=hash1(r i ||a i ·A j );
[0109] h2:=hash2(ri ||h1·A1);
[0110] R i : = h1·G;
[0111] A j =a j ·G;
[0112] The one-time traceable address public key of user i (here i = 3, 4, 5, representing distributors, pharmacies, and consumers) is: pk_addr i =h2·G+R i +B i ; B i =b i ·G, a j 、a i , b i is a randomly generated number; G is a prime number base point on the elliptic curve;
[0113] The one-time traceable address private key of user i is: sk_addr i =h1+h2+b i ;
[0114] User i will calculate addr i ={pk_addr i ,R i ,r i} as your own one-time traceable address.
[0115] hash1:{0,1} * →Z n It is a hash function that maps a binary string of any length to a value in the range of integers modulo n; hash2:Gˊ→Z n is a hash function, G is a prime number base point on the elliptic curve, Gˊ is the elliptic curve group, r i is a random number, r∈Z n * , Z n * represents the multiplicative group of integers, A j is the first half of the long-term public key of user j, A1 is the first half of the long-term public key of the supervisory client, a i is the first half of the long-term private key of user i. It should be noted here that each participant has two pairs of public and private keys, the first half refers to the first pair of public and private keys, and the second half refers to the second pair of public and private keys.
[0116] In particular, if the regulator wants to trace the one-time traceable address, then the regulator holds its own long-term public and private keys and the one-time traceable address addr of user i. i={pk_addr i ,R i ,r i},calculate:
[0117] h2ˊˊ:=hash2(r i ||a1·R i );
[0118] B i :=pk_addr i -R i -h2ˊˊ·G;
[0119] a1 is the first half of the regulator’s long-term private key.
[0120] Calculated B i This is the second half of the long-term public key of user i obtained by the supervisor. Therefore, the supervisor can use the address and the first half of its own long-term private key to track the long-term private key of user i. This method is the identity tracing method.
[0121] If user j wants to verify the validity of user i's one-time traceable address, user j holds his own long-term public and private keys and user i's one-time traceable address addr i ={pk_addr i ,R i ,r i},calculate:
[0122] h1ˊ:=hash1(r i ||a j ·A i );
[0123] h2ˊ:=hash2(r i ||h1ˊ·A1);
[0124] Check that the following equality holds:
[0125] B j ==pk_addr i -R i -h2ˊ·G;
[0126] If true, user j determines that the one-time traceable address of user i is valid, that is, user j can verify whether the long-term public key of user i is correct based on his own long-term private key and one-time traceable address. Therefore, user j can track the identity of user i.
[0127] In particular, when verifying VC and VP at each transaction stage, that is, when generating VC and when VC generates VP, a hash XOR tree structure is used to further improve data security.
[0128] When generating VC, taking the consumer as an example, the consumer's VC5 should contain the consumer's DID5, registration information info5, root root5, and signature information for root root5 and registration information info5. Registration information includes info5: name, age, medical insurance information, and symptom information. The attributes of this information must first be hashed to generate a hash value. For example, if the consumer's name is Jacky Ma, the hash value generated for this string of characters is recorded as H(A). Similarly, the hash values generated by other attribute information are recorded as H(B), H(C), and H(D). Then, for each hash value except itself, the hash values are combined. For example, for H(A), the other hash values are combined to obtain H(H(B)+H(C)+H(D)). Then, H(A) and H(H(B)+H(C)+H(D)) are combined and hashed to obtain H(H(A)+H(H(B)+H(C)+H(D))). For the following description, it is recorded as 1. At the same time, other attribute information is also obtained as H(H(B)+H(H(A)+H(C)+H(D))), H(H(C)+H(H(A)+H(B)+H(D))), H(H(D)+H (H(A)+H(B)+H(C))), recorded as 2, 3, and 4 respectively. Then, for 1, 2, 3, and 4 are XORed to obtain XOR(2+3+4). The other information attributes are also XOR(1+3+4), XOR(1+2+4), and XOR(1+2+3). Then, 1 and XOR(2+3+4) are XORed to obtain XOR(1+XOR(2+3+4)). Similarly, the other information attributes are XOR(2+XOR(1+3+4)), XOR(3+XOR(1+2+4)), and XOR(4+XOR(1+2+3)). Finally, any one of these four numbers is hashed to obtain H(XOR(1+2+3+4)), which is root5.
[0129] When VP is generated by VC, since the attribute information in VC is stored in a hash XOR tree structure, when a node in the supply chain needs to generate VP to verify part of the information, some hash nodes in the tree can be selectively disclosed. For example, if a verifier only needs to verify the production date and batch number of a drug, it only needs to disclose the hash value and its path related to these attributes without disclosing the entire VC. The advantage of this is that the authenticity of the disclosed information can be quickly verified without accessing other undisclosed data. When the verifier receives the VP, it uses the hash XOR tree verification algorithm to verify it based on the disclosed hash value and path to ensure that the disclosed information is complete, accurate, and has not been tampered with. Due to the characteristics of the hash XOR tree structure, even if only part of the information is disclosed, its integrity and consistency can still be verified through the root.
[0130] In the above steps, the validity of the signature in the VP is generally verified by the public key of the signer. Since the public key of the signer is visible to every participant in the system, the verifier can use the public key of the signer for verification. For example, the pharmaceutical client can use the public key of the distributor for verification.
[0131] like Figure 7 As shown, this embodiment also provides an electronic device, which may include a processor 41 and a memory 42, wherein the memory 42 is coupled to the processor 41. It is worth noting that this figure is exemplary, and other types of structures may be used to supplement or replace this structure to achieve data extraction, report generation, communication or other functions.
[0132] like Figure 7 As shown, the electronic device may further include: an input unit 43, a display unit 44 and a power supply 45. It is worth noting that the electronic device does not necessarily have to include Figure 7 In addition, electronic devices may also include Figure 7 For components not shown, reference may be made to the prior art.
[0133] The processor 41 is sometimes also called a controller or an operation control, and may include a microprocessor or other processor devices and / or logic devices. The processor 41 receives inputs and controls the operations of various components of the electronic device.
[0134] The memory 42 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices, and may store information such as configuration information of the processor 41 and instructions executed by the processor 41. The processor 41 may execute the program stored in the memory 42 to implement information storage or processing. In one embodiment, the memory 42 also includes a buffer memory, i.e., a buffer, to store intermediate information.
[0135] An embodiment of the present invention further provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed in an electronic device, the program product enables the electronic device to execute the operation steps included in the method of the present invention.
[0136] An embodiment of the present invention further provides a storage medium storing computer-readable instructions, wherein the computer-readable instructions enable an electronic device to execute the operation steps included in the method of the present invention.
[0137] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0138] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0139] The above-described embodiments are only specific implementations of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications, replacements and improvements within the technical scope disclosed by the present invention, and these modifications, replacements and improvements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A drug supply chain supervision method based on decentralized identity identification, characterized in that: Including user registration steps, drug registration steps, and circulation supervision steps; In the user registration step, each participating client generates its own decentralized identity DID and DID document, and obtains a verifiable certificate VC signed by the regulator; the participating clients include pharmaceutical factory clients, distributor clients, pharmacy clients, and hospital clients; In the drug registration step, the pharmaceutical factory client generates a decentralized identity DID for each batch of drugs. med 、DID med Documentation and VC med ; In the circulation link supervision step, the buyer's client generates a one-time traceable address and a buyer's verifiable statement VP, and the buyer's verifiable statement VP is generated by selectively disclosing information through a hash XOR tree structure using the buyer's verifiable certificate VC; the seller's client verifies the validity of the one-time traceable address, the integrity of the buyer's verifiable statement VP, and the validity of the signature in the buyer's verifiable statement VP. If all the verifications are passed, the seller's verifiable certificate VC is used to generate the seller's verifiable statement VP through a hash XOR tree structure and sends it to the buyer's client. The buyer's client verifies the integrity of the seller's verifiable statement VP; after the verification is passed, the seller's client is notified to update VC med The transaction field in .
2. The drug supply chain supervision method based on decentralized identity identification according to claim 1 is characterized in that: The user registration step includes the following steps: S11, each participating client generates its own public and private key pair; S12, each participating client generates its own DID i and DID i Documents, DID i Document contains DID i , Public Key PK i , verify the method and service endpoint information, and then DID i The document is first uploaded to the IPFS system so that the IPFS system can generate a content identifier CID i , then CID i Upload to the blockchain with DIDi, where CID i It is DID i The hash value corresponding to the document; S13, each participating client sends an application for a verifiable credential VC to the regulatory client i The request includes the DID generated by the client of the participant i Documents, registration informationinfo i , Sign the application data with a private key; S14, after receiving the request, the regulatory client verifies the DID i DID in Documents i Whether it has been registered in the blockchain, verify whether the signature of the application data is correct, and verify the registration information info i If all the above verifications are passed, the supervisory client returns VC to the participating client. i , VC i Contains the registration information of the participants i , DID of the participant, DID of the supervisor, permission statement, root i And the signature of the supervisor, where the supervisor's signature includes the root i Signature and registration information of the participants i Signature of root i The information is registered by the participants. i The information attributes in the final root value generated by the hash XOR tree structure; S15, each client of the participating party receives VC i After that, store it in their respective identity wallets.
3. The drug supply chain supervision method based on decentralized identity identification according to claim 1 is characterized in that: The drug registration process includes the following steps: S21, every time a batch of drugs is produced, the pharmaceutical factory client generates a unique identifier DID for each batch of drugs through the identity wallet med and DID med Documents, DID med Document contains DID med , the pharmaceutical factory's public key, verification method, and service endpoint, and DID med The document is uploaded to the IPFS system so that the IPFS system can generate a CID med , and then CID med Upload to blockchain; S22, pharmaceutical factory client based on DID med Generate VC for pharmaceutical products med , VC of medicines med Record DID med As well as drug information, timestamp, and the root generated by the hash XOR tree structure with drug information as the attribute med , Use the pharmaceutical factory private key to root med and signatures for all messages; S23, the pharmaceutical factory client sends the signed drug VC med Upload to blockchain.
4. The drug supply chain supervision method based on decentralized identity identification according to claim 1 is characterized in that: The circulation link supervision step includes the supervision sub-steps from the pharmaceutical factory to the distributor, the supervision sub-steps from the distributor to the pharmacy, and the supervision sub-steps from the pharmacy to the consumer; wherein the supervision sub-steps from the pharmaceutical factory to the distributor include the following steps: S31, in the process of drugs flowing from the pharmaceutical factory to the distributor, the distributor client generates a one-time traceable address addr3 = {pk_addr3, R3, r3} and a private key sk_addr3 corresponding to the one-time traceable address, where pk_addr3 is the public key corresponding to the one-time traceable address, and r3 is a random number; S32, the dealer client selectively discloses the dealer's verifiable certificate VC3 through a hash XOR tree structure, selects the fields to be disclosed, the verification path and the root root3, and generates a verifiable statement VP3 based on the disclosed information. VP3 contains the signature of the dealer client using the dealer's private key; S33, when purchasing drugs, the distributor uses the one-time traceable address addr3 and sends the one-time traceable address addr3, VP3 and random number r3 to the pharmaceutical factory client; S34, after receiving the information from the distributor client, the pharmaceutical factory client verifies the validity of the one-time traceable address addr3, the integrity of VP3 and the validity of the signature in VP3. If the verification is successful, the pharmaceutical factory client checks whether it has produced the drug corresponding to the disclosure field. If so, the pharmaceutical factory client generates a verifiable statement VP2 from the pharmaceutical factory's VC2 through a hash XOR tree structure. VP2 contains production license, sales license, drug information and a signature made with the pharmaceutical factory's private key, and VP2 and DID med Sent to the distributor client; if the verification fails or the pharmaceutical factory does not have the corresponding drug, the transaction is terminated; S35, the distributor client verifies the integrity of VP2. If the verification is successful, the pharmaceutical factory client is notified to upload the transaction information to the smart contract, and the smart contract automatically updates the drug VC. med Transaction field in the VC med and DID med The document is uploaded to the blockchain; if verification fails, the transaction is terminated.
5. The drug supply chain supervision method based on decentralized identity identification according to claim 4 is characterized in that: The sub-step of supervising the distributor-to-drugstore link includes the following steps: S41, in the process of drugs flowing from distributors to pharmacies, the pharmacy client generates a one-time traceable address addr4 = {pk_addr4, R4, r4} and a private key sk_addr4 corresponding to the one-time traceable address; S42, the pharmacy client selectively discloses the pharmacy's verifiable certificate VC4 through a hash XOR tree structure, selects the fields to be disclosed, the verification path and the root root4, and generates a verifiable statement VP4 based on the disclosed information. VP4 includes the signature of the pharmacy client using the pharmacy's private key; S43, when purchasing drugs, the pharmacy uses the one-time traceable address addr4 and sends the one-time traceable address addr4, VP4 and random number r4 to the distributor client; S44, after receiving the information sent by the pharmacy client, the dealer client verifies the validity of the one-time traceable address addr4, the integrity of VP4 and the validity of the signature in VP4. If all the verifications are passed, the dealer client checks whether it has stored the drug corresponding to the disclosure field. If so, the dealer client generates a verifiable statement VP3 from the dealer's VC3 through a hash XOR tree structure. VP3 contains sales permission and drug information, and VP3 and DID med Sent to the pharmacy client; if the verification fails or the distributor does not have the corresponding drug, the transaction is terminated; S45, the pharmacy client verifies the integrity of VP3. If the verification is successful, the dealer client is notified to upload the transaction information to the smart contract, and the smart contract automatically updates the drug VC med Transaction field in the VC med and DID med The document is uploaded to the blockchain; if verification fails, the transaction is terminated.
6. The drug supply chain supervision method based on decentralized identity identification according to claim 4 is characterized in that: The pharmacy-to-consumer supervision sub-step includes the following steps: S51, the consumer client generates a one-time traceable address addr5 = {pk_addr5, R5, r5}, a private key sk_addr5 and DID5 corresponding to the one-time traceable address; S52, determine whether the medicine to be purchased is a prescription drug. If it is a prescription drug, the consumer client submits its own DID5, registration information info5 encrypted with the hospital public key, one-time traceable address addr5, and the signature of the application data with the consumer private key to the hospital client, and then proceeds to step S53; if it is an over-the-counter drug, proceed to step S56; S53, the hospital client determines whether the consumer has the authority to purchase prescription drugs, and after determining that the consumer has the authority to purchase prescription drugs, sends a verifiable certificate VC5 representing that the consumer can purchase prescription drugs to the consumer client, and then enters step S54; if it is determined that the consumer does not have the authority to purchase prescription drugs, the transaction is terminated; S54, the consumer client generates a verifiable statement VP5 based on the information disclosed in VC5, and sends VP5, a one-time traceable address addr5, and a random number r5 to the pharmacy client, and then proceeds to step S55; S55, the pharmacy client verifies the validity of the one-time traceable address addr5, the integrity of VP5, and the validity of the signature in VP5, and after the verification is passed, the pharmacy client's VP4 and the drug DID med Send to the consumer client, and then go to step S58; S56, the consumer client sends the one-time traceable address addr5 and the random number r5 to the pharmacy client, and then proceeds to step S57; S57, the pharmacy client verifies the validity of the one-time traceable address addr5, and after verification, sends the pharmacy client’s VP4 and the drug DID med Send to the consumer client, and then go to step S58; S58, the consumer client verifies the integrity of the pharmacy's VP4. If the verification is successful, the pharmacy client is notified to upload the transaction information to the smart contract, and the smart contract automatically updates the drug VC med Transaction field in the VC med and DID med The document is uploaded to the blockchain; if verification fails, the transaction is terminated.
7. A drug supply chain supervision system based on decentralized identity identification, characterized in that: It includes a regulatory client and a participant client, wherein the participant client includes a pharmaceutical factory client, a distributor client, a pharmacy client, and a hospital client; Each participating client is configured to generate its own decentralized identity DID and DID document during the user registration step, and obtain a verifiable certificate VC signed by the regulator; The pharmaceutical factory client is also configured to generate a decentralized identity DID for each batch of drugs during the drug registration step. med 、DID med Documentation and VC med ; Each participating client is also configured to generate a one-time traceable address and a verifiable statement VP for the buyer during the circulation supervision step. The verifiable statement VP for the buyer is generated by selectively disclosing information through a hash XOR tree structure using the verifiable certificate VC for the buyer; the seller client verifies the validity of the one-time traceable address, the integrity of the verifiable statement VP for the buyer, and the validity of the signature in the verifiable statement VP for the buyer. If all the verifications are passed, the seller verifiable certificate VC is used to generate the seller verifiable statement VP through a hash XOR tree structure and sends it to the buyer client. After the buyer client verifies the integrity of the seller verifiable statement VP, it notifies the seller client to update the VC. med The transaction field in ; Among them, when the drugs flow from pharmaceutical factories to distributors in the circulation link, the pharmaceutical factories are selling prescriptions and the distributors are buying prescriptions; when the drugs flow from distributors to pharmacies in the circulation link, the distributors are selling prescriptions and the pharmacies are buying prescriptions; when the drugs flow from pharmacies to consumers in the circulation link, the pharmacies are selling prescriptions and consumers are buying prescriptions.
8. A computer program product comprising computer readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps in the drug supply chain supervision method based on decentralized identity identification described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium comprising computer-readable instructions, characterized in that: When the computer-readable instructions are executed by a processor, the steps in the drug supply chain supervision method based on decentralized identity identification described in any one of claims 1 to 6 are implemented.
10. An electronic device, characterized in that: include: Memory, which stores program instructions; A processor is connected to the memory and executes program instructions in the memory to implement the steps in the drug supply chain supervision method based on decentralized identity identification as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Cross-block chain identity verification method and system in cloud computing environment
CN113806699A
Product quality inspection traceability method and device based on block chain
CN116883024A