CN114493637A - Block chain-based traditional Chinese medicine tracing method, equipment and medium - Google Patents

Block chain-based traditional Chinese medicine tracing method, equipment and medium Download PDF

Info

Publication number
CN114493637A
CN114493637A CN202210111703.6A CN202210111703A CN114493637A CN 114493637 A CN114493637 A CN 114493637A CN 202210111703 A CN202210111703 A CN 202210111703A CN 114493637 A CN114493637 A CN 114493637A
Authority
CN
China
Prior art keywords
information
traditional chinese
chinese medicine
planting
identification code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210111703.6A
Other languages
Chinese (zh)
Inventor
田佳云
商广勇
李文博
马龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Inspur Industrial Internet Industry Co Ltd
Original Assignee
Shandong Inspur Industrial Internet Industry Co Ltd
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 Shandong Inspur Industrial Internet Industry Co Ltd filed Critical Shandong Inspur Industrial Internet Industry Co Ltd
Priority to CN202210111703.6A priority Critical patent/CN114493637A/en
Publication of CN114493637A publication Critical patent/CN114493637A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Landscapes

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

Abstract

The application discloses a traditional Chinese medicine tracing method, equipment and a medium based on a block chain, wherein the method comprises the following steps: carrying out identification coding on the container filled with the traditional Chinese medicine to generate a first identification code of the traditional Chinese medicine; acquiring planting information of the traditional Chinese medicine, associating the first identification code with the planting information, and uploading the associated planting information to a block chain; acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, and uploading the associated first transportation information to a block chain; carrying out identification coding on the minimum packaging layer of the processed traditional Chinese medicine at a production node to generate a second identification code of the traditional Chinese medicine; associating the first identification code with the second identification code; acquiring processing information of the traditional Chinese medicine, associating the second identification code with the processing information, and uploading the associated processing information to the block chain; and acquiring second transportation information of the traditional Chinese medicine transported to the corresponding seller node, associating the second identification code with the second transportation information, and uploading the associated second transportation information to the block chain.

Description

