CN116385023A - Drug traceability system and method based on blockchain - Google Patents

Drug traceability system and method based on blockchain Download PDF

Info

Publication number
CN116385023A
CN116385023A CN202310312868.4A CN202310312868A CN116385023A CN 116385023 A CN116385023 A CN 116385023A CN 202310312868 A CN202310312868 A CN 202310312868A CN 116385023 A CN116385023 A CN 116385023A
Authority
CN
China
Prior art keywords
medicine
contract
drug
data
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310312868.4A
Other languages
Chinese (zh)
Inventor
王立波
范文杰
黄子龙
许诺
罗宇鑫
李安琪
黄麒儒
伍娟
华天标
吕思震
赵祎明
刘志全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan University
Original Assignee
Jinan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan University filed Critical Jinan University
Priority to CN202310312868.4A priority Critical patent/CN116385023A/en
Publication of CN116385023A publication Critical patent/CN116385023A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Technology Law (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The invention discloses a drug traceability system and method based on a blockchain, wherein the system comprises an under-chain perception layer, an on-chain application layer and a blockchain network infrastructure layer; the under-chain sensing layer comprises various environment parameter sensors, a medicine quality detecting instrument, medicine unique identification tag reading equipment and an Internet of things gateway and is used for completing data collection in the processes of medicine production, storage and transportation; the on-chain application layer comprises a medicine data module, a medicine contract module, an anti-counterfeiting tracing module, a user management module and an application gateway; and the blockchain network infrastructure layer is composed of server nodes built by various participants, and each server node runs a designated intelligent contract according to the identity of the participant to which the server node belongs and is responsible for maintaining a blockchain account book. The invention is based on the blockchain technology, and realizes the comprehensive supervision and information transparency of the medicines in the links of production, circulation and sales.

Description

Drug traceability system and method based on blockchain
Technical Field
The invention belongs to the technical field of blockchain, and particularly relates to a drug traceability system and method based on blockchain.
Background
Drug traceability refers to the whole process of monitoring and recording the process from production, circulation to final sales of drugs, so as to ensure the medication safety of consumers and maintain medical order. However, the conventional drug traceability system has some problems, such as isolation of raw material suppliers, manufacturers, logistics companies, detection institutions and sales institutions, individual information islands, mutual distrustation, inconsistent traceability standards, and difficulty in achieving a unified system, so that end consumers have difficulty in trusting the security of drugs. The blockchain technique is an excellent solution to the above-described problems. The blockchain is a distributed account book technology, a decentralised trusted environment can be established among a plurality of participants, the security of multiparty data is ensured in a alliance formed by the plurality of participants, and a set of quick and stable trust system is constructed. In the blockchain, participants form a decentralized distributed storage system, and redundant histories prevent a malicious attacker from easily tampering with the given results. Meanwhile, the storage system can generate an account book block under the common witness of each participant through a specific consensus mechanism, and no single or few entities are used for management in the process, so that the public trust of information stored on one block is ensured. Meanwhile, the efficiency is improved along with the method and the device which can reduce human intervention and errors. Therefore, the drug traceability system based on the blockchain can record information in the whole process on the blockchain, so that the reliability, transparency and traceability of the information can be greatly improved, and the safety problem possibly caused by illegal information pruning and the like is prevented.
Disclosure of Invention
The invention aims to overcome the defects and shortcomings of the prior art and provides a drug traceability system and method based on a blockchain.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
a drug traceability system based on a blockchain relates to five participants of a producer, a detection mechanism, a carrier, a distributor and a consumer, and comprises a chain lower perception layer, an upper application layer and a blockchain network infrastructure layer;
the under-chain sensing layer comprises various environment parameter sensors, a medicine quality detecting instrument, medicine unique identification tag reading equipment and an Internet of things gateway and is used for completing data collection in the processes of medicine production, storage and transportation;
the on-chain application layer comprises a medicine data module, a medicine contract module, an anti-counterfeiting tracing module, a user management module and an application gateway;
the block chain network infrastructure layer is composed of server nodes built by all the participants, and each server node runs a designated intelligent contract and is responsible for maintaining a block chain account book according to the identity of the participant to which the server node belongs; under the premise of protecting the privacy security of data of each party, the blockchain is divided into two pieces, namely a medicine information chain for recording the data of the medicine and an anti-counterfeiting traceability chain for recording traceability history.
The invention also comprises a medicine tracing method based on the provided medicine tracing system, which is provided with five participants of a producer, a detection mechanism, a carrier, a distributor and a consumer, and comprises the following steps:
s1, initializing a medicine tracing system, constructing a server by each participant, initializing a block chain network node, applying random strings by the participants and submitting registration data, and detecting the registration data by a user management module;
s2, detecting the quality of the medicine, wherein a manufacturer establishes a detection contract and signs the contract with a detection mechanism, the detection mechanism fulfills the detection contract, a medicine contract module processes a contract fulfilling result, and the manufacturer acquires the detection result and inquires about quality problems;
s3, the manufacturer and the distributor trade the medicine, the manufacturer and the distributor sign trade contracts, the manufacturer, the transporter and the distributor sign transport contracts together, the transporter fulfills transport contracts, and the distributor receives the medicine;
s4, selling the medicines to the consumers by the distributors, establishing transaction contracts and preparing to sell the medicines by the distributors, signing the transaction contracts by the consumers to complete medicine purchase, and confirming the collection condition by the distributors to complete the transaction contracts;
s5, a consumer applies for anti-counterfeiting tracing of the medicine, the consumer obtains anti-counterfeiting tracing information, the medicine tracing system generates and returns an anti-counterfeiting tracing record, and the consumer receives the anti-counterfeiting tracing report.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. the system and the method can monitor and record the whole process from production, circulation to sales of the medicine, and ensure the authenticity, the integrity and the non-tamper property of the information through a blockchain and digital signature technology; by endowing the medicine with a unique identification traceability code, a consumer can quickly trace information such as the source, the circulation path, the storage condition and the like of the medicine after purchasing the medicine, so that the medication safety of the consumer is ensured.
2. The system and the method can help enterprises and supervision departments to save the drug tracing cost; in the traditional tracing mode, each enterprise has a plurality of self-built databases, has information barriers, and needs to input a great deal of manpower and material resource cost in the medicine tracing process.
Drawings
FIG. 1 is a schematic diagram of a system of the present invention;
fig. 2 is a flow chart of the method of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but embodiments of the present invention are not limited thereto.
Examples
As shown in FIG. 1, the invention provides a drug traceability system based on a blockchain, which comprises an under-chain perception layer, an on-chain application layer and a blockchain network infrastructure layer;
the under-chain sensing layer comprises various environment parameter sensors, a medicine quality detecting instrument, medicine unique identification tag reading equipment and an Internet of things gateway and is used for completing data collection in the processes of medicine production, storage and transportation;
the on-chain application layer comprises a medicine data module, a medicine contract module, an anti-counterfeiting tracing module, a user management module and an application gateway;
the block chain network infrastructure layer is composed of server nodes built by various participants, and each server node runs a designated intelligent contract according to the identity of the participant to which the server node belongs and is responsible for maintaining a block chain account book; under the premise of protecting the privacy security of data of each party, the blockchain is divided into two pieces, namely a medicine information chain for recording the data of the medicine and an anti-counterfeiting traceability chain for recording traceability history.
As shown in fig. 1, the participants (users) involved in the system of the present embodiment include: manufacturer (producer), detection mechanism (detector), carrier (transporter), distributor (distributor), and consumer (consumer); the detailed descriptions of the participants in the system are as follows:
the manufacturer is responsible for recording the production quality data of the medicine as the starting point of the life cycle of the medicine, endows the medicine with a unique traceability label, realizes that each operation in the process of medicine circulation can be recorded on a history block of the unique traceability label, ensures the effective creation of a medicine traceability link, ensures that a participant receiving the medicine can trace the authenticity of the medicine and determine the safety of the medicine through the label, and is convenient for timely receiving the feedback of adverse reaction and quality problems of the medicine in the subsequent links.
And the detection mechanism is responsible for detecting the quality of the medicines submitted by the manufacturer and registering the detection result in the system.
The carrier mainly completes the circulation of the medicines among other system participants, so that the quality data of the medicines are not required to be concerned, and the source of the quality problem possibly occurring in the process of receiving and delivering the medicines is required to be concerned, for example, whether the medicines are in a proper preservation environment or not is judged, and the carrier is required to record the sensing data of the environment where the medicines are in the process; aiming at whether the medicine is stolen or replaced maliciously in the middle, the carrier should record the transportation route data of the medicine at regular time.
The distributor mainly collects the demands of the sales terminals and orders the medicines from the producer or the superior distributor according to the demands, thus being responsible for creating transportation contracts and recording the storage environment data of the medicines before transferring most of the time.
The consumer mainly focuses on whether the use of the medicine brings about a safety problem, so that the quality of the medicine can be actively determined after the medicine is purchased.
In this embodiment, the environmental parameter sensor is configured to collect drug production-related data, drug storage-related data, drug transport-related data, and drug transaction data;
the medicine quality detecting instrument is used for detecting whether the medicine quality reaches a specified standard or not, and submitting the detection process and result data to a medicine information chain so as to facilitate the follow-up medicine quality problem alarming and the tracing of the problem root;
the medicine unique identification tag reading equipment is used for identifying the medicine unique identification tag when medicines circulate among all the participants, and providing an anti-counterfeiting traceability entrance of the medicines for the participants;
the gateway of the Internet of things has sufficient computing resources, is used as a middleware for communicating the under-chain sensing layer with the blockchain layer, provides a channel for the sensing equipment with limited resources in the under-chain sensing layer to be connected with the blockchain network, and provides sensing data caching, data anomaly alarming and sensing data packing and chaining services;
among the data collected by the environmental parameter sensor, the drug production related data specifically include:
raw material number, medicine manufacturer ID, medicine production time, medicine production batch, medicine detection contract ID and original production data hash fingerprint (the original production data refers to the confidential data such as production line operation time, production environment temperature and humidity); as shown in table 1 below, a table of data fields related to drug production.
Figure SMS_1
Figure SMS_2
TABLE 1
The drug storage related data specifically include:
drug belongs to warehouse responsible person ID, drug expected warehouse entry time, drug actual warehouse entry time, drug expected warehouse exit time, drug actual warehouse entry time, drug expected temporary storage time length and drug storage environment sensing data (such as temperature, humidity, illumination and the like); as shown in table 2 below, a table of relevant data fields is stored for the drug.
Symbol expression Field name
ID manager Drug-affiliated warehouse responsible person ID
ET in Drug expected warehouse-in time
AT in Actual time of drug storage
ET out Drug expected time to leave warehouse
AT out Actual time of drug delivery
ET store Anticipated temporary duration of medicine
Data env Drug storage environment sensing data
TABLE 2
The drug delivery related data specifically includes:
driver ID in charge of the transportation, GPS data in the transportation and drug preservation environment sensing data; as shown in table 3 below, a table of data fields related to drug delivery.
Figure SMS_3
Figure SMS_4
TABLE 3 Table 3
The drug trade data specifically includes:
the ID of the two parties responsible for the drug transaction, the drug number, the drug batch and the transaction time; as shown in Table 4 below, a table of drug transaction data fields is provided in which trade is specific to the manufacturer and distributor and sale is specific to the distributor and consumer.
Symbol expression Field name
ID sold Medicine vendor ID
ID purchase Drug purchaser ID
ID drug Medicine numbering
ID batch Pharmaceutical production lot
Cnt drug Quantity of medicine
Price drug Unit price of medicine
Sum sale 、Sum trade Total price of transaction
T sale 、T trade Transaction time
TABLE 4 Table 4
In this embodiment, the drug data module provides an update and read interface of drug data for the under-link sensing layer, and is also used for accessing the existing drug information system to the drug traceability system; after the drug data module receives the data submitted by the participants, the data is uplink completed, and the performance of the drug contracts related in the drug contract module is triggered;
the drug contract module provides creation, signing and fulfillment of three contracts for system participants, the three contracts being a detection contract, a transaction contract and a transportation contract respectively;
the anti-counterfeiting traceability module is used for enabling system participants to rapidly confirm the real source and qualification guarantee of the medicines in the whole process of production, transportation and sales of the medicines according to the whole-period process data of the medicines stored on the medicine information chain; the anti-counterfeiting traceability module also provides anti-counterfeiting and traceability functions for the medicines for specific scenes (such as confirmation of medicine sources by consumers, confirmation of medicine circulation conditions by manufacturers, and the like); after being called, the anti-counterfeiting traceability module integrates data submitted to a medicine information chain in the medicine data module and the medicine contract module to generate a complete traceability chain, generates corresponding anti-counterfeiting hash, records the anti-counterfeiting hash on the anti-counterfeiting traceability chain, and then returns anti-counterfeiting traceability data;
the user management module is used for providing user registration, information updating and operation authentication functions and ensuring the safety and uniqueness of user information;
the application gateway is used for bearing each module of the application layer on the chain and is the only medium for all entities to interact with the blockchain network.
In this embodiment, a contract is detected whose participants have:
manufacturer and detection mechanism; the detection contract is first established by the manufacturer, and the manufacturer designates the detection mechanism when established; secondly, after the detection mechanism agrees to achieve cooperation, detecting the finished product of the medicine, comparing the result with production process data, expected medicine efficacy and execution standard submitted by a manufacturer, submitting a detection result, and fulfilling a detection contract;
trade contracts, the participants of which fall into two categories:
the first is that both the producer and the distributor participate, and the medicine circulates from the producer to the distributor;
the second is that the distributor participates in the consumer, and the medicine circulates from the distributor to the final consumer;
the content of the transaction contract is a data set of the type of medicine, the lot of medicine, the unit price of medicine and the quantity of medicine, and the participants of the transaction contract need to confirm the contract content and submit the transaction record so as to fulfill the contract;
a transportation contract comprising three parties, respectively:
manufacturer, carrier, distributor; wherein, the producer and the distributor need to cooperate first, and then the carrier is appointed to accept the medicine transportation; in the transportation contract, the transportation company needs to confirm the performance condition and submit the related data of the medicine in the performance process;
in the process of fulfilling three contracts of the medicine contract module, if the data submitted by the participants does not meet the requirements, or the submitted data is abnormal data, or the performance conditions are met but the data is unexpected, the early warning is automatically triggered, the participants are timely informed to check the medicine flow data, and the root cause of contract fulfillment abnormality is located.
In another embodiment, a drug tracing method based on the drug tracing system is provided, as shown in fig. 2, including the following steps:
s1, initializing a medicine tracing system, which specifically comprises the following steps:
s11, constructing a server by each participant, wherein the server comprises the following concrete steps:
each participant needs to correctly configure digital certificates cert of the participants and key information (IP addresses, port numbers, node addresses, node identities and the like) of the blockchain nodes on the corresponding servers according to own conditions (such as the number, performance and the like of the available servers);
s12, initializing a block chain network node, wherein the initialization is specifically as follows:
the initialization process of the blockchain network node comprises the steps of establishing communication and verifying identity;
the node establishes a point-to-point communication channel with other nodes according to the preconfigured information so as to mutually verify identities; after the authentication is successful, the node acquires a code which needs to be operated in the current identity from the blockchain network, and further responds to a calling request from a gateway layer;
s13, a participant applies for random strings, specifically:
the participant first generates a key pair < PK, SK >, then submits the public key PK to the user management module, and applies for a UUID, the user management module will<PK,UUID>Writing into the cache, encrypting UUID by using public key PK, and returning an encryption result Encrypt PK (UUID); the user management module will be in the preset time T expire Then deleting the UUID from the cache;
s14, submitting registration data by the participants, wherein the registration data are specifically:
after receiving the encrypted UUID, the participant decrypts the UUID by using a private key SK to obtain a UUID plaintext, signs the UUID plaintext, and finally packages the registered data into PK SK (T) and uploading to a user management module, wherein T is a registration timestamp, and I represents a character string splicing operation;
s15, checking registration data by a user management module, wherein the registration data are specifically:
the user management module firstly verifies that the public key PK is less than PK, UUID is more than or equal to PK in the cache, if the public key PK in the package registration data is not present or submitted by a participant, the registration fails, and the step S13 is returned if the registration needs to be continued;
if the registration information exists, a unique ID is allocated for the participant, and registration information is <, PK I N SK ||) is saved into the blockchain and registration is returnedSuccessful results.
S2, detecting the quality of the medicine, specifically comprising the following steps:
s21, the manufacturer establishes a detection contract and signs the contract with a detection mechanism, and the detection contract is specifically as follows:
the manufacturer establishes a detection contract Ct through a medicine contract module ins When establishing a contract, a detection mechanism is required to be designated, namely, a detection mechanism ID is provided, and the detection mechanism is informed to complete contract signing together; signing the content by the contract includes:
drug number ID drug Detection start date T ins Detecting standard St;
the manufacturer needs to use the private key SK prod For contract content ID drug || ins Signing the I, and then giving the signature to a detection mechanism by using a private key SK ins Signing, the signing result of the detection contract is expressed as:
Figure SMS_5
s22, the detection mechanism fulfills a detection contract, specifically:
the detection mechanism performs quality detection on the medicine submitted by the manufacturer through detection personnel and detection instruments, and submits a detection result Q through a medicine data module in the following form, so that a detection contract is fulfilled:
Figure SMS_6
s23, a medicine contract module processes a contract execution result, specifically:
after receiving the detection result submitted by the detection mechanism, the drug contract module marks the detection contract as completed, and updates the content of the detection contract recorded on the drug information chain into the following form:
Figure SMS_7
then, verifying the detection result according to the detection contract requirement, and if the detection result does not meet the requirement of the detection standard in the detection contract, sending an alarm to the producer, and executing step S24 by the producer; if the detection result meets the requirement, the updated contract content is sent to the producer, and the producer executes step S3;
s24, the manufacturer obtains a detection result, and the quality problem is tracked, specifically:
after the manufacturer receives the alarm, the self private key SK is used prod Decrypting detected contract content Q sent by the medicine contract module and utilizing public key PK of detection mechanism uns Confirming whether the detection result is tampered, namely confirming whether the following formula is established:
Figure SMS_8
if the above formula is established, it is indicated that the detection result provided by the detection mechanism is not tampered, and the manufacturer pursues the quality problem according to the detection result.
S3, the manufacturer and the distributor trade medicines, which specifically comprises the following steps:
s31, signing a transaction contract by the manufacturer and the distributor, wherein the transaction contract is specifically as follows:
the manufacturer as the seller of the medicine and the distributor as the purchaser of the medicine establish a trade contract Ct through a medicine contract module trade The method comprises the steps of carrying out a first treatment on the surface of the The initial contract content includes:
medicine vendor ID prod Drug purchaser ID dis Drug number ID drug Drug production lot ID batch Transaction time stamp T trade The expression is as follows:
Ct erade =ID prod ||D dis ||D drug ||D batch || trade
s32, the manufacturer, the carrier and the distributor sign the transportation contract together, specifically:
the manufacturer establishes a transportation contract through the medicine contract module, designates a carrier to be subjected to medicine delivery, and solicits a distributor to agree that the carrier is responsible for medicine delivery, and the transportation contract is signed specifically as follows:
hash value Hash of the trade contract by the carrier trade Signing and then the distributor uses the public key PK dis Its signature is encrypted, expressed as:
Figure SMS_9
the signed result of the transportation contract is updated to the transaction contract to become a sub-contract of the transaction contract; if the distributor agrees to a plurality of transportation contracts proposed by the manufacturer, writing the transportation contracts into sub-contracts of the transaction contracts; the updated trade contracts are as follows:
Figure SMS_10
s33, the carrier fulfills a transportation contract, specifically:
after the carrier receives the responsibility of drug delivery, in the process of receiving the drug and delivering the drug to the distributor, the carrier needs to record and upload the related data of transportation in real time according to the data field requirement of the drug data module, and the related data is used as the proof of fulfilling the transportation contract;
s34, the distributor receives medicines, specifically:
after receiving the medicines, the distributor firstly uses a unique label reading device to read the anti-counterfeiting information of the medicines, and after confirming that the medicines are correct, the distributor carries out one (or more) transportation contracts Ct trans Decrypt and use private key SK dis Signing the decrypted result and then contracting the final contract
Figure SMS_11
Submitting to a drug contract module, and completing the transportation contract;
the distributor also needs to deal with the contract Ct t rade Each subcontract in (a)
Figure SMS_12
Updated to->
Figure SMS_13
After the distributor completes the update of the subcontract data, the transaction contract is completed.
S4, selling medicines to consumers by distributors, wherein the selling medicines specifically comprise the following steps:
s41, a distributor establishes a transaction contract to prepare medicines for sale, specifically:
the distributor establishes a transaction contract through a medicine contract module, and the contract content comprises:
medicine vendor ID dis Drug purchaser ID csm Drug number ID drug Drug production lot ID batch Drug quantity Cnt drug Price of medicine drug Transaction total Sum sale Transaction time stamp T trade The trade contracts are expressed as follows:
Ct sale =ID dis ||D csm ||D drug ||D batch || trade
s42, the consumer signs a transaction contract to complete the purchase of the medicine, specifically:
the consumer pays for Ct according to contract requirements sale Signing, appending payment Pay to Ct sale After that, ct is combined with s ale Submitting to a medicine contract module, notifying the distributor of Ct s ale Confirming; attach Pay to Ct sale The latter is indicated as follows:
Figure SMS_14
s43, the distributor confirms the collection condition and completes the transaction contract, specifically:
after confirming receipt of payment from the consumer, the distributor calculates Ct s ale The following operations are carried out, and the operation results are submitted to a medicine contract module, so that the medicine is sold:
Figure SMS_15
s5, applying for medicine anti-counterfeiting traceability by consumers, comprising the following steps:
s51, a consumer acquires anti-counterfeiting traceability information, which specifically comprises the following steps:
the consumer uses the intelligent equipment connected with the network to scan the traceability tag attached to the medicine, and uploads the read traceability tag information to the anti-counterfeiting traceability module to initiate a traceability request, and requests an anti-counterfeiting traceability result; before uploading the traceable tag information, the consumer needs to pass through the identity verification of the user management module to ensure the legality;
s52, the medicine tracing system generates and returns an anti-counterfeiting tracing record, which specifically comprises the following steps:
the anti-counterfeiting traceability module is used for auditing and verifying the medicine information according to the received label information;
first, according to the medicine number ID drug Request contract content contains ID drug Block data of (a);
then, integrating all the information to generate an anti-counterfeiting traceability report, if the medicine is real, integrating the block data and generating an anti-counterfeiting traceability report by the system, wherein the anti-counterfeiting traceability report comprises the data of the whole link of the medicine from the source, namely from the manufacturer to the consumer and the medicine use instruction; the traceability report can be recorded on an anti-counterfeiting traceability chain, has a unique traceability record number, can be inquired and checked by other authorized parties, and can be recorded on the anti-counterfeiting traceability chain every time the traceability record is operated (including inquiry, update and the like);
finally, returning the anti-counterfeiting traceability report to the consumer;
s53, the consumer receives an anti-counterfeiting traceability report, which specifically comprises the following steps:
after the consumer receives the anti-counterfeiting traceability report, if the authenticity or the safety of the medicine is still doubtful, the feedback problem can be used for processing the related participants.
As shown in table 5 below, the meaning of symbols involved in the drug tracing method of this example is described.
(symbol) Description of the invention
prod Manufacturer (S)
ins Detection mechanism
dis Distributor (E)
trans Transport means
csm Consumers are provided with
cert Digital certificate
Status pay Payment case
Status rec Receipt of money
Ct Contract(s)
UUID Registration identification code
PK Public key
SK Private key
TABLE 5
Blockchain technology exhibits a strong non-tamperable nature, so more and more traceback information has been stored to blockchain systems. At present, before the medicine is finally sold to consumers, the medicine must be sold and transported, which means that even if the production quality of the medicine is guaranteed in production, the relevant state of the medicine cannot be effectively recorded in the subsequent flow, and the relevant system participants can be timely notified and the root cause of the tracing problem can be assisted after the quality of the medicine is affected. The invention realizes comprehensive supervision and information transparency of medicines in production, circulation and sales links based on a blockchain technology, has the advantages of low traceability cost, data tamper resistance and the like, can provide safe and reliable medicine guarantee for consumers, brings convenience for enterprises to improve management efficiency and brand reputation, and helps to assist the digitization process of related entities on medicine safety supervision.
It should also be noted that in this specification, terms such as "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A drug traceability system based on a blockchain is characterized in that the system relates to five participants of a producer, a detection mechanism, a carrier, a distributor and a consumer and comprises an under-chain perception layer, an on-chain application layer and a blockchain network infrastructure layer;
the under-chain sensing layer comprises various environment parameter sensors, a medicine quality detecting instrument, medicine unique identification tag reading equipment and an Internet of things gateway and is used for completing data collection in the processes of medicine production, storage and transportation;
the on-chain application layer comprises a medicine data module, a medicine contract module, an anti-counterfeiting tracing module, a user management module and an application gateway;
the block chain network infrastructure layer is composed of server nodes built by all the participants, and each server node runs a designated intelligent contract and is responsible for maintaining a block chain account book according to the identity of the participant to which the server node belongs; under the premise of protecting the privacy security of data of each party, the blockchain is divided into two pieces, namely a medicine information chain for recording the data of the medicine and an anti-counterfeiting traceability chain for recording traceability history.
2. The blockchain-based drug traceability system of claim 1, wherein the environmental parameter sensor is configured to collect drug production-related data, drug storage-related data, drug transportation-related data, and drug transaction data;
the medicine quality detecting instrument is used for detecting whether the medicine quality reaches a specified standard or not, and submitting the detection process and result data to a medicine information chain so as to facilitate the follow-up medicine quality problem alarming and the tracing of the problem root;
the medicine unique identification tag reading equipment is used for identifying the medicine unique identification tag when medicines circulate among all the participants, and providing an anti-counterfeiting traceability entrance of the medicines for the participants;
the gateway of the Internet of things is used as a middleware for communicating the under-chain sensing layer with the blockchain layer, provides a channel for sensing equipment with limited resources in the under-chain sensing layer to be connected with a blockchain network, and provides sensing data caching, data abnormality alarming and sensing data packing and chaining services;
among the data collected by the environmental parameter sensor, the drug production related data specifically include:
raw material number, medicine manufacturer ID, medicine production time, medicine production lot, medicine detection contract ID, and raw production data hash fingerprint;
the drug storage related data specifically include:
drug belongs to the warehouse responsible person ID, drug expected warehouse entry time, drug actual warehouse entry time, drug expected warehouse exit time, drug actual warehouse entry time, drug expected temporary storage time length and drug storage environment sensing data;
the drug delivery related data specifically includes:
driver ID in charge of the transportation, GPS data in the transportation and drug preservation environment sensing data;
the drug trade data specifically includes:
the ID of the party responsible for the drug transaction, the drug number, the drug lot, and the transaction time.
3. The blockchain-based drug traceability system of claim 1, wherein the drug data module provides an update and read interface for drug data for an under-chain sensing layer and is also used for accessing an existing drug information system to the blockchain-based drug traceability system; after the drug data module receives the data submitted by the participants, the data is uplink completed, and the performance of the drug contracts related in the drug contract module is triggered;
the drug contract module provides creation, signing and fulfillment of three contracts for system participants, the three contracts being a detection contract, a transaction contract and a transportation contract respectively;
the anti-counterfeiting traceability module is used for enabling system participants to rapidly confirm the real source and qualification guarantee of the medicines in the whole process of production, transportation and sales of the medicines according to the whole-period process data of the medicines stored on the medicine information chain; the anti-counterfeiting traceability module also provides anti-counterfeiting and traceability functions for the medicines for specific scenes; after being called, the anti-counterfeiting traceability module integrates the data submitted to the medicine information chain in the medicine data module and the medicine contract module, generates a complete traceability chain, generates corresponding anti-counterfeiting hash, records the anti-counterfeiting hash on the anti-counterfeiting traceability chain, and then returns anti-counterfeiting traceability data;
the user management module is used for providing user registration, information updating and operation authentication functions and ensuring the safety and uniqueness of user information;
the application gateway is used for bearing each module of the application layer on the chain and is the only medium for all entities to interact with the blockchain network.
4. The blockchain-based drug traceability system of claim 1, wherein detecting the participants of the contract comprises:
manufacturer and detection mechanism; the detection contract is first established by the manufacturer, and the manufacturer designates the detection mechanism when established; secondly, after the detection mechanism agrees to achieve cooperation, detecting the finished product of the medicine, comparing the result with production process data, expected medicine efficacy and execution standard submitted by a manufacturer, submitting a detection result, and fulfilling a detection contract;
the participants of a trade contract fall into two categories:
the first is that both the producer and the distributor participate, and the medicine circulates from the producer to the distributor;
the second is that the distributor participates in the consumer, and the medicine is circulated from the distributor to the consumer;
the content of the transaction contract is a data set of the type of medicine, the lot of medicine, the unit price of medicine and the quantity of medicine, and the participants of the transaction contract need to confirm the contract content and submit the transaction record so as to fulfill the contract;
the transportation contract includes three parties, respectively:
manufacturer, carrier, and distributor; wherein, the producer and the distributor need to cooperate first, and then the carrier is appointed to accept the medicine transportation; in the transportation contract, the transportation company needs to confirm the performance condition and submit the related data of the medicine in the performance process;
in the process of fulfilling three contracts of the medicine contract module, if the data submitted by the participants does not meet the requirements, or the submitted data is abnormal data, or the performance conditions are met but the data is unexpected, the early warning is automatically triggered, the participants are timely informed to check the medicine flow data, and the root cause of contract fulfillment abnormality is located.
5. A drug traceability method based on a blockchain-based drug traceability system according to any of claims 1-4, characterized in that there are five parties of manufacturer, detection mechanism, carrier, distributor and consumer, the method comprising the steps of:
s1, initializing a medicine tracing system, constructing a server by each participant, initializing a block chain network node, applying random strings by the participants and submitting registration data, and detecting the registration data by a user management module;
s2, detecting the quality of the medicine, wherein a manufacturer establishes a detection contract and signs the contract with a detection mechanism, the detection mechanism fulfills the detection contract, a medicine contract module processes a contract fulfilling result, and the manufacturer acquires the detection result and inquires about quality problems;
s3, the manufacturer and the distributor trade the medicine, the manufacturer and the distributor sign trade contracts, the manufacturer, the transporter and the distributor sign transport contracts together, the transporter fulfills transport contracts, and the distributor receives the medicine;
s4, selling the medicines to the consumers by the distributors, establishing transaction contracts and preparing to sell the medicines by the distributors, signing the transaction contracts by the consumers to complete medicine purchase, and confirming the collection condition by the distributors to complete the transaction contracts;
s5, a consumer applies for anti-counterfeiting tracing of the medicine, the consumer obtains anti-counterfeiting tracing information, the medicine tracing system generates and returns an anti-counterfeiting tracing record, and the consumer receives the anti-counterfeiting tracing report.
6. The drug tracing method of claim 5, wherein step S1 specifically comprises:
s11, constructing a server by each participant, wherein the server comprises the following concrete steps:
each participant needs to correctly configure the digital certificate cert and key information of the blockchain node of the participant on a corresponding server according to the self condition;
s12, initializing a block chain network node, wherein the initialization is specifically as follows:
the initialization process of the blockchain network node comprises the steps of establishing communication and verifying identity;
the node establishes a point-to-point communication channel with other nodes according to the preconfigured information so as to mutually verify identities; after the authentication is successful, the node acquires a code which needs to be operated in the current identity from the blockchain network, and further responds to a calling request from a gateway layer;
s13, a participant applies for random strings, specifically:
the party first generates a key pair<PK, SK), then submitting the public key PK to the user management module and applying for a UUID, the user management module will<PK,UUID>Writing into the cache, encrypting UUID by using public key PK, and returning an encryption result Encrypt PK (UUID); the user management module will pass the preset time T expire Then deleting the UUID from the cache;
s14, submitting registration data by the participants, wherein the registration data are specifically:
after receiving the encrypted UUID, the participant decrypts the UUID by using the private key SK to obtain a UUID plaintext, signs the UUID plaintext, and finally packages the registration data into PK T UUID Sign SK (T UUID) and uploading to a user management module, wherein T is a registration timestamp, and I represents a character string splicing operation;
s15, checking registration data by a user management module, wherein the registration data are specifically:
the user management module firstly verifies whether the < PK, UUID > still exists in the cache, if the < PK, UUID > does not exist or the public key PK in the package registration data submitted by the participant is inconsistent with the PK in the cache, the registration fails, and if the registration needs to be continued, the step S13 is returned;
if so, the unique ID is allocated to the party, and the registration information is registered<ID,PK||T||UUID||Sign SK (T||UUID)>Save to the blockchain and return the result of successful registration.
7. The drug tracing method of claim 5, wherein step S2 specifically comprises:
s21, the manufacturer establishes a detection contract and signs the contract with a detection mechanism, and the detection contract is specifically as follows:
the manufacturer establishes a detection contract Ct through a medicine contract module ins When establishing a contract, a detection mechanism is required to be designated, namely, a detection mechanism ID is provided, and the detection mechanism is informed to complete contract signing together; signing the content by the contract includes:
drug number ID drug Detection start date T ins Detecting standard St;
the manufacturer needs to use the private key SK prod For contract content ID drug ||T ins Signature is carried out on St, and then the St is transmitted to a detection mechanism by using a private key SK ins Signing, the signing result of the detection contract is expressed as:
Figure FDA0004149155650000051
s22, the detection mechanism fulfills a detection contract, specifically:
the detection mechanism performs quality detection on the medicine submitted by the manufacturer through detection personnel and detection instruments, and submits a detection result Q through a medicine data module in the following form, so that a detection contract is fulfilled:
Figure FDA0004149155650000052
s23, a medicine contract module processes a contract execution result, specifically:
after receiving the detection result submitted by the detection mechanism, the drug contract module marks the detection contract as completed, and updates the content of the detection contract recorded on the drug information chain into the following form:
Figure FDA0004149155650000053
then, verifying the detection result according to the detection contract requirement, and if the detection result does not meet the requirement of the detection standard in the detection contract, sending an alarm to the producer, and executing step S24 by the producer; if the detection result meets the requirement, the updated contract content is sent to the producer, and the producer executes step S3;
s24, the manufacturer obtains a detection result, and the quality problem is tracked, specifically:
after the manufacturer receives the alarm, the self private key SK is used prod Decrypting detected contract content Q sent by the medicine contract module and utilizing public key PK of detection mechanism ins Confirming whether the detection result is tampered, namely confirming whether the following formula is established:
Figure FDA0004149155650000054
if the above formula is established, it is indicated that the detection result provided by the detection mechanism is not tampered, and the manufacturer pursues the quality problem according to the detection result.
8. The drug tracing method of claim 5, wherein step S3 specifically comprises:
s31, signing a transaction contract by the manufacturer and the distributor, wherein the transaction contract is specifically as follows:
the manufacturer as the seller of the medicine and the distributor as the purchaser of the medicine establish a trade contract Ct through a medicine contract module trade The method comprises the steps of carrying out a first treatment on the surface of the The initial contract content includes:
medicine vendor ID prod Drug purchaser ID dis Drug number ID arug Drug production lot ID batch Transaction timestamp T trade The expression is as follows:
Ct trade =ID prod ||ID dis ||ID drug ||ID batch ||T trade
s32, the manufacturer, the carrier and the distributor sign the transportation contract together, specifically:
the manufacturer establishes a transportation contract through the medicine contract module, designates a carrier to be subjected to medicine delivery, and solicits a distributor to agree that the carrier is responsible for medicine delivery, and the transportation contract is signed specifically as follows:
hash value Hash of the trade contract by the carrier trade Signing, then the distributor re-uses the public key PK dis Encrypting its signature, expressed as:
Figure FDA0004149155650000061
the signed result of the transportation contract is updated to the transaction contract to become a sub-contract of the transaction contract; if the distributor agrees to a plurality of transportation contracts proposed by the manufacturer, writing the transportation contracts into sub-contracts of the transaction contracts; the updated trade contracts are as follows:
Figure FDA0004149155650000062
s33, the carrier fulfills a transportation contract, specifically:
after the carrier receives the responsibility of drug delivery, in the process of receiving the drug and delivering the drug to the distributor, the carrier needs to record and upload the related data of transportation in real time according to the data field requirement of the drug data module, and the related data is used as the proof of fulfilling the transportation contract;
s34, the distributor receives medicines, specifically:
after receiving the drug, the distributor first reads with the unique tagThe taking device reads the medicine anti-counterfeiting information, and after confirming the medicine anti-counterfeiting information, the taking device carries out one or more transport contracts Ct trans Decrypt and use private key SK dis Signing the decrypted result and then contracting the final contract
Figure FDA0004149155650000063
Submitting to a drug contract module, and completing the transportation contract;
the distributor also needs to deal with the contract Ct' trade Each subcontract in (a)
Figure FDA0004149155650000071
Updated to->
Figure FDA0004149155650000072
After the distributor completes the update of the subcontract data, the transaction contract is completed.
9. The drug tracing method of claim 5, wherein step S4 specifically comprises:
s41, a distributor establishes a transaction contract to prepare medicines for sale, specifically:
the distributor establishes a transaction contract through a medicine contract module, and the contract content comprises:
medicine vendor ID dis Drug purchaser ID csm Drug number ID drug Drug production lot ID batch Drug quantity Cnt drug Price of medicine drug Transaction total Sum sale Transaction timestamp T trade The trade contracts are expressed as follows:
Ct sale =ID dis ||ID csm ||ID drug ||ID batch ||T trade
s42, the consumer signs a transaction contract to complete the purchase of the medicine, specifically:
the consumer pays for Ct according to contract requirements sale Signing, appending payment Pay to Ct sale After that, ct 'is combined' sale Submit to the medicineThe product contract module informs the distributor of Ct' sale Confirming; attach Pay to Ct sale The latter is indicated as follows:
Figure FDA0004149155650000073
s43, the distributor confirms the collection condition and completes the transaction contract, specifically:
after confirming receipt of payment from the consumer, the distributor sends a payment to Ct' sale The following operations are carried out, and the operation results are submitted to a medicine contract module, so that the medicine is sold:
Figure FDA0004149155650000074
10. the drug tracing method of claim 5, wherein step S5 specifically comprises:
s51, a consumer acquires anti-counterfeiting traceability information, which specifically comprises the following steps:
the consumer uses the intelligent equipment connected with the network to scan the traceability tag attached to the medicine, and uploads the read traceability tag information to the anti-counterfeiting traceability module to initiate a traceability request, and requests an anti-counterfeiting traceability result; before uploading the traceable tag information, the consumer needs to pass through the identity verification of the user management module to ensure the legality;
s52, the medicine tracing system generates and returns an anti-counterfeiting tracing record, which specifically comprises the following steps:
the anti-counterfeiting traceability module is used for auditing and verifying the medicine information according to the received label information;
first, according to the medicine number ID drug Request contract content contains ID drug Block data of (a);
then, integrating all the information to generate an anti-counterfeiting traceability report, if the medicine is real, integrating the block data and generating an anti-counterfeiting traceability report by the system, wherein the anti-counterfeiting traceability report comprises the data of the whole link of the medicine from the source, namely from the manufacturer to the consumer and the medicine use instruction; the traceability report can be recorded on an anti-counterfeiting traceability chain, has a unique traceability record number, can be inquired and checked by other authorized participants, and can be recorded on the anti-counterfeiting traceability chain every time the traceability record is operated;
finally, returning the anti-counterfeiting traceability report to the consumer;
s53, the consumer receives an anti-counterfeiting traceability report, which specifically comprises the following steps:
after the consumer receives the anti-counterfeiting traceability report, if the authenticity or the safety of the medicine is still doubtful, the feedback problem can be used for processing the related participants.
CN202310312868.4A 2023-03-28 2023-03-28 Drug traceability system and method based on blockchain Pending CN116385023A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310312868.4A CN116385023A (en) 2023-03-28 2023-03-28 Drug traceability system and method based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310312868.4A CN116385023A (en) 2023-03-28 2023-03-28 Drug traceability system and method based on blockchain

Publications (1)

Publication Number Publication Date
CN116385023A true CN116385023A (en) 2023-07-04

Family

ID=86960903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310312868.4A Pending CN116385023A (en) 2023-03-28 2023-03-28 Drug traceability system and method based on blockchain

Country Status (1)

Country Link
CN (1) CN116385023A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993012A (en) * 2023-07-31 2023-11-03 深圳市大满包装有限公司 Block chain-based commodity packaging method and system
CN117575634A (en) * 2024-01-15 2024-02-20 首都医科大学 Dermatological medicine traceability system and method based on blockchain

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993012A (en) * 2023-07-31 2023-11-03 深圳市大满包装有限公司 Block chain-based commodity packaging method and system
CN116993012B (en) * 2023-07-31 2024-04-16 深圳市大满包装有限公司 Block chain-based commodity packaging method and system
CN117575634A (en) * 2024-01-15 2024-02-20 首都医科大学 Dermatological medicine traceability system and method based on blockchain
CN117575634B (en) * 2024-01-15 2024-03-15 首都医科大学 Dermatological medicine traceability system and method based on blockchain

Similar Documents

Publication Publication Date Title
US10868676B2 (en) Computerized apparatus for secure serialization of supply chain product units
CN112036901A (en) Method for protecting supply chain data in block chain and system for recording supply chain information
CN108432176B (en) System and method for ensuring asset and supply chain integrity
US10387695B2 (en) Authenticating and managing item ownership and authenticity
CN116385023A (en) Drug traceability system and method based on blockchain
WO2019165126A1 (en) System and methods for querying the distribution path of product units within a supply chain
AU2022206741A1 (en) Electronic document platform
US20190342085A1 (en) System and method for tracking product and providing verified product information and consumer rewards
US20200374131A1 (en) Method and system for generalized provenance solution for blockchain supply chain applications
US20070205258A1 (en) System and Method of Product Information Coding and Authentication
WO2019165120A1 (en) Secure supply chain transactional management system
EP3475865A1 (en) Agents and systems for right&#39;s management
EP3227853A1 (en) Cryptographic verification of provenance in a supply chain
JP6498123B2 (en) Digitally protected electronic titles for supply chain products
CN105096134A (en) Security scheme for authenticating digital entities and aggregate object origins
CN111062731A (en) Block chain-based food safety tracing system and method
US11516001B2 (en) Method and system for generalized provenance solution for blockchain supply chain applications
US20200344046A1 (en) Product Tracking System and Method
CN113538004A (en) Asset management resume evidence accumulation system and method based on block chain
WO2019195903A1 (en) Method for tracking products using distributed, shared registration bases and random numbers generated by quantum processes
CN113886883A (en) Internet of things data management method and device
Nawale et al. Blockchain & IoT based drugs traceability for pharma industry
CN114723462A (en) Chinese herbal medicine storage quality management system based on block chain technology
CN112184264A (en) Block chain-based drug supervision method, device, server and medium
CN116596551A (en) Supply chain product tracing method based on block chain, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination