CN118134508A - Product tracing method and system based on consensus mechanism - Google Patents

Product tracing method and system based on consensus mechanism Download PDF

Info

Publication number
CN118134508A
CN118134508A CN202410263427.4A CN202410263427A CN118134508A CN 118134508 A CN118134508 A CN 118134508A CN 202410263427 A CN202410263427 A CN 202410263427A CN 118134508 A CN118134508 A CN 118134508A
Authority
CN
China
Prior art keywords
information
target product
storage
supply chain
product information
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
CN202410263427.4A
Other languages
Chinese (zh)
Inventor
兰春嘉
林乐
徐兵
张海军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Lingshuzhonghe Information Technology Co ltd
Original Assignee
Shanghai Lingshuzhonghe Information Technology 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 Shanghai Lingshuzhonghe Information Technology Co ltd filed Critical Shanghai Lingshuzhonghe Information Technology Co ltd
Priority to CN202410263427.4A priority Critical patent/CN118134508A/en
Publication of CN118134508A publication Critical patent/CN118134508A/en
Pending legal-status Critical Current

Links

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Accounting & Taxation (AREA)
  • Computing Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a product tracing method and a system based on a consensus mechanism, which relate to the technical field of block chains, and the method comprises the following steps: extracting a plurality of key nodes in the whole process of processing the target product; setting an information storage node and a storage information type; establishing a supply chain network; storing the target product information to a supply chain network, and verifying the target product information; when the verification result of the target product information is not passed, carrying out abnormal identification of the first node, and determining an abnormal identification result; and carrying out accurate tracing on the target product according to the abnormal identification result, and carrying out abnormal correction on the whole process of processing the target product through the tracing result. The technical problems that data existing in a centralized database and paper records are easy to tamper, information is opaque and real-time tracing is difficult to carry out are solved, the possibility of tampering of the data is reduced, and the technical effects of transparency and real-time product tracing are achieved.

Description

Product tracing method and system based on consensus mechanism
Technical Field
The application relates to the technical field of blockchain, in particular to a product tracing method and system based on a consensus mechanism.
Background
As globalization and complexity of the supply chain increase, ensuring the source, circulation process and quality of the product becomes critical. Both consumers and businesses need to be able to track the complete process flow of a product in order to be able to quickly locate and resolve quality or safety issues. Traditional product tracing methods often rely on centralized databases or paper records, which increase the risk of data tampering or record loss. At the same time, these methods have difficulty providing real-time, transparent traceability information, making it difficult for businesses and consumers to trust the data they provide.
In the related art at the present stage, the centralized database and the paper record have the technical problems that the data is easy to tamper, the information is opaque, and real-time tracing is difficult to carry out.
Disclosure of Invention
The application provides the product tracing method and system based on the consensus mechanism, adopts technical means such as the consensus mechanism of the block chain, and the like, thereby achieving the technical effects of reducing the possibility of data tampering and realizing transparent and real-time product tracing.
The application provides a product tracing method based on a consensus mechanism, which comprises the following steps:
extracting a plurality of key nodes in the whole process of processing the target product;
setting an information storage node and a storage information type based on the plurality of key nodes;
Establishing a supply chain network based on the information storage node and the stored information type;
storing target product information to the supply chain network, and verifying the target product information;
when the verification result of the target product information is that the target product information does not pass, carrying out abnormal identification of the first node, and determining an abnormal identification result;
And carrying out accurate tracing on the target product according to the abnormal identification result, and carrying out abnormal correction on the whole process of processing the target product through the tracing result.
In a possible implementation manner, a plurality of key nodes in the whole process of processing the target product are extracted, and the following processing is performed:
a product processing record log is called, and associated influence information is generated according to the associated influence factors;
Traversing the association influence information to sequentially match with target product processing nodes in the whole target product processing flow, and determining a node matching result;
and marking in the whole process of processing the target product according to the node matching result, and generating the plurality of key nodes.
In a possible implementation manner, based on the plurality of key nodes, setting information storage nodes and storage information types, the following processes are performed:
screening a plurality of trusted storage nodes according to the stability of the plurality of key nodes;
Adding the plurality of trusted storage nodes to the information storage node;
analyzing a data structure of the target storage data based on synchronicity among the plurality of trusted storage nodes;
And analyzing the stored information according to the data structure, and determining the type of the stored information.
In a possible implementation, the following processes are performed by establishing a supply chain network based on the information storage node and the stored information type:
determining a supply chain information type according to the storage information type;
deploying the information storage nodes according to the supply chain information types through a block chain technology;
and carrying out iterative verification on target storage information in the information storage node through a consensus mechanism, and completing establishment of the supply chain network when a verification result tends to be converged.
In a possible implementation, target product information is stored to the supply chain network, the target product information is verified, and the following processing is performed:
The target product information comprises first target product information and second target product information … (N) target product information, wherein the number of N is equal to the number of blocks in the supply chain network, and N is an integer greater than 2;
before the second target product information is stored in a second block in the supply chain network, verifying whether the first target product information in a first block meets a preset storage condition, wherein the first block is a previous adjacent block of the second block, and the first target product information is different from the second target product information.
In a possible implementation, the following process is performed:
When the verification result of the target product information is that the target product information passes, the first target product information in the first block is considered to accord with a preset storage condition;
And storing the second target product information into the second block in the supply chain network according to an information storage flow, wherein the second block and the second target product information have a corresponding relation.
In a possible implementation, the following process is performed:
when the verification result of the target product information is that the target product information does not pass, the first target product information in the first block is regarded as not meeting a preset storage condition;
traversing the first block to perform abnormality screening of the data stored in the first node, and generating an abnormality screening result;
Demarcating an abnormal grade according to the abnormal screening result, and carrying out abnormal identification based on the abnormal grade to generate an abnormal identification result;
Judging whether the target product information is subjected to information storage operation in the supply chain network according to the abnormal identification result;
If not, outputting the abnormal identification result to trace the source of the product.
The application also provides a product tracing system based on the consensus mechanism, which comprises:
the key node extraction module is used for extracting a plurality of key nodes in the whole process of processing the target product;
the storage node and type setting module is used for setting information storage nodes and storage information types based on the plurality of key nodes;
A supply chain network establishment module for establishing a supply chain network based on the information storage node and the stored information type;
The storage verification module is used for storing target product information to the supply chain network and verifying the target product information;
The verification result processing module is used for carrying out abnormal identification of the first node when the verification result of the target product information is not passed, and determining an abnormal identification result;
and the product tracing module is used for precisely tracing the target product according to the abnormal identification result and carrying out the abnormal correction of the whole process of processing the target product through the tracing result.
The application also provides an electronic device, comprising:
A memory for storing executable instructions;
and the processor is used for realizing a product tracing method based on a consensus mechanism when executing the executable instructions stored in the memory.
The present application also provides a computer-readable storage medium comprising:
and a computer program is stored thereon, which when executed by the processor implements a product tracing method based on a consensus mechanism.
The product tracing method and system based on the consensus mechanism firstly identify key nodes in the product processing process, then set information storage positions and types based on the nodes, and establish a supply chain network. The information is stored in the supply chain network and verified. If the information verification is not passed, the abnormal identification is carried out, the product is accurately traced according to the identification result, and finally the abnormal correction of the whole product processing flow is carried out, so that the possibility of data tampering is reduced, and the transparent and real-time product tracing technical effect is realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly describe the drawings of the embodiments of the present disclosure, in which flowcharts are used to illustrate operations performed by a system according to embodiments of the present disclosure. It should be understood that the preceding or following operations are not necessarily performed in order precisely. Rather, the various steps may be processed in reverse order or simultaneously, as desired. Also, other operations may be added to or removed from these processes.
Fig. 1 is a schematic flow chart of a product tracing method based on a consensus mechanism according to an embodiment of the present application;
Fig. 2 is a flowchart of a method for performing anomaly screening on a first node according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a product tracing system based on a consensus mechanism according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict, the term "first\second" being referred to merely as distinguishing between similar objects and not representing a particular ordering for the objects. The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements that are expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or modules that may not be expressly listed or inherent to such process, method, article, or apparatus, and unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for the purpose of describing embodiments of the application only.
The embodiment of the application provides a product tracing method based on a consensus mechanism, as shown in fig. 1, the method comprises the following steps:
Step S100, extracting a plurality of key nodes in the whole process of processing the target product. The target product refers to a specific product or a product set which needs to be traced and managed in a whole process, and key nodes in the target product are identified by analyzing the processing flow (the production process, the technological process, the related raw materials, the production equipment, the quality inspection links and the like) of the target product, wherein the key nodes are key links affecting the quality, the safety performance or the management of a supply chain, such as links of quality inspection, logistics distribution, batch numbers, production dates, raw material warehouse entry and the like of the product.
In one possible implementation, step S100 further includes step S110 of retrieving a product processing log and generating associated influence information according to the associated influence factor. The product processing log is data obtained from the record of product processing, including production log, quality inspection log, equipment running log, etc., the product processing log is extracted from the database, and the data in the log is analyzed to identify relevant influence factors related to product quality, performance, safety, etc., including raw material quality, processing parameters (such as temperature, pressure, time, etc.), equipment state, environmental condition, etc. Based on the determined association influence factors, data in the log is processed and analyzed by adopting methods such as data mining, statistical analysis and the like, and data patterns and trends related to the association influence factors are identified and extracted to generate association influence information. And step S120 is executed according to the association influence information, the association influence information is traversed to be sequentially matched with the target product processing nodes in the whole target product processing flow, and a node matching result is determined. That is, the relevant influence information generated in step S110 is checked one by one, the relevant influence information is compared with each node in the product processing flow, the matched nodes are found, the threshold is set according to the magnitude of the relevant influence degree, the nodes meeting the threshold requirement are matched, the nodes are key nodes, step S130 is executed according to the node matching result, the identification is carried out in the whole target product processing flow according to the node matching result, and the plurality of key nodes are generated. The key nodes are identified for providing basis for subsequent tracking and management. Step S110 and step S120 are used for generating associated influence information according to the associated influence factors by retrieving the product processing record logs, identifying nodes closely related to product quality, performance, safety and the like through traversal matching, determining the nodes as key nodes, and achieving the technical effect of accurately identifying the key nodes.
After determining the key nodes of the whole process of processing the target product, step S200 is executed, and the information storage nodes and the storage information types are set based on the plurality of key nodes. First, for each key node, a respective information storage node is determined, which may be a physical location, a database, a file system, etc., depending on the storage technology and architecture selected. Then, according to the characteristics of the target product, the requirements of the processing flow, the regulation requirements and the like, it is determined which information needs to be stored on each key node, for example, on the key node of the production date, the information of specific time of production, production batch and the like needs to be stored. For each information storage node, according to the type of information to be stored, the required storage information type is designed and defined, and the storage information type comprises structured data, unstructured data, real-time data and the like.
In a possible implementation, step S200 further includes step S210 of screening the plurality of trusted storage nodes according to the stability of the plurality of critical nodes. And (3) performing stability evaluation on each key node by monitoring performance indexes (such as availability, response time, data consistency and the like) of the nodes, screening according to evaluation results, wherein screening standards comprise node performance, data reliability and the like, and determining a trusted storage node based on screening results, wherein the trusted storage node is a node with higher stability. Based on the determined plurality of trusted storage nodes, step S220 is performed to add the plurality of trusted storage nodes to the information storage node. I.e. a trusted storage node is taken as the information storage node. Step S230 is next performed to analyze the data structure of the target storage data based on the synchronicity between the plurality of trusted storage nodes. In order to ensure the consistency and the integrity of the data, the data synchronization condition among the trusted storage nodes is monitored, the data structure of the target storage data is analyzed according to the synchronization monitoring result, the organization form, the field definition, the relation and the like of the data are identified, and the structural mode of the data is determined based on the analysis result. And executing step S240 according to the determined data structure, analyzing the storage information according to the data structure, and determining the storage information type. The analysis of the data structure of the information to be stored includes determining the components of the data and the association between the components, and by analyzing the data structure, determining the components of the fields, records, entities, etc. contained in the data and the relationship between them, for example, in the supply chain management, the information includes data in terms of suppliers, products, orders, logistics, etc., and complex association exists between these data. After determining the components and association of the data, the type of stored information is further determined, and suitable storage modes and tools are determined according to the characteristics of the data structure, for example: if the information is structured, i.e. the data has explicit field definitions and relational patterns, a relational database, such as MySQL, oracle (Oracle) etc., can be selected for storage, which can provide efficient data retrieval, complex query functions and powerful data integrity support; for semi-structured or unstructured information, such as text, pictures, audio, video, etc., a document database, such as a MongoDB (Mongo database), or a distributed file system, such as a Hadoop distributed file system HDFS (Hadoop Distributed FILE SYSTEM), etc., may be selected for storage, in a manner suitable for storage and access of large amounts of unstructured data, and capable of providing flexible data querying and processing capabilities. The step S210 and the step S220 select the node with higher stability as the information storage node by monitoring the performance index of the node, thereby achieving the technical effect of ensuring the stability and the reliability of data storage, and the step S230 and the step S240 determine the type of the stored information by analyzing the data structure, thereby avoiding the problem of mismatching or misclassification of the data types and achieving the technical effect of ensuring the integrity and the consistency of the data.
After the information storage node and the storage information type are determined, step S300 is performed to establish a supply chain network based on the information storage node and the storage information type. The supply chain network is a mesh structure composed of a plurality of organization nodes, and the network is composed of all participants on the supply chain from the beginning to the consumption end, including suppliers, manufacturers, distributors, retailers, end users and the like. Specifically, the supply chain structure of the target product is analyzed, the relation and the data exchange requirement among the nodes are determined, and based on the information storage nodes and the storage information types, the connection among the nodes is established through network protocols, data interfaces and other modes, so that the data exchange and the sharing among the nodes can be performed. According to the requirements of a sender, a receiver, transmission frequency, transmission format and the like of information, the flow path and the exchange mode of the information in a supply chain network are designed, in order to realize data sharing among all nodes of the supply chain, a data sharing mechanism is established through measures such as data synchronization, data backup, data encryption and the like so as to ensure the safety and accuracy of data, and finally, the data from different nodes are integrated to form a complete product traceability information chain.
In a possible implementation, step S300 further includes step S310 of determining a supply chain information type according to the stored information type. Specifically, these information types are first mapped onto supply chain information types based on stored information types, such as product information, vendor information, purchase orders, logistics information, payment information, etc., for example, if the stored information type is product inventory data, then the corresponding supply chain information type is inventory management related. Next, by analyzing the importance, sensitivity, access rights, etc. of the information, the application logic determines the type of supply chain information corresponding to each type of stored information, for example, the product information is critical to the operation of the whole supply chain, and needs to take additional encryption and security measures to protect, and meanwhile, selects a proper storage mode according to the requirement of the access rights. And finally, labeling the determined supply chain information type for later information processing and classification management, and rapidly identifying and managing various information by labeling, thereby improving the efficiency and accuracy of information processing. Next, step S320 is performed to deploy the information storage nodes according to the supply chain information type through a blockchain technology. First, a proper blockchain platform or tool, such as an ethernet, HYPERLEDGER FABRIC (super ledger Fabric) is selected, and based on the selected blockchain platform, an intelligent contract is written, wherein the intelligent contract is a program deployed on a blockchain and is used for defining rules and logic of operations such as data storage, access and modification, and the consistency and credibility of information storage and processing are ensured through the intelligent contract. And further, information storage nodes are deployed on the selected blockchain platform, wherein the nodes can be full nodes, light nodes or verification nodes and the like, and each node is responsible for storing and processing supply chain information so as to ensure the accuracy and the integrity of the information. In addition, the location of the information storage nodes is reasonably set according to the roles and functions of each participant in the supply chain network and the flow paths of the information in the supply chain, for example, manufacturers, suppliers, logistics companies and retailers can be used as nodes of the network, and the nodes are set according to the responsibilities and the information requirements. Next, step S330 is executed to perform iterative verification on the target storage information in the information storage node through a consensus mechanism, and when the verification result tends to converge, the establishment of the supply chain network is completed. Depending on the nature and requirements of the supply chain network, a suitable consensus mechanism is selected, such as a Proof of Work (Proof of Work), proof of equity (Proofof Stake), proof of equity (DELEGATED PROOFOF STAKE) or practical Bayesian-vestibular fault tolerance (PRACTICAL BYZANTINE FAULT TO1 erance), for ensuring synchronization and consistency of supply chain information between storage nodes by specifying access rights for the information, conditions for information updating, and a verification mechanism for information consistency, and carrying out iterative verification on target storage information in the information storage nodes through a selected consensus mechanism, including verification information integrity, consistency, accuracy and the like, continuously monitoring the change trend of a verification result, considering that the information verification meets the requirement when the verification result tends to converge (namely the change range gradually decreases or is stabilized in a certain range), and completing the establishment of a supply chain network after the information verification meets the requirement, wherein each node in the supply chain network can start to normally carry out operations such as information storage, exchange, processing and the like. In the steps S310 to S330, the step S330 is a key link of the whole flow, which ensures synchronization and consistency of supply chain information among information storage nodes, and can achieve consensus among nodes, verify the integrity and accuracy of the information and ensure the consistency of the information through a consensus mechanism.
After the supply chain network is established, step S400 is performed to store the target product information to the supply chain network and verify the target product information. The target product information comprises a product batch number, a production date, a quality inspection result, a logistics state and the like, information of a plurality of key nodes is collected from links of production, processing, quality inspection and the like of the target product, then collected data are cleaned and arranged through methods of data preprocessing, data checking and the like, invalid or erroneous data are removed, and accuracy and completeness of the data are ensured. And further storing the cleaned and tidied target product information on corresponding information storage nodes in the supply chain network through a database, a file system or other storage media. Before storage, the stored target product information is verified in a mode of comparing with the existing data, historical data or third party verification data and the like so as to ensure the authenticity and accuracy of the target product information.
In a possible implementation manner, step S400 further includes step S410, where the target product information includes first target product information and second target product information … N-th target product information, where N is equal to the number of blocks in the supply chain network, and N is an integer greater than 2; step S420, before storing the second target product information in the second block in the supply chain network, verifies whether the first target product information in a first block meets a preset storage condition, where the first block is a previous adjacent block of the second block, and the first target product information is different from the second target product information. Specifically, the target product information is split into a plurality of target product information, including first target product information and second target product information … N-th target product information, where the target product information corresponds to the number of blocks in the supply chain network, and each block stores one target product information, i.e., the number of N is equal to the number of blocks, where N is an integer greater than 2, so as to ensure that each block has unique target product information corresponding to the unique target product information. And then, storing the information into the corresponding block according to the information storage flow, when the information of the node is stored, firstly verifying the storage content of the block of the previous node, namely verifying whether the first target product information in the first block accords with preset storage conditions or not, wherein the preset storage conditions can be set according to actual requirements, such as the integrity, the accuracy, the validity and the like of the data, the verification process is realized through rules and logic in an intelligent contract, and if the first target product information does not accord with the preset storage conditions, corresponding processing, such as re-verification or storage refusal and the like, is carried out. The first target product information is information stored in the first block, the second target product information is information stored in the second block, before the second target product information is stored in the second block in the supply chain network, whether the first target product information in the first block meets the preset storage condition or not is verified, so that consistency and consistency of information are guaranteed, the fact that a subsequent block can accurately refer to and verify information of a previous block is guaranteed, and if the first target product information does not meet the preset storage condition, storage of the second target product information is paused, and corresponding processing is performed. Step S410 and step S420 achieve the technical effect of ensuring the integrity and consistency of the information in the supply chain network by splitting the target product information into a plurality of target product information and verifying whether the information of the previous block meets the preset storage conditions.
And executing step S500 according to the verification result, and when the verification result of the target product information is that the target product information does not pass, carrying out abnormal identification of the first node, and determining an abnormal identification result. Specifically, firstly, judging whether the verification is passed or not according to the verification result of the target product information, and if the verification result is not passed, carrying out abnormal identification. Before the anomaly identification is carried out, determining the type of the anomaly according to a verification result and related standards or rules, wherein the type of the anomaly comprises various conditions such as data inconsistency, data missing, data outlier and the like, determining a key node where the anomaly occurs according to the anomaly condition, namely a first key node where the anomaly or the problem occurs, namely the first node, carrying out the anomaly identification on the first node, and recording related information of the anomaly in a supply chain network, wherein the information comprises anomaly description, occurrence time, anomaly type and the like.
In a possible implementation manner, the verification result is passing, where step S500 further includes step S510, and when the verification result of the target product information is passing, the first target product information in the first block is considered to meet a preset storage condition; step S520, storing the second target product information into the second block in the supply chain network according to an information storage flow, where the second block has a corresponding relationship with the second target product information. That is, the first target product information in the first block meets the preset storage condition, the verification is passed, and once the verification is passed, the second target product information is stored in the second block in the supply chain network, the storage process is performed according to the preset information storage flow, so that the second target product information can be ensured to be correctly stored in the corresponding second block, and the corresponding relation is defined and managed through rules and logic in the intelligent contract. Step S510 and step S520 realize the automatic and efficient verification and storage process through the rules and logic of the intelligent contract, and achieve the technical effects of improving the efficiency of information verification and storage and ensuring the integrity and consistency of data.
As shown in fig. 2, in another possible implementation manner, the verification result is not passed, and step S500 further includes step S530, where when the verification result of the target product information is not passed, the first target product information in the first block is regarded as not meeting a preset storage condition. At this time, steps S540 to S570 are required to be performed to deal with this, and first, step S540 is performed to traverse the first block to perform the abnormality screening of the data stored in the first node, so as to generate an abnormality screening result. This process is implemented by rules and logic in the smart contracts, checking whether the data meets preset exception criteria or thresholds. Once the abnormality screening is completed, step S550 is executed, the abnormality level is defined according to the abnormality screening result, and the abnormality identification is performed based on the abnormality level, so as to generate the abnormality identification result. That is, the method includes dividing the target product information into different levels, such as high, medium, and low levels, according to the severity or the influence range of the abnormality, identifying the abnormality based on the level of the abnormality, generating an abnormality identification result, and executing step S560 to determine whether the target product information is subjected to the information storage operation in the supply chain network according to the abnormality identification result. If the anomaly identification result indicates that the problem impact of the product information is negligible or within a processable range, then a store operation may be performed, or after taking other corresponding processing actions. If the target product information is not suitable to be stored in the supply chain network, step S570 is executed, and if not, the abnormal identification result is output to carry out product tracing. The source and the flow direction of the product are tracked through product tracing, the root of the problem is found, and corresponding solving measures are adopted. And step 530 to step 570 are performed with a series of operations such as abnormality screening, abnormality grade demarcation, abnormality identification and product tracing when the verification result of the target product information is failed, and through the steps, the information which does not accord with the preset storage condition is effectively processed, the stability and the reliability of the supply chain network are ensured, and the technical effects of realizing automatic and efficient abnormality processing flow are achieved.
After the anomaly identification is performed, step S600 is performed, accurate tracing is performed on the target product according to the anomaly identification result, and anomaly correction of the whole process of processing the target product is performed through the tracing result. In other words, according to the abnormal identification result, the tracing requirement and target are defined, including determining key nodes needing tracing, a tracing time range, a tracing data type and the like, and further according to the tracing requirement, tracing operation is implemented in the supply chain network by means of inquiring a database, calling a data interface, retrieving a file system and the like. In the tracing process, data of related nodes are collected from a supply chain network to form a complete tracing chain, then the collected tracing data are analyzed, and the reasons and positions of occurrence of the abnormality are determined through methods such as data mining, trend analysis, causality determination and the like. And finally, according to the tracing result, corresponding abnormal correction measures are formulated, including measures such as adjusting production process, repairing equipment faults, improving quality inspection flow and the like. The embodiment of the application adopts technical means such as a common knowledge mechanism of a block chain, and the like, thereby achieving the technical effects of reducing the possibility of data tampering and realizing transparent and real-time product tracing.
In the above, the product tracing method based on the consensus mechanism according to the embodiment of the present invention is described in detail with reference to fig. 1 and 2. Next, a product tracing system based on a consensus mechanism according to an embodiment of the present invention will be described with reference to fig. 3.
The product tracing system based on the consensus mechanism is used for solving the technical problems that data existing in a centralized database and paper records are easy to tamper, information is opaque and real-time tracing is difficult to carry out, and achieves the technical effects of reducing the possibility of tampering of the data and realizing transparent and real-time product tracing. The product traceability system based on the consensus mechanism comprises: the system comprises a key node extraction module 10, a storage node and type setting module 20, a supply chain network establishment module 30, a storage verification module 40, a verification result processing module 50 and a product tracing module 60.
The key node extraction module 10 is used for extracting a plurality of key nodes in the whole process of processing the target product;
The storage node and type setting module 20 is configured to set an information storage node and a storage information type based on the plurality of key nodes;
The supply chain network establishment module 30 is configured to establish a supply chain network based on the information storage node and the stored information type;
The storage verification module 40 is configured to store target product information to the supply chain network, and verify the target product information;
the verification result processing module 50 is configured to perform an abnormal identification of the first node when the verification result of the target product information is that the verification result is not passed, and determine an abnormal identification result;
The product tracing module 60 is configured to accurately trace the source of the target product according to the anomaly identification result, and perform anomaly correction on the whole process of processing the target product according to the tracing result.
Next, the specific configuration of the key node extraction module 10 will be described in detail. As described above, the key node extraction module 10 may further include: the associated influence information generating unit is used for calling a product processing record log and generating associated influence information according to the associated influence factors; the matching unit is used for traversing the association influence information to sequentially match with target product processing nodes in the whole target product processing flow, and determining a node matching result; the key node generating units are used for identifying in the whole target product processing flow according to the node matching result to generate the key nodes.
Next, the specific configuration of the storage node and type setting module 20 will be described in detail. As described above, based on the plurality of key nodes setting information storage nodes and storage information types, the storage node and type setting module 20 may further include: the node screening and adding unit is used for screening a plurality of trusted storage nodes according to the stability of the plurality of key nodes and adding the plurality of trusted storage nodes into the information storage nodes; the data structure analysis unit is used for analyzing the data structure of the target storage data based on the synchronicity among the plurality of trusted storage nodes; and the storage information type determining unit is used for analyzing the storage information according to the data structure and determining the storage information type.
Next, the specific configuration of the supply chain network establishment module 30 will be described in detail. As described above, the supply chain network establishment module 30 may further include: the supply chain information type determining unit is used for determining a supply chain information type according to the storage information type; the information storage node deployment unit is used for deploying the information storage nodes according to the supply chain information types through a blockchain technology; and the iteration verification unit is used for carrying out iteration verification on the target storage information in the information storage node through a consensus mechanism, and when the verification result tends to be converged, the establishment of the supply chain network is completed.
Next, the specific configuration of the storage authentication module 40 will be described in detail. As described above, storing target product information to the supply chain network, verifying the target product information, the storage verification module 40 may further include: the verification unit is configured to verify whether the first target product information in a first block meets a preset storage condition before the second target product information is stored in a second block in the supply chain network, wherein the first block is a previous adjacent block of the second block, and the first target product information is different from the second target product information.
Next, the specific configuration of the verification result processing module 50 will be described in detail. When the verification result of the target product information is passed, the verification result processing module 50 may further include: and the product information storage unit is used for considering that the first target product information in the first block accords with a preset storage condition when the verification result of the target product information is that the first target product information passes, and storing the second target product information into the second block in the supply chain network according to an information storage flow, wherein the second block and the second target product information have a corresponding relation.
And, when the verification result of the target product information is failed, the verification result processing module 50 may further include: the abnormal screening unit is used for judging that the first target product information in the first block does not accord with a preset storage condition when the verification result of the target product information is not passed, traversing the first block to perform abnormal screening of the data stored in the first node, and generating an abnormal screening result; the abnormality identification unit is used for demarcating an abnormality grade according to the abnormality screening result, carrying out abnormality identification based on the abnormality grade and generating the abnormality identification result; and the judging unit is used for judging whether the target product information is subjected to information storage operation in the supply chain network according to the abnormal identification result, and outputting the abnormal identification result to trace the product if not.
The product tracing system based on the consensus mechanism provided by the embodiment of the invention can execute the product tracing method based on the consensus mechanism provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Although the present application makes various references to certain modules in a system according to embodiments of the present application, any number of different modules may be used and run on a user terminal and/or server, including units and modules that are merely partitioned by functional logic, but are not limited to the above-described partitioning, so long as the corresponding functionality is enabled; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application.
Based on the foregoing embodiments, the embodiments of the present application further provide an electronic device and a computer-readable storage medium having a computer program stored therein, which when executed by a processor of the electronic device, is capable of implementing the method as described in any of the foregoing embodiments.
Fig. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application, and shows a block diagram of an exemplary electronic device suitable for implementing an embodiment of the present application. The electronic device shown in fig. 4 is only an example, and should not be construed to limit the functionality and scope of use of the embodiments of the present application in the form of a general purpose computing device, whose components may include, but are not limited to, input means 401, processor 402, memory 403, and output means 404. Wherein the processor 402 may be one or more; memory 403 may include a computer-readable medium and at least one program product having a set of (at least one) program modules configured to perform the functions of the embodiments of the application.
The memory 403 illustrated in embodiments of the present invention may employ any combination of one or more computer-readable media; the computer readable storage medium may be, but is not limited to, an infrared, a semiconductor system, an apparatus, or a device, or any combination thereof, for storing a software program, a computer executable program, and a module, such as program instructions/modules corresponding to a product tracing method based on a consensus mechanism in an embodiment of the present invention, and the processor 402 executes the software program, instructions, and modules stored in the memory 403, thereby performing various functional applications and data processing of the computer device, that is, implementing the product tracing method based on the consensus mechanism.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (10)

1. The product tracing method based on the consensus mechanism is characterized by comprising the following steps:
extracting a plurality of key nodes in the whole process of processing the target product;
setting an information storage node and a storage information type based on the plurality of key nodes;
Establishing a supply chain network based on the information storage node and the stored information type;
storing target product information to the supply chain network, and verifying the target product information;
when the verification result of the target product information is that the target product information does not pass, carrying out abnormal identification of the first node, and determining an abnormal identification result;
And carrying out accurate tracing on the target product according to the abnormal identification result, and carrying out abnormal correction on the whole process of processing the target product through the tracing result.
2. The product tracing method based on the consensus mechanism as claimed in claim 1, wherein the method comprises the steps of:
a product processing record log is called, and associated influence information is generated according to the associated influence factors;
Traversing the association influence information to sequentially match with target product processing nodes in the whole target product processing flow, and determining a node matching result;
and marking in the whole process of processing the target product according to the node matching result, and generating the plurality of key nodes.
3. The consensus mechanism based product tracing method of claim 1, wherein the information storage node and the storage information type are set based on the plurality of key nodes, the method comprising:
screening a plurality of trusted storage nodes according to the stability of the plurality of key nodes;
Adding the plurality of trusted storage nodes to the information storage node;
analyzing a data structure of the target storage data based on synchronicity among the plurality of trusted storage nodes;
And analyzing the stored information according to the data structure, and determining the type of the stored information.
4. The consensus mechanism based product tracing method of claim 3, wherein a supply chain network is established based on the information storage node and the stored information type, the method comprising:
determining a supply chain information type according to the storage information type;
deploying the information storage nodes according to the supply chain information types through a block chain technology;
and carrying out iterative verification on target storage information in the information storage node through a consensus mechanism, and completing establishment of the supply chain network when a verification result tends to be converged.
5. The consensus mechanism based product tracing method of claim 1, wherein target product information is stored to the supply chain network, the target product information is verified, the method comprising:
The target product information comprises first target product information and second target product information … (N) target product information, wherein the number of N is equal to the number of blocks in the supply chain network, and N is an integer greater than 2;
before the second target product information is stored in a second block in the supply chain network, verifying whether the first target product information in a first block meets a preset storage condition, wherein the first block is a previous adjacent block of the second block, and the first target product information is different from the second target product information.
6. The consensus mechanism based product tracing method of claim 5, wherein the method further comprises:
When the verification result of the target product information is that the target product information passes, the first target product information in the first block is considered to accord with a preset storage condition;
And storing the second target product information into the second block in the supply chain network according to an information storage flow, wherein the second block and the second target product information have a corresponding relation.
7. The consensus mechanism based product tracing method of claim 6, wherein the method further comprises:
when the verification result of the target product information is that the target product information does not pass, the first target product information in the first block is regarded as not meeting a preset storage condition;
traversing the first block to perform abnormality screening of the data stored in the first node, and generating an abnormality screening result;
Demarcating an abnormal grade according to the abnormal screening result, and carrying out abnormal identification based on the abnormal grade to generate an abnormal identification result;
Judging whether the target product information is subjected to information storage operation in the supply chain network according to the abnormal identification result;
If not, outputting the abnormal identification result to trace the source of the product.
8. A consensus mechanism based product tracing system, characterized in that the system is configured to implement the consensus mechanism based product tracing method according to any one of claims 1-7, the system comprising:
the key node extraction module is used for extracting a plurality of key nodes in the whole process of processing the target product;
the storage node and type setting module is used for setting information storage nodes and storage information types based on the plurality of key nodes;
A supply chain network establishment module for establishing a supply chain network based on the information storage node and the stored information type;
The storage verification module is used for storing target product information to the supply chain network and verifying the target product information;
The verification result processing module is used for carrying out abnormal identification of the first node when the verification result of the target product information is not passed, and determining an abnormal identification result;
and the product tracing module is used for precisely tracing the target product according to the abnormal identification result and carrying out the abnormal correction of the whole process of processing the target product through the tracing result.
9. An electronic device, the electronic device comprising:
A memory for storing executable instructions;
A processor, configured to implement the consensus mechanism-based product tracing method according to any one of claims 1 to 7 when executing the executable instructions stored in the memory.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the consensus mechanism based product tracing method according to any one of claims 1-7.
CN202410263427.4A 2024-03-07 2024-03-07 Product tracing method and system based on consensus mechanism Pending CN118134508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410263427.4A CN118134508A (en) 2024-03-07 2024-03-07 Product tracing method and system based on consensus mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410263427.4A CN118134508A (en) 2024-03-07 2024-03-07 Product tracing method and system based on consensus mechanism

