A supply chain circulation product traceability method based on random inspection mechanism
By assigning continuous traceability codes to the product and using the sampling inspection mechanism, only some products are scanned and the circulation probability matrix is calculated, the problem of non-sharing of circulation node data in the existing technology is solved, and high-accuracy product traceability is achieved, which is suitable for supply chain circulation product traceability with different sampling inspection ratios.
Patent Information
- Application Number
- CN202310231582.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-03-10
AI Technical Summary
The existing product traceability technology has problems with the problem of not sharing data from circulation nodes, low enthusiasm for enterprises to participate, high operating costs, difficult to achieve supply chain information sharing and high availability, and the probability of building an enterprise relationship network is difficult and the probability of cumulative form indicates error.
The supply chain circulation product traceability method based on the sampling inspection mechanism is adopted. By assigning continuous traceability codes to the product, using the circulation probability matrix and sampling inspection mechanism, only some products are scanned to calculate the product circulation probability matrix to restore the circulation information of all products.
It achieves the accuracy rate of about 90% without scanning all codes, reduces the pressure on corporate traceability, protects corporate privacy, and is suitable for different sampling ratio requirements, with high applicability and flexibility.
Smart Images

Figure CN116245540B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of circulating product traceability, and in particular to a supply chain circulating product traceability method based on a random inspection mechanism. Background Art
[0002] Current product traceability technology incorporates digital anti-counterfeiting technology called "one item, one code" to assign a unique traceability code to each smallest sales unit. Based on international coding standards, manufacturers print traceability codes that comply with national standards on all products coming off the production line. These codes are then applied to both the inner and outer packaging, and a closed-loop linkage is established between the box and carton levels according to packaging specifications. During the product's distribution process, each company that passes through the product scans the traceability code, enabling the sharing of product locations and registering inbound, outbound, and inbound shipments, achieving real-time traceability.
[0003] In the above traceability method, each node scans and registers all incoming products, realizing the sharing and traceability of product circulation information. However, there are also certain problems: (1) Once the data of the circulation nodes are not shared or inconsistent, the product flow information chain will be broken. (2) Enterprises are the main body of the traceability system. Due to their own business privacy, operating costs and other reasons, some circulation enterprises are not very motivated to upload traceability information and participate in circulation traceability, and the goal of supply chain information sharing cannot be achieved. (3) There are tens of thousands of products circulating in the supply chain, and the current traceability technology is mostly developed for single-category products. It is difficult to achieve high availability of product traceability technology. (4) All nodes in the entire product supply chain network scan each product circulation code and register the supply flow information, which has huge operating costs and is difficult to promote on a large scale.
[0004] Among the existing methods, there is also a method of obtaining it by constructing a corporate connectivity network and using the probability of product circulation to express it in a cumulative form. However, it is usually difficult to construct a corporate relationship network, and there will be a problem of cumulative error in the probability expression in a cumulative form. Summary of the Invention
[0005] In response to the shortcomings of existing algorithms, the present invention eliminates the need to scan all product traceability codes at every node through which a product circulates. Instead, it only requires scanning a sample of some products to restore the circulation information of all products, significantly reducing the workload of traditional tracing methods.
[0006] The technical solution adopted by the present invention is: a supply chain circulation product traceability method based on a sampling inspection mechanism includes the following steps:
[0007] Step 1: A batch of products is assigned a continuous traceability code at the starting point of circulation;
[0008] Based on the network structure formed by the circulation of a single batch of products in the supply chain, the study defines the node set V={V0,...,V t ,...,Vn}.
[0009] Further details are as follows:
[0010] The total number of product M is n pieces, and the n products are given continuous traceability codes M1, M2, ..., M at the starting point of circulation. n Each product is uniquely coded, and the traceability code sequence is O(M). The smallest serial number is M1, and the largest serial number is M. n , the circulation probability matrix of product M is expressed as P M :
[0011]
[0012]
[0013] In formula (1), Indicates that the traceability code is M j The product at node V t The probability of circulation, For node V t About the circulation probability matrix of product M.
[0014] Step 2: Scan the traceability codes of the nodes that a batch of products passes through proportionally. Based on the scanned traceability code information, use the traceability algorithm to calculate the product circulation probability matrix of the nodes;
[0015] Further, specifically including:
[0016] Step 21: Sort the randomly scanned traceability code sequence and set the product circulation probability between the maximum and minimum scanned codes to 1;
[0017] Step 22: Sum the node circulation probability matrix. When the sum is greater than the total number of circulating products, set the circulation probability of the products between the largest span of adjacent scanned traceability codes to 0.
[0018] Step 23: When the sum is less than the total number of circulating products, perform probability calculation on the adjacent products of the scanned product.
[0019] Further details are as follows:
[0020] Step 2.1: Flow to node V t The total number of products M is S. Under the sampling mechanism, node V t Randomly scan a number of products s; by scanning the code, these s products can be determined at node V t circulation, then the corresponding The probability of product circulation in is 1;
[0021] According to O(M), the random sampling traceability code sequence is sorted and the sequential sampling traceability code sequence is obtained. The probability matrix The minimum scanned code To the maximum scanned code The product circulation probability between is set to 1, as shown in formula (3):
[0022]
[0023] Define M x for The set of traceability codes with a probability of 1, M y is a set of traceability codes with probability values other than 1, and we define |M x |with|M y | is the number of elements in the collection.
[0024] Step 2.2, when |M x | is greater than the total number of products S, The corresponding circulation probability value is assigned 0, as shown in formulas (4) and (5):
[0025]
[0026]
[0027] In formula (4), d max Indicates the maximum adjacent detected code span, and Indicates the order of two adjacent traceability codes.
[0028] Step 2.3: When the sum of the node circulation probability matrix is less than the total number of circulating products, perform probability calculation on products whose circulation probability is not 1;
[0029] When |M x | is less than the total number of products S, first calculate the minimum traceability code span, as shown in formula (6), and then y Medium Satisfaction The probability calculation of the traceability code product with the conditions is performed as shown in formula (7).
[0030]
[0031]
[0032] In formula (6), express and Minimum encoding span.
[0033] Step 3: Calculate the maximum probability circulation node sequence of the problem product based on the product circulation probability matrix and recall the problem product.
[0034] Further details are as follows:
[0035] According to each flow node V0, ..., V t ,...,V n For the product M, the circulation probability matrix P of each node about M can be calculated from step 2. M , as shown in formula (8):
[0036]
[0037] In the source tracing scenario, if the code M j If the product is a problem product, then compare P M The circulation probability of the product coded by each node in the problem Sort them in descending order of probability value to obtain the node sequence with the maximum circulation probability, and recall the problematic products based on this node sequence.
[0038] Beneficial effects of the present invention:
[0039] 1. Using a random inspection mechanism, even if some products do not share circulation information, they can still be inferred through algorithms. If the circulation nodes only sample 20% of the products, the algorithm's prediction accuracy can reach about 90%, which can apply to a wider range of products.
[0040] 2. Enterprises do not need to share transaction information, so as to build a product distribution network to implement the traceability algorithm and further protect corporate privacy;
[0041] 3. Only part of the code needs to be scanned, not all of it, reducing the pressure on enterprises to trace the source;
[0042] 4. The product sampling ratio is flexible and controllable. As the sampling rate increases, the accuracy of the algorithm improves accordingly. It is suitable for products with different sampling ratio requirements and has scalability and high applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a flow chart of the supply chain circulation product tracing method based on the sampling inspection mechanism of the present invention;
[0044] Figure 2 It is a line graph of the accuracy of the traceability algorithm of the present invention. DETAILED DESCRIPTION
[0045] The present invention will be further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore only shows the components related to the present invention.
[0046] like Figure 1 As shown, a supply chain circulation product traceability method based on a sampling inspection mechanism includes the following steps:
[0047] Step 1: A batch of products is assigned a continuous traceability code at the starting point of circulation;
[0048] A batch of product M is circulated to 6 enterprise nodes, where node 0 is the starting node. The total number of coded products shipped out is 30, and the traceability codes are M1~M 30 ; The sampling inspection ratio is stipulated to be no less than 20%. The circulation status and sampling inspection status of product M are shown in Table 1 below.
[0049] Table 1 Product circulation and sampling inspection status
[0050]
[0051] As shown in Table 1, the total number of nodes in circulation is S=20, and the traceability codes of the node circulation products in the table are M1~M5, M 16 ~M 30 , a total of 20 products.
[0052] Step 2: Scan the traceability codes of the nodes that the batch of products passes through proportionally. Based on the information of the scanned traceability codes, use the traceability algorithm to calculate the product circulation probability matrix of the nodes.
[0053] The traceability codes of the products scanned at node 1 are M1, M4, M 18 ,M 28 ,Right now
[0054] M i ={M1, M4, M18, M28}.
[0055] (2.1) The four products can be 100% confirmed to circulate at node 1, that is, P(M1) = 1, P(M4) = 1, P(M 18 )=1,P(M 28 )=1; According to O(M), the random sampling traceability code sequence is sorted, and the sequential sampling traceability code sequence M can be obtained. i ={M1, M4, M 18 , M 28}; The probability matrix The smallest scanned code M1 to the largest scanned code M 28 The product circulation probability between is set to 1, as shown in formula (9):
[0056] P(M1), ..., P(M 28 )=1 (9)
[0057] Define M x for The set of traceability codes with a probability of 1, M yis a set of traceability codes with probability values other than 1, and we define |M x |with|M y | is the number of elements in the collection.
[0058] (2.2) When the sum of the node circulation probability matrix is greater than the total number of circulating products, the circulation probability of the products between the largest span of adjacent scanned traceability codes is set to 0.
[0059] Through the calculation of formula (9), we can get: |M x |=28,|M x |>S. The maximum scanned traceability code span is 14, and the code segment is M4~M 18 , assign the product circulation probability value between the code segments to 0, as shown in formula (10):
[0060] P(M5), ..., P(M 17 )=0 (10)
[0061] (2.3) When the sum of the node circulation probability matrix is less than the total number of circulating products, the probability calculation is performed on products with a circulation probability other than 1.
[0062] Through the calculation of formula (10), we can get |M x |=12,|M x |<S, M2∈My, taking the calculation of P(M2) as an example.
[0063] First, the minimum traceability code span between M2 and the product with probability 1 is calculated according to formula (6). From formula (9), we can see that P(M1) = 1, and the span between M2 and M1 is the minimum, as shown in formula (11):
[0064]
[0065] satisfy Then the probability calculation according to formula (7) is as follows:
[0066]
[0067] Using the algorithm described in step 2, we can obtain the circulation probability matrix of all circulation nodes for product M, as shown in Table 2:
[0068] Table 2 Node circulation probability matrix
[0069]
[0070]
[0071] Based on the algorithm's inference results in Table 2, the accuracy of the algorithm can be calculated. Indicator 1 represents the accuracy of product circulation at the node. Because the sampling mechanism only inspects 20% of the products at the node, the algorithm infers the remaining 80%. The accuracy of the inferred product circulation at the node is Indicator 1. Indicator 2 represents the accuracy of product circulation at the node. The degree of consistency between the algorithm's inferred circulation node and the actual product circulation node is Indicator 2.
[0072] 1: Product circulation accuracy, as shown in formula (13):
[0073]
[0074] In formula (13), S is the total number of nodes, M y is the set of circulating products. As shown in Table 1, the total number of products circulating at node 1 is 20, and M y M1~M5, M 16 ~M 30 As shown in Table 2, is 17.31, The accuracy of nodes 1 to 6 is shown in Table 3.
[0075] Table 3 Node product circulation accuracy
[0076]
[0077] 2: Node flow accuracy, as shown in formula (14):
[0078]
[0079] In formula (14), N represents the total number of products M, in this example N = 30; T represents the accurate estimation of the circulation nodes of the product, such as product M j When the flow reaches nodes 1, 2, and 3, the algorithm infers 1, 2, and 3, then T=1.
[0080] Based on the circulation conditions and estimated conditions shown in Tables 1 and 2, the comparison conditions and T values shown in Tables 4 to 6 can be obtained. According to formula (14), Auc2 is calculated to be 90.00%.
[0081] Table 4 Products M1~M 10 Circulation Estimate Comparison
[0082]
[0083]
[0084] Table 5 Comparison of circulation estimates for products M11 to M20
[0085]
[0086] Table 6 Comparison of circulation estimates for products M21 to M30
[0087]
[0088] Step 3: Calculate the maximum probability circulation node sequence of the problem product based on the product circulation probability matrix and recall the problem product.
[0089] The product circulation probability matrix is shown in Table 2. If the product coded M2 is a problem product, then compare P M The circulation probability of the product coded by each node in the problem As can be seen from Table 2, Sort them in descending order of probability value to obtain the node sequence with the maximum circulation probability [V1, V4], as shown in Table 4. The problem products are recalled based on this node sequence.
[0090] The above algorithm can achieve an accuracy of 90% by sampling only 20% of the products. When the sampling ratio is increased, the accuracy of the algorithm will also be improved. Figure 2 The sampling ratio and algorithm accuracy shown are as follows. Considering that some products are dangerous goods and must be fully sampled, the algorithm can 100% restore the product circulation situation; for some low-risk products, the sampling ratio can be reduced, and the use of this invention can also achieve good traceability results.
[0091] With the above-described preferred embodiments of the present invention as a guide, and with reference to the above description, relevant personnel are fully capable of making various changes and modifications without departing from the technical scope of this invention. The technical scope of this invention is not limited to the contents of the specification and must be determined according to the scope of the claims.
Claims
1. A supply chain circulation product traceability method based on a sampling inspection mechanism, characterized in that: The following steps are involved: Step 1: A batch of products is assigned a continuous traceability code at the starting point of circulation; Step 2: Scan the traceability codes of the nodes that a batch of products passes through proportionally. Based on the scanned traceability code information, use the traceability algorithm to calculate the product circulation probability matrix of the nodes; Step 2 includes: Step 21: Sort the randomly scanned traceability code sequence and set the product circulation probability between the maximum and minimum scanned codes to 1; Step 22: Sum the node circulation probability matrix. When the sum is greater than the total number of circulating products, set the circulation probability of the products between the largest span of adjacent scanned traceability codes to 0. Step 23: When the sum is less than the total number of circulating products, the probability of adjacent products of the swept product is calculated; Step 3: Calculate the maximum probability circulation node sequence of the problem product based on the product circulation probability matrix and recall the problem product; Step 2 specifically includes: Step 2.1: Circulate to nodes Products M The total is S , under the sampling mechanism, nodes Randomly scanned products s ; By scanning the code, the s Products can be determined at the node circulation, then the corresponding The probability of product circulation in is 1; according to Sorting the randomly scanned traceability code sequence can obtain the sequential sampling traceability code sequence , the probability matrix The minimum scanned code To the maximum scanned code The product circulation probability between is set to 1, as shown in formula (3): definition for The set of traceability codes with a probability value of 1, is a set of traceability codes with probability values other than 1, and is defined as and is the number of elements in the collection; Step 2.2: is greater than the total number of products S, The corresponding circulation probability value is assigned 0, as shown in formulas (4) and (5): In formula (4), Indicates the maximum adjacent detected code span, and Indicates the order of two adjacent traceability codes. , ; Step 2.3, when If it is less than the total number of products S, first calculate the minimum traceability code span, as shown in formula (6), and then Medium Satisfaction The probability calculation of the traceability code product under the conditions is as shown in formula (7); In formula (6), , , , express and Minimum encoding span.
2. The supply chain circulation product tracing method based on the sampling inspection mechanism according to claim 1 is characterized in that: Step 1 specifically includes: The total is n Pieces of products M Assign a continuous traceability code at the starting point of circulation , the traceability code sequence is , the minimum sequence number bit is encoded as , the maximum sequence number bit is encoded as ,product M The circulation probability matrix is expressed as : In formula (1), Indicates that the traceability code is Products at the node The probability of circulation, For nodes About the product M The circulation probability matrix.
3. The supply chain circulation product tracing method based on the sampling inspection mechanism according to claim 1 is characterized in that: Step three specifically includes: According to each circulation node About products M The sweeping situation of each node can be calculated from step 2. M Circulation probability matrix , as shown in formula (8): in, Indicates that the traceability code is Products at the node probability of circulation.
Citation Information
Patent Citations
Important product efficient tracing method
CN115222420A