WO2021114406A1 - Blockchain-based vaccine information monitoring method and apparatus, and computer device - Google Patents

Blockchain-based vaccine information monitoring method and apparatus, and computer device Download PDF

Info

Publication number
WO2021114406A1
WO2021114406A1 PCT/CN2019/128749 CN2019128749W WO2021114406A1 WO 2021114406 A1 WO2021114406 A1 WO 2021114406A1 CN 2019128749 W CN2019128749 W CN 2019128749W WO 2021114406 A1 WO2021114406 A1 WO 2021114406A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
node
smart contract
blockchain
vaccine
Prior art date
Application number
PCT/CN2019/128749
Other languages
French (fr)
Chinese (zh)
Inventor
陈飞
肖哲
Original Assignee
深圳大学
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 深圳大学 filed Critical 深圳大学
Publication of WO2021114406A1 publication Critical patent/WO2021114406A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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
    • G06Q30/0185Product, service or business identity fraud
    • 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
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/22Social work
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/88Medical equipments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Definitions

  • This application relates to the technical field of functional testing, and in particular to a method, device, computer equipment, and storage medium for monitoring vaccine information based on blockchain.
  • the embodiments of this application provide a method, device, computer equipment and storage medium for vaccine information monitoring based on blockchain, aiming to solve the problem that the information of the vaccine circulation process in the prior art is dispersed in multiple independent systems.
  • the risk of tampering and deletion makes it difficult to inquire about the source of the problem.
  • an embodiment of the present application provides a method for monitoring vaccine information based on a blockchain, which includes:
  • the blockchain node includes a first type of blockchain node, a second type of blockchain node, a third type of blockchain node, and a fourth type of area Blockchain nodes, fifth-type blockchain nodes;
  • the first-type blockchain nodes are vaccine manufacturers’ equipment blockchain nodes, and the second-type blockchain nodes are regulatory agency equipment blockchain nodes, so
  • the third type of block chain node is the CDC equipment block chain node, the fourth type of block chain node is the vaccination unit equipment block chain node, and the fifth type of block chain node is the vaccine transportation data Collect device blockchain nodes;
  • first data summary uploaded by any one of the first type blockchain nodes is detected, call the pre-stored first smart contract, second smart contract, third smart contract and/or fourth smart contract to compare the first The data digest is verified. If the first data digest is verified by the second smart contract, the third smart contract, and/or the fourth smart contract, the block is constructed by the first leader blockchain node elected by the consensus algorithm To store the first data summary, update the corresponding block on each blockchain node to obtain the updated blockchain;
  • any second type blockchain node If the second data summary uploaded by any second type blockchain node is detected, call the pre-stored first smart contract and/or fourth smart contract to verify the second data summary, if the second The data summary is verified by the first smart contract and/or the fourth smart contract, and the second leading blockchain node elected by the consensus algorithm is used to construct a block to store the second data summary. The corresponding block is updated to get the updated block chain;
  • the third data summary uploaded by any third type blockchain node is detected, call the pre-stored second smart contract, third smart contract and/or fourth smart contract to verify the third data summary, If the third data summary passes the verification of the second smart contract, the third smart contract, and/or the fourth smart contract, a block is constructed by the third leader blockchain node elected by the consensus algorithm to summarize the third data Perform storage and update the corresponding blocks on each blockchain node to obtain the updated blockchain; and
  • any fourth type blockchain node If the fourth data summary uploaded by any fourth type blockchain node is detected, call the pre-stored third smart contract and/or fourth smart contract to verify the fourth data summary.
  • the data summary is verified by the third smart contract and/or the fourth smart contract, and the fourth leader blockchain node elected by the consensus algorithm is used to construct a block to store the fourth data summary.
  • the corresponding block is updated to get the updated block chain.
  • an embodiment of the present application provides a vaccine information monitoring device based on a blockchain, which includes:
  • the data summary receiving unit is used to determine whether a data summary uploaded by a blockchain node is detected; wherein the blockchain node includes a first type of blockchain node, a second type of blockchain node, and a third type of block Chain nodes, fourth type blockchain nodes, fifth type blockchain nodes; the first type blockchain node is a vaccine manufacturer equipment blockchain node, and the second type blockchain node is a regulatory agency Device blockchain node, the third type blockchain node is the CDC device blockchain node, the fourth type blockchain node is the vaccination unit device blockchain node, the fifth type area
  • the block chain node is the block chain node of the vaccine transportation data collection equipment;
  • the first-type storage unit is used to call the pre-stored first smart contract, second smart contract, third smart contract and/or fourth smart contract if the first data summary uploaded by any first-type blockchain node is detected
  • the smart contract verifies the first data summary. If the first data summary passes, the second smart contract, the third smart contract, and/or the fourth smart contract are verified, the first data summary elected by the consensus algorithm is passed. Lead the blockchain node to construct a block to store the first data summary, and update the corresponding block on each blockchain node to obtain the updated blockchain;
  • the second type storage unit is used to call the pre-stored first smart contract and/or fourth smart contract to summarize the second data if the second data summary uploaded by any second type blockchain node is detected Perform verification. If the second data digest passes the verification of the first smart contract and/or the fourth smart contract, the second leader blockchain node elected by the consensus algorithm builds a block to store the second data digest , Update the corresponding block on each blockchain node to get the updated blockchain;
  • the third type storage unit is used to call the pre-stored second smart contract, third smart contract and/or fourth smart contract to check the third data summary uploaded by any third-type blockchain node.
  • the third data summary is verified. If the third data summary is verified by the second smart contract, the third smart contract, and/or the fourth smart contract, it is constructed by the third leader blockchain node elected by the consensus algorithm
  • the block stores the third data summary, and updates the corresponding blocks on each block chain node to obtain the updated block chain;
  • the fourth type storage unit is used to call the pre-stored third smart contract and/or fourth smart contract to summarize the fourth data if the fourth data summary uploaded by any fourth type blockchain node is detected Perform verification. If the fourth data summary passes the verification of the third smart contract and/or the fourth smart contract, the fourth leader blockchain node elected by the consensus algorithm builds a block to store the fourth data summary , Update the corresponding block on each block chain node to get the updated block chain.
  • an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and running on the processor, and the processor executes the computer
  • the program implements the blockchain-based vaccine information monitoring method described in the first aspect above.
  • an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the above-mentioned first On the one hand, the blockchain-based vaccine information monitoring method.
  • the embodiments of the application provide a method, device, computer equipment and storage medium for monitoring vaccine information based on blockchain, which realize the provision of data for key data in the production, sales, transportation, and supervision of the vaccine supply chain through the blockchain. Storage, management, traceability, verification, non-repudiation and other services.
  • the blockchain provides a globally unique and unmodifiable ledger, which can ensure the security of vaccine circulation data; the smart contract mechanism provided by the blockchain can ensure the traceability, non-repudiation, and timeliness of the vaccine circulation process. It can be used as electronic evidence when an accident occurs.
  • FIG. 1 is a schematic diagram of an application scenario of a vaccine information monitoring method based on a blockchain provided by an embodiment of the application;
  • FIG. 2 is a schematic flowchart of a method for monitoring vaccine information based on a blockchain provided by an embodiment of the application;
  • FIG. 3 is a schematic block diagram of a vaccine information monitoring device based on a blockchain provided by an embodiment of the application;
  • Fig. 4 is a schematic block diagram of a computer device provided by an embodiment of the application.
  • Figure 1 is a schematic diagram of the application scenario of the blockchain-based vaccine information monitoring method provided by an embodiment of the application
  • Figure 2 is a schematic diagram of the blockchain-based vaccine information monitoring method provided by an embodiment of the application Schematic diagram of the process.
  • the method for monitoring vaccine information based on the blockchain is applied to any blockchain node, and the method is executed by the application software installed in the blockchain node.
  • the method includes steps S110 to S150.
  • the blockchain node includes a first type of blockchain node, a second type of blockchain node, a third type of blockchain node, and a fourth type of blockchain node.
  • Type block chain node, fifth type block chain node the first type block chain node is a vaccine manufacturer equipment block chain node, and the second type block chain node is a regulatory agency equipment block chain node .
  • the third type of blockchain node is an equipment blockchain node of the Center for Disease Control and Prevention
  • the fourth type of blockchain node is a vaccination unit equipment blockchain node
  • the fifth type of blockchain node is a vaccine Blockchain node of transportation data collection equipment.
  • the blockchain network is composed of multiple blockchain nodes (for example, blockchain node 1-blockchain node N in Figure 1), and each blockchain node corresponds to A blockchain device, the blockchain is the first type of blockchain node, the second type of blockchain node, the third type of blockchain node, the fourth type of blockchain node, and the fifth type of blockchain node.
  • the blockchain is the first type of blockchain node, the second type of blockchain node, the third type of blockchain node, the fourth type of blockchain node, and the fifth type of blockchain node.
  • the first type of blockchain node is a vaccine manufacturer equipment blockchain node
  • the second type of blockchain node is a regulatory agency equipment blockchain node
  • the fourth type of block chain node is a vaccination unit equipment block chain node
  • the fifth type of block chain node is a vaccine transportation data collection equipment block chain node.
  • the first type of blockchain node can be used as a blockchain node, but can also be used to upload vaccine production data review node data, vaccine production tagging node data, vaccine delivery label update node data, and data summaries corresponding to these data. .
  • the second-type blockchain node can also be used to upload a data summary corresponding to the data of the vaccine approval node.
  • the third type of blockchain node can also be used to upload vaccine entry tag update node data, vaccine secondary delivery tag update node data, and vaccine adverse reaction monitoring data secondary upload node data.
  • the fourth type of blockchain node can also be used to upload vaccine secondary storage tag update node data, vaccination node data, vaccine adverse reaction monitoring data, upload node data, and data summary corresponding to these data. .
  • the fifth type of blockchain node can also be used to upload environmental monitoring data during the first vaccine transportation process (the generation time of the vaccine outbound label update node data and the vaccine inbound label update node data Between the generation time of the vaccine), the environmental monitoring data during the second transportation of the vaccine (between the generation time of the vaccine secondary outbound label update node data and the vaccine secondary storage label update node data generation time).
  • the environmental monitoring data during the first transportation of the vaccine and the environmental monitoring data during the second transportation of the vaccine both include at least the temperature and humidity of the transportation chain.
  • the blockchain equipment corresponding to the above five types of blockchain nodes is deployed in different institutions.
  • the roles represented by the blockchain nodes when uploading data are vaccine manufacturers, regulatory agencies, CDC, and vaccination.
  • the data uploaded by the blockchain device of each role is as the above example.
  • the block chain node constructs a block to store the first data summary, and correspondingly updates the block on each block chain node to obtain the updated block chain.
  • the first type of blockchain node in addition to being a blockchain node, can also be used to upload vaccine production data review node data, vaccine production tagging node data, and vaccine delivery label update node data. These data correspond to Therefore, when the blockchain network detects the first data summary uploaded by any first type blockchain node (this data summary has not been written into the block at this time, but is cached in the blockchain network In a data pool), at this time, the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract are correspondingly called from the smart contracts stored in each blockchain node to summarize the first data Whether the corresponding data satisfies the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract is verified.
  • the first smart contract corresponds to a production contract
  • the second smart contract corresponds to a purchase contract
  • the third smart contract corresponds to a transportation contract
  • the fourth smart contract corresponds to a supervision contract.
  • the production contract is used for the supervision of the production stage, and its main functions include: vaccine manufacturers submit production plans and production license applications.
  • the regulatory agency processes the production license application after checking the production plan. After the regulatory agency approves the application, the batch of vaccines will be assigned a label number according to the production plan.
  • the data table corresponding to the production contract includes the following fields: manufacturer number, vaccine batch number, vaccine type name, time of submission of the production application, status bit (initially 0, if the regulatory agency approves it, then it is 1, rejected It is -1), and the vaccine label code.
  • the purchase contract is used for order negotiation between the vaccine manufacturer and the CDC. Its main functions are: the CDC initiates a purchase application to the vaccine manufacturer, and submits data such as the type, quantity, and time of the vaccine to be purchased; the vaccine manufacturer processes the order.
  • the purchase contract also maintains a purchase data sheet, which saves manufacturer information, CDC information, and the type, quantity, purchase time, and other data of the vaccine in the order.
  • the transportation contract is used for the supervision of the transportation stage and consists of two parts. From the vaccine manufacturer to the CDC and from the CDC to the lower-level CDC or vaccination unit.
  • the main functions of the transportation contract include: recording the information of the sender and receiver of the transportation order, such as when an order is sent from manufacturer A to CDC B, or from CDC C to vaccination site D, and the transportation company Information. Monitor the temperature and location information during transportation, and the data sent by the sensor network to the transportation contract will be stored in the table.
  • the regulatory contract is based on the vaccine label and preserves the entire process of vaccine circulation. At the same time, it is also a channel for vaccinated users to query vaccine information based on the tag number, and can query the validity period of the vaccine, the vaccine manufacturer, the CDC passed by and the vaccinating unit. Its main function is as follows: vaccine manufacturers upload vaccine label data circulating to the CDC. The CDC scans the code, uploads the received vaccine label data, and checks it with the data uploaded by the manufacturer. The CDC uploads vaccine label data circulating to the next-level CDC or vaccination unit. The vaccination unit scans the code, uploads the received vaccine label data, and checks it with the data uploaded by the higher-level CDC. Provides the function of querying the entire circulation process information based on the label.
  • each blockchain node of the blockchain network needs to elect a first leader according to the consensus algorithm
  • the blockchain node uses the first leader blockchain node to act as a miner to dig the first data summary in the data pool, and write the first data summary into the corresponding block constructed by the first leader blockchain node. Store, and finally send a copy of the first data summary to other blockchain nodes in a very short time. After the rest of the nodes are authenticated, the corresponding blocks on each blockchain node are updated to obtain the updated blockchain. .
  • step S120 includes:
  • any first type blockchain node If the first data summary uploaded by any first type blockchain node is detected, call the query function in the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract to obtain the The first historical data set corresponding to the first data summary;
  • the leader blockchain node is elected through the practical Byzantine fault-tolerant algorithm ;
  • the first data node corresponding to the first data summary satisfies the first smart contract in order. If the order of the first data node corresponding to the first data summary does not satisfy the first smart contract, a prompt message indicating that the uploaded data is incorrect is sent to the first type blockchain node.
  • the data corresponding to the first data summary is the vaccine production data review node data uploaded by the first type of blockchain node, because each vaccine manufacturer will send the vaccine production data to the regulatory agency before producing each batch of vaccines And apply for review.
  • the vaccine production materials include vaccine varieties, vaccine batches, vaccine raw materials and production process parameters.
  • the first data summary corresponding to the vaccine production materials is also at the same time. Need to be wound.
  • the first data node sequence corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract (for example, the first data node sequence corresponding to the first data summary is 1 , Which satisfies the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract), the first blockchain node is elected through the practical Byzantine fault-tolerant algorithm, and then the first leader area is passed
  • the current first block created in the block chain node stores the first data summary.
  • the copy of the first data summary is sent to other blockchain nodes in the blockchain network except the first leading blockchain node.
  • the first data summary uploaded by the first-type blockchain node is effectively saved, not only the data cannot be tampered with, but also the traceability query is convenient.
  • the query function of to obtain the first historical data set corresponding to the first data summary includes:
  • the process node corresponding to the first data summary is a vaccine production data review node, a vaccine label update node, or a vaccine delivery node ;
  • process node corresponding to the first data summary is a vaccine production data review node, set the first historical data set to an empty set;
  • the process node corresponding to the first data summary is a vaccine label update node, obtain vaccine production data review node data and vaccine approval node data to form a first historical data set;
  • the process node corresponding to the first data summary is a vaccine delivery node, obtain vaccine production data review node data, vaccine approval node data, and vaccine production tagging node data to form a first historical data set.
  • the first type of blockchain nodes upload data
  • they are mainly in the following process nodes in the production, sales, transportation, and supervision of the vaccine supply chain.
  • One is the vaccine production material review node
  • the other is It is the vaccine label update node
  • the third is the vaccine delivery node.
  • the vaccine manufacturer’s equipment is sent to the regulatory agency to send the vaccine production material for review.
  • the vaccine production material includes the vaccine variety, vaccine batch, vaccine raw materials and production process parameters, and the vaccine production material corresponds to The first data summary of can be operated on the chain.
  • the vaccine manufacturer's equipment receives the vaccine label code sent by the regulatory agency equipment, and correspondingly prints the vaccine label code as a label, and the label corresponding to each vaccine label code is pasted on the outer packaging box of the batch of vaccines
  • the time of sticking the label can be used as the vaccine production labeling node data, and the first data summary corresponding to the vaccine production labeling node data can be uploaded to the chain.
  • the vaccine label code is composed of 20 digits, the first 6 digits are the vaccine manufacturer code, the middle 6 digits are the vaccine batch number, and the last 8 digits are the vaccine number (the vaccine number is the vaccine The vaccine production materials will be reviewed, and the number will be assigned after the review is passed).
  • the vaccine delivery information (which can also be understood as the vaccine delivery label update node data) includes the vaccine tag code, vaccine delivery time, Vaccine outbound transportation chain information (for example, including vaccine outbound transportation chain information that the vaccine is transported by A cold chain transportation company), the first data summary corresponding to the update node data of the vaccine outbound label can be operated on the chain.
  • the first type of blockchain node is uploading data, it mainly determines whether the order of its data nodes meets the restrictions in the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract.
  • This verification method can ensure that the first-type blockchain node uploads data at the correct process node, thereby forming a complete traceability data with the data of other nodes of the batch of vaccines.
  • the acquiring the first data node sequence corresponding to the first data summary according to each historical data included in the first historical data set includes:
  • the historical data and the first data summary in the first historical data set are sorted in ascending order of time to obtain the first data node order corresponding to the first data summary.
  • the first historical data set After acquiring the first historical data set, you can know which historical data the first historical data set includes, and you can know the data timestamp corresponding to each historical data (the data time corresponding to the historical data)
  • the stamp is already stored in the block of the blockchain and can be queried), and the current system time corresponding to the first data summary is also available.
  • Sorting the historical data and the first data summary in the first historical data set in ascending order of time the order of the first data node corresponding to the first data summary can be obtained. Sorting the historical data and the first data summary in the first historical data set in the ascending order of the data timestamp can effectively verify whether the first-type blockchain node uploads the data at the correct process node.
  • the integrity of all process data in the historical data set can also be obtained.
  • a certain vaccine tag code that is, the traceability source code
  • verifying the integrity of the first historical data set is to determine the Whether the vaccine production data review node data, vaccine approval node data, and vaccine production tagging node data corresponding to the vaccine tag code have been stored in the blockchain. In this way, it can be verified that the vaccine circulation process, the corresponding before and after the source code, and the data is open and transparent, cannot be tampered with, and the time sequence of circulation is correct.
  • the leader blockchain node if the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract in order, through the utility of Byzantine Before the fault-tolerant algorithm elects the leader blockchain node, it also includes:
  • the identity verification of each blockchain node is passed, obtain user identity information of each blockchain node; the user identity information includes vaccine manufacturer equipment, regulatory agency equipment, CDC equipment, vaccination unit equipment, and vaccine transportation data collection equipment.
  • each blockchain node needs to perform identity verification before joining the blockchain network.
  • each blockchain node forms the FISCO BCOS alliance chain.
  • FISCO BCOS is a blockchain underlying platform developed by the Open Source Working Group of the Financial Blockchain Cooperative Alliance (Shenzhen) with financial business practices as a reference sample.
  • FISCO BCOS also has multi-chain parallel and cross-chain communication technology to support massive transaction requests.
  • the blockchain network in this embodiment adopts a single-chain structure, that is, all blockchain nodes jointly maintain a chain.
  • the system implements a user identity access mechanism, the supervisory agency account serves as the chain administrator, and the remaining users must pass the review and authorization of the supervisory agency to join the system.
  • a user can have one or more nodes (authorization by regulatory agencies), and all nodes participate in the blockchain consensus.
  • the user's identity management is also realized through smart contracts. Users register on the front-end and apply for different roles. First, they need to create an account, that is, assign a pair of asymmetric keys. The public key hash is used as the user's account address, and then the identity management contract is called. The contract uses a table structure to store the user's account address and identity. At the same time, users need to run blockchain nodes. In the blockchain consensus, all user nodes participate in verification.
  • the second type of blockchain node in addition to being a blockchain node, can also be used to upload the data summary corresponding to the data of the vaccine approval node. Therefore, when the blockchain network detects any of the second type The second data summary uploaded by the blockchain node (this data summary has not yet been written into the block at this time, but is cached in a data pool of the blockchain network), at this time through the stored data in each blockchain node
  • the first smart contract and/or the fourth smart contract are correspondingly invoked to verify whether the data corresponding to the second data summary satisfies the first smart contract and/or the fourth smart contract.
  • each blockchain node of the blockchain network needs to elect a second leader blockchain node according to the consensus algorithm to pass the second leader
  • the blockchain node acts as a miner to dig the second data summary in the data pool, write the second data summary into the corresponding block constructed by the second leader blockchain node for storage, and finally take a very short time
  • the copy of the second data summary is sent to other blockchain nodes, so that the corresponding blocks on each blockchain node are updated to obtain the updated blockchain.
  • the specific process can refer to judging whether the order of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the The third smart contract and/or the fourth smart contract process.
  • the third type of blockchain node can also be used to upload vaccine entry label update node data, vaccine secondary exit label update node data, and vaccine adverse reaction monitoring data.
  • the data summary corresponding to these data uploading node data for the second time so when the blockchain network detects the third data summary uploaded by any third type blockchain node (this data summary has not been written into the block at this time, but Cached in a data pool of the blockchain network), at this time, the second smart contract, the third smart contract, and/or the fourth smart contract are correspondingly called from the smart contracts stored in each blockchain node to compare the third Whether the data corresponding to the data summary satisfies the second smart contract, the third smart contract and/or the fourth smart contract is verified.
  • each blockchain node of the blockchain network needs to elect a third leader blockchain node according to the consensus algorithm. Take the role of the third leader blockchain node as a miner to dig the third data summary in the data pool, write the third data summary into the corresponding block constructed by the third leader blockchain node for storage, and finally A copy of the third data summary is sent to other blockchain nodes in a very short time, so that the corresponding blocks on each blockchain node are updated to obtain the updated blockchain.
  • the specific process can refer to judging whether the order of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the The third smart contract and/or the fourth smart contract process.
  • the fourth type of blockchain node can also be used to upload the secondary vaccine storage tag update node data, vaccination node data, and vaccine adverse reaction monitoring data upload node data.
  • the data summary corresponding to the data so when the blockchain network detects the fourth data summary uploaded by any fourth type blockchain node (this data summary has not been written to the block at this time, but is cached in the blockchain In a data pool of the network), at this time, the third smart contract and/or the fourth smart contract are correspondingly called from the smart contracts stored in each blockchain node to determine whether the data corresponding to the fourth data summary meets the third smart The contract and/or the fourth smart contract are verified.
  • each blockchain node of the blockchain network needs to elect a fourth leader blockchain node according to the consensus algorithm to pass the fourth leader
  • the blockchain node acts as a miner to dig the fourth data summary in the data pool, write the fourth data summary into the corresponding block constructed by the fourth leading blockchain node for storage, and finally take a very short time Send a copy of the fourth data summary to other blockchain nodes, so as to update the corresponding blocks on each blockchain node to obtain the updated blockchain.
  • the specific process can refer to judging whether the order of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the first smart contract.
  • the third smart contract and/or the fourth smart contract process can refer to judging whether the order of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the first smart contract.
  • Blocks are updated synchronously to ensure that the blockchain data stored on each blockchain node is consistent.
  • first leader block chain node second leader block chain node, third leader block chain node, fourth leader block chain node, and even more subsequent leader block chain nodes elected It does not specifically refer to a fixed blockchain node, but any blockchain node may be elected as the leading blockchain node.
  • step S150 the method further includes:
  • the vaccine traceability data set corresponding to the traceable source code is obtained in the updated blockchain according to the traceable source code; wherein, the vaccine traceability data set includes vaccine production materials Review node data, vaccine approval node data, vaccine production labeling node data, vaccine delivery tag update node data, vaccine entry tag update node data, vaccine secondary delivery tag update node data, vaccine secondary entry tag update node Data, vaccination node data, vaccine adverse reaction monitoring data upload node data, and vaccine adverse reaction monitoring data secondary upload node data.
  • any blockchain node can initiate a data query at this time, and it is only necessary to determine whether it is detected The trace source code uploaded by the blockchain node. If the traceability source code uploaded by the blockchain node is detected, the vaccine traceability data set corresponding to the traceability source code is obtained in the updated blockchain according to the traceability source code.
  • vaccine manufacturers Before producing each batch of vaccines, vaccine manufacturers submit vaccine production materials to regulatory agencies for review. Vaccine manufacturers can only produce vaccines after obtaining approval from regulatory agencies.
  • the vaccine production materials include vaccine varieties, vaccine batches, vaccine raw materials and production process parameters;
  • the regulatory agency After the regulatory agency has reviewed the vaccine production materials of the vaccine manufacturer, the regulatory agency will return the review results, including whether to approve the production, and the regulatory agency will assign a vaccine label code to the batch of vaccines.
  • the vaccine label code is the unique identification mark of the vaccine For traceability;
  • the vaccine manufacturer After approval by the regulatory agency, the vaccine manufacturer will produce vaccines and paste codes for each vaccine (ie, paste the vaccine label code);
  • the vaccination unit uses the vaccine for the vaccinators and uploads the vaccination node data
  • the vaccination unit will upload the node data of the vaccine adverse reaction monitoring data to the CDC;
  • the vaccine traceability data set at this time includes at least vaccine production data review node data, vaccine approval node data, vaccine production tagging node data, vaccine delivery label update node data, and vaccine storage Label update node data, vaccine secondary outbound label update node data, vaccine secondary storage label update node data, vaccination node data, vaccine adverse reaction monitoring data upload node data, and vaccine adverse reaction monitoring data secondary upload node data.
  • vaccine traceability data set users can query vaccine information and vaccine circulation data.
  • the vaccine tag code can locate and track the circulation process of all the batches of vaccines, and can be used as undeniable digital evidence.
  • step S110 the method further includes:
  • the fifth data summary uploaded by any fifth type blockchain node is detected, call the pre-stored third smart contract to verify the fifth data summary, if the fifth data summary passes the third smart contract For verification, the fifth leading blockchain node elected by the consensus algorithm builds a block to store the fifth data summary, and updates the corresponding block on each blockchain node to obtain the updated blockchain.
  • the fifth type of blockchain node in addition to being a blockchain node, can also be used to upload data corresponding to environmental monitoring data during the first transportation of vaccines and environmental monitoring data during the second transportation of vaccines.
  • the blockchain network detects the fifth data summary uploaded by any fifth type blockchain node (this data summary has not been written into the block at this time, but a data cached in the blockchain network In the pool), at this time, the third smart contract is correspondingly invoked through the smart contracts stored in each blockchain node to verify whether the data corresponding to the fifth data summary meets the third smart contract.
  • each blockchain node of the blockchain network needs to elect a fifth leader blockchain node according to the consensus algorithm, so that the fifth leader blockchain node can act as the miner's
  • the character goes to the data pool to dig the fifth data summary, writes the fifth data summary into the corresponding block constructed by the fifth leader blockchain node for storage, and finally copies the fifth data summary in a very short time Send to other blockchain nodes.
  • the specific process can refer to judging whether the sequence of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the first smart contract.
  • the third smart contract and/or the fourth smart contract process can refer to judging whether the sequence of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the first smart contract.
  • step S110 the method further includes:
  • step S110 If the data summary uploaded by the blockchain node is not detected, wait for the preset consensus time, and return to step S110.
  • the data summary uploaded by the blockchain node is not detected, it means that there is no data to be uploaded to the chain at this time. At this time, wait for the preset consensus time (such as 1s) to initiate a check of the uploaded data summary again. .
  • This method realizes that the blockchain provides services such as data storage, management, traceability, verification, and non-repudiation for key data in the production, sales, transportation, and supervision of the vaccine supply chain, which can not only ensure the safety of vaccine circulation data, but also Ensure the traceability, undeniability, and timeliness of the vaccine circulation process.
  • the embodiment of the present application also provides a vaccine information monitoring device based on a blockchain, which is used to execute any embodiment of the aforementioned vaccine information monitoring method based on the blockchain.
  • FIG. 3 is a schematic block diagram of a vaccine information monitoring device based on a blockchain provided in an embodiment of the present application.
  • the vaccine information monitoring device 100 based on the blockchain can be configured in any blockchain node.
  • the vaccine information monitoring device 100 based on the blockchain includes a data summary receiving unit 110, a first type storage unit 120, a second type storage unit 130, a third type storage unit 140, and a fourth type storage unit 150. .
  • the data summary receiving unit 110 is used to determine whether a data summary uploaded by a blockchain node is detected; wherein, the blockchain node includes a first type of blockchain node, a second type of blockchain node, and a third type of blockchain node.
  • the five types of blockchain nodes are the blockchain nodes of vaccine transportation data collection equipment.
  • the first-type storage unit 120 is used to call the pre-stored first smart contract, second smart contract, third smart contract and/or first data summary uploaded by any first-type blockchain node.
  • Four smart contracts are used to verify the first data summary. If the first data summary passes, the second smart contract, the third smart contract, and/or the fourth smart contract are verified, the first data summary elected by the consensus algorithm
  • a leading blockchain node constructs a block to store the first data summary, and updates the corresponding block on each blockchain node to obtain the updated blockchain.
  • the first type storage unit 120 includes:
  • the first historical data set acquisition unit is used to call the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract if the first data summary uploaded by any first type blockchain node is detected
  • the query function in the contract obtains the first historical data set corresponding to the first data summary
  • the first data node sequence obtaining unit is configured to obtain the first data node sequence corresponding to the first data summary according to each historical data included in the first historical data set;
  • the first smart contract verification unit is used to determine whether the sequence of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract;
  • the first election unit is configured to use Byzantine fault tolerance if the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract in order, Algorithm to elect the leader blockchain node;
  • the first type block creation unit is configured to store the first data summary through the current first block created in the first leader blockchain node;
  • the first block copy sending unit is configured to send a copy of the first data digest in the current first block to other blockchain nodes.
  • the first historical data set acquisition unit includes:
  • the first process node judging unit is used to determine whether the process node corresponding to the first data summary is a vaccine production data review node or a vaccine label if the first data summary uploaded by any first type blockchain node is detected Update node, or vaccine delivery node;
  • a vaccine production material review node execution unit configured to set the first historical data set to an empty set if the process node corresponding to the first data summary is a vaccine production material review node
  • the vaccine label update node execution unit is configured to, if the process node corresponding to the first data summary is a vaccine label update node, obtain vaccine production data review node data and vaccine approval node data to form a first historical data set;
  • the vaccine delivery node execution unit is used to obtain vaccine production data review node data, vaccine approval node data, and vaccine production tagging node data if the process node corresponding to the first data summary is a vaccine delivery node to form the first Historical data set.
  • the first data node sequential obtaining unit includes:
  • the first time stamp obtaining unit is configured to obtain data time stamps corresponding to each historical data in the first historical data set, and obtain the current system time corresponding to the first data summary;
  • the first time stamp sorting unit is configured to sort the historical data and the first data summary in the first historical data set in ascending order of time to obtain the first data node order corresponding to the first data summary.
  • the vaccine information monitoring device 100 based on blockchain further includes:
  • the identity verification unit is used to call the pre-stored identity management contract to obtain the public key hash of each blockchain node to verify the identity of each blockchain node;
  • the equipment identity acquisition unit is used to obtain the user identity information of each blockchain node if the identity verification of each blockchain node is passed; the user identity information includes equipment of vaccine manufacturers, equipment of regulatory agencies, equipment of CDC, and equipment of vaccination unit , Vaccine transportation data collection equipment.
  • the second type storage unit 130 is configured to, if a second data summary uploaded by any second type blockchain node is detected, call the pre-stored first smart contract and/or fourth smart contract to compare the second data The summary is verified. If the second data summary passes the verification of the first smart contract and/or the fourth smart contract, the second leader blockchain node elected by the consensus algorithm constructs a block to perform the second data summary. Store, update the corresponding block on each block chain node to obtain the updated block chain.
  • the third type storage unit 140 is used to call the pre-stored second smart contract, third smart contract and/or fourth smart contract if the third data summary uploaded by any third type blockchain node is detected
  • the third data summary is verified, and if the third data summary passes the verification of the second smart contract, the third smart contract and/or the fourth smart contract, it passes the third leader blockchain node elected by the consensus algorithm
  • the block is constructed to store the third data summary, and the block corresponding to each block chain node is updated to obtain the updated block chain.
  • the fourth type storage unit 150 is configured to, if the fourth data summary uploaded by any fourth type blockchain node is detected, call the pre-stored third smart contract and/or fourth smart contract to compare the fourth data The summary is verified. If the fourth data summary passes the verification of the third smart contract and/or the fourth smart contract, the fourth leader blockchain node elected by the consensus algorithm builds a block to perform the fourth data summary. Store, update the corresponding block on each block chain node to obtain the updated block chain.
  • the device 100 for monitoring vaccine information based on blockchain further includes:
  • the data query request judging unit is used to judge whether the traceable source code uploaded by the blockchain node is detected; wherein the traceable source code is a 20-digit vaccine tag code;
  • the vaccine traceability data set obtaining unit is configured to obtain the vaccine traceability data set corresponding to the traceable source code in the updated blockchain according to the traceable source code if the traceable source code uploaded by the blockchain node is detected;
  • the vaccine traceability data set includes vaccine production data review node data, vaccine approval node data, vaccine production labeling node data, vaccine delivery tag update node data, vaccine entry tag update node data, vaccine secondary delivery tag update node data , Vaccine secondary storage tag update node data, vaccination node data, vaccine adverse reaction monitoring data upload node data, vaccine adverse reaction monitoring data secondary upload node data.
  • the device 100 for monitoring vaccine information based on blockchain further includes:
  • the fifth type storage unit is used to call a pre-stored third smart contract to verify the fifth data summary if the fifth data summary uploaded by any fifth type blockchain node is detected.
  • the fifth data summary is verified by the third smart contract, and the fifth data summary is constructed by the fifth leading blockchain node elected by the consensus algorithm to store the fifth data summary, and the corresponding block on each blockchain node is updated to get Blockchain after update.
  • the device realizes that the blockchain provides services such as data storage, management, traceability, verification, and non-repudiation for key data in the production, sales, transportation, and supervision of the vaccine supply chain. It can not only ensure the safety of vaccine circulation data, but also Ensure the traceability, undeniability, and timeliness of the vaccine circulation process.
  • the above-mentioned block chain-based vaccine information monitoring device can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 4.
  • FIG. 4 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • the computer device 500 is a server, and the server may be an independent server or a server cluster composed of multiple servers.
  • the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
  • the non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032.
  • the processor 502 can execute the vaccine information monitoring method based on the blockchain.
  • the processor 502 is used to provide calculation and control capabilities, and support the operation of the entire computer device 500.
  • the internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503.
  • the processor 502 can execute the vaccine information monitoring method based on the blockchain.
  • the network interface 505 is used for network communication, such as providing data information transmission.
  • the structure shown in FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied.
  • the specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
  • the processor 502 is configured to run a computer program 5032 stored in a memory to implement the vaccine information monitoring method based on the blockchain disclosed in the embodiment of the present application.
  • the embodiment of the computer device shown in FIG. 4 does not constitute a limitation on the specific configuration of the computer device.
  • the computer device may include more or less components than those shown in the figure. Or some parts are combined, or different parts are arranged.
  • the computer device may only include a memory and a processor. In such an embodiment, the structures and functions of the memory and the processor are consistent with the embodiment shown in FIG. 4, and will not be repeated here.
  • the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
  • a computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • the computer readable storage medium stores a computer program, where the computer program is executed by a processor to realize the vaccine information monitoring method based on the blockchain disclosed in the embodiments of the present application.
  • the disclosed equipment, device, and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods, or the units with the same function may be combined into one. Units, for example, multiple units or components can be combined or integrated into another system, or some features can be omitted or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments of the present application.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium.
  • the technical solution of this application is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium. It includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), magnetic disk or optical disk and other media that can store program codes.

Abstract

A blockchain-based vaccine information monitoring method and apparatus, a computer device, and a storage medium, for providing data storage, management, tracing, verification, and non-repudiation services for key data in the production, sales, transportation, and supervision links of a vaccine supply chain by means of the blockchain storing a summary of data uploaded by blockchain nodes. The blockchain provides a globally unique and unmodifiable ledger capable of ensuring the security of vaccine circulation data; and the smart contract mechanism provided by the blockchain can ensure the traceability, non-repudiation, and timeliness of the vaccine circulation process, and can be used as electronic evidence when a security incident occurs.

Description

基于区块链的疫苗信息监控方法、装置及计算机设备Vaccine information monitoring method, device and computer equipment based on blockchain
本申请是以申请号为201911274734.8、申请日为2019年12月12日的中国专利申请为基础,并主张其优先权,该申请的全部内容在此作为整体引入本申请中。This application is based on the Chinese patent application with the application number 201911274734.8 and the filing date on December 12, 2019, and claims its priority. The entire content of this application is hereby incorporated into this application as a whole.
技术领域Technical field
本申请涉及功能测试技术领域,尤其涉及一种基于区块链的疫苗信息监控方法、装置、计算机设备及存储介质。This application relates to the technical field of functional testing, and in particular to a method, device, computer equipment, and storage medium for monitoring vaccine information based on blockchain.
背景技术Background technique
近年来,疫苗安全事件频发,重要原因在于疫苗供应链存在安全隐患:疫苗的流通过程涉及到多方参与,信息不透明,监管过程未能够严格执行,管理有待完善。In recent years, vaccine safety incidents have occurred frequently. The important reason is that there are potential safety hazards in the vaccine supply chain: the circulation process of vaccines involves multiple parties, the information is not transparent, the supervision process has not been strictly implemented, and the management needs to be improved.
当前监管部门已经尝试使用信息技术保障疫苗供应链的安全,信息技术的使用不但减少了人为因素对疫苗流通过程的影响,而且一定程度上提高了疫苗流通的可溯源性。但是当前的信息技术使用主要基于传统的信息管理系统,数据分散于多个独立的系统之中,存在被篡改、删除的风险;当疫苗事故发生时,溯源的可靠性、不可否认性、时效性依然是有待解决的难题。At present, the regulatory authorities have tried to use information technology to ensure the safety of the vaccine supply chain. The use of information technology not only reduces the impact of human factors on the vaccine circulation process, but also improves the traceability of vaccine circulation to a certain extent. However, the current use of information technology is mainly based on traditional information management systems, and data is scattered among multiple independent systems, and there is a risk of being tampered with and deleted; when a vaccine accident occurs, the reliability, undeniability, and timeliness of traceability It is still a problem to be solved.
申请内容Application content
本申请实施例提供了一种基于区块链的疫苗信息监控方法、装置、计算机设备及存储介质,旨在解决现有技术中疫苗的流通过程的信息分散于多个独立的系统之中,存在被篡改、删除的风险,不易查询溯源的问题。The embodiments of this application provide a method, device, computer equipment and storage medium for vaccine information monitoring based on blockchain, aiming to solve the problem that the information of the vaccine circulation process in the prior art is dispersed in multiple independent systems. The risk of tampering and deletion makes it difficult to inquire about the source of the problem.
第一方面,本申请实施例提供了一种基于区块链的疫苗信息监控方法,其包括:In the first aspect, an embodiment of the present application provides a method for monitoring vaccine information based on a blockchain, which includes:
判断是否检测到区块链节点上传的数据摘要;其中,所述区块链节点包括第一类型区块链节点、第二类型区块链节点、第三类型区块链节点、第四类型区块链节点、第五类型区块链节点;所述第一类型区块链节点为疫苗产商设备区块链节点,所述第二类型区块链节点为监管机构设备区块链节点,所述第三类型区块链节点为疾控中心设备区块链节点,所述第四类型区块链节点为疫苗接种单位设备区块链节点、所述第五类型区块链节点为疫苗运输数据搜集设备 区块链节点;Determine whether a data summary uploaded by a blockchain node is detected; wherein, the blockchain node includes a first type of blockchain node, a second type of blockchain node, a third type of blockchain node, and a fourth type of area Blockchain nodes, fifth-type blockchain nodes; the first-type blockchain nodes are vaccine manufacturers’ equipment blockchain nodes, and the second-type blockchain nodes are regulatory agency equipment blockchain nodes, so The third type of block chain node is the CDC equipment block chain node, the fourth type of block chain node is the vaccination unit equipment block chain node, and the fifth type of block chain node is the vaccine transportation data Collect device blockchain nodes;
若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用预先存储的第一智能合约、第二智能合约、第三智能合约和/或第四智能合约以对所述第一数据摘要进行验证,若所述第一数据摘要通过、第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第一领导区块链节点构建区块以将第一数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;If the first data summary uploaded by any one of the first type blockchain nodes is detected, call the pre-stored first smart contract, second smart contract, third smart contract and/or fourth smart contract to compare the first The data digest is verified. If the first data digest is verified by the second smart contract, the third smart contract, and/or the fourth smart contract, the block is constructed by the first leader blockchain node elected by the consensus algorithm To store the first data summary, update the corresponding block on each blockchain node to obtain the updated blockchain;
若检测到任意一个第二类型区块链节点上传的第二数据摘要,调用预先存储的第一智能合约和/或第四智能合约以对所述第二数据摘要进行验证,若所述第二数据摘要通过第一智能合约和/或第四智能合约的验证,通过由共识算法所选举的第二领导区块链节点构建区块以将第二数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;If the second data summary uploaded by any second type blockchain node is detected, call the pre-stored first smart contract and/or fourth smart contract to verify the second data summary, if the second The data summary is verified by the first smart contract and/or the fourth smart contract, and the second leading blockchain node elected by the consensus algorithm is used to construct a block to store the second data summary. The corresponding block is updated to get the updated block chain;
若检测到任意一个第三类型区块链节点上传的第三数据摘要,调用预先存储的第二智能合约、第三智能合约和/或第四智能合约以对所述第三数据摘要进行验证,若所述第三数据摘要通过第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第三领导区块链节点构建区块以将第三数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;以及If the third data summary uploaded by any third type blockchain node is detected, call the pre-stored second smart contract, third smart contract and/or fourth smart contract to verify the third data summary, If the third data summary passes the verification of the second smart contract, the third smart contract, and/or the fourth smart contract, a block is constructed by the third leader blockchain node elected by the consensus algorithm to summarize the third data Perform storage and update the corresponding blocks on each blockchain node to obtain the updated blockchain; and
若检测到任意一个第四类型区块链节点上传的第四数据摘要,调用预先存储的第三智能合约和/或第四智能合约以对所述第四数据摘要进行验证,若所述第四数据摘要通过第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第四领导区块链节点构建区块以将第四数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。If the fourth data summary uploaded by any fourth type blockchain node is detected, call the pre-stored third smart contract and/or fourth smart contract to verify the fourth data summary. The data summary is verified by the third smart contract and/or the fourth smart contract, and the fourth leader blockchain node elected by the consensus algorithm is used to construct a block to store the fourth data summary. The corresponding block is updated to get the updated block chain.
第二方面,本申请实施例提供了一种基于区块链的疫苗信息监控装置,其包括:In the second aspect, an embodiment of the present application provides a vaccine information monitoring device based on a blockchain, which includes:
数据摘要接收单元,用于判断是否检测到区块链节点上传的数据摘要;其中,所述区块链节点包括第一类型区块链节点、第二类型区块链节点、第三类型区块链节点、第四类型区块链节点、第五类型区块链节点;所述第一类型区块链节点为疫苗产商设备区块链节点,所述第二类型区块链节点为监管机构设备区块链节点,所述第三类型区块链节点为疾控中心设备区块链节点,所述第 四类型区块链节点为疫苗接种单位设备区块链节点、所述第五类型区块链节点为疫苗运输数据搜集设备区块链节点;The data summary receiving unit is used to determine whether a data summary uploaded by a blockchain node is detected; wherein the blockchain node includes a first type of blockchain node, a second type of blockchain node, and a third type of block Chain nodes, fourth type blockchain nodes, fifth type blockchain nodes; the first type blockchain node is a vaccine manufacturer equipment blockchain node, and the second type blockchain node is a regulatory agency Device blockchain node, the third type blockchain node is the CDC device blockchain node, the fourth type blockchain node is the vaccination unit device blockchain node, the fifth type area The block chain node is the block chain node of the vaccine transportation data collection equipment;
第一类型存储单元,用于若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用预先存储的第一智能合约、第二智能合约、第三智能合约和/或第四智能合约以对所述第一数据摘要进行验证,若所述第一数据摘要通过、第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第一领导区块链节点构建区块以将第一数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;The first-type storage unit is used to call the pre-stored first smart contract, second smart contract, third smart contract and/or fourth smart contract if the first data summary uploaded by any first-type blockchain node is detected The smart contract verifies the first data summary. If the first data summary passes, the second smart contract, the third smart contract, and/or the fourth smart contract are verified, the first data summary elected by the consensus algorithm is passed. Lead the blockchain node to construct a block to store the first data summary, and update the corresponding block on each blockchain node to obtain the updated blockchain;
第二类型存储单元,用于若检测到任意一个第二类型区块链节点上传的第二数据摘要,调用预先存储的第一智能合约和/或第四智能合约以对所述第二数据摘要进行验证,若所述第二数据摘要通过第一智能合约和/或第四智能合约的验证,通过由共识算法所选举的第二领导区块链节点构建区块以将第二数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;The second type storage unit is used to call the pre-stored first smart contract and/or fourth smart contract to summarize the second data if the second data summary uploaded by any second type blockchain node is detected Perform verification. If the second data digest passes the verification of the first smart contract and/or the fourth smart contract, the second leader blockchain node elected by the consensus algorithm builds a block to store the second data digest , Update the corresponding block on each blockchain node to get the updated blockchain;
第三类型存储单元,用于若检测到任意一个第三类型区块链节点上传的第三数据摘要,调用预先存储的第二智能合约、第三智能合约和/或第四智能合约以对所述第三数据摘要进行验证,若所述第三数据摘要通过第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第三领导区块链节点构建区块以将第三数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;以及The third type storage unit is used to call the pre-stored second smart contract, third smart contract and/or fourth smart contract to check the third data summary uploaded by any third-type blockchain node. The third data summary is verified. If the third data summary is verified by the second smart contract, the third smart contract, and/or the fourth smart contract, it is constructed by the third leader blockchain node elected by the consensus algorithm The block stores the third data summary, and updates the corresponding blocks on each block chain node to obtain the updated block chain; and
第四类型存储单元,用于若检测到任意一个第四类型区块链节点上传的第四数据摘要,调用预先存储的第三智能合约和/或第四智能合约以对所述第四数据摘要进行验证,若所述第四数据摘要通过第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第四领导区块链节点构建区块以将第四数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。The fourth type storage unit is used to call the pre-stored third smart contract and/or fourth smart contract to summarize the fourth data if the fourth data summary uploaded by any fourth type blockchain node is detected Perform verification. If the fourth data summary passes the verification of the third smart contract and/or the fourth smart contract, the fourth leader blockchain node elected by the consensus algorithm builds a block to store the fourth data summary , Update the corresponding block on each block chain node to get the updated block chain.
第三方面,本申请实施例又提供了一种计算机设备,其包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面所述的基于区块链的疫苗信息监控方法。In a third aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and running on the processor, and the processor executes the computer The program implements the blockchain-based vaccine information monitoring method described in the first aspect above.
第四方面,本申请实施例还提供了一种计算机可读存储介质,其中所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所 述处理器执行上述第一方面所述的基于区块链的疫苗信息监控方法。In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the above-mentioned first On the one hand, the blockchain-based vaccine information monitoring method.
本申请实施例提供了一种基于区块链的疫苗信息监控方法、装置、计算机设备及存储介质,通过区块链实现了为疫苗供应链的生产、销售、运输、监管环节的关键数据提供数据存储、管理、追溯、验证、防抵赖等服务。而且区块链提供了全局唯一、不可修改的账本,可以保障疫苗流通数据的安全;区块链提供的智能合约机制,可以保障疫苗流通过程的可溯源性、不可否认性、时效性,当安全事故发生时可以作为电子证据使用。The embodiments of the application provide a method, device, computer equipment and storage medium for monitoring vaccine information based on blockchain, which realize the provision of data for key data in the production, sales, transportation, and supervision of the vaccine supply chain through the blockchain. Storage, management, traceability, verification, non-repudiation and other services. Moreover, the blockchain provides a globally unique and unmodifiable ledger, which can ensure the security of vaccine circulation data; the smart contract mechanism provided by the blockchain can ensure the traceability, non-repudiation, and timeliness of the vaccine circulation process. It can be used as electronic evidence when an accident occurs.
附图说明Description of the drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1为本申请实施例提供的基于区块链的疫苗信息监控方法的应用场景示意图;FIG. 1 is a schematic diagram of an application scenario of a vaccine information monitoring method based on a blockchain provided by an embodiment of the application;
图2为本申请实施例提供的基于区块链的疫苗信息监控方法的流程示意图;FIG. 2 is a schematic flowchart of a method for monitoring vaccine information based on a blockchain provided by an embodiment of the application;
图3为本申请实施例提供的基于区块链的疫苗信息监控装置的示意性框图;FIG. 3 is a schematic block diagram of a vaccine information monitoring device based on a blockchain provided by an embodiment of the application;
图4为本申请实施例提供的计算机设备的示意性框图。Fig. 4 is a schematic block diagram of a computer device provided by an embodiment of the application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and appended claims, the terms "including" and "including" indicate the existence of the described features, wholes, steps, operations, elements and/or components, but do not exclude one or The existence or addition of multiple other features, wholes, steps, operations, elements, components, and/or collections thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in the specification of this application and the appended claims, unless the context clearly indicates other circumstances, the singular forms "a", "an" and "the" are intended to include plural forms.
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/ 或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should be further understood that the term "and/or" used in the specification and appended claims of this application refers to any combination of one or more of the items listed in the associated and all possible combinations, and includes these combinations .
请参阅图1和图2,图1为本申请实施例提供的基于区块链的疫苗信息监控方法的应用场景示意图;图2为本申请实施例提供的基于区块链的疫苗信息监控方法的流程示意图,该基于区块链的疫苗信息监控方法应用于任一区块链节点中,该方法通过安装于区块链节点中的应用软件进行执行。Please refer to Figure 1 and Figure 2. Figure 1 is a schematic diagram of the application scenario of the blockchain-based vaccine information monitoring method provided by an embodiment of the application; Figure 2 is a schematic diagram of the blockchain-based vaccine information monitoring method provided by an embodiment of the application Schematic diagram of the process. The method for monitoring vaccine information based on the blockchain is applied to any blockchain node, and the method is executed by the application software installed in the blockchain node.
如图2所示,该方法包括步骤S110~S150。As shown in Figure 2, the method includes steps S110 to S150.
S110、判断是否检测到区块链节点上传的数据摘要;其中,所述区块链节点包括第一类型区块链节点、第二类型区块链节点、第三类型区块链节点、第四类型区块链节点、第五类型区块链节点;所述第一类型区块链节点为疫苗产商设备区块链节点,所述第二类型区块链节点为监管机构设备区块链节点,所述第三类型区块链节点为疾控中心设备区块链节点,所述第四类型区块链节点为疫苗接种单位设备区块链节点、所述第五类型区块链节点为疫苗运输数据搜集设备区块链节点。S110. Determine whether a data summary uploaded by a blockchain node is detected; wherein, the blockchain node includes a first type of blockchain node, a second type of blockchain node, a third type of blockchain node, and a fourth type of blockchain node. Type block chain node, fifth type block chain node; the first type block chain node is a vaccine manufacturer equipment block chain node, and the second type block chain node is a regulatory agency equipment block chain node , The third type of blockchain node is an equipment blockchain node of the Center for Disease Control and Prevention, the fourth type of blockchain node is a vaccination unit equipment blockchain node, and the fifth type of blockchain node is a vaccine Blockchain node of transportation data collection equipment.
在本实施例中,如图1所示,区块链网络由多个区块链节点组成(例如图1中的区块链节点1-区块链节点N),每一区块链节点对应一个区块链设备,区块链为第一类型区块链节点、第二类型区块链节点、第三类型区块链节点、第四类型区块链节点、第五类型区块链节点其中的一种。更具体的,所述第一类型区块链节点为疫苗产商设备区块链节点,所述第二类型区块链节点为监管机构设备区块链节点,所述第三类型区块链节点为疾控中心设备区块链节点,所述第四类型区块链节点为疫苗接种单位设备区块链节点,所述第五类型区块链节点为疫苗运输数据搜集设备区块链节点。In this embodiment, as shown in Figure 1, the blockchain network is composed of multiple blockchain nodes (for example, blockchain node 1-blockchain node N in Figure 1), and each blockchain node corresponds to A blockchain device, the blockchain is the first type of blockchain node, the second type of blockchain node, the third type of blockchain node, the fourth type of blockchain node, and the fifth type of blockchain node. Kind of. More specifically, the first type of blockchain node is a vaccine manufacturer equipment blockchain node, the second type of blockchain node is a regulatory agency equipment blockchain node, and the third type of blockchain node It is an equipment block chain node of the Center for Disease Control and Prevention, the fourth type of block chain node is a vaccination unit equipment block chain node, and the fifth type of block chain node is a vaccine transportation data collection equipment block chain node.
其中,所述第一类型区块链节点除了作为区块链节点,还可以用于上传疫苗生产资料审核节点数据、疫苗生产贴码节点数据、疫苗出库标签更新节点数据这些数据对应的数据摘要。Among them, the first type of blockchain node can be used as a blockchain node, but can also be used to upload vaccine production data review node data, vaccine production tagging node data, vaccine delivery label update node data, and data summaries corresponding to these data. .
所述第二类型区块链节点除了作为区块链节点,还可以用于上传疫苗审批节点数据这些数据对应的数据摘要。In addition to being a blockchain node, the second-type blockchain node can also be used to upload a data summary corresponding to the data of the vaccine approval node.
所述第三类型区块链节点除了作为区块链节点,还可以用于上传疫苗入库标签更新节点数据、疫苗二次出库标签更新节点数据、疫苗不良反应监测数据二次上传节点数据这些数据对应的数据摘要。In addition to being a blockchain node, the third type of blockchain node can also be used to upload vaccine entry tag update node data, vaccine secondary delivery tag update node data, and vaccine adverse reaction monitoring data secondary upload node data. The data summary corresponding to the data.
所述第四类型区块链节点除了作为区块链节点,还可以用于上传疫苗二次入库标签更新节点数据、疫苗接种节点数据、疫苗不良反应监测数据上传节点数据这些数据对应的数据摘要。In addition to being used as a blockchain node, the fourth type of blockchain node can also be used to upload vaccine secondary storage tag update node data, vaccination node data, vaccine adverse reaction monitoring data, upload node data, and data summary corresponding to these data. .
所述第五类型区块链节点除了作为区块链节点,还可以用于上传疫苗第一次运输过程环境监控数据(在疫苗出库标签更新节点数据的产生时间与疫苗入库标签更新节点数据的产生时间之间),疫苗第二次运输过程环境监控数据(在疫苗二次出库标签更新节点数据的产生时间与疫苗二次入库标签更新节点数据的产生时间之间)这些数据对应的数据摘要。其中,疫苗第一次运输过程环境监控数据和疫苗第二次运输过程环境监控数据中均至少包括运输链的温度、湿度。In addition to being a blockchain node, the fifth type of blockchain node can also be used to upload environmental monitoring data during the first vaccine transportation process (the generation time of the vaccine outbound label update node data and the vaccine inbound label update node data Between the generation time of the vaccine), the environmental monitoring data during the second transportation of the vaccine (between the generation time of the vaccine secondary outbound label update node data and the vaccine secondary storage label update node data generation time). These data correspond to these data Data summary. Among them, the environmental monitoring data during the first transportation of the vaccine and the environmental monitoring data during the second transportation of the vaccine both include at least the temperature and humidity of the transportation chain.
也即上述五种类型的区块链节点对应的区块链设备是部署在不同的机构,区块链节点在上传数据时所代表的角色为疫苗产商、监管机构、疾控中心、疫苗接种单位、数据搜集中心这五种中的其中一种,每种角色的区块链设备上传的数据如上述举例。That is to say, the blockchain equipment corresponding to the above five types of blockchain nodes is deployed in different institutions. The roles represented by the blockchain nodes when uploading data are vaccine manufacturers, regulatory agencies, CDC, and vaccination. One of the five types of units and data collection centers. The data uploaded by the blockchain device of each role is as the above example.
由于任意一个区块链节点均限定了其上传数据的类型,实现了由不同角色的区块链节点组成一个完整的区块链网络,为疫苗供应链的生产、销售、运输、监管环节的关键数据提供数据存储、管理、追溯、验证、防抵赖等服务。Since any blockchain node limits the type of data it uploads, a complete blockchain network composed of blockchain nodes with different roles is realized, which is the key to the production, sales, transportation, and supervision of the vaccine supply chain. Data provides services such as data storage, management, traceability, verification, and non-repudiation.
S120、若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用预先存储的第一智能合约、第二智能合约、第三智能合约和/或第四智能合约以对所述第一数据摘要进行验证,若所述第一数据摘要通过第一智能合约、第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第一领导区块链节点构建区块以将第一数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。S120. If the first data summary uploaded by any first type blockchain node is detected, call the pre-stored first smart contract, second smart contract, third smart contract, and/or fourth smart contract to compare the The first data summary is verified. If the first data summary is verified by the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract, it passes the first leadership district elected by the consensus algorithm The block chain node constructs a block to store the first data summary, and correspondingly updates the block on each block chain node to obtain the updated block chain.
在本实施例中,由于第一类型区块链节点除了作为区块链节点,还可以用于上传疫苗生产资料审核节点数据、疫苗生产贴码节点数据、疫苗出库标签更新节点数据这些数据对应的数据摘要,故当区块链网络检测到任意一个第一类型区块链节点上传的第一数据摘要(这一数据摘要此时还未写入区块,而是缓存在区块链网络的一个数据池中),此时通过各区块链节点中已存储的智能合约中对应调用第一智能合约、第二智能合约、第三智能合约和/或第四智能合约,以对第一数据摘要对应的数据是否满足第一智能合约、第二智能合约、第三智 能合约和/或第四智能合约进行验证。In this embodiment, in addition to being a blockchain node, the first type of blockchain node can also be used to upload vaccine production data review node data, vaccine production tagging node data, and vaccine delivery label update node data. These data correspond to Therefore, when the blockchain network detects the first data summary uploaded by any first type blockchain node (this data summary has not been written into the block at this time, but is cached in the blockchain network In a data pool), at this time, the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract are correspondingly called from the smart contracts stored in each blockchain node to summarize the first data Whether the corresponding data satisfies the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract is verified.
其中,第一智能合约对应生产合约,第二智能合约对应购买合约,第三智能合约对应运输合约,第四智能合约对应监管合约。Among them, the first smart contract corresponds to a production contract, the second smart contract corresponds to a purchase contract, the third smart contract corresponds to a transportation contract, and the fourth smart contract corresponds to a supervision contract.
更具体的,生产合约用于生产阶段的监督,其主要功能包括:疫苗产商提交生产计划与生产许可申请。监管机构对生产计划核查后对生产许可申请进行处理。监管机构批准申请后,根据生产计划为该批次疫苗分配标签号码。其中,生产合约对应的数据表中包括以下字段:生产厂商编号、疫苗的批次编号、疫苗的种类名称、提交生产申请的时间、状态位(初始为0,如果监管机构批准则为1,拒绝则为-1)、以及疫苗标签码。More specifically, the production contract is used for the supervision of the production stage, and its main functions include: vaccine manufacturers submit production plans and production license applications. The regulatory agency processes the production license application after checking the production plan. After the regulatory agency approves the application, the batch of vaccines will be assigned a label number according to the production plan. Among them, the data table corresponding to the production contract includes the following fields: manufacturer number, vaccine batch number, vaccine type name, time of submission of the production application, status bit (initially 0, if the regulatory agency approves it, then it is 1, rejected It is -1), and the vaccine label code.
购买合约用于疫苗产商到疾控中心之间的订单协商。其主要功能有:疾控中心向疫苗产商发起购买申请,提交购买的疫苗种类,数量,时间等数据;疫苗产商处理订单。购买合约也维护一张采购数据表,保存生产厂商信息,疾控中心信息,以及订单中的疫苗种类,数量,购买时间等等数据。The purchase contract is used for order negotiation between the vaccine manufacturer and the CDC. Its main functions are: the CDC initiates a purchase application to the vaccine manufacturer, and submits data such as the type, quantity, and time of the vaccine to be purchased; the vaccine manufacturer processes the order. The purchase contract also maintains a purchase data sheet, which saves manufacturer information, CDC information, and the type, quantity, purchase time, and other data of the vaccine in the order.
运输合约用于运输阶段的监督,包含两个部分。从疫苗产商到疾控中心和从疾控中心分发到下级疾控中心或者接种单位。运输合约的主要功能包括:记录下运输订单的发送方和接收方信息,如某订单时从生产厂商A发往疾控中心B,或者是从疾控中心C发往接种点D,以及运输企业的信息。监控运输过程中的温度与位置信息,由传感器网络发送给运输合约的数据会保存在表中。The transportation contract is used for the supervision of the transportation stage and consists of two parts. From the vaccine manufacturer to the CDC and from the CDC to the lower-level CDC or vaccination unit. The main functions of the transportation contract include: recording the information of the sender and receiver of the transportation order, such as when an order is sent from manufacturer A to CDC B, or from CDC C to vaccination site D, and the transportation company Information. Monitor the temperature and location information during transportation, and the data sent by the sensor network to the transportation contract will be stored in the table.
监管合约以疫苗标签为基础,保存疫苗流通的整个过程。同时它还是接种用户根据标签号码查询疫苗信息的通道,可以查询到疫苗的有效期,疫苗产商,经过的疾控中心以及接种单位。它的主要功能如下:疫苗产商上传流通到疾控中心的疫苗标签数据。疾控中心扫码,上传接收到的疫苗标签数据,并与生产厂商上传的数据进行核对。疾控中心上传流通到下一级疾控中心或者接种单位的疫苗标签数据。接种单位扫码,上传接收到的疫苗标签数据,并与上一级疾控中心上传的数据进行核对。提供根据标签查询整个流通过程信息的功能。The regulatory contract is based on the vaccine label and preserves the entire process of vaccine circulation. At the same time, it is also a channel for vaccinated users to query vaccine information based on the tag number, and can query the validity period of the vaccine, the vaccine manufacturer, the CDC passed by and the vaccinating unit. Its main function is as follows: vaccine manufacturers upload vaccine label data circulating to the CDC. The CDC scans the code, uploads the received vaccine label data, and checks it with the data uploaded by the manufacturer. The CDC uploads vaccine label data circulating to the next-level CDC or vaccination unit. The vaccination unit scans the code, uploads the received vaccine label data, and checks it with the data uploaded by the higher-level CDC. Provides the function of querying the entire circulation process information based on the label.
当第一数据摘要对应的数据满足第一智能合约、第二智能合约、第三智能合约和/或第四智能合约时,需区块链网络的各区块链节点根据共识算法选举一个第一领导区块链节点,以通过第一领导区块链节点充当矿工的角色去数据池中挖取第一数据摘要,将第一数据摘要写入第一领导区块链节点对应构建的区块中进行存储,最后再以极短的时间内将第一数据摘要的副本发送至其他区块 链节点,经过其余节点认证后,实现对各区块链节点上的区块对应进行更新得到更新后区块链。When the data corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract, each blockchain node of the blockchain network needs to elect a first leader according to the consensus algorithm The blockchain node uses the first leader blockchain node to act as a miner to dig the first data summary in the data pool, and write the first data summary into the corresponding block constructed by the first leader blockchain node. Store, and finally send a copy of the first data summary to other blockchain nodes in a very short time. After the rest of the nodes are authenticated, the corresponding blocks on each blockchain node are updated to obtain the updated blockchain. .
在一实施例中,步骤S120包括:In an embodiment, step S120 includes:
若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用第一智能合约、第二智能合约、第三智能合约和/或第四智能合约中的查询函数,获取与所述第一数据摘要对应的第一历史数据集;If the first data summary uploaded by any first type blockchain node is detected, call the query function in the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract to obtain the The first historical data set corresponding to the first data summary;
根据第一历史数据集中包括的各历史数据,获取所述第一数据摘要对应的第一数据节点顺序;Acquiring the first data node sequence corresponding to the first data summary according to each historical data included in the first historical data set;
判断所述第一数据摘要对应的第一数据节点顺序是否满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约;Judging whether the sequence of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract;
若所述第一数据摘要对应的第一数据节点顺序满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约,通过实用拜占庭容错算法选举领导区块链节点;If the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract in order, the leader blockchain node is elected through the practical Byzantine fault-tolerant algorithm ;
通过所述第一领导区块链节点中创建的当前第一区块将所述第一数据摘要进行存储;Storing the first data summary through the current first block created in the first leader blockchain node;
将所述当前第一区块中的第一数据摘要的副本发送至其他区块链节点。Send a copy of the first data summary in the current first block to other blockchain nodes.
在本实施例中,为了判断所述第一数据摘要是否满足所述第一智能合约,主要是判断所述第一数据摘要对应的第一数据节点顺序满足所述第一智能合约。若所述第一数据摘要对应的第一数据节点顺序不满足所述第一智能合约,则发送上传数据有误的提示信息至第一类型区块链节点。例如所述第一数据摘要对应的数据为第一类型区块链节点上传的疫苗生产资料审核节点数据,由于每一疫苗产商在生产每一批疫苗之前,均会向监管机构发送疫苗生产资料而申请审核。In this embodiment, in order to determine whether the first data summary satisfies the first smart contract, it is mainly determined that the first data node corresponding to the first data summary satisfies the first smart contract in order. If the order of the first data node corresponding to the first data summary does not satisfy the first smart contract, a prompt message indicating that the uploaded data is incorrect is sent to the first type blockchain node. For example, the data corresponding to the first data summary is the vaccine production data review node data uploaded by the first type of blockchain node, because each vaccine manufacturer will send the vaccine production data to the regulatory agency before producing each batch of vaccines And apply for review.
在该疫苗生产资料中包括了疫苗品种、疫苗批次、疫苗的原材料及生产工艺参数,这些疫苗生产资料由疫苗产商设备发送至监管机构设备时,疫苗生产资料对应的第一数据摘要也同时需上链。第一数据摘要对应的第一数据节点顺序满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约(例如第一数据摘要对应的第一数据节点顺序为1,是满足第一智能合约、第二智能合约、第三智能合约和/或第四智能合约的),通过实用拜占庭容错算法选举领导第一区块链节点,之后再通过所述第一领导区块链节点中创建的当前第一区 块将所述第一数据摘要进行存储。最后再以极短的时间内,将第一数据摘要的副本发送至区块链网络中除了第一领导区块链节点以外的其他区块链节点。通过这一方式,将第一类型区块链节点上传的第一数据摘要进行了有效保存,不仅数据无法篡改,而且便于溯源查询。The vaccine production materials include vaccine varieties, vaccine batches, vaccine raw materials and production process parameters. When these vaccine production materials are sent from the vaccine manufacturer’s equipment to the regulatory agency equipment, the first data summary corresponding to the vaccine production materials is also at the same time. Need to be wound. The first data node sequence corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract (for example, the first data node sequence corresponding to the first data summary is 1 , Which satisfies the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract), the first blockchain node is elected through the practical Byzantine fault-tolerant algorithm, and then the first leader area is passed The current first block created in the block chain node stores the first data summary. Finally, in a very short time, the copy of the first data summary is sent to other blockchain nodes in the blockchain network except the first leading blockchain node. In this way, the first data summary uploaded by the first-type blockchain node is effectively saved, not only the data cannot be tampered with, but also the traceability query is convenient.
在一实施例中,所述若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用第一智能合约、第二智能合约、第三智能合约和/或第四智能合约中的查询函数,获取与所述第一数据摘要对应的第一历史数据集,包括:In an embodiment, if the first data summary uploaded by any first type blockchain node is detected, call the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract The query function of to obtain the first historical data set corresponding to the first data summary includes:
若检测到任意一个第一类型区块链节点上传的第一数据摘要,判断所述第一数据摘要对应的流程节点是疫苗生产资料审核节点,或是疫苗标签更新节点,或是疫苗出库节点;If the first data summary uploaded by any first type blockchain node is detected, it is determined whether the process node corresponding to the first data summary is a vaccine production data review node, a vaccine label update node, or a vaccine delivery node ;
若所述第一数据摘要对应的流程节点是疫苗生产资料审核节点,将所述第一历史数据集置为空集;If the process node corresponding to the first data summary is a vaccine production data review node, set the first historical data set to an empty set;
若所述第一数据摘要对应的流程节点是疫苗标签更新节点,获取疫苗生产资料审核节点数据、疫苗审批节点数据,以组成第一历史数据集;If the process node corresponding to the first data summary is a vaccine label update node, obtain vaccine production data review node data and vaccine approval node data to form a first historical data set;
若所述第一数据摘要对应的流程节点是疫苗出库节点,获取疫苗生产资料审核节点数据、疫苗审批节点数据、疫苗生产贴码节点数据,以组成第一历史数据集。If the process node corresponding to the first data summary is a vaccine delivery node, obtain vaccine production data review node data, vaccine approval node data, and vaccine production tagging node data to form a first historical data set.
在本实施例中,第一类型区块链节点在上传数据时,主要是在疫苗供应链的生产、销售、运输、监管环节中的以下几个流程节点,一是疫苗生产资料审核节点、二是疫苗标签更新节点、三是疫苗出库节点。In this embodiment, when the first type of blockchain nodes upload data, they are mainly in the following process nodes in the production, sales, transportation, and supervision of the vaccine supply chain. One is the vaccine production material review node, and the other is It is the vaccine label update node, and the third is the vaccine delivery node.
在疫苗生产资料审核节点时,疫苗产商设备发送至监管机构设备发送疫苗生产资料以待审核,疫苗生产资料中包括了疫苗品种、疫苗批次、疫苗的原材料及生产工艺参数,疫苗生产资料对应的第一数据摘要可进行上链操作。At the vaccine production material review node, the vaccine manufacturer’s equipment is sent to the regulatory agency to send the vaccine production material for review. The vaccine production material includes the vaccine variety, vaccine batch, vaccine raw materials and production process parameters, and the vaccine production material corresponds to The first data summary of can be operated on the chain.
在疫苗标签更新节点时,疫苗产商设备接收了监管机构设备发送的疫苗标签码,对应将疫苗标签码打印为标签,每一疫苗标签码对应的标签粘贴至该批次疫苗的外包装盒上,此时可以将粘贴标签的时间作为疫苗生产贴码节点数据,将疫苗生产贴码节点数据对应的第一数据摘要可进行上链操作。其中,疫苗标签码是20位数字组成,其中前6位是疫苗产商代码,中间6位是疫苗批次的编号,最后8位是疫苗编号(疫苗编号是监管机构在接收到疫苗产商发送的疫苗生产资料而进行审核,审核通过之后而分配的编号)。When the vaccine label update node, the vaccine manufacturer's equipment receives the vaccine label code sent by the regulatory agency equipment, and correspondingly prints the vaccine label code as a label, and the label corresponding to each vaccine label code is pasted on the outer packaging box of the batch of vaccines At this time, the time of sticking the label can be used as the vaccine production labeling node data, and the first data summary corresponding to the vaccine production labeling node data can be uploaded to the chain. Among them, the vaccine label code is composed of 20 digits, the first 6 digits are the vaccine manufacturer code, the middle 6 digits are the vaccine batch number, and the last 8 digits are the vaccine number (the vaccine number is the vaccine The vaccine production materials will be reviewed, and the number will be assigned after the review is passed).
在疫苗出库节点时,疫苗产商设备发送至监管机构设备发送疫苗出库信息,疫苗出库信息(也可理解为疫苗出库标签更新节点数据)中包括疫苗标签码、疫苗出库时间、疫苗出库运输链信息(例如包括由A冷链运输公司运输疫苗这一疫苗出库运输链信息),疫苗出库标签更新节点数据对应的第一数据摘要可进行上链操作。At the vaccine delivery node, the vaccine manufacturer’s equipment sends the vaccine delivery information to the regulatory agency equipment. The vaccine delivery information (which can also be understood as the vaccine delivery label update node data) includes the vaccine tag code, vaccine delivery time, Vaccine outbound transportation chain information (for example, including vaccine outbound transportation chain information that the vaccine is transported by A cold chain transportation company), the first data summary corresponding to the update node data of the vaccine outbound label can be operated on the chain.
也就是只要当第一类型区块链节点在上传数据时,主要判断其数据节点顺序是否满足第一智能合约、第二智能合约、第三智能合约和/或第四智能合约中的限定,通过这一验证方式,能确保第一类型区块链节点在正确的流程节点上传数据,从而与该批次疫苗的其他节点数据组成完整的溯源数据。That is, as long as the first type of blockchain node is uploading data, it mainly determines whether the order of its data nodes meets the restrictions in the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract. This verification method can ensure that the first-type blockchain node uploads data at the correct process node, thereby forming a complete traceability data with the data of other nodes of the batch of vaccines.
在一实施例中,所述根据第一历史数据集中包括的各历史数据,获取所述第一数据摘要对应的第一数据节点顺序,包括:In an embodiment, the acquiring the first data node sequence corresponding to the first data summary according to each historical data included in the first historical data set includes:
获取所述第一历史数据集中各历史数据分别对应的数据时间戳,并获取所述第一数据摘要对应的当前系统时间;Acquiring the data timestamp corresponding to each historical data in the first historical data set, and acquiring the current system time corresponding to the first data summary;
将所述第一历史数据集中各历史数据及第一数据摘要按时间升序进行排序,以得到取所述第一数据摘要对应的第一数据节点顺序。The historical data and the first data summary in the first historical data set are sorted in ascending order of time to obtain the first data node order corresponding to the first data summary.
在本实施例中,当获取了第一历史数据集后,即可知道该第一历史数据集已包括哪些历史数据,而且可以获知每一历史数据对应的数据时间戳(历史数据对应的数据时间戳是已经存储在区块链的区块中,可以查询得到),而且所述第一数据摘要对应的当前系统时间也是可以获取的。此时,将所述第一历史数据集中各历史数据及第一数据摘要按时间升序进行排序,即可得到取所述第一数据摘要对应的第一数据节点顺序。通过数据时间戳的升序对所述第一历史数据集中各历史数据及第一数据摘要进行排序,能有效验证第一类型区块链节点是否在正确的流程节点上传数据。在本实施例中,除了可通过每一历史数据对应的数据时间戳以对各历史数据进行排序,还可以获取该历史数据集中所有过程数据的完整性。例如目前第一历史数据集对应的某一疫苗标签码(也即溯源码)对应的在疫苗出库标签更新节点数据之前所有数据,此时对第一历史数据集的完整性就行验证就是判断该疫苗标签码对应的疫苗生产资料审核节点数据、疫苗审批节点数据、疫苗生产贴码节点数据是否都已在区块链中存储。通过这一方式可以验证疫苗流通过程中的,溯源码前后对应的上,并且数据公开透明,无法篡改,流通的时间顺序无误。In this embodiment, after acquiring the first historical data set, you can know which historical data the first historical data set includes, and you can know the data timestamp corresponding to each historical data (the data time corresponding to the historical data) The stamp is already stored in the block of the blockchain and can be queried), and the current system time corresponding to the first data summary is also available. At this time, by sorting the historical data and the first data summary in the first historical data set in ascending order of time, the order of the first data node corresponding to the first data summary can be obtained. Sorting the historical data and the first data summary in the first historical data set in the ascending order of the data timestamp can effectively verify whether the first-type blockchain node uploads the data at the correct process node. In this embodiment, in addition to sorting the historical data by the data timestamp corresponding to each historical data, the integrity of all process data in the historical data set can also be obtained. For example, a certain vaccine tag code (that is, the traceability source code) corresponding to the first historical data set corresponds to all the data before the update node data of the vaccine outbound tag. At this time, verifying the integrity of the first historical data set is to determine the Whether the vaccine production data review node data, vaccine approval node data, and vaccine production tagging node data corresponding to the vaccine tag code have been stored in the blockchain. In this way, it can be verified that the vaccine circulation process, the corresponding before and after the source code, and the data is open and transparent, cannot be tampered with, and the time sequence of circulation is correct.
在一实施例中,所述若所述第一数据摘要对应的第一数据节点顺序满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约,通过实用拜占庭容错算法选举领导区块链节点之前,还包括:In an embodiment, if the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract in order, through the utility of Byzantine Before the fault-tolerant algorithm elects the leader blockchain node, it also includes:
调用预先存储的身份管理合约,获取各区块链节点的公钥哈希,以对各区块链节点进行身份验证;Call the pre-stored identity management contract to obtain the public key hash of each blockchain node to verify the identity of each blockchain node;
若各区块链节点的身份验证通过,获取各区块链节点的用户身份信息;所述用户身份信息包括疫苗产商设备,监管机构设备,疾控中心设备疫苗接种单位设备、疫苗运输数据搜集设备。If the identity verification of each blockchain node is passed, obtain user identity information of each blockchain node; the user identity information includes vaccine manufacturer equipment, regulatory agency equipment, CDC equipment, vaccination unit equipment, and vaccine transportation data collection equipment.
在本实施例中,每一区块链节点需要进行身份验证后才能加入区块链网络。具体实施时,各区块链节点组成FISCO BCOS联盟链。FISCO BCOS是一个区块链底层平台,是金融区块链合作联盟(深圳)开源工作组以金融业务实践为参考样本开发的。FISCO BCOS除了标准的区块链特性以外,还具备多链并行与跨链通信技术,以支持海量的交易请求等。本实施例中的区块链网络采用单链结构,即所有区块链节点共同维护一条链。系统实行用户身份准入机制,监管机构账户作为链管理员,其余用户加入系统必须通过监管机构的审核与授权。一个用户可以拥有一个或者多个节点(需要监管机构授权),所有节点均参与区块链共识。In this embodiment, each blockchain node needs to perform identity verification before joining the blockchain network. In specific implementation, each blockchain node forms the FISCO BCOS alliance chain. FISCO BCOS is a blockchain underlying platform developed by the Open Source Working Group of the Financial Blockchain Cooperative Alliance (Shenzhen) with financial business practices as a reference sample. In addition to the standard blockchain features, FISCO BCOS also has multi-chain parallel and cross-chain communication technology to support massive transaction requests. The blockchain network in this embodiment adopts a single-chain structure, that is, all blockchain nodes jointly maintain a chain. The system implements a user identity access mechanism, the supervisory agency account serves as the chain administrator, and the remaining users must pass the review and authorization of the supervisory agency to join the system. A user can have one or more nodes (authorization by regulatory agencies), and all nodes participate in the blockchain consensus.
用户的身份管理也是通过智能合约来实现的。用户在前端注册,申请成为不同的角色,首先需要创建账户,即分配一对非对称密钥。公钥哈希作为用户的账户地址,然后调用身份管理合约,合约用表结构存储用户的账户地址与身份。同时用户需要运行区块链节点,在区块链共识时,所有用户节点参与验证。The user's identity management is also realized through smart contracts. Users register on the front-end and apply for different roles. First, they need to create an account, that is, assign a pair of asymmetric keys. The public key hash is used as the user's account address, and then the identity management contract is called. The contract uses a table structure to store the user's account address and identity. At the same time, users need to run blockchain nodes. In the blockchain consensus, all user nodes participate in verification.
S130、若检测到任意一个第二类型区块链节点上传的第二数据摘要,调用预先存储的第一智能合约和/或第四智能合约以对所述第二数据摘要进行验证,若所述第二数据摘要通过第一智能合约和/或第四智能合约的验证,通过由共识算法所选举的第二领导区块链节点构建区块以将第二数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。S130. If the second data summary uploaded by any second type blockchain node is detected, call the pre-stored first smart contract and/or fourth smart contract to verify the second data summary, if said The second data summary is verified by the first smart contract and/or the fourth smart contract, and a block is constructed by the second leader blockchain node elected by the consensus algorithm to store the second data summary. The above block is updated corresponding to the updated block chain.
在本实施例中,由于第二类型区块链节点除了作为区块链节点,还可以用于上传疫苗审批节点数据这些数据对应的数据摘要,故当区块链网络检测到任意一个第二类型区块链节点上传的第二数据摘要(这一数据摘要此时还未写入区块,而是缓存在区块链网络的一个数据池中),此时通过各区块链节点中已 存储的智能合约中对应调用第一智能合约和/或第四智能合约,以对第二数据摘要对应的数据是否满足第一智能合约和/或第四智能合约进行验证。当第二数据摘要对应的数据满足第一智能合约和/或第四智能合约时,需区块链网络的各区块链节点根据共识算法选举一个第二领导区块链节点,以通过第二领导区块链节点充当矿工的角色去数据池中挖取第二数据摘要,将第二数据摘要写入第二领导区块链节点对应构建的区块中进行存储,最后再以极短的时间内将第二数据摘要的副本发送至其他区块链节点,实现对各区块链节点上的区块对应进行更新得到更新后区块链。第二数据摘要对应的数据是否满足第二智能合约进行验证时,具体过程可以参考判断所述第一数据摘要对应的第一数据节点顺序是否满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约的过程。In this embodiment, in addition to being a blockchain node, the second type of blockchain node can also be used to upload the data summary corresponding to the data of the vaccine approval node. Therefore, when the blockchain network detects any of the second type The second data summary uploaded by the blockchain node (this data summary has not yet been written into the block at this time, but is cached in a data pool of the blockchain network), at this time through the stored data in each blockchain node In the smart contract, the first smart contract and/or the fourth smart contract are correspondingly invoked to verify whether the data corresponding to the second data summary satisfies the first smart contract and/or the fourth smart contract. When the data corresponding to the second data summary satisfies the first smart contract and/or the fourth smart contract, each blockchain node of the blockchain network needs to elect a second leader blockchain node according to the consensus algorithm to pass the second leader The blockchain node acts as a miner to dig the second data summary in the data pool, write the second data summary into the corresponding block constructed by the second leader blockchain node for storage, and finally take a very short time The copy of the second data summary is sent to other blockchain nodes, so that the corresponding blocks on each blockchain node are updated to obtain the updated blockchain. When verifying whether the data corresponding to the second data summary satisfies the second smart contract for verification, the specific process can refer to judging whether the order of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the The third smart contract and/or the fourth smart contract process.
S140、若检测到任意一个第三类型区块链节点上传的第三数据摘要,调用预先存储的第二智能合约、第三智能合约和/或第四智能合约以对所述第三数据摘要进行验证,若所述第三数据摘要通过第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第三领导区块链节点构建区块以将第三数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。S140. If the third data summary uploaded by any third type blockchain node is detected, call the pre-stored second smart contract, third smart contract and/or fourth smart contract to perform the third data summary Verification, if the third data summary passes the verification of the second smart contract, the third smart contract and/or the fourth smart contract, the third leader blockchain node elected by the consensus algorithm is used to construct a block to convert the third The data summary is stored, and the corresponding blocks on each blockchain node are updated to obtain the updated blockchain.
在本实施例中,由于第三类型区块链节点除了作为区块链节点,还可以用于上传疫苗入库标签更新节点数据、疫苗二次出库标签更新节点数据、疫苗不良反应监测数据二次上传节点数据这些数据对应的数据摘要,故当区块链网络检测到任意一个第三类型区块链节点上传的第三数据摘要(这一数据摘要此时还未写入区块,而是缓存在区块链网络的一个数据池中),此时通过各区块链节点中已存储的智能合约中对应调用第二智能合约、第三智能合约和/或第四智能合约,以对第三数据摘要对应的数据是否满足第二智能合约、第三智能合约和/或第四智能合约进行验证。当第三数据摘要对应的数据满足第二智能合约、第三智能合约和/或第四智能合约时,需区块链网络的各区块链节点根据共识算法选举一个第三领导区块链节点,以通过第三领导区块链节点充当矿工的角色去数据池中挖取第三数据摘要,将第三数据摘要写入第三领导区块链节点对应构建的区块中进行存储,最后再以极短的时间内将第三数据摘要的副本发送至其他区块链节点,实现对各区块链节点上的区块对应进行更新得到更新后区块 链。第三数据摘要对应的数据是否满足第三智能合约进行验证时,具体过程可以参考判断所述第一数据摘要对应的第一数据节点顺序是否满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约的过程。In this embodiment, in addition to being a blockchain node, the third type of blockchain node can also be used to upload vaccine entry label update node data, vaccine secondary exit label update node data, and vaccine adverse reaction monitoring data. The data summary corresponding to these data uploading node data for the second time, so when the blockchain network detects the third data summary uploaded by any third type blockchain node (this data summary has not been written into the block at this time, but Cached in a data pool of the blockchain network), at this time, the second smart contract, the third smart contract, and/or the fourth smart contract are correspondingly called from the smart contracts stored in each blockchain node to compare the third Whether the data corresponding to the data summary satisfies the second smart contract, the third smart contract and/or the fourth smart contract is verified. When the data corresponding to the third data summary satisfies the second smart contract, the third smart contract, and/or the fourth smart contract, each blockchain node of the blockchain network needs to elect a third leader blockchain node according to the consensus algorithm. Take the role of the third leader blockchain node as a miner to dig the third data summary in the data pool, write the third data summary into the corresponding block constructed by the third leader blockchain node for storage, and finally A copy of the third data summary is sent to other blockchain nodes in a very short time, so that the corresponding blocks on each blockchain node are updated to obtain the updated blockchain. When verifying whether the data corresponding to the third data summary satisfies the third smart contract for verification, the specific process can refer to judging whether the order of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the The third smart contract and/or the fourth smart contract process.
S150、若检测到任意一个第四类型区块链节点上传的第四数据摘要,调用预先存储的第三智能合约和/或第四智能合约以对所述第四数据摘要进行验证,若所述第四数据摘要通过第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第四领导区块链节点构建区块以将第四数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。S150. If the fourth data summary uploaded by any fourth type blockchain node is detected, call a pre-stored third smart contract and/or fourth smart contract to verify the fourth data summary, if said The fourth data summary is verified by the third smart contract and/or the fourth smart contract, and the fourth leader blockchain node elected by the consensus algorithm is used to construct a block to store the fourth data summary. The above block is updated corresponding to the updated block chain.
在本实施例中,由于第四类型区块链节点除了作为区块链节点,还可以用于上传疫苗二次入库标签更新节点数据、疫苗接种节点数据、疫苗不良反应监测数据上传节点数据这些数据对应的数据摘要,故当区块链网络检测到任意一个第四类型区块链节点上传的第四数据摘要(这一数据摘要此时还未写入区块,而是缓存在区块链网络的一个数据池中),此时通过各区块链节点中已存储的智能合约中对应调用第三智能合约和/或第四智能合约,以对第四数据摘要对应的数据是否满足第三智能合约和/或第四智能合约进行验证。当第四数据摘要对应的数据满足第三智能合约和/或第四智能合约时,需区块链网络的各区块链节点根据共识算法选举一个第四领导区块链节点,以通过第四领导区块链节点充当矿工的角色去数据池中挖取第四数据摘要,将第四数据摘要写入第四领导区块链节点对应构建的区块中进行存储,最后再以极短的时间内将第四数据摘要的副本发送至其他区块链节点,实现对各区块链节点上的区块对应进行更新得到更新后区块链。第四数据摘要对应的数据是否满足第四智能合约进行验证时,具体过程可以参考判断所述第一数据摘要对应的第一数据节点顺序是否满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约的过程。In this embodiment, in addition to being a blockchain node, the fourth type of blockchain node can also be used to upload the secondary vaccine storage tag update node data, vaccination node data, and vaccine adverse reaction monitoring data upload node data. The data summary corresponding to the data, so when the blockchain network detects the fourth data summary uploaded by any fourth type blockchain node (this data summary has not been written to the block at this time, but is cached in the blockchain In a data pool of the network), at this time, the third smart contract and/or the fourth smart contract are correspondingly called from the smart contracts stored in each blockchain node to determine whether the data corresponding to the fourth data summary meets the third smart The contract and/or the fourth smart contract are verified. When the data corresponding to the fourth data summary satisfies the third smart contract and/or the fourth smart contract, each blockchain node of the blockchain network needs to elect a fourth leader blockchain node according to the consensus algorithm to pass the fourth leader The blockchain node acts as a miner to dig the fourth data summary in the data pool, write the fourth data summary into the corresponding block constructed by the fourth leading blockchain node for storage, and finally take a very short time Send a copy of the fourth data summary to other blockchain nodes, so as to update the corresponding blocks on each blockchain node to obtain the updated blockchain. When verifying whether the data corresponding to the fourth data summary satisfies the fourth smart contract, the specific process can refer to judging whether the order of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the first smart contract. The third smart contract and/or the fourth smart contract process.
即当在第一领导区块链节点构建区块、第二领导区块链节点构建区块、第三领导区块链节点构建区块、或者第四领导区块链节点构建区块中存储对应的摘要数据后,为了保证区块链节点上存储的区块链全都同步,此时需将除领导区块链节点之外的所有区块链节点的区块,都根据领导区块链节点的区块进行同步更新,从而确保每一区块链节点上存储的区块链数据是一致的。That is, when the corresponding block is stored in the first leader blockchain node building block, the second leader blockchain node building block, the third leader blockchain node building block, or the fourth leader blockchain node building block After the summary data, in order to ensure that all the blockchains stored on the blockchain nodes are synchronized, at this time, all the blocks of the blockchain nodes except the leading blockchain node need to be based on the leading blockchain node’s Blocks are updated synchronously to ensure that the blockchain data stored on each blockchain node is consistent.
而且所选举出来的第一领导区块链节点、第二领导区块链节点、第三领导区块链节点、第四领导区块链节点,甚至于后续更多选举出来的领导区块链节 点并不是特指某一固定的区块链节点,而是任意一个区块链节点均有可能被选举出来成为领导区块链节点。And the elected first leader block chain node, second leader block chain node, third leader block chain node, fourth leader block chain node, and even more subsequent leader block chain nodes elected It does not specifically refer to a fixed blockchain node, but any blockchain node may be elected as the leading blockchain node.
在一实施例中,步骤S150之后还包括:In an embodiment, after step S150, the method further includes:
判断是否检测到区块链节点上传的溯源码;其中,所述溯源码为20位的疫苗标签码;Determine whether the traceable source code uploaded by the blockchain node is detected; wherein the traceable source code is a 20-digit vaccine tag code;
若检测到区块链节点上传的溯源码,根据所述溯源码在所述更新后区块链中获取所述溯源码对应的疫苗溯源数据集;其中,所述疫苗溯源数据集包括疫苗生产资料审核节点数据、疫苗审批节点数据、疫苗生产贴码节点数据、疫苗出库标签更新节点数据、疫苗入库标签更新节点数据、疫苗二次出库标签更新节点数据、疫苗二次入库标签更新节点数据、疫苗接种节点数据、疫苗不良反应监测数据上传节点数据、疫苗不良反应监测数据二次上传节点数据。If the traceable source code uploaded by a blockchain node is detected, the vaccine traceability data set corresponding to the traceable source code is obtained in the updated blockchain according to the traceable source code; wherein, the vaccine traceability data set includes vaccine production materials Review node data, vaccine approval node data, vaccine production labeling node data, vaccine delivery tag update node data, vaccine entry tag update node data, vaccine secondary delivery tag update node data, vaccine secondary entry tag update node Data, vaccination node data, vaccine adverse reaction monitoring data upload node data, and vaccine adverse reaction monitoring data secondary upload node data.
在本实施例中,当完成了某一批次疫苗的全流程数据的在区块链上的存储时,此时任一区块链节点均能发起数据查询,此时只需判断是否检测到区块链节点上传的溯源码。若检测到区块链节点上传的溯源码,根据所述溯源码在所述更新后区块链中获取所述溯源码对应的疫苗溯源数据集。In this embodiment, when the storage of the whole process data of a certain batch of vaccine on the blockchain is completed, any blockchain node can initiate a data query at this time, and it is only necessary to determine whether it is detected The trace source code uploaded by the blockchain node. If the traceability source code uploaded by the blockchain node is detected, the vaccine traceability data set corresponding to the traceability source code is obtained in the updated blockchain according to the traceability source code.
一般疫苗的全流程如下:The whole process of general vaccine is as follows:
1)在生产每批疫苗之前,疫苗产商向监管机构提交疫苗生产资料以待审核。疫苗产商只有在获得监管机构批准后才能进行生产,疫苗生产资料中包括了疫苗品种、疫苗批次、疫苗的原材料及生产工艺参数;1) Before producing each batch of vaccines, vaccine manufacturers submit vaccine production materials to regulatory agencies for review. Vaccine manufacturers can only produce vaccines after obtaining approval from regulatory agencies. The vaccine production materials include vaccine varieties, vaccine batches, vaccine raw materials and production process parameters;
2)监管机构在审核了疫苗产商的疫苗生产资料之后,监管机构将返回审核结果,包括是否批准生产,同时监管机构为该批次疫苗分配疫苗标签码,疫苗标签码为疫苗的唯一身份标志,用于追溯;2) After the regulatory agency has reviewed the vaccine production materials of the vaccine manufacturer, the regulatory agency will return the review results, including whether to approve the production, and the regulatory agency will assign a vaccine label code to the batch of vaccines. The vaccine label code is the unique identification mark of the vaccine For traceability;
3)监管机构批准后,疫苗产商进行疫苗生产,并为每支疫苗进行贴码(即粘贴疫苗标签码);3) After approval by the regulatory agency, the vaccine manufacturer will produce vaccines and paste codes for each vaccine (ie, paste the vaccine label code);
4-6)在疫苗流通的所有环节,涉及到疫苗实体,入库和出库时需要扫描标签并上传数据;4-6) In all links of vaccine circulation, vaccine entities are involved, and tags and data need to be scanned when entering and leaving the warehouse;
7)疫苗接种单位对接种者使用疫苗,上传疫苗接种节点数据;7) The vaccination unit uses the vaccine for the vaccinators and uploads the vaccination node data;
8)疫苗接种单位将疫苗不良反应监测数据上传节点数据上报至疾控中心;8) The vaccination unit will upload the node data of the vaccine adverse reaction monitoring data to the CDC;
9)疾控中心将疫苗不良反应监测数据二次上传节点数据上报至给监管机构。9) The Center for Disease Control and Prevention reports the secondary upload node data of the vaccine adverse reaction monitoring data to the regulatory agency.
为了便于对疫苗的全流程数据溯源,此时所述疫苗溯源数据集中至少包括 苗生产资料审核节点数据、疫苗审批节点数据、疫苗生产贴码节点数据、疫苗出库标签更新节点数据、疫苗入库标签更新节点数据、疫苗二次出库标签更新节点数据、疫苗二次入库标签更新节点数据、疫苗接种节点数据、疫苗不良反应监测数据上传节点数据、疫苗不良反应监测数据二次上传节点数据。通过这一疫苗溯源数据集,用户可以查询到查询疫苗信息及疫苗流通数据。而且通过疫苗标签码能定位追踪所有该批次疫苗的流通过程,并可作为无法否认的数字证据。In order to facilitate the traceability of the entire process of vaccine data, the vaccine traceability data set at this time includes at least vaccine production data review node data, vaccine approval node data, vaccine production tagging node data, vaccine delivery label update node data, and vaccine storage Label update node data, vaccine secondary outbound label update node data, vaccine secondary storage label update node data, vaccination node data, vaccine adverse reaction monitoring data upload node data, and vaccine adverse reaction monitoring data secondary upload node data. Through this vaccine traceability data set, users can query vaccine information and vaccine circulation data. Moreover, the vaccine tag code can locate and track the circulation process of all the batches of vaccines, and can be used as undeniable digital evidence.
在一实施例中,步骤S110之后还包括:In an embodiment, after step S110, the method further includes:
若检测到任意一个第五类型区块链节点上传的第五数据摘要,调用预先存储的第三智能合约以对所述第五数据摘要进行验证,若所述第五数据摘要通过第三智能合约的验证,通过由共识算法所选举的第五领导区块链节点构建区块以将第五数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。If the fifth data summary uploaded by any fifth type blockchain node is detected, call the pre-stored third smart contract to verify the fifth data summary, if the fifth data summary passes the third smart contract For verification, the fifth leading blockchain node elected by the consensus algorithm builds a block to store the fifth data summary, and updates the corresponding block on each blockchain node to obtain the updated blockchain.
在本实施例中,由于第五类型区块链节点除了作为区块链节点,还可以用于上传疫苗第一次运输过程环境监控数据、疫苗第二次运输过程环境监控数据这些数据对应的数据摘要,故当区块链网络检测到任意一个第五类型区块链节点上传的第五数据摘要(这一数据摘要此时还未写入区块,而是缓存在区块链网络的一个数据池中),此时通过各区块链节点中已存储的智能合约中对应调用第三智能合约,以对第五数据摘要对应的数据是否满足第三智能合约进行验证。当第五数据摘要对应的数据满足第三智能合约时,需区块链网络的各区块链节点根据共识算法选举一个第五领导区块链节点,以通过第五领导区块链节点充当矿工的角色去数据池中挖取第五数据摘要,将第五数据摘要写入第五领导区块链节点对应构建的区块中进行存储,最后再以极短的时间内将第五数据摘要的副本发送至其他区块链节点。第五数据摘要对应的数据是否满足第五智能合约进行验证时,具体过程可以参考判断所述第一数据摘要对应的第一数据节点顺序是否满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约的过程。In this embodiment, in addition to being a blockchain node, the fifth type of blockchain node can also be used to upload data corresponding to environmental monitoring data during the first transportation of vaccines and environmental monitoring data during the second transportation of vaccines. Abstract, so when the blockchain network detects the fifth data summary uploaded by any fifth type blockchain node (this data summary has not been written into the block at this time, but a data cached in the blockchain network In the pool), at this time, the third smart contract is correspondingly invoked through the smart contracts stored in each blockchain node to verify whether the data corresponding to the fifth data summary meets the third smart contract. When the data corresponding to the fifth data summary satisfies the third smart contract, each blockchain node of the blockchain network needs to elect a fifth leader blockchain node according to the consensus algorithm, so that the fifth leader blockchain node can act as the miner's The character goes to the data pool to dig the fifth data summary, writes the fifth data summary into the corresponding block constructed by the fifth leader blockchain node for storage, and finally copies the fifth data summary in a very short time Send to other blockchain nodes. When verifying whether the data corresponding to the fifth data summary satisfies the fifth smart contract, the specific process can refer to judging whether the sequence of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, and the first smart contract. The third smart contract and/or the fourth smart contract process.
在一实施例中,步骤S110之后还包括:In an embodiment, after step S110, the method further includes:
若未检测到区块链节点上传的数据摘要,等待预设的共识时间,返回执行步骤S110。If the data summary uploaded by the blockchain node is not detected, wait for the preset consensus time, and return to step S110.
在本实施例中,若未检测到区块链节点上传的数据摘要,表示此时无数据需上链,此时等待预设的共识时间(如1s)再次发起一次上传数据摘要的检查即可。In this embodiment, if the data summary uploaded by the blockchain node is not detected, it means that there is no data to be uploaded to the chain at this time. At this time, wait for the preset consensus time (such as 1s) to initiate a check of the uploaded data summary again. .
该方法实现了由区块链为疫苗供应链的生产、销售、运输、监管环节的关键数据提供数据存储、管理、追溯、验证、防抵赖等服务,既可保障疫苗流通数据的安全,也可保障疫苗流通过程的可溯源性、不可否认性、时效性。This method realizes that the blockchain provides services such as data storage, management, traceability, verification, and non-repudiation for key data in the production, sales, transportation, and supervision of the vaccine supply chain, which can not only ensure the safety of vaccine circulation data, but also Ensure the traceability, undeniability, and timeliness of the vaccine circulation process.
本申请实施例还提供一种基于区块链的疫苗信息监控装置,该基于区块链的疫苗信息监控装置用于执行前述基于区块链的疫苗信息监控方法的任一实施例。具体地,请参阅图3,图3是本申请实施例提供的基于区块链的疫苗信息监控装置的示意性框图。该基于区块链的疫苗信息监控装置100可以配置于任一区块链节点中。The embodiment of the present application also provides a vaccine information monitoring device based on a blockchain, which is used to execute any embodiment of the aforementioned vaccine information monitoring method based on the blockchain. Specifically, please refer to FIG. 3, which is a schematic block diagram of a vaccine information monitoring device based on a blockchain provided in an embodiment of the present application. The vaccine information monitoring device 100 based on the blockchain can be configured in any blockchain node.
如图3所示,基于区块链的疫苗信息监控装置100包括数据摘要接收单元110、第一类型存储单元120、第二类型存储单元130、第三类型存储单元140、第四类型存储单元150。As shown in FIG. 3, the vaccine information monitoring device 100 based on the blockchain includes a data summary receiving unit 110, a first type storage unit 120, a second type storage unit 130, a third type storage unit 140, and a fourth type storage unit 150. .
其中,数据摘要接收单元110,用于判断是否检测到区块链节点上传的数据摘要;其中,所述区块链节点包括第一类型区块链节点、第二类型区块链节点、第三类型区块链节点、第四类型区块链节点、第五类型区块链节点;所述第一类型区块链节点为疫苗产商设备区块链节点,所述第二类型区块链节点为监管机构设备区块链节点,所述第三类型区块链节点为疾控中心设备区块链节点,所述第四类型区块链节点为疫苗接种单位设备区块链节点、所述第五类型区块链节点为疫苗运输数据搜集设备区块链节点。The data summary receiving unit 110 is used to determine whether a data summary uploaded by a blockchain node is detected; wherein, the blockchain node includes a first type of blockchain node, a second type of blockchain node, and a third type of blockchain node. Type block chain node, type fourth type block chain node, fifth type block chain node; the first type block chain node is a vaccine manufacturer equipment block chain node, and the second type block chain node Is a block chain node of a regulatory agency equipment, the third type of block chain node is a CDC equipment block chain node, the fourth type of block chain node is a vaccination unit equipment block chain node, the first The five types of blockchain nodes are the blockchain nodes of vaccine transportation data collection equipment.
第一类型存储单元120,用于若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用预先存储的第一智能合约、第二智能合约、第三智能合约和/或第四智能合约以对所述第一数据摘要进行验证,若所述第一数据摘要通过、第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第一领导区块链节点构建区块以将第一数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。The first-type storage unit 120 is used to call the pre-stored first smart contract, second smart contract, third smart contract and/or first data summary uploaded by any first-type blockchain node. Four smart contracts are used to verify the first data summary. If the first data summary passes, the second smart contract, the third smart contract, and/or the fourth smart contract are verified, the first data summary elected by the consensus algorithm A leading blockchain node constructs a block to store the first data summary, and updates the corresponding block on each blockchain node to obtain the updated blockchain.
在一实施例中,所述第一类型存储单元120,包括:In an embodiment, the first type storage unit 120 includes:
第一历史数据集获取单元,用于若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用第一智能合约、第二智能合约、第三智能合约和/或第 四智能合约中的查询函数,获取与所述第一数据摘要对应的第一历史数据集;The first historical data set acquisition unit is used to call the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract if the first data summary uploaded by any first type blockchain node is detected The query function in the contract obtains the first historical data set corresponding to the first data summary;
第一数据节点顺序获取单元,用于根据第一历史数据集中包括的各历史数据,获取所述第一数据摘要对应的第一数据节点顺序;The first data node sequence obtaining unit is configured to obtain the first data node sequence corresponding to the first data summary according to each historical data included in the first historical data set;
第一智能合约验证单元,用于判断所述第一数据摘要对应的第一数据节点顺序是否满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约;The first smart contract verification unit is used to determine whether the sequence of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract;
第一选举单元,用于若所述第一数据摘要对应的第一数据节点顺序满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约,通过实用拜占庭容错算法选举领导区块链节点;The first election unit is configured to use Byzantine fault tolerance if the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract and/or the fourth smart contract in order, Algorithm to elect the leader blockchain node;
第一类型区块创建单元,用于通过所述第一领导区块链节点中创建的当前第一区块将所述第一数据摘要进行存储;The first type block creation unit is configured to store the first data summary through the current first block created in the first leader blockchain node;
第一区块副本发送单元,用于将所述当前第一区块中的第一数据摘要的副本发送至其他区块链节点。The first block copy sending unit is configured to send a copy of the first data digest in the current first block to other blockchain nodes.
在一实施例中,所述第一历史数据集获取单元,包括:In an embodiment, the first historical data set acquisition unit includes:
第一流程节点判断单元,用于若检测到任意一个第一类型区块链节点上传的第一数据摘要,判断所述第一数据摘要对应的流程节点是疫苗生产资料审核节点,或是疫苗标签更新节点,或是疫苗出库节点;The first process node judging unit is used to determine whether the process node corresponding to the first data summary is a vaccine production data review node or a vaccine label if the first data summary uploaded by any first type blockchain node is detected Update node, or vaccine delivery node;
疫苗生产资料审核节点执行单元,用于若所述第一数据摘要对应的流程节点是疫苗生产资料审核节点,将所述第一历史数据集置为空集;A vaccine production material review node execution unit, configured to set the first historical data set to an empty set if the process node corresponding to the first data summary is a vaccine production material review node;
疫苗标签更新节点执行单元,用于若所述第一数据摘要对应的流程节点是疫苗标签更新节点,获取疫苗生产资料审核节点数据、疫苗审批节点数据,以组成第一历史数据集;The vaccine label update node execution unit is configured to, if the process node corresponding to the first data summary is a vaccine label update node, obtain vaccine production data review node data and vaccine approval node data to form a first historical data set;
疫苗出库节点执行单元,用于若所述第一数据摘要对应的流程节点是疫苗出库节点,获取疫苗生产资料审核节点数据、疫苗审批节点数据、疫苗生产贴码节点数据,以组成第一历史数据集。The vaccine delivery node execution unit is used to obtain vaccine production data review node data, vaccine approval node data, and vaccine production tagging node data if the process node corresponding to the first data summary is a vaccine delivery node to form the first Historical data set.
在一实施例中,所述第一数据节点顺序获取单元,包括:In an embodiment, the first data node sequential obtaining unit includes:
第一时间戳获取单元,用于获取所述第一历史数据集中各历史数据分别对应的数据时间戳,并获取所述第一数据摘要对应的当前系统时间;The first time stamp obtaining unit is configured to obtain data time stamps corresponding to each historical data in the first historical data set, and obtain the current system time corresponding to the first data summary;
第一时间戳排序单元,用于将所述第一历史数据集中各历史数据及第一数据摘要按时间升序进行排序,以得到取所述第一数据摘要对应的第一数据节点 顺序。The first time stamp sorting unit is configured to sort the historical data and the first data summary in the first historical data set in ascending order of time to obtain the first data node order corresponding to the first data summary.
在一实施例中,所述基于区块链的疫苗信息监控装置100,还包括:In an embodiment, the vaccine information monitoring device 100 based on blockchain further includes:
身份验证单元,用于调用预先存储的身份管理合约,获取各区块链节点的公钥哈希,以对各区块链节点进行身份验证;The identity verification unit is used to call the pre-stored identity management contract to obtain the public key hash of each blockchain node to verify the identity of each blockchain node;
设备身份获取单元,用于若各区块链节点的身份验证通过,获取各区块链节点的用户身份信息;所述用户身份信息包括疫苗产商设备,监管机构设备,疾控中心设备疫苗接种单位设备、疫苗运输数据搜集设备。The equipment identity acquisition unit is used to obtain the user identity information of each blockchain node if the identity verification of each blockchain node is passed; the user identity information includes equipment of vaccine manufacturers, equipment of regulatory agencies, equipment of CDC, and equipment of vaccination unit , Vaccine transportation data collection equipment.
第二类型存储单元130,用于若检测到任意一个第二类型区块链节点上传的第二数据摘要,调用预先存储的第一智能合约和/或第四智能合约以对所述第二数据摘要进行验证,若所述第二数据摘要通过第一智能合约和/或第四智能合约的验证,通过由共识算法所选举的第二领导区块链节点构建区块以将第二数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。The second type storage unit 130 is configured to, if a second data summary uploaded by any second type blockchain node is detected, call the pre-stored first smart contract and/or fourth smart contract to compare the second data The summary is verified. If the second data summary passes the verification of the first smart contract and/or the fourth smart contract, the second leader blockchain node elected by the consensus algorithm constructs a block to perform the second data summary. Store, update the corresponding block on each block chain node to obtain the updated block chain.
第三类型存储单元140,用于若检测到任意一个第三类型区块链节点上传的第三数据摘要,调用预先存储的第二智能合约、第三智能合约和/或第四智能合约以对所述第三数据摘要进行验证,若所述第三数据摘要通过第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第三领导区块链节点构建区块以将第三数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。The third type storage unit 140 is used to call the pre-stored second smart contract, third smart contract and/or fourth smart contract if the third data summary uploaded by any third type blockchain node is detected The third data summary is verified, and if the third data summary passes the verification of the second smart contract, the third smart contract and/or the fourth smart contract, it passes the third leader blockchain node elected by the consensus algorithm The block is constructed to store the third data summary, and the block corresponding to each block chain node is updated to obtain the updated block chain.
第四类型存储单元150,用于若检测到任意一个第四类型区块链节点上传的第四数据摘要,调用预先存储的第三智能合约和/或第四智能合约以对所述第四数据摘要进行验证,若所述第四数据摘要通过第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第四领导区块链节点构建区块以将第四数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。The fourth type storage unit 150 is configured to, if the fourth data summary uploaded by any fourth type blockchain node is detected, call the pre-stored third smart contract and/or fourth smart contract to compare the fourth data The summary is verified. If the fourth data summary passes the verification of the third smart contract and/or the fourth smart contract, the fourth leader blockchain node elected by the consensus algorithm builds a block to perform the fourth data summary. Store, update the corresponding block on each block chain node to obtain the updated block chain.
在一实施例中,所述基于区块链的疫苗信息监控装置100还包括:In an embodiment, the device 100 for monitoring vaccine information based on blockchain further includes:
数据查询请求判断单元,用于判断是否检测到区块链节点上传的溯源码;其中,所述溯源码为20位的疫苗标签码;The data query request judging unit is used to judge whether the traceable source code uploaded by the blockchain node is detected; wherein the traceable source code is a 20-digit vaccine tag code;
疫苗溯源数据集获取单元,用于若检测到区块链节点上传的溯源码,根据所述溯源码在所述更新后区块链中获取所述溯源码对应的疫苗溯源数据集;其中,所述疫苗溯源数据集包括疫苗生产资料审核节点数据、疫苗审批节点数据、疫苗生产贴码节点数据、疫苗出库标签更新节点数据、疫苗入库标签更新节点 数据、疫苗二次出库标签更新节点数据、疫苗二次入库标签更新节点数据、疫苗接种节点数据、疫苗不良反应监测数据上传节点数据、疫苗不良反应监测数据二次上传节点数据。The vaccine traceability data set obtaining unit is configured to obtain the vaccine traceability data set corresponding to the traceable source code in the updated blockchain according to the traceable source code if the traceable source code uploaded by the blockchain node is detected; The vaccine traceability data set includes vaccine production data review node data, vaccine approval node data, vaccine production labeling node data, vaccine delivery tag update node data, vaccine entry tag update node data, vaccine secondary delivery tag update node data , Vaccine secondary storage tag update node data, vaccination node data, vaccine adverse reaction monitoring data upload node data, vaccine adverse reaction monitoring data secondary upload node data.
在一实施例中,所述基于区块链的疫苗信息监控装置100还包括:In an embodiment, the device 100 for monitoring vaccine information based on blockchain further includes:
第五类型存储单元,用于若检测到任意一个第五类型区块链节点上传的第五数据摘要,调用预先存储的第三智能合约以对所述第五数据摘要进行验证,若所述第五数据摘要通过第三智能合约的验证,通过由共识算法所选举的第五领导区块链节点构建区块以将第五数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。The fifth type storage unit is used to call a pre-stored third smart contract to verify the fifth data summary if the fifth data summary uploaded by any fifth type blockchain node is detected. The fifth data summary is verified by the third smart contract, and the fifth data summary is constructed by the fifth leading blockchain node elected by the consensus algorithm to store the fifth data summary, and the corresponding block on each blockchain node is updated to get Blockchain after update.
该装置实现了由区块链为疫苗供应链的生产、销售、运输、监管环节的关键数据提供数据存储、管理、追溯、验证、防抵赖等服务,既可保障疫苗流通数据的安全,也可保障疫苗流通过程的可溯源性、不可否认性、时效性。The device realizes that the blockchain provides services such as data storage, management, traceability, verification, and non-repudiation for key data in the production, sales, transportation, and supervision of the vaccine supply chain. It can not only ensure the safety of vaccine circulation data, but also Ensure the traceability, undeniability, and timeliness of the vaccine circulation process.
上述基于区块链的疫苗信息监控装置可以实现为计算机程序的形式,该计算机程序可以在如图4所示的计算机设备上运行。The above-mentioned block chain-based vaccine information monitoring device can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in FIG. 4.
请参阅图4,图4是本申请实施例提供的计算机设备的示意性框图。该计算机设备500是服务器,服务器可以是独立的服务器,也可以是多个服务器组成的服务器集群。Please refer to FIG. 4, which is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 is a server, and the server may be an independent server or a server cluster composed of multiple servers.
参阅图4,该计算机设备500包括通过系统总线501连接的处理器502、存储器和网络接口505,其中,存储器可以包括非易失性存储介质503和内存储器504。4, the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
该非易失性存储介质503可存储操作系统5031和计算机程序5032。该计算机程序5032被执行时,可使得处理器502执行基于区块链的疫苗信息监控方法。The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 can execute the vaccine information monitoring method based on the blockchain.
该处理器502用于提供计算和控制能力,支撑整个计算机设备500的运行。The processor 502 is used to provide calculation and control capabilities, and support the operation of the entire computer device 500.
该内存储器504为非易失性存储介质503中的计算机程序5032的运行提供环境,该计算机程序5032被处理器502执行时,可使得处理器502执行基于区块链的疫苗信息监控方法。The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the vaccine information monitoring method based on the blockchain.
该网络接口505用于进行网络通信,如提供数据信息的传输等。本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备500的限定,具体的计算机设备500可以包括比图中所示更多或更少的部件,或者组合某些部件, 或者具有不同的部件布置。The network interface 505 is used for network communication, such as providing data information transmission. Those skilled in the art can understand that the structure shown in FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
其中,所述处理器502用于运行存储在存储器中的计算机程序5032,以实现本申请实施例公开的基于区块链的疫苗信息监控方法。Wherein, the processor 502 is configured to run a computer program 5032 stored in a memory to implement the vaccine information monitoring method based on the blockchain disclosed in the embodiment of the present application.
本领域技术人员可以理解,图4中示出的计算机设备的实施例并不构成对计算机设备具体构成的限定,在其他实施例中,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,计算机设备可以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图4所示实施例一致,在此不再赘述。Those skilled in the art can understand that the embodiment of the computer device shown in FIG. 4 does not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or less components than those shown in the figure. Or some parts are combined, or different parts are arranged. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structures and functions of the memory and the processor are consistent with the embodiment shown in FIG. 4, and will not be repeated here.
应当理解,在本申请实施例中,处理器502可以是中央处理单元(Central Processing Unit,CPU),该处理器502还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in this embodiment of the application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor.
在本申请的另一实施例中提供计算机可读存储介质。该计算机可读存储介质可以为非易失性的计算机可读存储介质。该计算机可读存储介质存储有计算机程序,其中计算机程序被处理器执行时实现本申请实施例公开的基于区块链的疫苗信息监控方法。In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer readable storage medium stores a computer program, where the computer program is executed by a processor to realize the vaccine information monitoring method based on the blockchain disclosed in the embodiments of the present application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的设备、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described equipment, device, and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here. A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both, in order to clearly illustrate the hardware and software Interchangeability, in the above description, the composition and steps of each example have been generally described in accordance with the function. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为逻辑功能划分,实际实现时可以有另外的 划分方式,也可以将具有相同功能的单元集合成一个单元,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed equipment, device, and method may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, or the units with the same function may be combined into one. Units, for example, multiple units or components can be combined or integrated into another system, or some features can be omitted or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments of the present application.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application is essentially or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium. It includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), magnetic disk or optical disk and other media that can store program codes.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (10)

  1. 一种基于区块链的疫苗信息监控方法,其特征在于,应用于任一区块链节点,包括:A method for monitoring vaccine information based on blockchain, which is characterized in that it is applied to any blockchain node and includes:
    判断是否检测到区块链节点上传的数据摘要;其中,所述区块链节点包括第一类型区块链节点、第二类型区块链节点、第三类型区块链节点、第四类型区块链节点、第五类型区块链节点;所述第一类型区块链节点为疫苗产商设备区块链节点,所述第二类型区块链节点为监管机构设备区块链节点,所述第三类型区块链节点为疾控中心设备区块链节点,所述第四类型区块链节点为疫苗接种单位设备区块链节点、所述第五类型区块链节点为疫苗运输数据搜集设备区块链节点;Determine whether a data summary uploaded by a blockchain node is detected; wherein, the blockchain node includes a first type of blockchain node, a second type of blockchain node, a third type of blockchain node, and a fourth type of area Blockchain nodes, fifth-type blockchain nodes; the first-type blockchain nodes are vaccine manufacturers’ equipment blockchain nodes, and the second-type blockchain nodes are regulatory agency equipment blockchain nodes, so The third type of block chain node is the CDC equipment block chain node, the fourth type of block chain node is the vaccination unit equipment block chain node, and the fifth type of block chain node is the vaccine transportation data Collect device blockchain nodes;
    若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用预先存储的第一智能合约、第二智能合约、第三智能合约和/或第四智能合约以对所述第一数据摘要进行验证,若所述第一数据摘要通过、第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第一领导区块链节点构建区块以将第一数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;If the first data summary uploaded by any one of the first type blockchain nodes is detected, call the pre-stored first smart contract, second smart contract, third smart contract and/or fourth smart contract to compare the first The data digest is verified. If the first data digest is verified by the second smart contract, the third smart contract, and/or the fourth smart contract, the block is constructed by the first leader blockchain node elected by the consensus algorithm To store the first data summary, update the corresponding block on each blockchain node to obtain the updated blockchain;
    若检测到任意一个第二类型区块链节点上传的第二数据摘要,调用预先存储的第一智能合约和/或第四智能合约以对所述第二数据摘要进行验证,若所述第二数据摘要通过第一智能合约和/或第四智能合约的验证,通过由共识算法所选举的第二领导区块链节点构建区块以将第二数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;If the second data summary uploaded by any second type blockchain node is detected, call the pre-stored first smart contract and/or fourth smart contract to verify the second data summary, if the second The data summary is verified by the first smart contract and/or the fourth smart contract, and the second leading blockchain node elected by the consensus algorithm is used to construct a block to store the second data summary. The corresponding block is updated to get the updated block chain;
    若检测到任意一个第三类型区块链节点上传的第三数据摘要,调用预先存储的第二智能合约、第三智能合约和/或第四智能合约以对所述第三数据摘要进行验证,若所述第三数据摘要通过第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第三领导区块链节点构建区块以将第三数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;以及If the third data summary uploaded by any third type blockchain node is detected, call the pre-stored second smart contract, third smart contract and/or fourth smart contract to verify the third data summary, If the third data summary passes the verification of the second smart contract, the third smart contract, and/or the fourth smart contract, a block is constructed by the third leader blockchain node elected by the consensus algorithm to summarize the third data Perform storage and update the corresponding blocks on each blockchain node to obtain the updated blockchain; and
    若检测到任意一个第四类型区块链节点上传的第四数据摘要,调用预先存储的第三智能合约和/或第四智能合约以对所述第四数据摘要进行验证,若所述第四数据摘要通过第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第四领导区块链节点构建区块以将第四数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。If the fourth data summary uploaded by any fourth type blockchain node is detected, call the pre-stored third smart contract and/or fourth smart contract to verify the fourth data summary. The data summary is verified by the third smart contract and/or the fourth smart contract, and the fourth leader blockchain node elected by the consensus algorithm is used to construct a block to store the fourth data summary. The corresponding block is updated to get the updated block chain.
  2. 根据权利要求1所述的基于区块链的疫苗信息监控方法,其特征在于, 所述若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用预先存储的第一智能合约、第二智能合约、第三智能合约和/或第四智能合约以对所述第一数据摘要进行验证,若所述第一数据摘要通过、第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第一领导区块链节点构建区块以将第一数据摘要进行存储,包括:The method for monitoring vaccine information based on blockchain according to claim 1, characterized in that, if the first data summary uploaded by any first type blockchain node is detected, the pre-stored first smart contract is called , The second smart contract, the third smart contract and/or the fourth smart contract to verify the first data summary, if the first data summary passes, the second smart contract, the third smart contract and/or the first data summary Fourth, the verification of smart contracts is to build blocks to store the first data summary through the first leading blockchain node elected by the consensus algorithm, including:
    若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用第一智能合约、第二智能合约、第三智能合约和/或第四智能合约中的查询函数,获取与所述第一数据摘要对应的第一历史数据集;If the first data summary uploaded by any first type blockchain node is detected, call the query function in the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract to obtain the The first historical data set corresponding to the first data summary;
    根据第一历史数据集中包括的各历史数据,获取所述第一数据摘要对应的第一数据节点顺序;Acquiring the first data node sequence corresponding to the first data summary according to each historical data included in the first historical data set;
    判断所述第一数据摘要对应的第一数据节点顺序是否满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约;Judging whether the sequence of the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract;
    若所述第一数据摘要对应的第一数据节点顺序满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约,通过实用拜占庭容错算法选举领第一导区块链节点;If the first data node corresponding to the first data summary satisfies the first smart contract, the second smart contract, the third smart contract, and/or the fourth smart contract in order, the first guide area is elected through the practical Byzantine fault-tolerant algorithm Block chain node;
    通过所述第一领导区块链节点中创建的当前第一区块将所述第一数据摘要进行存储;Storing the first data summary through the current first block created in the first leader blockchain node;
    将所述当前第一区块中的第一数据摘要的副本发送至其他区块链节点。Send a copy of the first data summary in the current first block to other blockchain nodes.
  3. 根据权利要求2所述的基于区块链的疫苗信息监控方法,其特征在于,所述若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用第一智能合约、第二智能合约、第三智能合约和/或第四智能合约中的查询函数,获取与所述第一数据摘要对应的第一历史数据集,包括:The method for monitoring vaccine information based on blockchain according to claim 2, characterized in that, if the first data summary uploaded by any one of the first type blockchain nodes is detected, the first smart contract, the second The query function in the smart contract, the third smart contract, and/or the fourth smart contract to obtain the first historical data set corresponding to the first data summary includes:
    若检测到任意一个第一类型区块链节点上传的第一数据摘要,判断所述第一数据摘要对应的流程节点是疫苗生产资料审核节点,或是疫苗标签更新节点,或是疫苗出库节点;If the first data summary uploaded by any first type blockchain node is detected, it is determined whether the process node corresponding to the first data summary is a vaccine production data review node, a vaccine label update node, or a vaccine delivery node ;
    若所述第一数据摘要对应的流程节点是疫苗生产资料审核节点,将所述第一历史数据集置为空集;If the process node corresponding to the first data summary is a vaccine production data review node, set the first historical data set to an empty set;
    若所述第一数据摘要对应的流程节点是疫苗标签更新节点,获取疫苗生产资料审核节点数据、疫苗审批节点数据,以组成第一历史数据集;If the process node corresponding to the first data summary is a vaccine label update node, obtain vaccine production data review node data and vaccine approval node data to form a first historical data set;
    若所述第一数据摘要对应的流程节点是疫苗出库节点,获取疫苗生产资料审核节点数据、疫苗审批节点数据、疫苗生产贴码节点数据,以组成第一历史数据集。If the process node corresponding to the first data summary is a vaccine delivery node, obtain vaccine production data review node data, vaccine approval node data, and vaccine production tagging node data to form a first historical data set.
  4. 根据权利要求2所述的基于区块链的疫苗信息监控方法,其特征在于,所述根据第一历史数据集中包括的各历史数据,获取所述第一数据摘要对应的第 一数据节点顺序,包括:The method for monitoring vaccine information based on the blockchain according to claim 2, wherein the first data node sequence corresponding to the first data summary is obtained according to each historical data included in the first historical data set, include:
    获取所述第一历史数据集中各历史数据分别对应的数据时间戳,并获取所述第一数据摘要对应的当前系统时间;Acquiring the data timestamp corresponding to each historical data in the first historical data set, and acquiring the current system time corresponding to the first data summary;
    将所述第一历史数据集中各历史数据及第一数据摘要按时间升序进行排序,以得到取所述第一数据摘要对应的第一数据节点顺序。The historical data and the first data summary in the first historical data set are sorted in ascending order of time to obtain the first data node order corresponding to the first data summary.
  5. 根据权利要求2所述的基于区块链的疫苗信息监控方法,其特征在于,若所述第一数据摘要对应的第一数据节点顺序满足所述第一智能合约、第二智能合约、第三智能合约和/或第四智能合约,通过实用拜占庭容错算法选举领导区块链节点之前,还包括:The method for monitoring vaccine information based on blockchain according to claim 2, wherein if the first data node corresponding to the first data summary satisfies the order of the first smart contract, the second smart contract, and the third The smart contract and/or the fourth smart contract, before electing the leader blockchain node through a practical Byzantine fault-tolerant algorithm, also includes:
    调用预先存储的身份管理合约,获取各区块链节点的公钥哈希,以对各区块链节点进行身份验证;Call the pre-stored identity management contract to obtain the public key hash of each blockchain node to verify the identity of each blockchain node;
    若各区块链节点的身份验证通过,获取各区块链节点的用户身份信息;所述用户身份信息包括疫苗产商设备,监管机构设备,疾控中心设备疫苗接种单位设备、疫苗运输数据搜集设备。If the identity verification of each blockchain node is passed, obtain user identity information of each blockchain node; the user identity information includes vaccine manufacturer equipment, regulatory agency equipment, CDC equipment, vaccination unit equipment, and vaccine transportation data collection equipment.
  6. 根据权利要求1所述的基于区块链的疫苗信息监控方法,其特征在于,所述对各区块链节点上的区块对应进行更新,得到更新后区块链之后,还包括:The method for monitoring vaccine information based on blockchain according to claim 1, characterized in that said correspondingly updating the blocks on each blockchain node, after obtaining the updated blockchain, it further comprises:
    判断是否检测到区块链节点上传的溯源码;其中,所述溯源码为20位的疫苗标签码;Determine whether the traceable source code uploaded by the blockchain node is detected; wherein the traceable source code is a 20-digit vaccine tag code;
    若检测到区块链节点上传的溯源码,根据所述溯源码在所述更新后区块链中获取所述溯源码对应的疫苗溯源数据集;其中,所述疫苗溯源数据集包括疫苗生产资料审核节点数据、疫苗审批节点数据、疫苗生产贴码节点数据、疫苗出库标签更新节点数据、疫苗入库标签更新节点数据、疫苗二次出库标签更新节点数据、疫苗二次入库标签更新节点数据、疫苗接种节点数据、疫苗不良反应监测数据上传节点数据、疫苗不良反应监测数据二次上传节点数据。If the traceable source code uploaded by a blockchain node is detected, the vaccine traceability data set corresponding to the traceable source code is obtained in the updated blockchain according to the traceable source code; wherein, the vaccine traceability data set includes vaccine production materials Review node data, vaccine approval node data, vaccine production labeling node data, vaccine delivery tag update node data, vaccine entry tag update node data, vaccine secondary delivery tag update node data, vaccine secondary entry tag update node Data, vaccination node data, vaccine adverse reaction monitoring data upload node data, and vaccine adverse reaction monitoring data secondary upload node data.
  7. 根据权利要求1所述的基于区块链的疫苗信息监控方法,其特征在于,所述判断是否检测到区块链节点上传的数据摘要之后,还包括:The method for monitoring vaccine information based on blockchain according to claim 1, characterized in that, after determining whether a data digest uploaded by a blockchain node is detected, the method further comprises:
    若检测到任意一个第五类型区块链节点上传的第五数据摘要,调用预先存储的第三智能合约以对所述第五数据摘要进行验证,若所述第五数据摘要通过第三智能合约的验证,通过由共识算法所选举的第五领导区块链节点构建区块以将第五数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。If the fifth data summary uploaded by any fifth type blockchain node is detected, call the pre-stored third smart contract to verify the fifth data summary, if the fifth data summary passes the third smart contract For verification, the fifth leading blockchain node elected by the consensus algorithm builds a block to store the fifth data summary, and updates the corresponding block on each blockchain node to obtain the updated blockchain.
  8. 一种基于区块链的疫苗信息监控装置,其特征在于,包括:A vaccine information monitoring device based on blockchain, which is characterized in that it includes:
    数据摘要接收单元,用于判断是否检测到区块链节点上传的数据摘要;其中,所述区块链节点包括第一类型区块链节点、第二类型区块链节点、第三类型区 块链节点、第四类型区块链节点、第五类型区块链节点;所述第一类型区块链节点为疫苗产商设备区块链节点,所述第二类型区块链节点为监管机构设备区块链节点,所述第三类型区块链节点为疾控中心设备区块链节点,所述第四类型区块链节点为疫苗接种单位设备区块链节点、所述第五类型区块链节点为疫苗运输数据搜集设备区块链节点;The data summary receiving unit is used to determine whether a data summary uploaded by a blockchain node is detected; wherein the blockchain node includes a first type of blockchain node, a second type of blockchain node, and a third type of block Chain nodes, fourth type blockchain nodes, fifth type blockchain nodes; the first type blockchain node is a vaccine manufacturer equipment blockchain node, and the second type blockchain node is a regulatory agency Device blockchain node, the third type blockchain node is the CDC device blockchain node, the fourth type blockchain node is the vaccination unit device blockchain node, the fifth type area The block chain node is the block chain node of the vaccine transportation data collection equipment;
    第一类型存储单元,用于若检测到任意一个第一类型区块链节点上传的第一数据摘要,调用预先存储的第一智能合约、第二智能合约、第三智能合约和/或第四智能合约以对所述第一数据摘要进行验证,若所述第一数据摘要通过、第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第一领导区块链节点构建区块以将第一数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;The first-type storage unit is used to call the pre-stored first smart contract, second smart contract, third smart contract and/or fourth smart contract if the first data summary uploaded by any first-type blockchain node is detected The smart contract verifies the first data summary. If the first data summary passes, the second smart contract, the third smart contract, and/or the fourth smart contract are verified, the first data summary elected by the consensus algorithm is passed. Lead the blockchain node to construct a block to store the first data summary, and update the corresponding block on each blockchain node to obtain the updated blockchain;
    第二类型存储单元,用于若检测到任意一个第二类型区块链节点上传的第二数据摘要,调用预先存储的第一智能合约和/或第四智能合约以对所述第二数据摘要进行验证,若所述第二数据摘要通过第一智能合约和/或第四智能合约的验证,通过由共识算法所选举的第二领导区块链节点构建区块以将第二数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;The second type storage unit is used to call the pre-stored first smart contract and/or fourth smart contract to summarize the second data if the second data summary uploaded by any second type blockchain node is detected Perform verification. If the second data digest passes the verification of the first smart contract and/or the fourth smart contract, the second leader blockchain node elected by the consensus algorithm builds a block to store the second data digest , Update the corresponding block on each blockchain node to get the updated blockchain;
    第三类型存储单元,用于若检测到任意一个第三类型区块链节点上传的第三数据摘要,调用预先存储的第二智能合约、第三智能合约和/或第四智能合约以对所述第三数据摘要进行验证,若所述第三数据摘要通过第二智能合约、第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第三领导区块链节点构建区块以将第三数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链;以及The third type storage unit is used to call the pre-stored second smart contract, third smart contract and/or fourth smart contract to check the third data summary uploaded by any third-type blockchain node. The third data summary is verified. If the third data summary is verified by the second smart contract, the third smart contract, and/or the fourth smart contract, it is constructed by the third leader blockchain node elected by the consensus algorithm The block stores the third data summary, and updates the corresponding blocks on each block chain node to obtain the updated block chain; and
    第四类型存储单元,用于若检测到任意一个第四类型区块链节点上传的第四数据摘要,调用预先存储的第三智能合约和/或第四智能合约以对所述第四数据摘要进行验证,若所述第四数据摘要通过第三智能合约和/或第四智能合约的验证,通过由共识算法所选举的第四领导区块链节点构建区块以将第四数据摘要进行存储,对各区块链节点上的区块对应进行更新得到更新后区块链。The fourth type storage unit is used to call the pre-stored third smart contract and/or fourth smart contract to summarize the fourth data if the fourth data summary uploaded by any fourth type blockchain node is detected Perform verification. If the fourth data summary passes the verification of the third smart contract and/or the fourth smart contract, the fourth leader blockchain node elected by the consensus algorithm builds a block to store the fourth data summary , Update the corresponding block on each block chain node to get the updated block chain.
  9. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7中任一项所述的基于区块链的疫苗信息监控方法。A computer device, comprising a memory, a processor, and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program as claimed in claims 1 to 7. The blockchain-based vaccine information monitoring method described in any one of 7.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序当被处理器执行时使所述处理器执行如权利要求1至7任一项所述的基于区块链的疫苗信息监控方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes any one of claims 1 to 7 The described vaccine information monitoring method based on blockchain.
PCT/CN2019/128749 2019-12-12 2019-12-26 Blockchain-based vaccine information monitoring method and apparatus, and computer device WO2021114406A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911274734.8 2019-12-12
CN201911274734.8A CN111031036B (en) 2019-12-12 2019-12-12 Block chain-based vaccine information monitoring method and device and computer equipment

Publications (1)

Publication Number Publication Date
WO2021114406A1 true WO2021114406A1 (en) 2021-06-17

Family

ID=70206287

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/128749 WO2021114406A1 (en) 2019-12-12 2019-12-26 Blockchain-based vaccine information monitoring method and apparatus, and computer device

Country Status (2)

Country Link
CN (1) CN111031036B (en)
WO (1) WO2021114406A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113506117A (en) * 2021-07-15 2021-10-15 上海海洋大学 Aquatic product block chain traceability optimization system and method
CN113592509A (en) * 2021-06-22 2021-11-02 北京农业信息技术研究中心 Data tracing supervision method and system based on supply chain
CN113591122A (en) * 2021-08-11 2021-11-02 飞天诚信科技股份有限公司 Method and device for processing transactions on block chain, storage medium and server
CN113672989A (en) * 2021-07-30 2021-11-19 广东浪潮智慧计算技术有限公司 Block chain key information detection method, system, device and readable storage medium
CN117574409A (en) * 2024-01-15 2024-02-20 北京易油互联科技有限公司 Chemical product transportation data encryption method

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111429995B (en) * 2020-06-11 2020-09-18 北京连琪科技有限公司 Vaccine tracing method and system based on alliance chain
CN111737360B (en) * 2020-07-21 2020-12-15 腾讯科技(深圳)有限公司 Block chain-based equipment management method and device and computer equipment
CN112002396A (en) * 2020-09-03 2020-11-27 杭州甘道智能科技有限公司 Ecological vaccine management device and method based on block chain
CN112364371B (en) * 2020-10-16 2024-04-16 杭州甘道智能科技有限公司 Vaccine transfer monitoring device and method based on block chain
CN112347504A (en) * 2020-10-16 2021-02-09 杭州甘道智能科技有限公司 Block chain based vaccination monitoring device and method
CN112307500A (en) * 2020-11-02 2021-02-02 杭州甘道智能科技有限公司 Block chain-based vaccine circulation data encryption device and method
CN112308489A (en) * 2020-11-02 2021-02-02 杭州甘道智能科技有限公司 Vaccine circulation supervision device and method based on block chain
CN112598466B (en) * 2020-12-23 2023-12-26 南京知麦信息科技有限公司 Agricultural machinery self-service payment renting method based on alliance chain
CN113688423A (en) * 2021-08-27 2021-11-23 南华大学 Data management method, system and equipment of mobile vaccination vehicle
CN116739618B (en) * 2023-06-19 2024-01-26 河北华烨冀科信息技术有限责任公司 Variable code tracing system based on block chain and data processing method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118253A (en) * 2018-08-22 2019-01-01 泰康保险集团股份有限公司 Block chain drug management-control method, device, medium and electronic equipment
CN109544160A (en) * 2018-11-20 2019-03-29 杭州呯嘭智能技术有限公司 A kind of transaction authenticity verification methods and system based on block chain and intelligent contract
CN110084626A (en) * 2019-05-08 2019-08-02 湖南大学 A kind of production of vaccine monitoring and managing method based on block chain
US20190259024A1 (en) * 2016-09-19 2019-08-22 China Unionpay Co., Ltd. Security electronic file processing system and method based on block chain structure
CN110533429A (en) * 2019-08-30 2019-12-03 北京金山云网络技术有限公司 Transaction endorsement method, apparatus and block chain network in block chain

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10346406B2 (en) * 2016-03-28 2019-07-09 International Business Machines Corporation Decentralized autonomous edge compute coordinated by smart contract on a blockchain
US10452776B2 (en) * 2017-07-28 2019-10-22 International Business Machines Corporation Cognitive mediator for generating blockchain smart contracts
CN109670321A (en) * 2018-11-30 2019-04-23 深圳灵图慧视科技有限公司 Date storage method, data query method and device
CN109886039A (en) * 2019-01-23 2019-06-14 深圳壹账通智能科技有限公司 Faculty of Finance integration rule detection method and relevant device based on block chain
CN114511344A (en) * 2019-05-09 2022-05-17 成都天钥科技有限公司 Control method for internet dynamic marketing
CN110400642A (en) * 2019-06-12 2019-11-01 梁胤豪 A kind of medical data shared system and design method based on block chain technology
CN110443075B (en) * 2019-08-05 2021-05-25 中国工商银行股份有限公司 Method and device for verifying and deploying block chain intelligent contracts
CN110545273B (en) * 2019-08-29 2022-05-03 广东昭阳信息技术有限公司 Resource allocation method and system based on block chain application

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190259024A1 (en) * 2016-09-19 2019-08-22 China Unionpay Co., Ltd. Security electronic file processing system and method based on block chain structure
CN109118253A (en) * 2018-08-22 2019-01-01 泰康保险集团股份有限公司 Block chain drug management-control method, device, medium and electronic equipment
CN109544160A (en) * 2018-11-20 2019-03-29 杭州呯嘭智能技术有限公司 A kind of transaction authenticity verification methods and system based on block chain and intelligent contract
CN110084626A (en) * 2019-05-08 2019-08-02 湖南大学 A kind of production of vaccine monitoring and managing method based on block chain
CN110533429A (en) * 2019-08-30 2019-12-03 北京金山云网络技术有限公司 Transaction endorsement method, apparatus and block chain network in block chain

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "Blockchain + Traceability, Let Children Get Safely a Vaccine", 26 July 2018 (2018-07-26), pages 1 - 10, XP055820240, Retrieved from the Internet <URL:https://m.sohu.com/a/243409582_100174370> [retrieved on 20210701] *
ANONYMOUS: "This may be the best article to write a blockchain!", MUDUO NEW DRAMA, 9 May 2018 (2018-05-09), pages 1 - 8, XP055820243, Retrieved from the Internet <URL:https://baijiahao.baidu.com/s?id=1599986433348896737&wfr=spider&for=pc> [retrieved on 20210701] *
ANONYMOUS: "Vaccine conundrum What can blockchain do?", pages 1 - 9, XP055820234, Retrieved from the Internet <URL:https://baijiahao.baidu.com/s?id=1607053117937771895&wfr=spider&for=pc> [retrieved on 20210701] *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113592509A (en) * 2021-06-22 2021-11-02 北京农业信息技术研究中心 Data tracing supervision method and system based on supply chain
CN113592509B (en) * 2021-06-22 2023-09-12 北京农业信息技术研究中心 Data tracing supervision method and system based on supply chain
CN113506117A (en) * 2021-07-15 2021-10-15 上海海洋大学 Aquatic product block chain traceability optimization system and method
CN113672989A (en) * 2021-07-30 2021-11-19 广东浪潮智慧计算技术有限公司 Block chain key information detection method, system, device and readable storage medium
CN113591122A (en) * 2021-08-11 2021-11-02 飞天诚信科技股份有限公司 Method and device for processing transactions on block chain, storage medium and server
CN113591122B (en) * 2021-08-11 2023-08-08 飞天诚信科技股份有限公司 Processing method and device for transactions on blockchain, storage medium and server
CN117574409A (en) * 2024-01-15 2024-02-20 北京易油互联科技有限公司 Chemical product transportation data encryption method
CN117574409B (en) * 2024-01-15 2024-04-12 北京易油互联科技有限公司 Chemical product transportation data encryption method

