Blockchain-based medicine management method and device, electronic equipment and storage medium

By using blockchain technology to obtain information about medicines and buyers, the problem of not being able to sell medicines based on their usage has been solved, ensuring medication safety, improving sales efficiency, and perfecting the drug circulation record.

CN115440337BActive Publication Date: 2026-07-07CHINA ACADEMY OF INFORMATION & COMM

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA ACADEMY OF INFORMATION & COMM
Filing Date
2022-09-20
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In the current technology, it is impossible to sell medicines to buyers based on their medication needs, which makes it difficult to guarantee the safety of medication use.

Method used

Through blockchain technology, sellers receive drug purchase requests, obtain information about the drugs and the buyer, and determine whether the drug meets preset conditions based on prescription information and drug purchase records before selling the drug to the buyer.

Benefits of technology

This system enables the determination of drug sales based on the buyer's medication needs, ensuring medication safety, improving sales efficiency, and perfecting the drug distribution information chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115440337B_ABST
    Figure CN115440337B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure discloses a medicine management method and device based on a blockchain, an electronic device and a storage medium, wherein the method comprises: a seller obtaining medicine information of a to-be-purchased medicine; when category information of the to-be-purchased medicine is preset category information, obtaining prescription information and medicine purchase information of a purchaser; determining whether there is prescription information that meets a preset prescription screening condition in the prescription information; when there is prescription information that meets the preset prescription screening condition, determining whether there is a medicine purchase record of purchasing the to-be-purchased medicine within a preset time period in the medicine purchase information; when there is the medicine purchase record of purchasing the to-be-purchased medicine within the preset time period, determining whether the purchaser meets a preset medicine purchase condition; and when the purchaser meets the preset medicine purchase condition, the seller sells the to-be-purchased medicine to the purchaser. The embodiment of the present disclosure can determine whether to sell the to-be-purchased medicine to the purchaser according to the medication condition of the purchaser for the to-be-purchased medicine, and ensures the medication safety of the purchaser.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to blockchain technology, drug management technology, and in particular to a blockchain-based drug management method and apparatus, electronic device and storage medium. Background Technology

[0002] Currently, in the process of selling medicines, drug retailers typically sell medicines to buyers based on their requests and prescriptions. This traditional method of selling medicines fails to consider the buyer's actual usage of the medicine. Summary of the Invention

[0003] This disclosure provides a method and apparatus, electronic device and storage medium for drug management based on blockchain, to solve the problem in the prior art that drugs cannot be sold to buyers based on their medication needs.

[0004] One aspect of this disclosure provides a blockchain-based drug management method, comprising: a seller receiving a drug purchase request from a buyer, wherein the drug purchase request includes: a buyer identifier and a drug identifier for the drug to be purchased; the seller obtaining drug information for the drug to be purchased on the blockchain based on the drug identifier, wherein the drug information includes: the drug name, administration method information, and category information of the drug to be purchased; in response to the category information of the drug to be purchased being preset category information, obtaining the buyer's prescription information and drug purchase information from the blockchain based on the buyer identifier; and determining the drug to be purchased based on the prescription information. The system determines whether there are prescriptions in the prescription information that meet preset prescription screening criteria; in response to the presence of prescriptions in the prescription information that meet preset prescription screening criteria, it determines whether there are drug purchase records in the drug purchase information that were purchased within a preset time period; in response to the presence of drug purchase records in the drug purchase information that were purchased within a preset time period, it determines whether the buyer meets preset drug purchase conditions based on the drug purchase information and the medication method information; in response to the buyer meeting the preset drug purchase conditions, the seller sells the drug to the buyer.

[0005] Optionally, in any of the above embodiments of the present disclosure, determining whether the purchaser meets the preset drug purchase conditions based on the drug purchase information and the medication method information includes: obtaining the most recent drug purchase record of the drug to be purchased from the drug purchase information as a target purchase record, wherein the target purchase record includes: purchase date and purchase quantity; determining whether the quantity of the drug to be purchased has been used up based on the target purchase record, the current date, and the medication method information; and determining that the purchaser meets the preset drug purchase conditions in response to the use up of the quantity of the drug to be purchased.

[0006] Optionally, in any of the above embodiments of the method disclosed herein, the drug purchase request further includes: the purchaser's prescription information; the step of determining whether there is prescription information in the prescription information that meets preset prescription screening conditions based on the prescription information includes: determining whether there is prescription information in the prescription information that includes the name of the drug to be purchased based on the prescription information and the drug information; in response to the existence of prescription information in the prescription information that includes the name of the drug to be purchased, determining the prescription information in the prescription information that includes the name of the drug to be purchased as target prescription information; determining whether the target prescription information matches the purchaser's prescription information; in response to the matching of the target prescription information with the purchaser's prescription information, determining that there is prescription information in the prescription information that meets the preset prescription screening conditions.

[0007] Optionally, in any of the above embodiments of the method disclosed herein, the drug purchase request further includes: the quantity of drugs to be purchased; the step of determining that the purchaser meets the preset drug purchase conditions in response to the depletion of the quantity of drugs to be purchased, the step of determining whether the quantity of drugs to be purchased in the purchaser's prescription information is greater than or equal to the quantity of drugs to be purchased, based on the quantity of drugs to be purchased and the purchaser's prescription information; and determining that the purchaser meets the preset drug purchase conditions in response to the quantity of drugs to be purchased being greater than or equal to the quantity of drugs to be purchased.

[0008] Optionally, in any of the above embodiments of the method disclosed herein, the drug purchase request further includes: a public key in the hospital's public-private key pair; the prescription information has a signature generated using the private key in the hospital's public-private key pair; before determining whether there is prescription information in the prescription information that meets preset prescription screening conditions based on the prescription information, the method further includes: the seller verifying the signature of the prescription information using the public key; in response to the existence of at least one prescription information signature verified by the public key, performing the operation of determining whether there is prescription information in the prescription information that meets preset prescription screening conditions based on the prescription information on the prescription information that has passed the signature verification.

[0009] One aspect of this disclosure provides a blockchain-based drug management device applied to a seller, comprising: a receiving module for receiving a drug purchase request sent by a buyer, wherein the drug purchase request includes: a buyer identifier and a drug identifier of the drug to be purchased; a first acquisition module for acquiring drug information of the drug to be purchased on the blockchain based on the drug identifier, wherein the drug information includes: drug name, administration method information, and category information of the drug to be purchased; a first response module for acquiring the buyer's prescription information and drug purchase information from the blockchain based on the buyer identifier in response to the category information of the drug to be purchased being preset category information; and a first determination module for determining, based on the prescription information... The system comprises the following modules: a first module determines whether prescription information meets preset prescription screening criteria; a second module determines whether, in response to the presence of prescription information meeting preset prescription screening criteria, there exists a drug purchase record in the drug purchase information for a preset period of time; a third module determines whether the buyer meets preset drug purchase conditions based on the drug purchase information and the medication method information; and a second response module, which, in response to the buyer meeting preset drug purchase conditions, sells the drug to the buyer.

[0010] Optionally, in the apparatus of any of the above embodiments of this disclosure, the third determining module includes: an acquisition submodule, configured to acquire from the drug purchase information the most recent drug purchase record of the drug to be purchased as a target purchase record, wherein the target purchase record includes: purchase date and purchase quantity; a first determining submodule, configured to determine whether the quantity of the drug to be purchased has been used up based on the target purchase record, the current date and the medication method information; and a first response submodule, configured to determine that the purchaser meets preset drug purchase conditions in response to the use up of the quantity of the drug to be purchased.

[0011] Optionally, in the apparatus of any of the above embodiments of this disclosure, the drug purchase request further includes: purchaser prescription information; the first determining module includes: a second determining submodule, configured to determine, based on the prescription information and the drug information, whether there is prescription information in the prescription information that includes the name of the drug to be purchased; a second response submodule, configured to, in response to the existence of prescription information in the prescription information that includes the name of the drug to be purchased, determine the prescription information in the prescription information that includes the name of the drug to be purchased as target prescription information; a third determining submodule, configured to determine whether the target prescription information matches the purchaser prescription information; and a third response submodule, configured to, in response to the matching of the target prescription information with the purchaser prescription information, determine that there is prescription information in the prescription information that meets the preset prescription screening conditions.

[0012] In one aspect of this disclosure, an electronic device is provided, comprising: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, wherein when the computer program is executed, it implements the aforementioned blockchain-based drug management method.

[0013] In one aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the aforementioned blockchain-based drug management method.

[0014] This disclosure provides a blockchain-based drug management method, apparatus, electronic device, and storage medium. The method includes: a seller obtaining drug information for a drug to be purchased from the blockchain based on a drug identifier in a purchase request; if the category information in the drug information is a preset category, obtaining the buyer's prescription information and drug purchase information from the blockchain based on the buyer's identifier; then determining whether there is prescription information in the prescription information that meets preset prescription screening conditions; if prescription information that meets preset prescription screening conditions is determined to exist, determining whether there is a drug purchase record for the drug to be purchased within a preset time period based on the drug purchase record in the drug purchase information; if a drug purchase record for the drug to be purchased within a preset time period is determined to exist, determining whether the buyer meets preset drug purchase conditions based on the drug purchase information and medication method information; and if the buyer meets the preset drug purchase conditions, the seller selling the drug to the buyer. Therefore, in this embodiment of the disclosure, by integrating the drug information of the drug to be purchased, the prescription information of the purchaser, and the drug purchase information, it is possible not only to determine whether to sell the drug to the purchaser based on the purchaser's medication history, ensuring the purchaser's medication safety; but also to process drugs with preset category information according to the category information of the drugs purchased by the purchaser, further ensuring the purchaser's medication safety and improving the efficiency of drug sales. Furthermore, this embodiment of the disclosure records the final link in the drug circulation process through drug purchase information, thus perfecting the drug circulation information chain.

[0015] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0016] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0017] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:

[0018] Figure 1 This is a schematic flowchart of a blockchain-based drug management method provided in an exemplary embodiment of this disclosure;

[0019] Figure 2 This is a flowchart illustrating step S160 provided in an exemplary embodiment of this disclosure;

[0020] Figure 3 This is a flowchart illustrating step S140 provided in another exemplary embodiment of this disclosure;

[0021] Figure 4This is a flowchart illustrating step S163 provided in another exemplary embodiment of this disclosure;

[0022] Figure 5 This is a schematic flowchart of a blockchain-based drug management method provided in an exemplary embodiment of this disclosure;

[0023] Figure 6 This is a flowchart illustrating an application example provided in yet another exemplary embodiment of this disclosure;

[0024] Figure 7 This is a schematic diagram of the structure of a blockchain-based drug management device provided in an exemplary embodiment of this disclosure;

[0025] Figure 8 This is a structural diagram of an electronic device provided in an exemplary embodiment of this disclosure. Detailed Implementation

[0026] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0027] Those skilled in the art will understand that the terms "first," "second," etc., in the embodiments of this disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they indicate a necessary logical order between them.

[0028] It should also be understood that in the embodiments disclosed herein, "a plurality of" may refer to two or more, and "at least one" may refer to one, two or more.

[0029] It should also be understood that any component, data or structure mentioned in the embodiments of this disclosure can generally be understood as one or more unless expressly defined or given to the contrary in the context.

[0030] Furthermore, the term "and / or" in this disclosure is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this disclosure generally indicates that the preceding and following related objects have an "or" relationship.

[0031] It should also be understood that the description of the various embodiments in this disclosure emphasizes the differences between the various embodiments, and the similarities or similarities can be referred to each other. For the sake of brevity, they will not be described in detail.

[0032] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0033] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0034] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0035] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0036] The embodiments disclosed herein can be applied to electronic devices such as terminal devices, computer systems, and servers, and can operate together with a wide range of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, and servers include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments including any of the above systems, etc.

[0037] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.

[0038] Figure 1 This illustration shows a flowchart of a blockchain-based drug management method according to an embodiment of this disclosure. This embodiment can be applied to electronic devices, such as... Figure 1 As shown, the blockchain-based drug management method in this embodiment includes the following steps:

[0039] Step S110: The seller receives the purchase request sent by the buyer.

[0040] The drug purchase request includes: the buyer's identifier and the drug identifier to be purchased.

[0041] A drug identifier uniquely identifies a drug and includes the storage address of drug information, which can be retrieved from the blockchain based on this address. A buyer identifier uniquely identifies a buyer and includes the storage address of buyer information, which can be retrieved from the blockchain based on this address. Buyer information may include: prescription information, drug purchase information, and identity information. Both drug identifiers and buyer identifiers can be barcodes, QR codes, DID (Decentralized Identifier), etc. Sellers can be retail pharmacies, and buyers can be patients or other individuals.

[0042] Step S120: The seller obtains the drug information of the drug to be purchased on the blockchain based on the drug identifier.

[0043] The drug information includes: the name of the drug to be purchased, the method of administration, and the category.

[0044] The drug name can be the Chinese name or English name of the drug to be purchased. Dosage information can include the usage and dosage of the drug. For example, the dosage information for drug A could be: Usage: Oral, can be chewed; Dosage: Three times daily, one tablet each time. Category information can include the category to which the drug belongs. Category information can be created based on the drug's properties, such as side effects, activity, and dependence; or based on whether the drug is a prescription drug; or based on the specific circumstances. For example, category information could be hypoglycemic, antihypertensive, prescription, etc.; or it can be custom category information, such as category information A, category information B, etc. Category information can be stored in the form of a drug category information table, which can include the drug name and the category information corresponding to each drug name; then, the drug's category information can be determined based on the drug category information table.

[0045] In one implementation, drug information may further include: the drug label, manufacturer, ingredients, adverse reactions, precautions for use, expiration date, approval number, transportation information, and storage information of the drug to be purchased. This drug information can be uploaded by the seller or manufacturer to a blockchain (the storage address included in the drug label) for storage. Drug information can be retrieved from the blockchain based on the storage address of the drug information included in the drug label.

[0046] In step S130, in response to the fact that the category information of the medicine to be purchased is preset category information, the prescription information and medicine purchase information of the buyer are obtained from the blockchain based on the buyer's identifier.

[0047] The preset category information can be set according to the actual situation. For example, the preset category information can be prescription drugs. When it is determined that the category information of the drug to be purchased is a prescription drug, the category information of the drug to be purchased can be set to the preset category information.

[0048] Prescription information may include: at least one drug name, dosage, quantity, method of administration, doctor's name, hospital name, and date of prescription. Dosage may include the amount used each time and the daily dosage; for example, dosage could be: three times a day, one tablet each time. Quantity may be the total quantity of each drug used; for example, the quantity of drug A to be purchased could be 3 boxes (30 tablets). Method of administration may be the specific method of use, such as oral administration or topical application. Each buyer can have multiple prescription records. Drug purchase information includes all records of drug purchases by the buyer, and may include: purchase date, quantity purchased, drug name, and the name of the seller.

[0049] In one implementation, the hospital has a terminal that has been certified by the blockchain. Doctors can upload the prescription information they issue to the blockchain through the terminal, and at the same time, the doctors will also send the prescription information to the purchaser.

[0050] In one implementation, when the category information of the medicine to be purchased is not the preset category information, the seller can directly sell the medicine to the buyer.

[0051] Step S140: Based on the prescription information, determine whether there is any prescription information that meets the preset prescription screening criteria.

[0052] Among them, the preset prescription screening conditions can be the conditions for screening prescription information, and the preset prescription screening conditions can be set according to the actual situation.

[0053] In one implementation, all prescription information can be traversed to determine whether there is any prescription information containing a drug name that is the same as the drug name to be purchased in the drug information. When it is determined that there is a prescription information containing a drug name that is the same as the drug name to be purchased in the drug information, it is determined that there is prescription information that meets the preset prescription screening conditions.

[0054] Step S150: In response to the presence of prescription information that meets the preset prescription screening criteria in the prescription information, determine whether there are any drug purchase records in the drug purchase information for purchasing drugs within a preset time period, based on the drug purchase records in the drug purchase information.

[0055] The drug purchase information can include at least one drug purchase record. Each drug purchase record can include: the date of purchase, the quantity of drug purchased, the name of the drug purchased, and the name (or identifier) ​​of the seller of the drug. The preset time period can be set according to actual needs; for example, the preset time period can be one week.

[0056] In one implementation, it can be determined whether there is a drug purchase record in the drug purchase information that includes the name of the drug to be purchased. When it is determined that there is a drug purchase record that includes the name of the drug to be purchased, this drug purchase record is designated as the target record. When the number of target records is greater than one, it can be determined whether the time interval between the purchase date in the most recent target record and the current date is less than a preset time period. If it is less than the preset time period, it can be determined that there is a drug purchase record in the drug purchase information that purchased the drug to be purchased within the preset time period. When the number of target purchase records is one, it can be determined directly based on the purchase date and the current date in the target record whether there is a drug purchase record in the drug purchase information that purchased the drug to be purchased within the preset time period. When it is determined that there is no drug purchase record that includes the name of the drug to be purchased, it can be determined that there is no drug purchase record in the drug purchase information that purchased the drug to be purchased within the preset time period.

[0057] Step S160: In response to the existence of drug purchase records for drugs purchased within a preset time period in the drug purchase information, determine whether the purchaser meets the preset drug purchase conditions based on the drug purchase information and medication method information.

[0058] In one implementation, the most recent drug purchase record of the drug to be purchased in the drug purchase information can be used as the target purchase record; the dosage of the drug to be purchased can be determined from the medication method information of the drug to be purchased.

[0059] Based on the purchase date and quantity of the medicine in the target purchase record, as well as the current date and medicine usage, determine the remaining quantity of the medicine to be purchased corresponding to the target purchase record. When the remaining quantity is less than or equal to the preset remaining quantity, it is determined that the purchaser meets the preset medicine purchase conditions.

[0060] In one implementation, when it is determined that there is no drug purchase record in the drug purchase information for purchasing the drug to be purchased within a preset time period, the seller sells the drug to the buyer.

[0061] In step S170, in response to the buyer meeting the preset drug purchase conditions, the seller sells the drug to the buyer.

[0062] Specifically, when it is determined that the buyer meets the preset drug purchase conditions, the seller sells the drug to the buyer.

[0063] In one implementation, after the seller sells the medicine to the buyer, the seller generates a medicine purchase record for this transaction and updates the medicine purchase record to the buyer's medicine purchase information.

[0064] In one practical approach, the seller will not sell the medicine to the buyer if it is determined that the buyer does not meet the preset conditions for purchasing the medicine.

[0065] In this embodiment, combining the drug information to be purchased with the purchaser's prescription and purchase information not only allows for determining whether to sell the drug to the purchaser based on their current medication history, ensuring medication safety, but also enables processing of drugs in preset categories and direct sale of drugs in non-preset categories, further ensuring medication safety and improving sales efficiency. Furthermore, this embodiment records the final stage of drug distribution through purchase information, thus perfecting the drug distribution information chain.

[0066] In one alternative embodiment, such as Figure 2 As shown, step S160 in this embodiment may include the following steps:

[0067] Step S161: Obtain the most recent drug purchase record of the drug to be purchased from the drug purchase information as the target purchase record.

[0068] The target purchase record includes: the date of purchase and the quantity of medicine purchased.

[0069] The target purchase record may also include: the name of the purchased drug and the name (or identifier) ​​of the seller of the purchased drug. Purchase records that include the same name as the drug to be purchased can be identified as purchase records for the drug to be purchased.

[0070] When the number of drug purchase records for a drug to be purchased is greater than one, the most recent drug purchase record for that drug will be selected as the target purchase record. When the number of drug purchase records for a drug to be purchased is equal to one, that drug purchase record will be selected as the target purchase record.

[0071] For example, when there are two drug purchase records for drug A to be purchased, these two drug purchase records are drug purchase record a and drug purchase record b, respectively. The purchase date in drug purchase record a is March 15, 2021, and the purchase date in drug purchase record b is January 7, 2021. Then, drug purchase record a is determined as the target purchase record.

[0072] Step S162: Based on the target purchase record, current date, and medication method information, determine whether the quantity of medicines to be purchased has been used up.

[0073] Specifically, it can be determined whether the buyer has used up the purchased drugs according to the purchase date and quantity in the target purchase record, as well as the dosage in the current date and medication method information.

[0074] For example, if the purchase date in the target purchase record is March 15, 2021, the quantity purchased is 1 box (16 tablets), the current date is April 4, 2021, and the dosage in the medication instructions is: 2 times a day, one tablet each time.

[0075] Based on the purchase date and the current date in the target purchase record, it can be determined that the interval between the purchase date and the current date is 20 days. Based on the dosage, the daily dosage is 2 tablets. Based on the purchase quantity (16 tablets), the interval (20 days), and the daily dosage (2 tablets), it can be determined that the medicine to be purchased has been used up by the current date.

[0076] Step S163: In response to the exhaustion of the purchased drugs in the quantity ordered, determine that the purchaser meets the preset drug purchase conditions.

[0077] When the quantity of medicines to be purchased is used up and it is determined that the buyer meets the preset purchase conditions, the seller will sell the medicines to the buyer.

[0078] In one implementation, if the quantity of medicines to be purchased is not used up, it is determined that the buyer does not meet the preset purchase conditions, and the seller will not sell the medicines to the buyer.

[0079] In this embodiment of the disclosure, based on the purchaser's most recent drug purchase record, as well as the current date and medication method information, it is determined whether the purchaser has used up the most recent purchased drug. Once it is determined that the drug has been used up, it is determined that the drug can be sold to the purchaser. This effectively ensures that the drug is sold to the purchaser when the drug has been used up. This not only improves the purchaser's medication safety but also enables effective monitoring of the purchaser's drug usage. It can promptly detect whether the purchaser has exceeded the dosage specified in the medication method information, further guaranteeing the purchaser's medication safety.

[0080] In one alternative embodiment, such as Figure 3 As shown in this embodiment, the drug purchase request further includes: the purchaser's prescription information; step S140 may include the following steps:

[0081] Step S141: Based on the prescription information and drug information, determine whether there is prescription information that includes the name of the drug to be purchased.

[0082] The purchaser's prescription information may include: at least one drug name, drug dosage, quantity of drug, method of drug use, doctor's name, hospital name, and date of prescription.

[0083] When a prescription contains a drug name that is identical to the name of the drug to be purchased, it is determined that the prescription contains prescription information that includes the name of the drug to be purchased.

[0084] Step S142: In response to the existence of prescription information containing the name of the drug to be purchased, the prescription information containing the name of the drug to be purchased is determined as the target prescription information.

[0085] Among them, prescription information that includes the same name as the drug to be purchased is identified as target prescription information.

[0086] Step S143: Determine whether the target prescription information matches the purchaser's prescription information.

[0087] In one implementation, multiple first key fields of the target prescription information and multiple second key fields of the buyer's prescription information can be obtained. The first key fields can be all drug names, drug dosages, drug quantities, doctor names, and prescription dates in the target prescription information; the second key fields can be all drug names, drug dosages, drug quantities, doctor names, and prescription dates in the target prescription information. A hash calculation is performed on the multiple first key fields to obtain first hash values, and a hash calculation is performed on the multiple second key fields to obtain second hash values. The first hash values ​​and second hash values ​​are compared. If the first hash value and the second hash value are the same, the target prescription information is determined to match the buyer's prescription information. Alternatively, if the drug name, drug dosage, drug quantity, and doctor name in the target prescription information are the same as those in the target prescription information, the target prescription information matches the buyer's prescription information.

[0088] It should be noted that when there are multiple target prescription information, each target prescription information needs to be matched with the purchaser's prescription information. When there is a target prescription information that matches the purchaser's prescription information among the multiple target prescription information, it can be determined that the target prescription information matches the purchaser's prescription information.

[0089] Step S144: In response to the matching of the target prescription information and the purchaser's prescription information, determine that there is prescription information in the prescription information that meets the preset prescription screening conditions.

[0090] Specifically, when it is determined that the target prescription information matches the purchaser's prescription information, it is determined that the prescription information contains prescription information that meets the preset prescription screening conditions.

[0091] In one alternative embodiment, such as Figure 4 As shown in this embodiment, the drug purchase request further includes: the quantity of drugs to be purchased; step S163 may include the following steps:

[0092] Step S1631: In response to the use up of the purchased drugs, based on the quantity of drugs purchased and the prescription information of the purchaser, determine whether the quantity of drugs used in the prescription information of the purchaser is greater than or equal to the quantity of drugs purchased.

[0093] The purchaser's prescription information may include: Quantity of medication. The quantity of medication can be the total quantity of each type of medication used. The quantity of medication to be purchased is the total quantity of medications the purchaser intends to buy. The purchaser's prescription information may include multiple quantities of medication, one quantity corresponding to each medication to be purchased.

[0094] Step S1632: In response to the purchaser's prescription information showing a quantity of medication greater than or equal to the quantity of medication purchased, determine that the purchaser meets the preset medication purchase conditions.

[0095] Specifically, when the target purchase record is determined to be used up, the quantity of the medicine to be purchased included in the purchaser's prescription information can be obtained from the purchaser's prescription information. The quantity of medicine to be purchased is compared with the quantity used. When the quantity of medicine to be purchased in the purchaser's prescription information is greater than or equal to the quantity of medicine to be purchased, it is determined that the purchaser meets the preset medicine purchase conditions.

[0096] In one alternative embodiment, such as Figure 5 As shown in this embodiment, the drug purchase request further includes: the public key of the hospital's public-private key pair; the prescription information has a signature generated using the private key of the hospital's public-private key pair;

[0097] The blockchain-based drug management method in this embodiment may include the following steps:

[0098] In step S210, the seller uses the public key to verify the signature of the prescription information.

[0099] The hospital can be a hospital or related medical institution, and it has the authority to issue prescriptions. The hospital can create its public-private key pair using asymmetric encryption algorithms, SM2 national cryptographic algorithm, etc. The public-private key pair includes a public key and a private key. The private key is used for signing, for example, signing prescription information using the private key. The public key is used to verify the signature generated using the private key in the public-private key pair.

[0100] In one practical approach, the hospital issues a prescription to the buyer, generates a copy of the prescription information identical to the original prescription, and sends this copy to the buyer as their prescription information. The hospital then signs the prescription information using the private key from its public-private key pair and uploads the signed prescription information to the blockchain via a terminal authenticated by the hospital. The hospital also sends the public key from its public-private key pair to the buyer.

[0101] Step S220: In response to the presence of a signature of at least one prescription information that has been verified by the public key, perform an operation on the prescription information that has been verified by the signature to determine whether there is any prescription information in the prescription information that meets the preset prescription screening conditions.

[0102] Specifically, the public key in the public-private key pair of the hospital in the drug purchase request is used to verify the signature of all prescription information of the buyer. When the signature of all prescription information of all buyers passes the public key verification, step S140 is executed for all prescription information. When the signature of some prescription information of the buyer passes the public key verification, step S140 is executed for the verified prescription information. When the signature of all prescription information of all buyers fails the public key verification, the operation ends and the drug to be purchased is not sold to the buyer.

[0103] In one alternative embodiment, Figure 6 This illustration shows an overall flowchart of a blockchain-based drug management method provided by an exemplary embodiment of this disclosure. The specific operations of each step have been described in detail above and will not be repeated here.

[0104] 1. The seller receives a drug purchase request from the buyer. The drug purchase request includes: the buyer's identifier, the drug identifier of the drug to be purchased, the buyer's prescription information, the quantity of the drug to be purchased, and the public key in the hospital's public-private key pair.

[0105] 2. The seller obtains the drug information of the drug to be purchased on the blockchain based on the drug label. The drug information includes: the drug name, administration method and category information of the drug to be purchased.

[0106] 3. Based on the category information of the medicine to be purchased and the preset category information, determine whether the category information of the medicine to be purchased is the preset category information. If it is determined that the category information of the medicine to be purchased is not the preset category information, proceed to step 4. If it is determined that the category information of the medicine to be purchased is the preset category information, proceed to step 5.

[0107] 4. The seller sells the medicine to the buyer, and then no further steps in this embodiment are performed.

[0108] 5. Based on the buyer's identifier, obtain the buyer's prescription information and drug purchase information from the blockchain.

[0109] 6. Use the public key in the hospital's public-private key pair to verify the signature of the purchaser's prescription information. If all the signatures of the purchaser's prescription information fail the public key verification, proceed to step 7. If at least one of the purchaser's prescription information has a signature that passes the public key verification, proceed to step 8.

[0110] 7. Do not sell the medicine to be purchased to the buyer, and then do not perform the subsequent steps of this embodiment.

[0111] 8. Determine whether there is a prescription information containing the name of the drug to be purchased in the prescription information verified by signature. If it is determined that there is no prescription information containing the name of the drug to be purchased in the prescription information verified by signature, proceed to step 9. If it is determined that there is a prescription information containing the name of the drug to be purchased in the prescription information verified by signature, proceed to step 10.

[0112] 9. Do not sell the medicine to be purchased to the buyer, and then do not perform the subsequent steps of this embodiment.

[0113] 10. The prescription information that has been verified by signature and includes the name of the drug to be purchased shall be identified as the target prescription information.

[0114] 11. Based on the target prescription information and the purchaser's prescription information, determine whether the target prescription information matches the purchaser's prescription information. If they do not match, proceed to step 12; if they match, proceed to step 13.

[0115] 12. Do not sell the medicine to be purchased to the buyer, and then do not perform the subsequent steps of this embodiment.

[0116] 13. Based on the drug purchase records in the drug purchase information, determine whether there are any drug purchase records for the drugs to be purchased within the preset time period. If it is determined that there are no records, proceed to step 14; if it is determined that there are records, proceed to step 15.

[0117] 14. The seller sells the medicine to the buyer, and then no further steps in this embodiment are performed.

[0118] 15. Based on the drug purchase records in the drug purchase information, obtain the most recent drug purchase record of the drug to be purchased as the target purchase record.

[0119] 16. Based on the target purchase record, current date, and medication method information, determine whether the quantity of medicine to be purchased in the target purchase record has been used up. If it is determined that it has not been used up, proceed to step 17; if it is determined that it has been used up, proceed to step 18.

[0120] 17. Do not sell the medicine to be purchased to the buyer, and then do not perform the subsequent steps of this embodiment.

[0121] 18. Based on the quantity of medicines purchased and the prescription information of the purchaser, determine whether the quantity of medicines in the prescription information is greater than or equal to the quantity of medicines purchased. If it is determined that the quantity of medicines in the prescription information is greater than or equal to the quantity of medicines purchased, proceed to step 19. If it is determined that the quantity of medicines in the prescription information is less than the quantity of medicines purchased, proceed to step 20.

[0122] 19. The seller sells the medicine to the buyer, and then no further steps in this embodiment are performed.

[0123] 20. Do not sell medicines to the buyer.

[0124] Figure 7 A block diagram of a blockchain-based drug management device is shown in an embodiment of this disclosure. Figure 7 As shown, this embodiment of the blockchain-based drug management device is applied to a seller and includes:

[0125] The receiving module 310 is used to receive a drug purchase request sent by the buyer, wherein the drug purchase request includes: the buyer's identifier and the drug identifier of the drug to be purchased;

[0126] The first acquisition module 320 is used to acquire the drug information of the drug to be purchased on the blockchain according to the drug identifier, wherein the drug information includes: the drug name, administration method information and category information of the drug to be purchased;

[0127] The first response module 330 is used to, in response to the category information of the medicine to be purchased being preset category information, obtain the prescription information and medicine purchase information of the purchaser from the blockchain based on the purchaser identifier;

[0128] The first determining module 340 is used to determine, based on the prescription information, whether there is any prescription information in the prescription information that meets the preset prescription screening conditions;

[0129] The second determining module 350 is used to respond to the presence of prescription information that meets the preset prescription screening conditions in the prescription information, and to determine whether there is a drug purchase record in the drug purchase information that was purchased within a preset time period based on the drug purchase record in the drug purchase information.

[0130] The third determining module 360 ​​is used to respond to the existence of a drug purchase record of purchasing the drug to be purchased within a preset time period in the drug purchase information, and to determine whether the purchaser meets the preset drug purchase conditions based on the drug purchase information and the medication method information.

[0131] The second response module 370 is used to respond to the buyer meeting the preset drug purchase conditions, and the seller sells the drug to be purchased to the buyer.

[0132] In one embodiment of this disclosure, the third determining module 360 ​​includes:

[0133] The acquisition submodule 361 (not shown in the figure) is used to acquire the most recent drug purchase record of the drug to be purchased from the drug purchase information as the target purchase record, wherein the target purchase record includes: purchase date and purchase quantity;

[0134] The first determining submodule 362 (not shown in the figure) is used to determine whether the quantity of the medicine to be purchased has been used up based on the target purchase record, the current date and the medication method information;

[0135] The first response submodule 363 (not shown in the figure) is used to determine that the purchaser meets the preset purchase conditions in response to the exhaustion of the quantity of medicines to be purchased.

[0136] In one embodiment of this disclosure, the drug purchase request further includes: the purchaser's prescription information; the first determining module 340 includes:

[0137] The second determining submodule 341 (not shown in the figure) is used to determine, based on the prescription information and the drug information, whether there is prescription information in the prescription information that includes the name of the drug to be purchased;

[0138] The second response submodule 342 (not shown in the figure) is used to determine the prescription information containing the name of the drug to be purchased as the target prescription information in response to the existence of prescription information containing the name of the drug to be purchased in the prescription information.

[0139] The third determining submodule 343 (not shown in the figure) is used to determine whether the target prescription information matches the purchaser's prescription information;

[0140] The third response submodule 344 (not shown in the figure) is used to determine, in response to the matching of the target prescription information with the purchaser's prescription information, that there is prescription information in the prescription information that meets the preset prescription screening conditions.

[0141] In one embodiment of this disclosure, the drug purchase request further includes: the quantity of drugs to be purchased; the first response submodule 363 includes:

[0142] The first response unit 3631 (not shown in the figure) is used to determine, in response to the use up of the quantity of medicine to be purchased, whether the quantity of medicine in the purchaser's prescription information is greater than or equal to the quantity of medicine to be purchased, based on the quantity of medicine purchased and the purchaser's prescription information.

[0143] The second response unit 3632 (not shown in the figure) is used to determine that the buyer meets the preset drug purchase conditions in response to the quantity of medication in the buyer's prescription information being greater than or equal to the quantity of medication purchased.

[0144] In one embodiment of this disclosure, the drug purchase request further includes: the public key of the hospital's public-private key pair; the prescription information has a signature generated using the private key of the hospital's public-private key pair; the blockchain-based drug management device further includes:

[0145] Verification module 370 (not shown in the figure) is used by the seller to verify the signature of the prescription information using the public key;

[0146] The third response module 380 (not shown in the figure) is used to perform the operation of determining whether there is prescription information that meets preset prescription screening conditions based on the prescription information in response to the existence of a signature of at least one prescription information verified by the public key.

[0147] In addition, this disclosure also provides an electronic device, including:

[0148] Memory, used to store computer programs;

[0149] A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the blockchain-based drug management method described in any of the above embodiments of this disclosure.

[0150] Figure 8 This is a schematic diagram illustrating the structure of an application embodiment of the electronic device disclosed herein. Below, reference is made to… Figure 8 To describe an electronic device according to embodiments of this disclosure. For example... Figure 8 As shown, the electronic device includes one or more processors and memory.

[0151] A processor can be a central processing unit (CPU) or other form of processing unit with data processing and / or instruction execution capabilities, and can control other components in an electronic device to perform desired functions.

[0152] The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and a processor may execute the program instructions to implement the blockchain-based drug management method of the various embodiments of this disclosure described above, and / or other desired functions.

[0153] In one example, the electronic device may also include input devices and output devices, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0154] In addition, the input device may include, for example, a keyboard, a mouse, etc.

[0155] This output device can output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0156] Of course, for the sake of simplicity, Figure 8 Only some of the components of the electronic device relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device may include any other suitable components depending on the specific application.

[0157] In addition to the methods and apparatus described above, embodiments of this disclosure may also be computer program products comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the blockchain-based drug management methods according to various embodiments of this disclosure as described in the foregoing sections of this specification.

[0158] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0159] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the blockchain-based drug management method according to various embodiments of this disclosure as described in the foregoing portion of this specification.

[0160] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0161] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.

[0162] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0163] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0164] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0165] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0166] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions to this disclosure.

[0167] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0168] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A blockchain-based drug management method, characterized in that, include: The seller receives a drug purchase request sent by the buyer, wherein the drug purchase request includes: a buyer identifier and a drug identifier of the drug to be purchased, the buyer identifier includes a storage address for retrieving buyer information from the blockchain, and the drug identifier of the drug to be purchased includes a storage address for retrieving drug information of the drug to be purchased from the blockchain; The seller obtains the drug information of the drug to be purchased on the blockchain based on the drug identifier. The drug information includes: the drug name, administration method and category information of the drug to be purchased. The drug information is stored at the storage address included in the drug identifier that the seller or manufacturer has pre-uploaded to the blockchain. In response to the fact that the category information of the medicine to be purchased is preset category information, the prescription information and medicine purchase information of the purchaser are obtained from the blockchain based on the purchaser's identifier; wherein, the prescription information is signed by the hospital using the private key in the hospital's public-private key pair, and the signed prescription information is uploaded to the blockchain through the hospital's terminal that has passed blockchain authentication; Based on the prescription information, determine whether there is any prescription information that meets the preset prescription screening criteria. In response to the presence of prescription information that meets preset prescription screening conditions in the prescription information, the system determines whether there are any drug purchase records in the drug purchase information that were purchased within a preset time period for the drug to be purchased, based on the drug purchase records in the drug purchase information. In response to the existence of a drug purchase record in the drug purchase information within a preset time period for purchasing the drug to be purchased, the purchaser is determined to meet the preset drug purchase conditions based on the drug purchase information and the medication method information. In response to the buyer meeting the preset drug purchase conditions, the seller sells the drug to be purchased to the buyer; The medication purchase request also includes: the public key of the hospital's public-private key pair; the prescription information has a signature generated using the private key of the hospital's public-private key pair; Before determining whether there are prescriptions in the prescription information that meet the preset prescription screening criteria based on the prescription information, the method further includes: The seller uses the public key to verify the signature of the prescription information; In response to the existence of a signature of at least one prescription information that is verified by the public key, the operation of determining whether there is any prescription information in the prescription information that meets the preset prescription screening conditions is performed on the prescription information that has passed the signature verification.

2. The method according to claim 1, characterized in that, The step of determining whether the purchaser meets the preset drug purchase conditions based on the drug purchase information and the medication method information includes: From the drug purchase information, the most recent drug purchase record of the drug to be purchased is obtained as the target purchase record, wherein the target purchase record includes: purchase date and purchase quantity; Based on the target purchase record, the current date, and the medication method information, determine whether the quantity of the medicine to be purchased has been used up; In response to the exhaustion of the quantity of medicines to be purchased, it is determined that the purchaser meets the preset medicine purchase conditions.

3. The method according to claim 2, characterized in that, The drug purchase request also includes: the purchaser's prescription information; The step of determining whether there are prescriptions in the prescription information that meet preset prescription screening criteria based on the prescription information includes: Based on the prescription information and the drug information, determine whether there is prescription information in the prescription information that includes the name of the drug to be purchased; In response to the presence of prescription information containing the name of the drug to be purchased, the prescription information containing the name of the drug to be purchased is determined as the target prescription information; Determine whether the target prescription information matches the purchaser's prescription information; In response to the matching of the target prescription information with the purchaser's prescription information, it is determined that there is prescription information in the prescription information that meets the preset prescription screening conditions.

4. The method according to claim 3, characterized in that, The drug purchase request also includes: the quantity of drugs to be purchased; The step of determining that the purchaser meets the preset purchase conditions in response to the depletion of the quantity of medicines to be purchased in accordance with the purchase quantity includes: In response to the use up of the purchased drugs in the specified quantity, based on the purchased quantity of drugs and the purchaser's prescription information, it is determined whether the quantity of drugs in the purchaser's prescription information is greater than or equal to the purchased quantity of drugs; In response to the purchaser's prescription information indicating that the quantity of medication used is greater than or equal to the quantity of medication purchased, the purchaser is determined to meet the preset medication purchase conditions.

5. A blockchain-based drug management device, characterized in that, Applied to sellers, including: A receiving module is used to receive a drug purchase request sent by a buyer. The drug purchase request includes: a buyer identifier and a drug identifier of the drug to be purchased. The buyer identifier includes a storage address for obtaining buyer information from the blockchain, and the drug identifier of the drug to be purchased includes a storage address for obtaining drug information of the drug to be purchased from the blockchain. The first acquisition module is used to acquire the drug information of the drug to be purchased on the blockchain according to the drug identifier, wherein the drug information includes: the drug name, administration method information and category information of the drug to be purchased, and the drug information is stored in the storage address included in the drug identifier pre-uploaded to the blockchain by the seller or manufacturer; The first response module is used to respond to the fact that the category information of the medicine to be purchased is preset category information, and obtain the prescription information and medicine purchase information of the purchaser from the blockchain based on the purchaser identifier; wherein, the prescription information is signed by the hospital using the private key in the hospital's public-private key pair, and the signed prescription information is uploaded to the blockchain through the hospital's terminal that has passed blockchain authentication; The first determining module is used to determine, based on the prescription information, whether there is any prescription information in the prescription information that meets the preset prescription screening conditions; The second determining module is used to respond to the presence of prescription information that meets the preset prescription screening conditions in the prescription information, and to determine whether there is a drug purchase record in the drug purchase information that was purchased within a preset time period based on the drug purchase record in the drug purchase information. The third determining module is used to respond to the existence of a drug purchase record in the drug purchase information within a preset time period for purchasing the drug to be purchased, and to determine whether the purchaser meets the preset drug purchase conditions based on the drug purchase information and the medication method information. The second response module is used to respond to the fact that the buyer meets the preset drug purchase conditions, and the seller sells the drug to be purchased to the buyer. The medication purchase request also includes: the public key of the hospital's public-private key pair; the prescription information has a signature generated using the private key of the hospital's public-private key pair; The blockchain-based drug management device also includes: The verification module is used by the seller to verify the signature of the prescription information using the public key; The third response module is used to perform the operation of determining whether there is any prescription information that meets the preset prescription screening conditions based on the prescription information in response to the existence of a signature of at least one prescription information that has been verified by the public key.

6. The apparatus according to claim 5, characterized in that, The third determining module includes: The acquisition submodule is used to acquire the most recent drug purchase record of the drug to be purchased from the drug purchase information as the target purchase record, wherein the target purchase record includes: purchase date and purchase quantity; The first determining submodule is used to determine whether the quantity of the medicine to be purchased has been used up based on the target purchase record, the current date, and the medication method information; The first response submodule is used to determine that the purchaser meets the preset purchase conditions in response to the fact that the quantity of the medicine to be purchased has been used up.

7. The apparatus according to claim 6, characterized in that, The drug purchase request also includes: the purchaser's prescription information; The first determining module includes: The second determining submodule is used to determine, based on the prescription information and the drug information, whether there is prescription information in the prescription information that includes the name of the drug to be purchased; The second response submodule is used to determine the prescription information containing the name of the drug to be purchased as the target prescription information in response to the existence of prescription information containing the name of the drug to be purchased in the prescription information. The third determining submodule is used to determine whether the target prescription information matches the purchaser's prescription information; The third response submodule is used to determine, in response to the matching of the target prescription information with the purchaser's prescription information, that there is prescription information in the prescription information that meets the preset prescription screening conditions.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute a computer program stored in the memory, wherein when the computer program is executed, it implements the blockchain-based drug management method according to any one of claims 1-4.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the blockchain-based drug management method according to any one of claims 1-4.