Production traceability management system and method based on full link
Through a full-link production traceability management system, the historical traceability records and feature changes of the product are analyzed and detected, the feature duration is calculated and the problem of product safety traceability information is solved, and the reliability of the traceability system is improved.
Patent Information
- Application Number
- CN202510685219.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-05-27
AI Technical Summary
In the prior art, the information recorded in the product safety traceability system loses its timeliness and reference value due to time elapsed, resulting in a decrease in the reliability of the traceability system.
Through a full-link production traceability management system and method, the historical traceability records of each production link of the product are retrieved, target records are analyzed and extracted, product characteristics changes are detected, characteristic functions of characteristic values change over time, the product's characteristic duration is calculated, and whether to make early warning prompts are determined based on the characteristic duration.
The reliability of the traceability system is improved, and the timeliness and reference value of traceability information is ensured through real-time verification and early warning mechanisms.
Smart Images

Figure CN120197842A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and specifically to a production traceability management system and method based on the entire link. Background Art
[0002] In the traditional manufacturing industry, the frequent occurrence of product safety accidents has attracted wide attention, which not only threatens public health but also affects consumer rights and the reputation of the manufacturing industry. Conducting full-link traceability of product production is an important safety management method. By recording, storing, managing, and tracing the data in each link and production process, it is possible to trace all links and nodes of the product from production and processing to circulation and sales, thereby ensuring the legal liability for product manufacturing safety.
[0003] However, due to the fact that the quality and safety of some products may change significantly in a short period of time, the information recorded in product safety traceability may lose its timeliness and reference value over time. If the traceability information is recorded at the initial stage of production, as time passes, when this information is entered into the traceability system in the later stage of the product, the reliability will decrease. Therefore, it is necessary to continuously optimize the traceability system, perform real-time verification on the entered information, and promptly remind corrections to improve the reliability of the traceability system. Summary of the Invention
[0004] The purpose of the present invention is to provide a production traceability management system and method based on the entire link to solve the problems raised in the prior art.
[0005] To achieve the above purpose, the present invention provides the following technical solutions:
[0006] A production traceability management method based on the entire link, including the following steps:
[0007] Step S100: Retrieve the historical traceability records for tracing each production link of the product; according to the sequential execution order of each production link, obtain several link combinations, extract and analyze the production information of the production link corresponding to each link combination in the traceability record to obtain the target value of the traceability record, and extract the target record from the traceability record according to the target value;
[0008] Step S200: Detect the product characteristics of the product corresponding to the target record, obtain the difference degree of each product characteristic according to the change situation of each product characteristic of the product, and then extract the target characteristic in the product;
[0009] Step S300: Monitor the characteristic values corresponding to the target characteristic during the period after the target record is coded, establish a characteristic function of the corresponding characteristic value changing with time, and then obtain the characteristic duration of the product according to the characteristic function;
[0010] Step S400: Obtain the coding time corresponding to the traceability record to be detected and the completion time of the input of the traceability code, obtain the warning value of the traceability record to be detected according to the characteristic duration, and determine whether to give a warning prompt to relevant personnel according to the warning value.
[0011] Further, step S100 includes:
[0012] Step S110: Obtain a number of historical traceability records. The traceability record is a record of inputting the production information corresponding to each production link of the product into the traceability system constructed based on the blockchain network and conducting traceability; sort each production link in the traceability system in the order of execution, and extract the block header and block body corresponding to each production link in the traceability system. The block header includes the hash value of the previous production link, and the block body includes the production time of the current production link;
[0013] Step S120: Take the next production link of a production link A in a traceability record R as B, and take link A and link B as link combination C A B ; If the hash value of link A is the same as the hash value in the block header of link B, and the production time of link A is earlier than the production time of link B, then mark link combination C A B and set the initial target degree to 0;
[0014] Obtain the operator P corresponding to link A A and the operation time T A , and the operator P corresponding to link B B and the operation time T B ; If the operator P A has the permission to input information for link A, the operator P B has the permission to input information for link B, and the operation time T A is within the working time of the operator P A , and the operation time T B is within the working time of the operator P B , then take the target degree of link combination C A B as 1;
[0015] Add up the target degrees of all the marked link combinations corresponding to the traceability record R to obtain the total target degree D, and further obtain the target value M of the traceability record R R =1 - e -D . If the target value is greater than the preset target threshold, then take the traceability record R as the target record, and further obtain all the target records.
[0016] The target records refer to the traceability records with normal information and relatively low suspicion during the process of inputting production information of products. Whether the information is normal is judged by the hash value and production time, and the suspicion is judged by the operator's authority and working time. Using such traceability records, that is, target records, helps to improve the reliability of the following calculations and judgments.
[0017] Further, step S200 includes:
[0018] Step S210: All products corresponding to the target records are of the same type and the type of the product is food. The moment when the product Y corresponding to a certain target record X is coded is taken as T1. The bacterial count of product Y at each moment after T1 is monitored in real time, and the moment when the bacterial count of product Y just meets the condition of being greater than the quantity threshold is taken as T2;
[0019] Step S220: The product characteristics include grayscale value, water content, and water activity; pictures of product Y at moment T1 and moment T2 are taken respectively and converted into grayscale images. According to the grayscale values of each pixel on the grayscale images, those with the same grayscale value are aggregated in quantity to obtain the grayscale histograms G1 and G2 corresponding to product Y at moment T1 and moment T2. Then, the Euclidean distance between the two grayscale histograms is calculated as the histogram similarity, and the average value is obtained according to the histogram similarity corresponding to each target record as the difference degree of the grayscale value;
[0020] The first histogram H1 and the second histogram H2 with all elements empty are established respectively. The water content W1 and water content W2 of product Y at moment T1 and moment T2 are measured respectively. The water content W1 is input into the first histogram H1, and the water content W2 is input into the second histogram H2; and according to the water content of the product corresponding to each target record, they are respectively input into the first histogram H1 and the second histogram H2, and the Euclidean distance between the two histograms is calculated as the difference degree of the water content;
[0021] The third histogram H3 and the fourth histogram H4 with all elements empty are established respectively. The water activity V1 and water activity V2 of product Y at moment T1 and moment T2 are measured respectively. The water activity V1 is input into the third histogram H3, and the water activity V2 is input into the fourth histogram H4; and according to the water activity of the product corresponding to each target record, they are respectively input into the third histogram H3 and the fourth histogram H4, and the Euclidean distance between the two histograms is calculated as the difference degree of the water activity; and the characteristic corresponding to the maximum difference degree is taken as the target characteristic of the product.
[0022] The Euclidean distance takes a positive value greater than 0, and the smaller the Euclidean distance, the more similar the histograms are, while the larger the Euclidean distance, the greater the difference between the histograms. Since the product in this solution is food, here it is necessary to select the characteristics that are quite different from those of the food in the normal state (i.e., at time T1) as the target characteristics, so as to make the subsequent analysis and calculation more accurate and reliable;
[0023] The principle of obtaining the target characteristics in this solution is as follows: Since the gray value, water content, and water activity belong to different physical quantities and have different units, if we want to compare their degree of difference from time T1 to time T2 (that is, the degree of change from time T1 to time T2), it is not rigorous enough to directly compare them. Therefore, in this solution, we process them from another dimension, that is, input them into the corresponding histograms, compare the Euclidean distances, and take the one with the largest Euclidean distance as the target characteristic.
[0024] Further, step S300 includes:
[0025] Step S310: Obtain the time T1 when the product Y corresponding to the target record X is coded, set the detection time interval as S, starting from time T1, and successively obtain the characteristic values of the target characteristics of the product Y at the detection times with a duration of S, 2×S, n×S from time T1 in the future. If the target characteristic is the gray value, add up the gray values of all pixels in the gray image and take the average as the characteristic value. If the target characteristic is the water content or water activity, take the measured corresponding water content or water activity as the characteristic value;
[0026] And according to the characteristic values of each target record at each detection time, add up the characteristic values that all belong to a certain detection time and take the average as the average characteristic value of that detection time, and establish a characteristic function of the average characteristic value changing with time;
[0027] Step S320: Obtain the characteristic value of the target characteristic of the product corresponding to each target record at time T2, and calculate the average value Z^; If the average value Z^ is between the average characteristic value at the detection time of k×S and the average characteristic value at the detection time of (k + 1)×S in the characteristic function, then take the midpoint time between the detection times k×S and (k + 1)×S as time T3, and take the duration from the origin to time T3 in the characteristic function as the characteristic duration of the product.
[0028] Further, step S400 includes: Obtain the coding time corresponding to the current traceability record to be detected and the completion time of the entry of the traceability code, subtract the completion time of the entry from the coding time to obtain the target time period, and take the value obtained by dividing the duration of the target time period by the characteristic duration as the warning value of the traceability to be detected. If the warning value is greater than the preset warning threshold, give a warning prompt to the traceability record to be detected and the relevant personnel.
[0029] A production traceability management system based on the entire link, including a target record extraction module, a target feature extraction module, a feature duration calculation module, and a warning prompt module;
[0030] The target record extraction module: used to retrieve the historical traceability records for tracing each production link of the product; according to the sequential execution order of each production link, obtain several link combinations, extract and analyze the production information of the production link corresponding to each link combination in the traceability record, obtain the target value of the traceability record, and extract the target record in the traceability record according to the target value;
[0031] The target feature extraction module: used to detect the product features of the product corresponding to the target record, obtain the difference degree of each product feature according to the change situation of each product feature of the product, and then extract the target features in the product;
[0032] The feature duration calculation module: used to monitor the feature values corresponding to the target features within the time period after the target record is coded, establish a feature function for the corresponding change of the feature values over time, and then obtain the feature duration of the product according to the feature function;
[0033] The warning prompt module: used to obtain the coding time corresponding to the traceability record to be detected and the completion time of the entry of the traceability code, obtain the warning value of the traceability record to be detected according to the feature duration, and judge whether to give a warning prompt to relevant personnel according to the warning value.
[0034] Furthermore, the target record extraction module includes a traceability record extraction unit and a target record extraction unit;
[0035] The traceability record extraction unit: used to obtain several historical traceability records, and extract the block header and block body corresponding to each production link in the traceability system. The block header includes the hash value of the previous production link, and the block body includes the production time of the current production link;
[0036] The target record extraction unit: used to obtain the next production link of a certain production link in the traceability record as the link combination; calculate the target value of the traceability record according to the target degree corresponding to the link combination, and then obtain the target record.
[0037] Furthermore, the feature duration calculation module includes a feature function establishment unit and a feature duration calculation unit;
[0038] The feature function establishment unit: used to obtain the moment when the product corresponding to the target record is coded, set the detection time interval, and then obtain several detection times, obtain the feature values of the target features of the product at the detection times, and establish a feature function according to the feature values of each target record at the corresponding detection times;
[0039] Feature duration calculation unit: used to obtain the feature duration of the product according to the characteristic values corresponding to each detection moment in the feature function.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows: The present invention provides a production traceability management system and method based on the entire link, including: retrieving the historical traceability records for tracing each production link of the product, obtaining the target values of the traceability records, and extracting the target records in the traceability records according to the target values; detecting the product characteristics of the products corresponding to the target records to obtain the difference degree of each product characteristic, and further extracting the target characteristics in the products; establishing a feature function in which the corresponding characteristic values change with time to obtain the feature duration of the product; obtaining the coding time corresponding to the traceability record to be detected and the completion time of the entry of the traceability code, obtaining the warning value of the traceability record to be detected, and performing a warning prompt. By analyzing the historical traceability records and combining the product characteristics of the traceable products, the present invention determines whether the current traceability record to be detected is reasonable and performs a warning prompt, improving the reliability of the traceability system. Brief Description of the Drawings
[0041] Figure 1 It is a flowchart of a production traceability management method based on the entire link of the present invention;
[0042] Figure 2 It is a structural diagram of a production traceability management system based on the entire link of the present invention. Detailed Embodiments
[0043] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0044] Embodiment: As Figure 1 shown, the present invention provides a technical solution for a production traceability management method based on the entire link, including the following steps:
[0045] Step S100: Retrieve the historical traceability records for tracing each production link of the product; according to the execution order of each production link, obtain several link combinations, extract and analyze the production information of the production links corresponding to each link combination in the traceability records to obtain the target values of the traceability records, and extract the target records in the traceability records according to the target values;
[0046] Step S110: Obtain a number of historical traceability records. The traceability records are records obtained by entering the production information corresponding to each production link of the product into the traceability system constructed based on the blockchain network and then conducting traceability. Sort the production links in the traceability system in the order of execution, and extract the block headers and block bodies corresponding to each production link in the traceability system. The block header includes the hash value of the previous production link, and the block body includes the production time of the current production link.
[0047] Step S120: Take the next production link of a certain production link A in a certain traceability record R as B, and take link A and link B as link combination C A B ; If the hash value of link A is the same as the hash value in the block header of link B, and the production time of link A is earlier than the production time of link B, then mark link combination C A B and set the initial target degree to 0;
[0048] Obtain the operator P corresponding to link A A and the operation time T A , and the operator P corresponding to link B B and the operation time T B ; If the operator P A has the permission to enter information for link A, the operator P B has the permission to enter information for link B, and the operation time T A is within the working hours of the operator P A , and the operation time T B is within the working hours of the operator P B , then set the target degree of link combination C A B to 1;
[0049] Add up the target degrees of all the marked link combinations corresponding to the traceability record R to obtain the total target degree D, and then obtain the target value M of the traceability record R R =1 - e -D . If the target value is greater than the preset target threshold, then take the traceability record R as the target record, and then obtain all the target records.
[0050] The target record refers to those traceability records with normal information and relatively low suspicion during the process of entering the production information of the product. Whether the information is normal is judged by the hash value and the production time, and the suspicion is judged by the operator's permission and working time. Using such traceability records, that is, the target records, helps to improve the reliability of the following calculations and judgments.
[0051] Step S200: Detect the product characteristics of the product corresponding to the target record. According to the change situation of each product characteristic of the product, obtain the difference degree of each product characteristic, and then extract the target characteristic in the product;
[0052] Step S210: All the products corresponding to the target records are of the same kind and the type of the product is food. Take the moment when the product Y corresponding to a certain target record X is coded as T1, monitor the number of bacteria in the product Y at each moment after the moment T1 in real time, and take the moment when the product Y just meets the condition that the number of bacteria is greater than the quantity threshold as T2;
[0053] The product characteristics include grayscale value, water content and water activity; Take pictures of the product Y at the moment T1 and the moment T2 respectively, and convert them into grayscale images. According to the grayscale value of each pixel on the grayscale image, aggregate the pixels with the same grayscale value in terms of quantity to obtain the grayscale histograms G1 and G2 corresponding to the product Y at the moment T1 and the moment T2. Then calculate the Euclidean distance between the two grayscale histograms as the histogram similarity, and calculate the average value according to the histogram similarity corresponding to each target record as the difference degree of the grayscale value;
[0054] Establish a first histogram H1 and a second histogram H2 with all elements empty respectively. Measure the water content W1 and water content W2 of the product Y at the moment T1 and the moment T2 respectively. Input the water content W1 into the first histogram H1 and the water content W2 into the second histogram H2; And input the water content of the product corresponding to each target record into the first histogram H1 and the second histogram H2 respectively, and calculate the Euclidean distance between the two histograms as the difference degree of the water content;
[0055] Establish a third histogram H3 and a fourth histogram H4 with all elements empty respectively. Measure the water activity V1 and water activity V2 of the product Y at the moment T1 and the moment T2 respectively. Input the water activity V1 into the third histogram H3 and the water activity V2 into the fourth histogram H4; And input the water activity of the product corresponding to each target record into the third histogram H3 and the fourth histogram H4 respectively, and calculate the Euclidean distance between the two histograms as the difference degree of the water activity; And take the characteristic corresponding to the maximum difference degree as the target characteristic of the product.
[0056] The Euclidean distance takes a positive number greater than 0, and the smaller the Euclidean distance, the more similar the histograms are, while the greater the Euclidean distance, the greater the difference between the histograms. Since the product in this solution is food, then here it is necessary to select the characteristics that are quite different from those of the food in the normal state (that is, at the moment T1) as the target characteristics, so as to make the subsequent analysis and calculation more accurate and reliable;
[0057] In this solution, the principle of obtaining the target characteristic is as follows: Since the gray value, water content, and water activity belong to different physical quantities with different units, if we want to compare their degree of difference from time T1 to time T2 (that is, the degree of change from time T1 to time T2), direct comparison is not rigorous enough. Therefore, in this solution, we process it from a different dimension, that is, input them into the corresponding histograms, compare the Euclidean distances, and take the one with the largest Euclidean distance as the target characteristic.
[0058] Step S300: During the period after the target record is encoded, monitor the characteristic values corresponding to the target characteristic, establish a characteristic function of the corresponding characteristic values changing with time, and then obtain the characteristic duration of the product according to the characteristic function.
[0059] Step S310: Obtain the time T1 when the product Y corresponding to the target record X is encoded. Set the detection time interval as S. Starting from time T1, sequentially obtain the characteristic values of the target characteristic of the product Y at the detection times that are S, 2×S, n×S in the future from time T1. If the target characteristic is the gray value, add up the gray values of all pixels in the gray image and calculate the average value as the characteristic value. If the target characteristic is the water content or water activity, take the measured corresponding water content or water activity as the characteristic value.
[0060] And according to the characteristic values at each detection time corresponding to each target record, add up the characteristic values that all belong to a certain detection time and calculate the average value as the average characteristic value at that detection time, and establish a characteristic function of the average characteristic value changing with time.
[0061] Step S320: Obtain the characteristic value of the target characteristic of the product corresponding to each target record at time T2, and calculate the average value Z^. If the average characteristic value at the detection time of k×S corresponding to the average value Z^ in the characteristic function is between the average characteristic value at the detection time of (k + 1)×S, then take the midpoint time between the detection times k×S and (k + 1)×S as time T3, and take the duration between the origin and time T3 in the characteristic function as the characteristic duration of the product.
[0062] Step S400: Obtain the encoding time and the completion time of the entry of the traceability code corresponding to the traceability record to be detected, obtain the warning value of the traceability record to be detected according to the characteristic duration, and determine whether to give a warning prompt to relevant personnel according to the warning value.
[0063] Step S400 includes: Obtain the encoding time and the completion time of the entry of the traceability code corresponding to the current traceability record to be detected. Subtract the completion time of the entry from the encoding time to obtain the target period, and take the value obtained by dividing the duration of the target period by the characteristic duration as the warning value of the traceability to be detected. If the warning value is greater than the preset warning threshold, give a warning prompt to the traceability record to be detected and relevant personnel.
[0064] It should be noted that the coding time is the time when the product is actually produced and coded. In the current traceability system, there is a situation where the same traceability code is used for the same batch of products. For example, a certain batch of products needs to be continuously processed for 30 days, starting from May 1st to 30th. Assuming that according to the target records corresponding to the product's history, the characteristic duration of the product is 10 days, but there is only one traceability code on May 1st (May 1st is the completion time of traceability code entry). Each subsequent product is labeled with the traceability code of May 1st (the coding time is the time when the current product is actually produced and coded, not necessarily May 1st). However, since the characteristic duration is only 10 days, it will lead to a situation where the reliability and reference value of the traceability code gradually decrease if the subsequent products still use the traceability code of May 1st; in this embodiment, the warning value is 0.5, that is, the products after May 5th need to be recoded.
[0065] The present invention also provides a production traceability management system based on the entire production chain, as Figure 2 shown, including: a target record extraction module, a target characteristic extraction module, a characteristic duration calculation module, and a warning prompt module;
[0066] The target record extraction module: is used to retrieve the historical traceability records for tracing each production link of the product; according to the sequential execution order of each production link, obtain several link combinations, extract and analyze the production information of the production link corresponding to each link combination in the traceability record, obtain the target value of the traceability record, and extract the target record in the traceability record according to the target value;
[0067] The target characteristic extraction module: is used to detect the product characteristics of the product corresponding to the target record, obtain the difference degree of each product characteristic according to the change situation of each product characteristic of the product, and then extract the target characteristics in the product;
[0068] The characteristic duration calculation module: is used to monitor the characteristic values corresponding to the target characteristics during the period after the target record is coded, establish a characteristic function of the corresponding characteristic values changing with time, and then obtain the characteristic duration of the product according to the characteristic function;
[0069] The warning prompt module: is used to obtain the coding time corresponding to the traceability record to be detected and the completion time of traceability code entry, obtain the warning value of the traceability record to be detected according to the characteristic duration, and judge whether to give a warning prompt to relevant personnel according to the warning value.
[0070] It is obvious to those skilled in the art that the present invention is not limited to the details of the above-described exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention. Therefore, in any aspect, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present invention. Any reference signs in the claims should not be construed as limiting the claims involved.
Claims
1. A production traceability management method based on the entire link, characterized in that, Including the following steps: Step S100: Retrieve the historical traceability records for tracing each production link of the product; according to the sequential execution order of each production link, obtain several link combinations, extract and analyze the production information of the production link corresponding to each link combination in the traceability record, obtain the target value of the traceability record, and extract the target record in the traceability record according to the target value; Step S200: Detect the product characteristics of the product corresponding to the target record, and according to the change situation of each product characteristic of the product, obtain the difference degree of each product characteristic, and then extract the target characteristic in the product; Step S300: Monitor the characteristic values corresponding to the target characteristic during the period after the target record is coded, establish a characteristic function of the corresponding characteristic value changing with time, and then obtain the characteristic duration of the product according to the characteristic function; Step S400: Obtain the coding time of the traceability record to be detected and the completion time of the input of the traceability code, obtain the warning value of the traceability record to be detected according to the characteristic duration, and judge whether to give a warning prompt to relevant personnel according to the warning value.
2. The production traceability management method based on the full link according to claim 1, characterized in that Step S100 includes: Step S110: Obtain several historical traceability records, where the traceability record is a record obtained by inputting the production information corresponding to each production link of the product into a traceability system constructed based on a blockchain network and performing traceability; sort the production links in the traceability system according to the sequential execution order, and extract the block header and block body corresponding to each production link in the traceability system. The block header includes the hash value of the previous production link, and the block body includes the production time of the current production link; Step S120: Take the next production step of a certain production step A in a certain traceability record R as B, and take step A and step B as a step combination C A B ; If the hash value of step A is the same as the hash value in the block header of step B, and the production time of step A is earlier than the production time of step B, then mark the step combination C A B and set the initial target degree to 0; Obtain the operator P corresponding to link A A and the operation time T A , and the operator P corresponding to link B B and the operation time T B ; If the operator P A has the permission to enter information for link A, the operator P B has the permission to enter information for link B, and the operation time T A is within the working hours of the operator P A , and the operation time T B is within the working hours of the operator P B , then take the target level of link combination C A B as 1; Add up the target degrees of all the marked link combinations corresponding to the traceability record R to obtain the total target degree D, and further obtain that the target value of the traceability record R is M R = 1 - e -D If the target value is greater than the preset target threshold, then take the traceability record R as the target record, and further obtain all the target records.
3. The production traceability management method based on the full link according to claim 1 is characterized in that, Step S200 includes: Step S210: All products corresponding to the target records are of the same type and the type of the product is food. Take the moment when the product Y corresponding to a certain target record X is coded as T1, and monitor the number of bacteria in product Y at each moment after time T1 in real time, and take the moment when product Y just meets the condition that the number of bacteria is greater than the quantity threshold as T2; Step S220: The product characteristics include grayscale value, water content, and water activity; take pictures of product Y at time T1 and time T2 respectively and convert them into grayscale images. According to the grayscale value of each pixel on the grayscale image, aggregate the pixels with the same grayscale value to obtain the grayscale histograms G1 and G2 corresponding to product Y at time T1 and time T2, and then calculate the Euclidean distance between the two grayscale histograms as the histogram similarity, and calculate the average value according to the histogram similarity corresponding to each target record as the difference degree of the grayscale value; Establish a first histogram H1 and a second histogram H2 with all elements empty respectively, measure the water content W1 and water content W2 of product Y at time T1 and time T2 respectively, input the water content W1 into the first histogram H1, and input the water content W2 into the second histogram H2; and input the water content of the product corresponding to each target record into the first histogram H1 and the second histogram H2 respectively, and calculate the Euclidean distance between the two histograms as the difference degree of the water content; Establish a third histogram H3 and a fourth histogram H4 with all elements being empty respectively. Measure the water activity V1 and water activity V2 of product Y at time T1 and time T2 respectively. Input the water activity V1 into the third histogram H3, and input the water activity V2 into the fourth histogram H4. And according to the water activity of the product corresponding to each target record, input them into the third histogram H3 and the fourth histogram H4 respectively, and calculate the Euclidean distance between the two histograms as the degree of difference in water activity. And take the characteristic corresponding to the maximum degree of difference as the target characteristic of the product.
4. The production traceability management method based on the full link according to claim 3, wherein Step S300 includes: Step S310: Obtain the time T1 when the product Y corresponding to the target record X is coded. Set the detection time interval as S. Starting from time T1, successively obtain the characteristic values of the target characteristic of product Y at the detection times of S, 2×S, n×S in the time period after time T1. If the target characteristic is the gray value, add up the gray values of all pixels in the gray image and calculate the average value as the characteristic value. If the target characteristic is the water content or water activity, take the measured corresponding water content or water activity as the characteristic value. And according to the characteristic values of each target record at each detection time, add up the characteristic values that belong to a certain detection time and calculate the average value as the average characteristic value of the certain detection time, and establish a characteristic function of the change of the average characteristic value with time. Step S320: Obtain the characteristic value of the target characteristic of the product corresponding to each target record at time T2, and calculate the average value Z^. If the average characteristic value at the detection time of k×S corresponding to the average value Z^ in the characteristic function is between the average characteristic value at the detection time of (k + 1)×S, then take the midpoint time between the detection times k×S and (k + 1)×S as time T3, and take the time period from the origin to time T3 in the characteristic function as the characteristic time length of the product.
5. The production traceability management method based on the whole link according to claim 1, characterized in that, Step S400 includes: Obtain the coding time of the current traceability record to be detected and the completion time of the input of the traceability code. Subtract the completion time of the input from the coding time to obtain the target time period, and take the value obtained by dividing the time length corresponding to the target time period by the characteristic time length as the warning value of the traceability to be detected. If the warning value is greater than the preset warning threshold, give a warning prompt to the traceability record to be detected and the relevant personnel.
6. A production traceability management system for implementing a production traceability management method based on the entire link described in any one of claims 1-5, characterized in that, The system includes a target record extraction module, a target characteristic extraction module, a characteristic time length calculation module, and a warning prompt module; Target record extraction module: Used to retrieve the historical traceability records for tracing each production link of the product; according to the execution order of each production link, obtain several link combinations, extract and analyze the production information of the production link corresponding to each link combination in the traceability record to obtain the target value of the traceability record, and extract the target record in the traceability record according to the target value. Target characteristic extraction module: Used to detect the product characteristics of the product corresponding to the target record, and obtain the degree of difference of each product characteristic according to the change of each product characteristic of the product, and then extract the target characteristic in the product. Feature duration calculation module: It is used to monitor the characteristic values corresponding to the target characteristics within the time period after the target record is coded, establish a characteristic function of the corresponding characteristic values changing with time, and then obtain the feature duration of the product according to the characteristic function; Early warning prompt module: It is used to obtain the coding time of the traceability record to be detected and the completion time of the input of the traceability code, obtain the early warning value of the traceability record to be detected according to the feature duration, and judge whether to give an early warning prompt to relevant personnel according to the early warning value.
7. A production traceability management system according to claim 6, characterized in that, The target record extraction module includes a traceability record extraction unit and a target record extraction unit; Traceability record extraction unit: It is used to obtain a number of historical traceability records, and extract the block header and block body corresponding to each production link in the traceability system. The block header includes the hash value of the previous production link, and the block body includes the production time of the current production link; Target record extraction unit: It is used to obtain the next production link of a certain production link in the traceability record as the link combination; calculate the target value of the traceability record according to the target degree corresponding to the link combination, and then obtain the target record.
8. A production traceability management system according to claim 6, characterized in that, The feature duration calculation module includes a feature function establishment unit and a feature duration calculation unit; Feature function establishment unit: It is used to obtain the moment when the product corresponding to the target record is coded, set the detection time interval, and then obtain a number of detection times, obtain the characteristic values of the target characteristics of the product at the detection times, and establish a characteristic function according to the characteristic values of each target record at each corresponding detection time; Feature duration calculation unit: It is used to obtain the feature duration of the product according to the characteristic values corresponding to each detection time in the characteristic function.
Citation Information
Patent Citations
Agricultural product planting traceability analysis management system and method based on big data
CN118071214A
Fertilizer production process supervision and traceability system based on block chain
CN119205137A
Traceability tracking method and system of cosmetic electronic two-dimensional code
CN119398801A
Food production information traceability management method and system
CN119990724A
Real-time alarm tracing apparatus and method in process industry production procedure
WO2023124778A1
Cited By
Workshop production line data centralized monitoring and traceability management method
CN121352256A
Workshop production line data centralized monitoring and traceability management method
CN121352256B
Consumable monitoring data analysis system and method based on artificial intelligence
CN121526639A