Also Published As

Publication number Publication date
CN111031036B (en) 2020-11-27
CN111031036A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
WO2021114406A1 (en) Blockchain-based vaccine information monitoring method and apparatus, and computer device
CN109791591B (en) Method and system for identity and credential protection and verification via blockchain
CN110121727B (en) Method and system for providing authenticated, auditable and immutable input for intelligent contracts
CN110620810B (en) Non-linked ownership of continuous asset transfer over blockchain
TWI706665B (en) Blockchain-based data checking system, method, computing equipment and storage media
CN111008402B (en) Blockchain timestamp protocol
JP2021509518A (en) How to Securely Serialize Product Units in the Supply Chain
US20200374131A1 (en) Method and system for generalized provenance solution for blockchain supply chain applications
CN110889710A (en) Device information management method, server, and storage medium
US11516001B2 (en) Method and system for generalized provenance solution for blockchain supply chain applications
CN111429995A (en) Vaccine tracing method and system based on alliance chain
CN112949798B (en) Laboratory equipment management method and system based on RFID technology
CN111429015A (en) Block chain system for monitoring house decoration quality
US11223655B2 (en) Semiconductor tool matching and manufacturing management in a blockchain
CN112184264A (en) Block chain-based drug supervision method, device, server and medium
CN112132545A (en) Evaluation system, information pushing method and device and electronic equipment
CN111984727B (en) Method and device for recruiting subjects, terminal device and storage medium
CN114596165A (en) Block chain system and method for registering, selling and managing financial products
US20120173495A1 (en) Computer Readable Medium, Systems, and Methods of Detecting a Discrepancy in a Chain-of-title of an Asset
CN109598148B (en) Invoice management method and system based on block chain
US11271920B2 (en) Method and system for account security of recycled phone numbers
CN110889763A (en) Financial management system based on big data
KR102592320B1 (en) Web server that performs test report validation based on blockchain network and Validation system for the same
CN116600009B (en) Interface management method based on collateral file safekeeping cabinet
CN115983724B (en) Product quality acceptance method and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19955430

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12/10/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19955430

Country of ref document: EP

Kind code of ref document: A1