Block chain-based traditional Chinese medicine tracing method, equipment and medium
Technical Field
The application relates to the technical field of medical safety, in particular to a traditional Chinese medicine tracing method, equipment and medium based on a block chain.
Background
With the development of economy, people pay more and more attention to physical health and pay more and more attention to the quality safety of medicines. The application of traditional Chinese medicines is increasingly wide, traditional Chinese medicine production is a typical flow type industry and relates to a plurality of links such as medicinal material planting, production and circulation, and in the production process, traditional Chinese medicine raw materials are circulated step by step according to the flow.
However, the information interaction degree and the cooperation degree between the business main bodies of the traditional Chinese medicine are low, the data sharing and the data feedback are poor, and an obvious upstream and downstream information island is formed, so that the traditional Chinese medicine cannot be traced in the whole process.
Disclosure of Invention
The embodiment of the application provides a traditional Chinese medicine tracing method, equipment and medium based on a block chain, which are used for solving the problem that the traditional Chinese medicine cannot be subjected to full-flow tracing.
The embodiment of the application adopts the following technical scheme:
in one aspect, an embodiment of the present application provides a method for tracing to a source of a traditional Chinese medicine based on a blockchain, where the method includes: carrying out identification coding on a container filled with traditional Chinese medicines to generate a first identification code of the traditional Chinese medicines; wherein, the same container is filled with the same type of traditional Chinese medicines, and the planting environment of the traditional Chinese medicines is the same; acquiring planting information of the traditional Chinese medicine through a supplier node, associating the first identification code with the planting information, and uploading the associated planting information to a block chain; acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, and uploading the associated first transportation information to the block chain; carrying out identification coding on the minimum packaging layer of the processed traditional Chinese medicine at a production node to generate a second identification code of the traditional Chinese medicine; associating the first identification code with the second identification code; acquiring processing information of the traditional Chinese medicine through the producer node, associating the second identification code with the processing information, and uploading the associated processing information to the block chain; acquiring second transportation information of the traditional Chinese medicine, which is transported to a corresponding seller node, associating the second identification code with the second transportation information, uploading the associated second transportation information to the block chain, so that a consumer node scans the second identification code through scanning equipment, and acquiring the associated planting information, the associated first transportation information, the associated processing information and the associated second transportation information of the traditional Chinese medicine from the block chain.
In one example, different types of chinese medicines correspond to different tiles, the method further comprising: determining basic information corresponding to the associated planting information, the associated first transportation information, the associated processing information and the associated second transportation information, and writing the basic information into the block; the basic information is related to the identity of each node and the type of each information; respectively generating summary information corresponding to the associated planting information, the associated first transportation information, the associated processing information and the associated second transportation information; storing the corresponding summary information in a pre-constructed distributed database; wherein, in the distributed database, the supplier node, the producer node and the seller node correspond to different databases respectively; and establishing a mapping relation between the distributed database and the block body, writing the mapping relation into the block head so as to map data into the block head for recording, and acquiring corresponding information from the distributed database through the mapping relation.
In one example, each of the databases in the distributed databases has a multi-level storage structure, and the storing the corresponding summary information in the pre-constructed distributed database specifically includes: acquiring the summary information and the storage time of the summary information, and storing the summary information to a first level of a corresponding database; the database is sequentially divided into a plurality of levels according to preset data capacity, and the capacity of the first level is lower than the capacities of other levels; if the storage duration of the summary information exceeds a preset time limit, storing the summary information backup to a second level; the first hierarchy is lower in level than the second hierarchy; and in the first level, generating a backup link of the summary information, and clearing the summary information so as to backup the summary information step by step.
In one example, the uploading the associated planting information to the block chain specifically includes: matching the associated planting information with standard planting information in a traditional Chinese medicine planting library in a preset traditional Chinese medicine planting library according to the type of the traditional Chinese medicine through an intelligent contract in the block chain; the standard planting information refers to planting information which is issued by a planting expert and is suitable for growth of the traditional Chinese medicine; judging whether the associated planting information is matched with standard planting information in the traditional Chinese medicine planting library or not; if so, writing the associated planting information into the block of the block chain; if not, determining unmatched planting information and acquiring medicinal value information of the traditional Chinese medicine; the medicinal value information is used for expressing the information of treating the specified diseases by the specified components of the traditional Chinese medicines; determining the influence level of the unmatched planting information on the traditional Chinese medicine based on the growth conditions of the specified components in the life cycle of the traditional Chinese medicine; and if the influence grade is greater than a preset grade, removing the unmatched planting information from the associated planting information to obtain effective associated planting information, and writing the effective associated planting information into the block.
In one example, the acquiring the medicinal value information of the traditional Chinese medicine specifically includes: calling the medicinal value information of the traditional Chinese medicines in a preset medicinal value library according to the types of the traditional Chinese medicines; the preset medicinal value library comprises medicinal value information corresponding to various types of traditional Chinese medicines respectively; judging the influence level of the unmatched planting information on the traditional Chinese medicine based on the growth conditions of the specified components in the life cycle of the traditional Chinese medicine, and specifically comprising the following steps: determining the designated components of the traditional Chinese medicine according to the medicinal value information; determining the growth conditions of the specified components in the production period of the traditional Chinese medicine; and determining the influence level of the unmatched planting information on the traditional Chinese medicine according to the matching relation between the unmatched planting information and the growth conditions.
In one example, the determining, according to the matching relationship between the unmatched planting information and the growth condition, the level of influence of the unmatched planting information on the traditional Chinese medicine specifically includes: matching the growth factors included in the unmatched planting information with the growth factors included in the generating conditions, and determining matched growth factor pairs; the growth factors comprise sunlight conditions, soil conditions, atmospheric conditions, water quality conditions and the like; determining the influence level corresponding to the unmatched planting information according to the number of the growth factor pairs; wherein a greater number of said pairs of growth factors indicates a greater level of said effect.
In one example, when the supplier node, the producer node, and the seller node apply for uplink, an asymmetrically encrypted public key and private key pair is generated for each node, and the uploading the associated planting information to the blockchain specifically includes: performing hash calculation on the associated planting information to obtain a first hash value, and performing digital signature on the first hash value through a private key corresponding to the supplier; the public key is used for verifying a first hash value of the digital signature; performing hash calculation on the public key to obtain a second hash value, establishing association between the second hash value and the associated planting information, and generating an identity identification number of the supplier node through the second hash value; and uploading the first hash value of the digital signature and the identity identification number of the provider node to the block chain through the provider node, and performing whole-network broadcasting.
In one example, after uploading the associated second transportation information to the blockchain, the method further comprises: acquiring an access request initiated by the seller node by scanning the second identification code; acquiring the frequency of the seller node access requests in a preset period; judging whether the frequency exceeds an access threshold value or not through a preset access intelligent contract; if so, determining the possibility that the traditional Chinese medicine is potentially unqualified, and informing the supplier node of performing quality inspection on the traditional Chinese medicine.
On the other hand, the embodiment of the present application provides a chinese medicine tracing apparatus of block chain, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to: carrying out identification coding on a container filled with traditional Chinese medicines to generate a first identification code of the traditional Chinese medicines; wherein, the same container is filled with the same type of traditional Chinese medicines, and the planting environment of the traditional Chinese medicines is the same; acquiring planting information of the traditional Chinese medicine through a supplier node, associating the first identification code with the planting information, and uploading the associated planting information to a block chain; acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, and uploading the associated first transportation information to the block chain; carrying out identification coding on the minimum packaging layer of the processed traditional Chinese medicine at a production node to generate a second identification code of the traditional Chinese medicine; associating the first identification code with the second identification code; acquiring processing information of the traditional Chinese medicine through the producer node, associating the second identification code with the processing information, and uploading the associated processing information to the block chain; acquiring second transportation information of the traditional Chinese medicine, which is transported to a corresponding seller node, associating the second identification code with the second transportation information, uploading the associated second transportation information to the block chain, so that a consumer node scans the second identification code through scanning equipment, and acquiring the associated planting information, the associated first transportation information, the associated processing information and the associated second transportation information of the traditional Chinese medicine from the block chain.
In another aspect, an embodiment of the present application provides a block chain-based traditional Chinese medicine tracing non-volatile computer storage medium, in which computer-executable instructions are stored, where the computer-executable instructions are configured to: carrying out identification coding on a container filled with traditional Chinese medicines to generate a first identification code of the traditional Chinese medicines; wherein, the same container is filled with the same type of traditional Chinese medicines, and the planting environment of the traditional Chinese medicines is the same; acquiring planting information of the traditional Chinese medicine through a supplier node, associating the first identification code with the planting information, and uploading the associated planting information to a block chain; acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, and uploading the associated first transportation information to the block chain; carrying out identification coding on the minimum packaging layer of the processed traditional Chinese medicine at a production node to generate a second identification code of the traditional Chinese medicine; associating the first identification code with the second identification code; acquiring processing information of the traditional Chinese medicine through the producer node, associating the second identification code with the processing information, and uploading the associated processing information to the block chain; acquiring second transportation information of the traditional Chinese medicine, which is transported to a corresponding seller node, associating the second identification code with the second transportation information, uploading the associated second transportation information to the block chain, so that a consumer node scans the second identification code through scanning equipment, and acquiring the associated planting information, the associated first transportation information, the associated processing information and the associated second transportation information of the traditional Chinese medicine from the block chain.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
information islands among traditional Chinese medicine planting, circulation and production are broken through the application of the identification, information interaction, cooperative operation and data sharing of upstream and downstream enterprises are achieved, the production efficiency of the enterprises is improved, and the supply and demand docking cost of the enterprises is reduced, so that finally in the traditional Chinese medicine production process, information such as raw material purchasing, circulation and production is collected through docking of the identification analysis system and industrial software, and the whole life cycle management and control of traditional Chinese medicine manufacturing from raw material planting, circulation and traditional Chinese medicine production is achieved.
Drawings
In order to more clearly explain the technical solutions of the present application, some embodiments of the present application will be described in detail below with reference to the accompanying drawings, in which:
fig. 1 is a schematic flowchart of a tracing method for traditional Chinese medicine based on a block chain according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a traditional Chinese medicine tracing apparatus based on a block chain according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following embodiments and accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a method for tracing to a source of a traditional Chinese medicine based on a block chain according to an embodiment of the present application. Certain input parameters or intermediate results in the procedure allow for manual intervention adjustments to help improve accuracy.
The analysis method according to the embodiment of the present application may be implemented by a terminal device or a server, and the present application is not limited to this. For convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.
The process in fig. 1 may include the following steps:
s101: carrying out identification coding on a container filled with traditional Chinese medicines to generate a first identification code of the traditional Chinese medicines; wherein, the same container is filled with the same type of traditional Chinese medicine, and the planting environment among the traditional Chinese medicine is the same.
That is, each container is attached with its own identification code, there is only one type of the Chinese medicine in the single container, and the Chinese medicines in the single container are purchased in the same production place. Therefore, the traditional Chinese medicine is classified from the minimum granularity, and the traditional Chinese medicine can be conveniently traced in the later stage.
S102: and acquiring the planting information of the traditional Chinese medicine through a supplier node, associating the first identification code with the planting information, and uploading the associated planting information to a block chain.
In some embodiments of the present application, the planting information has a large influence on the growth process of the traditional Chinese medicine, which may affect the quality of the traditional Chinese medicine. Therefore, the more the planting information conforms to the growth conditions of the traditional Chinese medicine, the better the quality of the traditional Chinese medicine is. Based on the method, the Chinese medicaments with poor quality can be screened out by screening unqualified planting information.
Specifically, firstly, the associated planting information is matched with the standard planting information in the traditional Chinese medicine planting library according to the type of the traditional Chinese medicine in a preset traditional Chinese medicine planting library through an intelligent contract in a block chain. Wherein, the standard planting information refers to planting information which is issued by planting experts and is suitable for the growth of the traditional Chinese medicine. That is, the closer the planting information is to the standard planting information, the better the quality of the traditional Chinese medicine is.
It should be noted that, in the traditional Chinese medicine planting library, different traditional Chinese medicine types and corresponding standard planting information are stored in advance.
And then, judging whether the associated planting information is matched with the standard planting information in the traditional Chinese medicine planting library, and if so, writing the associated planting information into a block of the block chain.
If not, determining unmatched planting information. Then, the medicinal value information of the traditional Chinese medicine is obtained. The medical value information is used for expressing the information of treating the specified diseases by the specified components of the traditional Chinese medicine.
When the medicinal value information of the traditional Chinese medicine is obtained, the medicinal value information of the traditional Chinese medicine is called in a preset medicinal value library according to the type of the traditional Chinese medicine. It should be noted that the preset medicinal value library includes medicinal value information corresponding to various types of Chinese medicines.
Then, based on the growth conditions of the specified components in the life cycle of the traditional Chinese medicine, determining the influence level of the unmatched planting information on the traditional Chinese medicine.
When the influence level of the unmatched planting information on the traditional Chinese medicine is determined, firstly, the specified components of the traditional Chinese medicine are determined according to the medicinal value information. Then, determining the growth conditions corresponding to the specified components in the production cycle of the traditional Chinese medicine, for example, obtaining the growth conditions required by the specified components issued by the planting experts in an internet mode. It is understood that growth conditions also refer to planting information.
And finally, determining the influence level of the unmatched planting information on the traditional Chinese medicine according to the matching relation between the unmatched planting information and the growth conditions.
When the influence level of the unmatched planting information on the traditional Chinese medicine is determined, the growth factors included in the unmatched planting information are matched with the growth factors included in the generating conditions, and the matched growth factor pairs are determined. Wherein the growth factor comprises sunshine condition, soil condition, atmospheric condition, water quality condition, etc.
Then, determining the influence level corresponding to the unmatched planting information according to the number of the growth factor pairs; wherein, the larger the number of growth factor pairs, the larger the influence level.
And if the influence grade is greater than the preset grade, removing the unmatched planting information from the associated planting information to obtain effective associated planting information, and writing the effective associated planting information into the block. And if the influence grade is less than or equal to the preset grade, writing the unmatched planting information into the block.
S103: acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, and uploading the associated first transportation information to the block chain.
S104: and carrying out identification coding on the minimum packaging layer of the processed traditional Chinese medicine at a production node to generate a second identification code of the traditional Chinese medicine.
It can be understood that, due to the nature of the herbs, in a container, the herbs are usually in bulk, and then, when reaching the node of the producing party, the producing party usually processes the herbs in bulk and then continues to pack them. Therefore, in order to facilitate tracing, the second identification code is given to the traditional Chinese medicine at the minimum packaging layer.
S105: associating the first identification code with the second identification code.
The first identification code is associated with the second identification code, so that code association is realized, and a source tracing channel of raw materials is opened.
S106: and acquiring processing information of the traditional Chinese medicine through the producer node, associating the second identification code with the processing information, and uploading the associated processing information to the block chain.
S107: acquiring second transportation information of the traditional Chinese medicine, which is transported to a corresponding seller node, associating the second identification code with the second transportation information, uploading the associated second transportation information to the block chain, so that a consumer node scans the second identification code through scanning equipment, and acquiring the associated planting information, the associated first transportation information, the associated processing information and the associated second transportation information of the traditional Chinese medicine from the block chain.
In some embodiments of the present application, after the associated second transportation information is uploaded to the block chain, when a quality problem occurs in a traditional Chinese medicine, in order to check whether a problem occurs in each link in time, a seller node may frequently check the traceability information of the traditional Chinese medicine in a short period.
Based on the method, the access request initiated by the seller node through scanning the second identification code can be obtained, the frequency of the access request of the seller node is obtained in a preset period, and whether the frequency exceeds the access threshold value or not is judged through a preset access intelligent contract.
If yes, determining the possibility that the traditional Chinese medicine is potentially unqualified, and informing a supplier node to carry out quality inspection on the traditional Chinese medicine. If not, the possibility that the traditional Chinese medicine is not qualified is shown, and no notification information is sent to the provider node.
In some embodiments of the present application, when uploading the associated planting information, the associated first transportation information, the associated processing information, and the associated second transportation information to the block chain, in order to more efficiently store and respond to the needs of each node in time, first, basic information corresponding to the associated planting information, the associated first transportation information, the associated processing information, and the associated second transportation information is determined, and the basic information is written into the block. Wherein, the basic information is related to the identity of each node and the type of each information.
And then, generating associated planting information, associated first transportation information, associated processing information and summary information corresponding to the associated second transportation information respectively. And then, storing the corresponding summary information in a pre-constructed distributed database. In the distributed database, a supplier node, a producer node and a seller node respectively correspond to different databases;
and finally, establishing a mapping relation between the distributed database and the block body, writing the mapping relation into the block head so as to map data into the block head for recording, and acquiring corresponding information from the distributed database through the mapping relation.
Therefore, the basic information can be stored in the block body, the data information generated in the running process of the block chain is stored in the database outside the main chain in an abstract mode, the data information is stored in a classification mode so as to facilitate tracing and data analysis, and the data is mapped and recorded in the block head.
Further, each database in the distributed database has a multi-level storage structure, and the method for storing the corresponding summary information in the pre-constructed distributed database specifically includes:
firstly, acquiring abstract information and storage time of the abstract information, and storing the abstract information to a first level of a corresponding database; the method comprises the steps that a database is divided into a plurality of levels in sequence according to preset data capacity, and the capacity of a first level is lower than that of other levels;
then, if the storage duration of the summary information exceeds a preset time limit, the summary information is backed up and stored to a second level; the first hierarchy is lower than the second hierarchy;
and finally, in the first level, generating a backup link of the summary information, and clearing the summary information so as to backup the summary information step by step, thereby being capable of storing more efficiently.
In some embodiments of the present application, when a supplier node, a producer node, and a seller node apply for uplink, asymmetrically encrypted public and private key pairs are generated for each node, taking the supplier node as an example.
Firstly, performing hash calculation on associated planting information to obtain a first hash value, and performing digital signature on the first hash value through a private key corresponding to a supplier; and the public key is used for verifying the first hash value of the digital signature.
Then, carrying out Hash calculation on the public key to obtain a second Hash value, establishing association between the second Hash value and the associated planting information, and generating an identity identification number of the supplier node through the second Hash value;
and finally, uploading the first hash value of the digital signature and the identity identification number of the provider node to a block chain through the provider node, and performing whole-network broadcasting. Therefore, fair and fair supply and demand transaction can be realized, and real data support decision and evaluation business work are provided.
It should be noted that, although the embodiment of the present application describes steps S101 to S107 in sequence with reference to fig. 1, this does not mean that steps S101 to S107 must be executed in strict sequence. The embodiment of the present application is described by sequentially describing step S101 to step S107 according to the sequence shown in fig. 1, so as to facilitate those skilled in the art to understand the technical solutions of the embodiment of the present application. In other words, in the embodiment of the present application, the sequence between step S101 and step S107 may be appropriately adjusted according to actual needs.
Through the method of the figure 1, information islands among traditional Chinese medicine planting, circulation and production are broken through the application of the identification, information interaction, cooperative operation and data sharing of upstream and downstream enterprises are achieved, the production efficiency of the enterprises is improved, and the supply and demand docking cost of the enterprises is reduced, so that finally in the production process of traditional Chinese medicines, information of raw material purchasing, circulation, production and the like is collected through docking of an identification analysis system and industrial software, and the whole life cycle management and control of traditional Chinese medicine manufacturing from raw material planting, circulation and traditional Chinese medicine production is achieved.
Based on the same idea, some embodiments of the present application further provide a device and a non-volatile computer storage medium corresponding to the above method.
Fig. 2 is a schematic structural diagram of a traditional Chinese medicine tracing apparatus based on a blockchain according to an embodiment of the present application, where the apparatus includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
carrying out identification coding on a container filled with traditional Chinese medicines to generate a first identification code of the traditional Chinese medicines; wherein, the same container is filled with the same type of traditional Chinese medicines, and the planting environment of the traditional Chinese medicines is the same;
acquiring planting information of the traditional Chinese medicine through a supplier node, associating the first identification code with the planting information, uploading the associated planting information to a block chain, and writing the associated planting information into a block through an intelligent contract in the block chain;
acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, uploading the associated first transportation information to the block chain, and writing the associated first transportation information into the block through the intelligent contract;
after the traditional Chinese medicine is processed at a production node, carrying out identification coding on a minimum packaging layer of the processed traditional Chinese medicine to generate a second identification code of the traditional Chinese medicine;
referencing the first identification code in attribute information in the second identification code to associate the first identification code with the second identification code;
acquiring processing information of the traditional Chinese medicine through the producer node, associating the second identification code with the processing information, uploading the associated processing information to the block chain, and writing the associated processing information into the block through the intelligent contract;
acquiring second transportation information of the traditional Chinese medicine, which is transported to a corresponding seller point, associating the second identification code with the second transportation information, uploading the associated second transportation information to the block chain, and writing the associated second transportation information into the block through the intelligent contract.
Some embodiments of the present application provide a blockchain-based traditional Chinese medicine tracing non-volatile computer storage medium, which stores computer-executable instructions configured to:
carrying out identification coding on a container filled with traditional Chinese medicines to generate a first identification code of the traditional Chinese medicines; wherein, the same container is filled with the same type of traditional Chinese medicines, and the planting environment of the traditional Chinese medicines is the same;
acquiring planting information of the traditional Chinese medicine through a supplier node, associating the first identification code with the planting information, uploading the associated planting information to a block chain, and writing the associated planting information into a block through an intelligent contract in the block chain;
acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, uploading the associated first transportation information to the block chain, and writing the associated first transportation information into the block through the intelligent contract;
after the traditional Chinese medicine is processed at a production node, carrying out identification coding on a minimum packaging layer of the processed traditional Chinese medicine to generate a second identification code of the traditional Chinese medicine;
referencing the first identification code in attribute information in the second identification code to associate the first identification code with the second identification code;
acquiring processing information of the traditional Chinese medicine through the producer node, associating the second identification code with the processing information, uploading the associated processing information to the block chain, and writing the associated processing information into the block through the intelligent contract;
acquiring second transportation information of the traditional Chinese medicine transported to a corresponding seller, associating the second identification code with the second transportation information, uploading the associated second transportation information to the block chain, and writing the associated second transportation information into the block through the intelligent contract.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and media embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for relevant points.
The device and the medium provided by the embodiment of the application correspond to the method one to one, so the device and the medium also have the similar beneficial technical effects as the corresponding method, and the beneficial technical effects of the method are explained in detail above, so the beneficial technical effects of the device and the medium are not repeated herein.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the technical principle of the present application shall fall within the protection scope of the present application.

Claims (10)

1. A traditional Chinese medicine tracing method based on a block chain is characterized by comprising the following steps:
carrying out identification coding on a container filled with traditional Chinese medicines to generate a first identification code of the traditional Chinese medicines; wherein, the same container is filled with the same type of traditional Chinese medicines, and the planting environment of the traditional Chinese medicines is the same;
acquiring planting information of the traditional Chinese medicine through a supplier node, associating the first identification code with the planting information, and uploading the associated planting information to a block chain;
acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, and uploading the associated first transportation information to the block chain;
carrying out identification coding on the minimum packaging layer of the processed traditional Chinese medicine at a production node to generate a second identification code of the traditional Chinese medicine;
associating the first identification code with the second identification code;
acquiring processing information of the traditional Chinese medicine through the producer node, associating the second identification code with the processing information, and uploading the associated processing information to the block chain;
acquiring second transportation information of the traditional Chinese medicine, which is transported to a corresponding seller node, associating the second identification code with the second transportation information, uploading the associated second transportation information to the block chain, so that a consumer node scans the second identification code through scanning equipment, and acquiring the associated planting information, the associated first transportation information, the associated processing information and the associated second transportation information of the traditional Chinese medicine from the block chain.
2. The method of claim 1, wherein different types of chinese medicines correspond to different tiles, the method further comprising:
determining basic information corresponding to the associated planting information, the associated first transportation information, the associated processing information and the associated second transportation information, and writing the basic information into the block; the basic information is related to the identity of each node and the type of each information;
respectively generating summary information corresponding to the associated planting information, the associated first transportation information, the associated processing information and the associated second transportation information;
storing the corresponding summary information in a pre-constructed distributed database; wherein, in the distributed database, the supplier node, the producer node and the seller node respectively correspond to different databases;
and establishing a mapping relation between the distributed database and the block body, writing the mapping relation into the block head so as to map data into the block head for recording, and acquiring corresponding information from the distributed database through the mapping relation.
3. The method according to claim 2, wherein each of the distributed databases has a multi-level storage structure, and the storing the corresponding summary information in the pre-constructed distributed database specifically includes:
acquiring the summary information and the storage time of the summary information, and storing the summary information to a first level of a corresponding database; the database is sequentially divided into a plurality of levels according to preset data capacity, and the capacity of the first level is lower than the capacities of other levels;
if the storage duration of the summary information exceeds a preset time limit, storing the summary information backup to a second level; the first hierarchy is lower in level than the second hierarchy;
and in the first level, generating a backup link of the summary information, and clearing the summary information so as to backup the summary information step by step.
4. The method according to claim 1, wherein uploading the associated planting information to a blockchain specifically comprises:
matching the associated planting information with standard planting information in a traditional Chinese medicine planting library in a preset traditional Chinese medicine planting library according to the type of the traditional Chinese medicine through an intelligent contract in the block chain; the standard planting information refers to planting information which is issued by a planting expert and is suitable for growth of the traditional Chinese medicine;
judging whether the associated planting information is matched with standard planting information in the traditional Chinese medicine planting library or not;
if so, writing the associated planting information into the block of the block chain;
if not, determining unmatched planting information and acquiring medicinal value information of the traditional Chinese medicine; the medicinal value information is used for expressing the information of treating the specified diseases by the specified components of the traditional Chinese medicines;
determining the influence level of the unmatched planting information on the traditional Chinese medicine based on the growth conditions of the specified components in the life cycle of the traditional Chinese medicine;
and if the influence grade is greater than a preset grade, removing the unmatched planting information from the associated planting information to obtain effective associated planting information, and writing the effective associated planting information into the block.
5. The method according to claim 4, wherein the acquiring the information of the medicinal value of the traditional Chinese medicine specifically comprises:
calling the medicinal value information of the traditional Chinese medicines in a preset medicinal value library according to the types of the traditional Chinese medicines; the preset medicinal value library comprises medicinal value information corresponding to various types of traditional Chinese medicines respectively;
judging the influence level of the unmatched planting information on the traditional Chinese medicine based on the growth conditions of the specified components in the life cycle of the traditional Chinese medicine, and specifically comprising the following steps:
determining the designated components of the traditional Chinese medicine according to the medicinal value information;
determining the growth conditions of the specified components in the production period of the traditional Chinese medicine;
and determining the influence level of the unmatched planting information on the traditional Chinese medicine according to the matching relation between the unmatched planting information and the growth conditions.
6. The method according to claim 5, wherein the determining the influence level of the unmatched planting information on the traditional Chinese medicine according to the matching relationship between the unmatched planting information and the growth conditions specifically comprises:
matching the growth factors included in the unmatched planting information with the growth factors included in the generating conditions, and determining matched growth factor pairs; the growth factors comprise sunlight conditions, soil conditions, atmospheric conditions, water quality conditions and the like;
determining the influence level corresponding to the unmatched planting information according to the number of the growth factor pairs; wherein a greater number of said pairs of growth factors indicates a greater degree of said effect.
7. The method of claim 1, wherein upon the supplier node, the producer node, and the seller node applying for uplink, generating asymmetrically encrypted public and private key pairs for each of the nodes, and uploading the associated planting information to a blockchain, comprises:
performing hash calculation on the associated planting information to obtain a first hash value, and performing digital signature on the first hash value through a private key corresponding to the supplier; the public key is used for verifying a first hash value of the digital signature;
performing hash calculation on the public key to obtain a second hash value, establishing association between the second hash value and the associated planting information, and generating an identity identification number of the supplier node through the second hash value;
and uploading the first hash value of the digital signature and the identity identification number of the provider node to the block chain through the provider node, and performing whole-network broadcasting.
8. The method of claim 1, wherein after uploading the associated second transportation information to the blockchain, the method further comprises:
acquiring an access request initiated by the seller node by scanning the second identification code;
acquiring the frequency of the seller node access requests in a preset period;
judging whether the frequency exceeds an access threshold value or not through a preset access intelligent contract;
if so, determining the possibility that the traditional Chinese medicine is potentially unqualified, and informing the supplier node of performing quality inspection on the traditional Chinese medicine.
9. A traditional chinese medicine equipment of tracing to source based on block chain, its characterized in that includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
carrying out identification coding on a container filled with traditional Chinese medicines to generate a first identification code of the traditional Chinese medicines; wherein, the same container is filled with the same type of traditional Chinese medicines, and the planting environment of the traditional Chinese medicines is the same;
acquiring planting information of the traditional Chinese medicine through a supplier node, associating the first identification code with the planting information, uploading the associated planting information to a block chain, and writing the associated planting information into a block through an intelligent contract in the block chain;
acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, uploading the associated first transportation information to the block chain, and writing the associated first transportation information into the block through the intelligent contract;
after the traditional Chinese medicine is processed at a production node, carrying out identification coding on a minimum packaging layer of the processed traditional Chinese medicine to generate a second identification code of the traditional Chinese medicine;
referencing the first identification code in attribute information in the second identification code to associate the first identification code with the second identification code;
acquiring processing information of the traditional Chinese medicine through the producer node, associating the second identification code with the processing information, uploading the associated processing information to the block chain, and writing the associated processing information into the block through the intelligent contract;
acquiring second transportation information of the traditional Chinese medicine transported to a corresponding seller, associating the second identification code with the second transportation information, uploading the associated second transportation information to the block chain, and writing the associated second transportation information into the block through the intelligent contract.
10. A blockchain-based traditional Chinese medicine traceability non-volatile computer storage medium storing computer-executable instructions configured to:
carrying out identification coding on a container filled with traditional Chinese medicines to generate a first identification code of the traditional Chinese medicines; wherein, the same container is filled with the same type of traditional Chinese medicines, and the planting environments of the traditional Chinese medicines are the same;
acquiring planting information of the traditional Chinese medicine through a supplier node, associating the first identification code with the planting information, uploading the associated planting information to a block chain, and writing the associated planting information into a block through an intelligent contract in the block chain;
acquiring first transportation information of the traditional Chinese medicine, associating the first identification code with the first transportation information, uploading the associated first transportation information to the block chain, and writing the associated first transportation information into the block through the intelligent contract;
after the traditional Chinese medicine is processed at a production node, carrying out identification coding on the minimum packaging layer of the processed traditional Chinese medicine to generate a second identification code of the traditional Chinese medicine;
referencing the first identification code in attribute information in the second identification code to associate the first identification code with the second identification code;
acquiring processing information of the traditional Chinese medicine through the producer node, associating the second identification code with the processing information, uploading the associated processing information to the block chain, and writing the associated processing information into the block through the intelligent contract;
acquiring second transportation information of the traditional Chinese medicine transported to a corresponding seller, associating the second identification code with the second transportation information, uploading the associated second transportation information to the block chain, and writing the associated second transportation information into the block through the intelligent contract.
CN202210111703.6A 2022-01-29 2022-01-29 Block chain-based traditional Chinese medicine tracing method, equipment and medium Pending CN114493637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210111703.6A CN114493637A (en) 2022-01-29 2022-01-29 Block chain-based traditional Chinese medicine tracing method, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210111703.6A CN114493637A (en) 2022-01-29 2022-01-29 Block chain-based traditional Chinese medicine tracing method, equipment and medium

Publications (1)

Publication Number Publication Date
CN114493637A true CN114493637A (en) 2022-05-13

Family

ID=81478461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210111703.6A Pending CN114493637A (en) 2022-01-29 2022-01-29 Block chain-based traditional Chinese medicine tracing method, equipment and medium

Country Status (1)

Country Link
CN (1) CN114493637A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109360000A (en) * 2018-08-28 2019-02-19 顺丰科技有限公司 A kind of system that commodity counterfeit prevention is traced to the source, method, equipment and storage medium
CN109886706A (en) * 2019-01-16 2019-06-14 杭州趣链科技有限公司 A kind of dendrobium candidum traceability system based on block chain
CN110264374A (en) * 2019-06-20 2019-09-20 浪潮卓数大数据产业发展有限公司 A kind of high quality agricultural products support method based on block chain
CN111008844A (en) * 2019-11-21 2020-04-14 山东爱城市网信息技术有限公司 Block chain-based drug tracing method, device and medium
CN111798253A (en) * 2020-07-09 2020-10-20 阳江市智慧农业科技开发有限公司 Agricultural product traceability system based on Internet of things and block chain
CN113077193A (en) * 2021-05-07 2021-07-06 重庆电子工程职业学院 Chinese medicinal material quality tracing system
CN113360501A (en) * 2021-06-04 2021-09-07 永旗(北京)科技有限公司 Block chain-based distributed data storage method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109360000A (en) * 2018-08-28 2019-02-19 顺丰科技有限公司 A kind of system that commodity counterfeit prevention is traced to the source, method, equipment and storage medium
CN109886706A (en) * 2019-01-16 2019-06-14 杭州趣链科技有限公司 A kind of dendrobium candidum traceability system based on block chain
CN110264374A (en) * 2019-06-20 2019-09-20 浪潮卓数大数据产业发展有限公司 A kind of high quality agricultural products support method based on block chain
CN111008844A (en) * 2019-11-21 2020-04-14 山东爱城市网信息技术有限公司 Block chain-based drug tracing method, device and medium
CN111798253A (en) * 2020-07-09 2020-10-20 阳江市智慧农业科技开发有限公司 Agricultural product traceability system based on Internet of things and block chain
CN113077193A (en) * 2021-05-07 2021-07-06 重庆电子工程职业学院 Chinese medicinal material quality tracing system
CN113360501A (en) * 2021-06-04 2021-09-07 永旗(北京)科技有限公司 Block chain-based distributed data storage method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
肖丽;谭星;谢鹏;田燕;温川飙;: "基于区块链技术的中药溯源体系研究", 时珍国医国药, no. 11, 20 November 2017 (2017-11-20) *
闫燕: "标识系统集成 帮助实现食品安全追溯", 食品安全导刊, 15 January 2009 (2009-01-15) *

Similar Documents

Publication Publication Date Title
CN111415170A (en) Block chain-based food tracing method and equipment and related storage medium
CN111047320A (en) Solar power transaction method, device and medium based on block chain
CN111144753A (en) Land use right circulation management method, device and medium based on block chain
CN116629805B (en) Water conservancy index service method, equipment and medium for distributed flow batch integration
CN111443894A (en) Random number generation method, device and medium based on block chain
CN111199350A (en) Block chain-based supervision and spot check method, equipment and medium
CN112036914A (en) Block chain-based edible agricultural product quality certificate management method, equipment and medium
CN115115417A (en) Public opinion-based commodity sales data prediction method, equipment and medium
CN111008404A (en) Service call auditing method, equipment and medium based on block chain
CN113726525A (en) Energy industry cloud network data tracing method and device
CN114493637A (en) Block chain-based traditional Chinese medicine tracing method, equipment and medium
CN117745307A (en) Block chain-based food supply chain multi-state change full-flow safety tracing method
CN111191007A (en) Article keyword filtering method and device based on block chain and medium
CN117749344A (en) Power data cross-domain supervision method, system and storage medium based on blockchain
CN111899096A (en) Method, device and medium for preventing block chain data expansion
CN111756803A (en) Server-side pushing method, equipment and medium based on block chain technology
CN111177093A (en) Method, device and medium for sharing scientific and technological resources
CN108121712A (en) A kind of keyword storage method and device
CN111091353A (en) Loving public interest management method, equipment and medium based on block chain
Sachin et al. Nuts and Bolts of ETL in Data Warehouse
CN112001690A (en) Intra-jurisdiction enterprise cooperation method, device and medium based on block chain
CN112579742A (en) Block chain-based enterprise message loss determination method, equipment and medium
CN114138787A (en) Bar code identification method, equipment and medium
CN110083437A (en) Handle the method and device of block chain affairs
WO2020192290A1 (en) Database migration method, apparatus, and device, and computer readable medium

Legal Events

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