Publications (1)

Publication Number Publication Date
CN118134508A true CN118134508A (en) 2024-06-04

Family

ID=91237015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410263427.4A Pending CN118134508A (en) 2024-03-07 2024-03-07 Product tracing method and system based on consensus mechanism

Country Status (1)

Country Link
CN (1) CN118134508A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118411184A (en) * 2024-07-03 2024-07-30 江苏权正检验检测有限公司 Food quality traceability detection method based on supply chain
CN118691167A (en) * 2024-08-29 2024-09-24 南昌万顺铝业有限公司 Quality traceability management system and method for whole aluminum profile production process

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118411184A (en) * 2024-07-03 2024-07-30 江苏权正检验检测有限公司 Food quality traceability detection method based on supply chain
CN118691167A (en) * 2024-08-29 2024-09-24 南昌万顺铝业有限公司 Quality traceability management system and method for whole aluminum profile production process

Similar Documents

Publication Publication Date Title
CN110929036B (en) Electric power marketing inspection management method, electric power marketing inspection management device, computer equipment and storage medium
CN118134508A (en) Product tracing method and system based on consensus mechanism
US7644055B2 (en) Rule-based database object matching with comparison certainty
Isaja et al. A blockchain-based framework for trusted quality data sharing towards zero-defect manufacturing
CN111338876B (en) Decision method, system and storage medium for fault mode and influence analysis
CN111010282B (en) Block chain-based information processing method, related device and storage medium
US20210201270A1 (en) Machine learning-based change control systems
US11790249B1 (en) Automatically evaluating application architecture through architecture-as-code
CN115114064B (en) Micro-service fault analysis method, system, equipment and storage medium
CN112799722A (en) Command recognition method, device, equipment and storage medium
CN112055837A (en) Industrial equipment matching method and device
CN117909392B (en) Intelligent data asset inventory method and system
Meier et al. A process model for systematically setting up the data basis for data-driven projects in manufacturing
CN116719817B (en) Digital object relationship tracing method and system for technological resources
Zhang et al. Using knowledge-based systems to manage quality attributes in software product lines
CN111260219A (en) Asset class identification method, device, equipment and computer readable storage medium
Stodt et al. Verifiable machine learning models in industrial IoT via blockchain
CN112364015B (en) Method and device for calculating SQL statement uniqueness hashID
Zhu et al. Model identification of unobservable behavior of discrete event systems using petri nets
CN112686676A (en) Industrial Internet identification chain processing method, device and equipment
CN118312548B (en) Data asset assessment method based on multi-source multi-dimensional data quality
Binlashram et al. A new Multi-Agents System based on Blockchain for Prediction Anomaly from System Logs
Xu et al. Concept drift detection and localization framework based on behavior replacement
CN117056209B (en) Software defect prediction model, interpretation method and quantitative evaluation method
CN118395505B (en) Construction method and system based on agricultural product information database

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