CN112837077A - Method and system for tracing health codes of food - Google Patents
Method and system for tracing health codes of food Download PDFInfo
- Publication number
- CN112837077A CN112837077A CN202110211634.1A CN202110211634A CN112837077A CN 112837077 A CN112837077 A CN 112837077A CN 202110211634 A CN202110211634 A CN 202110211634A CN 112837077 A CN112837077 A CN 112837077A
- Authority
- CN
- China
- Prior art keywords
- tracing
- health
- product
- circulation
- 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.)
- Granted
Links
- 230000036541 health Effects 0.000 title claims abstract description 137
- 238000000034 method Methods 0.000 title claims abstract description 47
- 235000013305 food Nutrition 0.000 title claims abstract description 45
- 238000001514 detection method Methods 0.000 claims abstract description 30
- 238000004519 manufacturing process Methods 0.000 claims abstract description 30
- 238000012544 monitoring process Methods 0.000 claims abstract description 17
- 238000012545 processing Methods 0.000 claims description 16
- 230000008569 process Effects 0.000 claims description 12
- 230000003068 static effect Effects 0.000 claims description 12
- 230000002159 abnormal effect Effects 0.000 claims description 10
- 230000002457 bidirectional effect Effects 0.000 claims description 4
- 230000000694 effects Effects 0.000 claims description 3
- 230000003862 health status Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 14
- 230000007246 mechanism Effects 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 4
- 238000003860 storage Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000005802 health problem Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000002994 raw material Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
- 238000004383 yellowing Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Commerce
- G06Q30/018—Certifying business or products
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6209—Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Health & Medical Sciences (AREA)
- Accounting & Taxation (AREA)
- Data Mining & Analysis (AREA)
- Entrepreneurship & Innovation (AREA)
- Computing Systems (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 invention discloses a method and a system for tracing health codes of food, wherein the method comprises a tracing part and a collaborative monitoring part, and the collaborative monitoring step is parallel to the tracing process step; the tracing step comprises the steps of obtaining initialized tracing product information and an initialized product health code state, and further initializing the current tracing digital assets; acquiring digital asset circulation; acquiring terminal management and control of digital asset circulation, and canceling the circulation of a single tracing code; the cooperative supervision step comprises the steps of obtaining product cooperative quality feedback of the traced products; and automatically executing an intelligent contract according to the quality feedback condition, and controlling the feedback of the health state of the traced product. The system comprises a production module, a circulation module, a consumption module, a supervision module and a detection module. The invention can relieve the pressure of monitoring resource scarcity by maintaining the health status pool in multiple ways, and can prevent secondary damage caused by identifying the problem product in the first time under the condition that the problem product appears.
Description
Technical Field
The invention relates to the field of food safety and traceability application, in particular to a method and a system for tracing a health code of food.
Background
With the expansion of the production and consumption scale of Chinese food, the rapidly developed food industry can effectively relieve the problem of food shortage in China. However, in recent years, food safety events expose the accumulated and disadvantageous food safety supervision mechanism, and also bring importance to food safety problems in all social circles.
At present, aiming at the food safety problem, various scholars and enterprises put forward to establish a food traceability tracing platform for supervision. The current food tracing platform mode comprises the following steps: the system comprises an enterprise self-building platform, a government building platform and a third-party service platform. However, the tracing islands formed by the platforms independent of each other cannot form an effective tracing supervision under the condition of scarce supervision resources. Secondly, the food tracing code has double-flower risk and lacks credibility. Moreover, the current traceability platform can not prevent secondary damage caused by food with problems to be identified in the first time.
Disclosure of Invention
The method, the tracing method and the tracing system for the food tracing health code are used for realizing multi-party collaborative supervision of food tracing, preventing secondary damage of problem food and increasing the reliability of food tracing.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for tracing health codes of food comprises a tracing part and a cooperative monitoring part, wherein the cooperative monitoring process and the tracing process are parallel;
wherein,
the tracing step comprises the following steps:
acquiring the information of the initialized tracing product and the state of the initialized product health code, and further initializing the current tracing digital asset; acquiring digital asset circulation; acquiring terminal management and control of digital asset circulation, and canceling the circulation of a single tracing code;
the cooperative supervision step comprises:
obtaining product cooperation quality feedback of the traced product; and automatically executing an intelligent contract according to the quality feedback condition, and controlling the feedback of the health state of the traced product.
Further, the obtaining of the product cooperation quality feedback of the traced product specifically includes the following four parallel steps:
obtaining consumer feedback; acquiring feedback of a currency provider; obtaining feedback of a supervisor; obtaining feedback of a detector;
wherein,
obtaining identity information of a consumer needing to be verified and fed back by the consumer, and determining ownership of digital assets of the consumer;
acquiring feedback of a currency provider, detecting the identity of a service node through a CA (certificate Authority), and determining the ownership of the digital assets of the service node;
obtaining the feedback of the supervisor, detecting the identity by the service node through the CA, and verifying one of three conditions: 1) ownership of a digital asset in the same batch; 2) a message signed by a supervisor in association with a consumer or detector; 3) a signed message of a regulator's merchant with the digital asset owner;
and obtaining feedback of the detector, and the service node detects the identity through the CA and determines the ownership of the detection sample provided by the service node.
Further, the obtaining of the product cooperation quality feedback of the traced product further includes that the service node injects the feedback information into a feedback pool of the health code associated with the digital asset thereof after successfully checking the complaint information, and broadcasts the feedback information to other nodes of the block chain.
Further, the automatically executing the intelligent contract according to the quality feedback condition, and controlling the feedback of the health state of the tracing product specifically includes:
the intelligent contracts accumulate the health abnormal values of the batches in a weighted mode according to the unhealthy feedback of the feedback pool, and contract appoints three grade thresholds: respectively, supervision intervention, yellow code warning and red code stopping;
when the abnormal value exceeds the complaint threshold value, the intelligent contract automatically informs the supervision node according to the convention, and the node is detected; when the abnormal value is accumulated to the stop of the red code, the related digital assets can not be normally circulated and traded.
Furthermore, the intelligent contract provides a query interface to facilitate query of tracing product health, circulation and feedback conditions.
Further, the initializing the product health code state comprises:
building a static data block of the health code block; binding health codes to the traced digital assets in the same batch;
initializing a health code block state block;
the method specifically comprises the following steps: after obtaining the information of the traced product provided by the manufacturer, a service node in the block chain needs to request CA to check the validity of the traced product;
for the same batch of tracing products provided by legal manufacturers, checking whether the tracing codes are double-flower or not, for the batch with no double-flower problem of the tracing codes, carrying out hash operation on basic information of the service node to generate corresponding root hash, then forming a Merkle hash tree by the batch of root hash, generating a hash value of Merklerot and a hash value of a last static data block, a health code, a signature health code, a public key of a production enterprise, a current version number and a timestamp, and storing static data in a data block of the health code in an initialization mode;
then, binding the health codes to the data of each retroactive product block, wherein the binding pre-step needs to verify whether the Hash value of the basic information of the binding pre-step exists in a Merkle Hash tree of the health code block, and a service node in a block chain binds the Hash values of the health codes and the static data block of the current health code to the retroactive product block meeting the conditions, and initializes a circulation state and a circulation pool;
and finally, after the bidirectional binding is finished, the service node initializes the state block of the health code block, and after the steps are finished, the service node broadcasts the health code block and the traced product blocks of the batch, so that the digital asset takes effect formally.
Further, the acquiring the circulation of the digital assets specifically comprises,
after the service node of the block chain acquires the circulation request, checking information, checking the identity of a circulation provider, finally changing the owner of a traceable product, and broadcasting the information to each node;
for the circulation of large batches of digital assets, a circulation side client packs the large batches of digital assets through a batch processing program, carries out batch signature, and finally submits application to a block chain service cluster to finish ex-warehouse operation.
Further, the acquiring the circulation of the digital assets specifically comprises,
after the service node obtains the consumption request, modifying the owner of the traceable product, then canceling the liquidity of the digital assets, broadcasting information to each node, and in addition, for the digital assets with the lapsed life cycle, automatically canceling the liquidity of the digital assets by the intelligent contract;
and for the condition that the health code state is red and circulation is forbidden, the consumption module rejects the calling of the circulation request, and the service node rejects the service of the circulation and consumption requests.
On the other hand, the invention also discloses a system for tracing the health code of the food, which comprises the following units:
the system comprises a production module, a circulation module, a consumption module, a supervision module and a detection module;
the production module is used for managing the tracing codes, initializing the tracing product information and initializing the product health code state;
the circulation module is used for tracing asset circulation and product cooperation quality feedback when a product circulation task is executed;
the consumption module is used for controlling the tracing back end, and canceling the circulation and product quality feedback of a single tracing back code;
the monitoring party module is used for querying products in a multi-stage early warning state in the system by the monitoring party and processing and feeding back information of primary early warning;
and the detection party module is used for detecting and processing the internal circulation process of the system by the detection party and processing and detecting and feeding back the information of the secondary early warning.
Further, the method also comprises the following units:
the tracing code structure body is used for recording a tracing code, tracing key field information of a product, associating a health code and an owner of a current tracing asset;
and the health code structure body is used for recording the approved health codes, the tracing codes of the product groups and the health state data and state characteristics of the product groups.
According to the technical scheme, the method and the system for tracing the health codes of the food have the following beneficial effects:
the invention provides a method and a system for tracing and collaboratively supervising food health, which relieve the pressure of scarce supervision resources by maintaining a health state pool in multiple ways and can prevent secondary damage caused by identifying a problem product in the first time under the condition that the problem product appears. The repeated tracing codes can not appear in the distributed system in terms of probability, and the identity identification of the enterprise is bound through a signature mechanism, so that the trust crisis of the source tracing code distributed by the center is avoided, and the reliability of the tracing is enhanced.
Drawings
FIG. 1 is a schematic diagram of a food cooperative monitoring method provided by the present invention;
fig. 2 is a tracing flow diagram of the system of the present invention.
FIG. 3 is a block diagram of the present invention tracing back digital assets and health codes;
fig. 4 is a schematic diagram of a method for generating a food tracing code according to the present invention;
fig. 5 is a schematic diagram of the system of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention.
As shown in fig. 1 and fig. 2, the method for tracing the health code of the food according to the embodiment of the present invention is divided into a tracing part and a cooperative monitoring part, wherein the tracing part is a main part, and the cooperative monitoring step is parallel to the tracing process step;
wherein,
the tracing step comprises the following steps:
acquiring the information of the initialized tracing product and the state of the initialized product health code, and further initializing the current tracing digital asset; acquiring digital asset circulation; acquiring terminal management and control of digital asset circulation, and canceling the circulation of a single tracing code;
the cooperative supervision step comprises:
obtaining product cooperation quality feedback of the traced product; and automatically executing an intelligent contract according to the quality feedback condition, and controlling the feedback of the health state of the traced product.
The following is a detailed description:
wherein, the tracing part comprises the following steps:
s100, acquiring initialized tracing product information and an initialized product health code state, and further initializing the current tracing digital assets;
initializing a product health code state comprises building a static data block of a health code block; binding health codes to the traced digital assets in the same batch; a health code block status block is initialized. As shown in fig. 3, after obtaining the information of tracing the product provided by the manufacturer, the service node in the block chain needs to request the CA to check the validity of the product. And for the same batch of tracing products provided by legal producers, checking whether the tracing codes are double-flower or not. For a batch with no double-flower problem of the tracing code, a service node performs hash operation on basic information of the tracing code to generate corresponding root hash, then the batch root hash is combined into a Merkle hash tree to generate a hash value of a Merklerot and a hash value, a health code, a signature health code, a public key of a production enterprise, a current version number and a timestamp of a last static data block, and the static data stored in a data block of the health code is initialized.
And then binding the health codes to the data of each retroactive product block, wherein the binding pre-step needs to verify whether the Hash value of the basic information of the binding pre-step exists in a Merkle Hash tree of the health code block, and a service node in a block chain binds the Hash values of the health codes and the static data block of the current health code to the retroactive product block meeting the conditions, and initializes the circulation state and the circulation pool.
Finally, after the bidirectional binding is completed, the service node initializes the state block of the health code block, and particularly, only initialization of the green code of the health state is generated. After the step of appeasing is completed, the service node broadcasts the health code block and the batch tracing product block, and the digital assets take effect formally.
Note that fig. 4 is a main step of generating the trace back code by the production node, which is an asynchronous pre-step of S100 in the distributed system. The production node generates random seeds in a local machine, the seeds are injected and processed by an elliptic curve cryptography algorithm (SECP256K1) to generate a public key, then the tracing code before BASE58 coding is obtained through calculation of SHA256 and RIPEMD160Hash algorithms, and the digital signature is carried out by combining the private key of a producer to generate the signature tracing code. The production node injects the tracing code, the signature tracing code and the producer public key into a basic information block of the tracing product.
In another embodiment, a plurality of production workers work on the production line, and the production nodes select a group signature mode to carry out signature code production.
Further, the CA is directed to a production node to issue a prefix code of the health code, the production node derives a complete health code according to the prefix code, and the health code is signed in the same way to generate a signed health code. And after the production node finishes the complaint step, the production node submits the information to the service cluster of the block chain for processing.
S200, acquiring digital asset circulation;
further, after the service node of the block chain acquires the circulation request, the service node checks the information, checks the identity of the circulation provider, changes the owner of the traceable product, and broadcasts the information to each node.
Particularly, for the circulation of a large number of digital assets, the client of the circulation party packs the large number of digital assets through a batch processing program, carries out batch signature, and finally submits an application to the block chain service cluster to finish the ex-warehouse operation.
In another embodiment, the merchant can perform the above batch processing by using a trusted PDA handheld code scanning device or a pipeline code scanning device. In particular, the CA will mount the device information of the related trusted device provided by the currency provider under its role attributes.
And S300, acquiring the control of the tail end, and canceling the circulation of the single tracing code.
Furthermore, after acquiring the consumption request, the service node modifies the owner of the traceable product, then cancels the liquidity of the digital assets, and broadcasts information to each node. In addition, the intelligent contract automatically deregisters the digital assets that the lifecycle has elapsed.
Particularly, for the situation that the health code state is red and circulation is forbidden, the consumption module rejects the calling of the circulation request, and the service node rejects the service of the circulation and consumption requests.
The cooperative monitoring part is a parallel step in the tracing process, and specifically comprises the following steps:
t100, obtaining product cooperation quality feedback of the traced product;
processing of four parallel steps in the step: obtaining consumer feedback; acquiring feedback of a currency provider; obtaining feedback of a supervisor; and obtaining the feedback of the detector.
(1) Obtaining consumer feedback requires verifying the identity of the consumer and determining ownership of its digital assets.
(2) And acquiring feedback of the negotiable instrument, and detecting the identity of the service node through the CA to determine the ownership of the digital assets of the service node.
(3) Obtaining the feedback of the supervisor, detecting the identity by the service node through the CA, and verifying one of three conditions: 1) ownership of a digital asset in the same batch; 2) a message signed by a supervisor in association with a consumer or detector; 3) the regulator signs the message with the streamers of the digital asset owners.
(4) And obtaining feedback of the detector, and the service node detects the identity through the CA and determines the ownership of the detection sample provided by the service node.
After the service node successfully checks the complaint information, the service node injects the feedback information into a feedback pool of health codes associated with the digital assets of the service node and broadcasts the feedback information to other nodes of the block chain.
And T200, automatically executing an intelligent contract according to the quality feedback condition, and controlling the feedback of the health state of the traced product.
Furthermore, the intelligent contract weights and accumulates the abnormal health values of the batches according to the unhealthy feedback of the feedback pool. Contracts contract three level thresholds: respectively, supervision intervention, yellow code warning and red code stopping. When the abnormal value exceeds the complaint threshold value, the intelligent contract automatically informs the supervision node according to the convention, and the node is detected; in particular, when the abnormal value is added to the red code, the related digital assets can not normally circulate for trading.
In particular, contracts provide a query interface to facilitate queries for traceability of product health, circulation, and feedback.
In summary, the method for tracing the health code for the food according to the embodiment is mainly implemented based on the block chain technology and the intelligent contract technology;
meanwhile, the invention also discloses a system for tracing the health code of the food, and fig. 5 is a schematic diagram of the architecture of the method for tracing the health code of the food provided by the embodiment of the invention, and the system can comprise: the system comprises a production module, a circulation module, a consumption module, a supervision module and a detection module.
The production module is used for managing the tracing codes, initializing the tracing product information and initializing the product health code state;
the circulation module is used for tracing asset circulation and product cooperation quality feedback when a product circulation task is executed;
the consumption module is used for controlling the tracing back end, and canceling the circulation and product quality feedback of a single tracing back code;
the monitoring party module is used for querying products in a multi-stage early warning state in the system by the monitoring party and processing and feeding back information of primary early warning;
and the detection party module is used for detecting and processing the internal circulation process of the system by the detection party and processing and detecting and feeding back the information of the secondary early warning.
The following is a detailed description:
the system further comprises:
and the tracing code structure body is used for recording the tracing code, the key field information of the tracing product, the associated health code and the owner of the current tracing asset.
And the health code structure body is used for recording the approved health codes, the tracing codes of the product groups and the health state data and state characteristics of the product groups.
The tracing code structure body further comprises that the module can be initialized only by the production module, and is cancelled and circulated by the consumption module. Fig. 3 is a main description of the producer generating the tracing code, where an admitted producer generates a random seed in a local machine, the seed is injected into a public-private key generator to generate a tracing initial code, and a digital signature of the producer is combined to generate a final tracing code. The generation of the tracing code is automatically generated by each node of the producer instead of centralized distribution.
Optionally, if there are multiple manufacturers with reference to fig. 4, the digital signature may be generated in a manner of selecting a group signature.
The system of (a), wherein the health code structure further comprises: the module can be initialized only by a production module authorized by health, the health state only has four health grade states of green code health passing, supervision intervention, yellow code warning and red code stopping circulation. The health state is maintained by the circulation module, the consumption module, the supervision module and the detection module.
In the system, after the tracing code and the health code are initialized, the tracing code and the health code are in a two-way binding state. In particular, the health code is in a one-to-many relationship with the traceback code and cannot be altered after initialization.
The working principle of the system, as shown in fig. 2, is a food safety tracing flow chart provided by the embodiment of the invention, and a manufacturer can call an intelligent contract to initialize a health code to a green code at a stage of generating a tracing code at the initial stage of production on the premise of obtaining a health certificate; the manufacturer can transfer the produced tracing product assets to other circulation manufacturers by calling the circulation module.
When the health code state of the traceability product is in a non-red code state or is not consumed by the terminal, the circulation module can be allowed to circulate the traceability assets under the current role. Otherwise, stopping the corresponding tracing asset circulation.
The consumer can check the health state of the traceable product through the code scanning, and when the health code state of the traceable product is not in a red code or is not consumed by the terminal, the consumption module can purchase the traceable asset and eliminate the liquidity of the traceable asset. The consumer has problems in using the product, and the non-health case can be fed back through the consumption module.
The health status pool shown in fig. 2 is maintained for the health status of a single batch of products, wherein relevant role discovery and feedback problems in the traceability process are accumulated in the status pool.
When the warning state reaches a supervision threshold value, the intelligent contract automatically informs a supervision department of intervention, and if the supervision department confirms that a health problem is fed back through the supervision module after checking the condition, the health code automatically turns yellow and enters a detection department for intervention;
when the warning state reaches a detection threshold value, the intelligent contract automatically informs the detection mechanism to intervene, the detection mechanism feeds back the situation through the detection module according to the detection result, if the food safety problem exists, the health code automatically turns red, and the product cannot be circulated;
when the unhealthy state feedback of the consumed products by the consumption module is accumulated to a danger threshold, the intelligent contract automatically turns red, and the products in the same batch cannot circulate in the system.
For a secondary process manufacturer, the operation module comprises: production module, circulation module, consumption module. In particular, the consumption module is used to consume products of upstream raw material providers.
For the detection mechanism, the operation module comprises: a detection module and a consumption module. In particular, the consumption module is used for a sample detection process. In particular, the consuming module includes, but is not limited to, obtaining from the consumer or obtaining from the marketplace when the code turns red.
For a manufacturer, if the number of abnormal health code states exceeds a threshold, the manufacturer cannot call a production module to produce, and the system automatically notifies a supervision department to intervene.
Specifically, the system for collaborative supervision of food health of the present invention has the following specific implementation processes:
a, a production module firstly generates a health code at the initial stage of production on the premise of acquiring a health certificate, binds the health code by using the tracing code of the same batch, then binds the tracing code by using the health code to complete bidirectional binding, and finally initializes the health code state as a green code;
and B, when the health code state of the traceability product is in a non-red code state or is not consumed by the terminal, the circulation module can be allowed to circulate the traceability assets under the current role. Otherwise, stopping the corresponding tracing asset circulation. Wherein the digital asset transfer can be traced only when a signature is needed in the circulation process;
and C, when the health code state of the traceability product is in a non-red code state or is not consumed by the terminal, the consumption module can purchase the traceability asset and eliminate the liquidity of the traceability asset. If a product has a problem, the consumption module can feed back the unhealthy case.
And D, automatically informing a supervision department of intervention by the intelligent contract, and entering the detection department of the step E to intervene if the supervision department confirms that the health problem is fed back through the supervision module after checking the condition.
E, automatically yellowing the health code, automatically informing a detection mechanism of intervention by an intelligent contract, feeding back the condition by the detection mechanism through a detection module according to the detection result of the detection mechanism, and if the food safety problem exists, F;
step B, when the unhealthy state of the consumed product is accumulated to a danger threshold value, the intelligent contract automatically turns red, products in the same batch cannot circulate in the system, and related products are frozen;
in particular, the circulation module also has feedback rights. And (4) entering the step D when the unhealthy state of the product is accumulated to a supervision intervention threshold, entering the step E when the unhealthy state of the consumer product is accumulated to a detection threshold, and entering the step F when the unhealthy state of the consumer product is accumulated to a danger threshold.
In particular, the accumulation of unhealthy states and state changes of consumer products are cooperatively supervised by multiple parties invoking intelligent contracts.
In summary, the invention provides a method and a system for tracing and collaboratively supervising food health, which can relieve the pressure of scarce supervision resources by maintaining a health state pool in multiple ways, and can prevent secondary damage caused by the identification of a problem product in the first time under the condition that the problem product appears. The repeated tracing codes can not appear in the distributed system in terms of probability, and the identity identification of the enterprise is bound through a signature mechanism, so that the trust crisis of the source tracing code distributed by the center is avoided, and the reliability of the tracing is enhanced.
It is understood that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and the explanation, the example and the beneficial effects of the related contents can refer to the corresponding parts in the method.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. 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.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for tracing health codes of food comprises a tracing part and is characterized in that: the system also comprises a cooperative monitoring part, wherein the cooperative monitoring process is parallel to the tracing process;
wherein,
the tracing step comprises the following steps:
acquiring the information of the initialized tracing product and the state of the initialized product health code, and further initializing the current tracing digital asset; acquiring digital asset circulation; acquiring terminal management and control of digital asset circulation, and canceling the circulation of a single tracing code;
the cooperative supervision step comprises:
obtaining product cooperation quality feedback of the traced product; and automatically executing an intelligent contract according to the quality feedback condition, and controlling the feedback of the health state of the traced product.
2. The method for food traceability of health codes as claimed in claim 1, wherein: the method for obtaining the product cooperation quality feedback of the traced product specifically comprises the following four parallel steps:
obtaining consumer feedback; acquiring feedback of a currency provider; obtaining feedback of a supervisor; obtaining feedback of a detector;
wherein,
obtaining identity information of a consumer needing to be verified and fed back by the consumer, and determining ownership of digital assets of the consumer;
acquiring feedback of a currency provider, detecting the identity of a service node through a CA (certificate Authority), and determining the ownership of the digital assets of the service node;
obtaining the feedback of the supervisor, detecting the identity by the service node through the CA, and verifying one of three conditions: 1) ownership of a digital asset in the same batch; 2) a message signed by a supervisor in association with a consumer or detector; 3) a signed message of a regulator's merchant with the digital asset owner;
and obtaining feedback of the detector, and the service node detects the identity through the CA and determines the ownership of the detection sample provided by the service node.
3. The method for food traceability health codes as claimed in claim 2, wherein: the method for obtaining the product cooperation quality feedback of the traced product further comprises the step that after the service node successfully checks the complaint information, the service node injects the feedback information into a feedback pool of the health code associated with the digital asset and broadcasts the feedback information to other nodes of the block chain.
4. The method for food traceability of health codes as claimed in claim 1, wherein: the automatic execution of the intelligent contract according to the quality feedback condition and the control of the feedback of the health state of the tracing product specifically comprise the following steps:
the intelligent contracts accumulate the health abnormal values of the batches in a weighted mode according to the unhealthy feedback of the feedback pool, and contract appoints three grade thresholds: respectively, supervision intervention, yellow code warning and red code stopping;
when the abnormal value exceeds the complaint threshold value, the intelligent contract automatically informs the supervision node according to the convention, and the node is detected; when the abnormal value is accumulated to the stop of the red code, the related digital assets can not be normally circulated and traded.
5. The method for food traceability health codes as claimed in claim 4, wherein: the intelligent contract provides a query interface to facilitate query of tracing product health, circulation and feedback conditions.
6. The method for food traceability of health codes as claimed in claim 1, wherein: the initializing product health code states comprises:
building a static data block of the health code block; binding health codes to the traced digital assets in the same batch; initializing a health code block state block;
the method specifically comprises the following steps: after obtaining the information of the traced product provided by the manufacturer, a service node in the block chain needs to request CA to check the validity of the traced product;
for the same batch of tracing products provided by legal manufacturers, checking whether the tracing codes are double-flower or not, for the batch with no double-flower problem of the tracing codes, carrying out hash operation on basic information of the service node to generate corresponding root hash, then forming a Merkle hash tree by the batch of root hash, generating a hash value of Merklerot and a hash value of a last static data block, a health code, a signature health code, a public key of a production enterprise, a current version number and a timestamp, and storing static data in a data block of the health code in an initialization mode;
then, binding the health codes to the data of each retroactive product block, wherein the binding pre-step needs to verify whether the Hash value of the basic information of the binding pre-step exists in a Merkle Hash tree of the health code block, and a service node in a block chain binds the Hash values of the health codes and the static data block of the current health code to the retroactive product block meeting the conditions, and initializes a circulation state and a circulation pool;
and finally, after the bidirectional binding is finished, the service node initializes the state block of the health code block, and after the steps are finished, the service node broadcasts the health code block and the traced product blocks of the batch, so that the digital asset takes effect formally.
7. The method for food traceability health codes of claim 6, wherein: the acquiring the circulation of the digital assets specifically includes,
after the service node of the block chain acquires the circulation request, checking information, checking the identity of a circulation provider, finally changing the owner of a traceable product, and broadcasting the information to each node;
for the circulation of large batches of digital assets, a circulation side client packs the large batches of digital assets through a batch processing program, carries out batch signature, and finally submits application to a block chain service cluster to finish ex-warehouse operation.
8. The method for food traceability of health codes as claimed in claim 1, wherein: the acquiring digital asset circulation specifically comprises:
after the service node obtains the consumption request, modifying the owner of the traceable product, then canceling the liquidity of the digital assets, broadcasting information to each node, and in addition, for the digital assets with the lapsed life cycle, automatically canceling the liquidity of the digital assets by the intelligent contract;
and for the condition that the health code state is red and circulation is forbidden, the consumption module rejects the calling of the circulation request, and the service node rejects the service of the circulation and consumption requests.
9. A system for tracing health codes of food is characterized by comprising the following units:
the system comprises a production module, a circulation module, a consumption module, a supervision module and a detection module;
the production module is used for managing the tracing codes, initializing the tracing product information and initializing the product health code state;
the circulation module is used for tracing asset circulation and product cooperation quality feedback when a product circulation task is executed;
the consumption module is used for controlling the tracing back end, and canceling the circulation and product quality feedback of a single tracing back code;
the monitoring party module is used for querying products in a multi-stage early warning state in the system by the monitoring party and processing and feeding back information of primary early warning;
and the detection party module is used for detecting and processing the internal circulation process of the system by the detection party and processing and detecting and feeding back the information of the secondary early warning.
10. The system for food product traceability of health codes as claimed in claim 9, further comprising the following units:
the tracing code structure body is used for recording a tracing code, tracing key field information of a product, associating a health code and an owner of a current tracing asset;
and the health code structure body is used for recording the approved health codes, the tracing codes of the product groups and the health state data and state characteristics of the product groups.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110211634.1A CN112837077B (en) | 2021-02-25 | 2021-02-25 | Method and system for tracing health codes by food |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110211634.1A CN112837077B (en) | 2021-02-25 | 2021-02-25 | Method and system for tracing health codes by food |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112837077A true CN112837077A (en) | 2021-05-25 |
CN112837077B CN112837077B (en) | 2024-07-12 |
Family
ID=75933533
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110211634.1A Active CN112837077B (en) | 2021-02-25 | 2021-02-25 | Method and system for tracing health codes by food |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112837077B (en) |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104636934A (en) * | 2015-02-14 | 2015-05-20 | 中国科学院合肥物质科学研究院 | Whole-course quality tracing and anti-counterfeiting system for seeds |
CN109034833A (en) * | 2018-06-16 | 2018-12-18 | 复旦大学 | A kind of product back-tracing information management system and method based on block chain |
CN109872019A (en) * | 2017-12-05 | 2019-06-11 | 航天信息股份有限公司 | Agricultural product quality and safety retroactive method and system |
CN110991961A (en) * | 2019-11-29 | 2020-04-10 | 腾讯科技(深圳)有限公司 | Block chain-based article inspection method, device, equipment and readable storage medium |
CN111080213A (en) * | 2020-01-02 | 2020-04-28 | 航天信息股份有限公司 | Container grain sealing inspection coding block chain data acquisition method and system |
US20200135305A1 (en) * | 2018-10-24 | 2020-04-30 | Conéctate Soluciones Y Aplicaciones Sl | Procedure for unified global registry and universal identification of products of biological origin for medicinal purposes |
CN111275449A (en) * | 2018-11-16 | 2020-06-12 | 顺丰科技有限公司 | Commodity tracing method and system |
CN111429162A (en) * | 2020-04-16 | 2020-07-17 | 汪金小 | Energized block chain agricultural product quality credible traceability system based on nondestructive detection technology |
CN111582887A (en) * | 2020-05-09 | 2020-08-25 | 苏州惠贝电子科技有限公司 | Product traceability management system and method based on block chain |
CN111931199A (en) * | 2020-06-24 | 2020-11-13 | 山东浪潮质量链科技有限公司 | Health authentication method, equipment and medium based on block chain and dynamic code |
CN111930497A (en) * | 2020-06-24 | 2020-11-13 | 山东浪潮质量链科技有限公司 | Resource allocation method, device and medium based on block chain and static code |
US20210035217A1 (en) * | 2018-02-08 | 2021-02-04 | 2Bc Innovations, Llc | Updating blockchain-encoded records of rived longevity-contingent instruments |
-
2021
- 2021-02-25 CN CN202110211634.1A patent/CN112837077B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104636934A (en) * | 2015-02-14 | 2015-05-20 | 中国科学院合肥物质科学研究院 | Whole-course quality tracing and anti-counterfeiting system for seeds |
CN109872019A (en) * | 2017-12-05 | 2019-06-11 | 航天信息股份有限公司 | Agricultural product quality and safety retroactive method and system |
US20210035217A1 (en) * | 2018-02-08 | 2021-02-04 | 2Bc Innovations, Llc | Updating blockchain-encoded records of rived longevity-contingent instruments |
CN109034833A (en) * | 2018-06-16 | 2018-12-18 | 复旦大学 | A kind of product back-tracing information management system and method based on block chain |
US20200135305A1 (en) * | 2018-10-24 | 2020-04-30 | Conéctate Soluciones Y Aplicaciones Sl | Procedure for unified global registry and universal identification of products of biological origin for medicinal purposes |
CN111275449A (en) * | 2018-11-16 | 2020-06-12 | 顺丰科技有限公司 | Commodity tracing method and system |
CN110991961A (en) * | 2019-11-29 | 2020-04-10 | 腾讯科技(深圳)有限公司 | Block chain-based article inspection method, device, equipment and readable storage medium |
CN111080213A (en) * | 2020-01-02 | 2020-04-28 | 航天信息股份有限公司 | Container grain sealing inspection coding block chain data acquisition method and system |
CN111429162A (en) * | 2020-04-16 | 2020-07-17 | 汪金小 | Energized block chain agricultural product quality credible traceability system based on nondestructive detection technology |
CN111582887A (en) * | 2020-05-09 | 2020-08-25 | 苏州惠贝电子科技有限公司 | Product traceability management system and method based on block chain |
CN111931199A (en) * | 2020-06-24 | 2020-11-13 | 山东浪潮质量链科技有限公司 | Health authentication method, equipment and medium based on block chain and dynamic code |
CN111930497A (en) * | 2020-06-24 | 2020-11-13 | 山东浪潮质量链科技有限公司 | Resource allocation method, device and medium based on block chain and static code |
Non-Patent Citations (1)
Title |
---|
KAY BEHNKE: "boundary condition for tracebility in food supply chains using blockchain technology", 《INTERNATIONAL JOURNAL OF INFORMATION MANAGEMENT》, pages 1 - 10 * |
Also Published As
Publication number | Publication date |
---|---|
CN112837077B (en) | 2024-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111898148B (en) | Information supervision method and device based on blockchain | |
CN108805656B (en) | Supply and demand matching method, platform, system and computer readable storage medium | |
US20190303541A1 (en) | Auditing smart contracts configured to manage and document software audits | |
US20190306173A1 (en) | Alert smart contracts configured to manage and respond to alerts related to code | |
CN109636592B (en) | High performance intelligent contract design | |
CN111010282B (en) | Block chain-based information processing method, related device and storage medium | |
CN103294558A (en) | MapReduce scheduling method supporting dynamic trust evaluation | |
CN110704464B (en) | Method and device for processing bifurcation problem | |
US10514905B1 (en) | System and method of remediating and redeploying out of compliance applications and cloud services | |
CN111612415B (en) | Project management method and device | |
CN105512188A (en) | Data connection method and data connection system | |
WO2021227867A1 (en) | Method and system for forming decentralized distributed database, electronic device, and computer readable storage medium | |
CN112037055B (en) | Transaction processing method, device, electronic equipment and readable storage medium | |
CN112837077A (en) | Method and system for tracing health codes of food | |
WO2024055740A1 (en) | Data processing method, computer device, and readable storage medium | |
CN113364806B (en) | Service interface migration verification method and device | |
CN116071160A (en) | Block chain-based transaction implementation method, device and computer readable medium | |
CN113364874B (en) | Node synchronization method and device based on block chain, storage medium and server | |
CN114491662A (en) | Block chain-based data asset auditing method, system and equipment | |
CN112837060A (en) | Payment business processing method for block chain security protection and digital financial platform | |
CN111738855A (en) | Intelligent contract management method and device | |
CN114693449B (en) | Processing method, device and storage medium for transaction request based on blockchain | |
CN117539644B (en) | Block chain transaction query method, system and storage medium based on service chain | |
US11956368B2 (en) | Enhanced method for a useful blockchain consensus | |
EP4163846A1 (en) | Storing object data in a blockchain |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |