A production traceability management system and method based on full link
Through blockchain network and feature functions monitoring changes in product characteristics, the problem of the reduction in reliability of traceability information over time is solved, real-time verification and early warning of traceability system is realized, and the reliability of product safety traceability is improved.
Patent Information
- Application Number
- CN202510685219.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-05-27
AI Technical Summary
In the existing traceability system, as time goes by, the reliability of traceability information is reduced, and timely verification and reminder cannot be made, resulting in insufficient reliability of the product safety traceability system.
Through a traceability system based on blockchain network, historical information of each production link of the product is recorded and traced, and the hash value and operator authority are used to judge the suspiciousness of the traceability record, and the target record is extracted; the product characteristics changes are monitored, the feature functions are established, the feature duration is calculated and the early warning prompts are given.
It improves the reliability of the traceability system, ensures the timeliness and accuracy of traceability information, promptly warns of potential problems, and enhances product safety management.
Smart Images

Figure CN120197842B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a full-link production traceability management system and method. Background Art
[0002] The frequent occurrence of product safety incidents in the traditional manufacturing industry has attracted widespread attention. These incidents not only threaten public health but also impact consumer rights and the reputation of the manufacturing industry. Full-chain traceability of product production is a key safety management method. By recording, storing, managing, and tracing data from every link and production process, it can trace every link and node of a product's journey from production and processing to distribution and sales, thereby ensuring legal accountability for product manufacturing safety.
[0003] However, since the quality and safety of some products may change significantly in a short period of time, the information recorded in the product safety traceability may lose its timeliness and reference value over time. If the traceability information is recorded in the early stages of production, as time goes by, when this information is entered into the product's later traceability system, the reliability will decrease. Therefore, it is necessary to continuously optimize the traceability system, perform real-time verification of 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 a full link to solve the problems raised in the prior art.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A full-link production traceability management method includes the following steps:
[0007] Step S100: Retrieving historical traceability records for each production link of the product; obtaining several link combinations based on the execution order of each production link, extracting and analyzing the production information of the production link corresponding to each link combination in the traceability record, obtaining the target value of the traceability record, and extracting the target record in the traceability record based on the target value;
[0008] Step S200: Detecting the product characteristics of the product corresponding to the target record, obtaining the degree of difference of each product characteristic based on the change of each product characteristic, and then extracting the target characteristics of the product;
[0009] Step S300: monitoring the characteristic value corresponding to the target characteristic within the time period after the target record is coded, and establishing a characteristic function of the corresponding characteristic value changing over time, and then obtaining the characteristic duration of the product based on the characteristic function;
[0010] Step S400: Obtain the coding time corresponding to the traceability record to be detected and the time when the traceability code is entered, and obtain the warning value of the traceability record to be detected based on the characteristic duration, and determine whether to issue a warning prompt to relevant personnel based on the warning value.
[0011] Furthermore, step S100 includes:
[0012] Step S110: Obtain several historical traceability records. A traceability record is a record that records the production information corresponding to each production link of a product and enters it into a traceability system built on a blockchain network for tracing. The production links in the traceability system are sorted in the order of execution, and the block header and block body corresponding to each production link in the traceability system are extracted. 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: Set the next production link of a production link A in a traceability record R as B, and set 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 link combination C A B Mark and set the initial target level to 0;
[0014] Get the operator P corresponding to link A A and operation time T A , and the operator P corresponding to link B B and operation time T B If the operator P A Operator P has the authority to enter information for link A. B Has the authority to enter information for link B, and the operation time is T A In the operator P A Working hours, operation time T B In the operator P B During the working hours, the link combination C A B The target degree is taken as 1;
[0015] Add up the target degrees of all the marked link combinations corresponding to the traceability record R to get the total target degree D, and then get the target value of the traceability record R M R =1-e -D ,If the target value is greater than the preset target threshold, the traceability record R is used as the target record, and then all target records are obtained.
[0016] Target records refer to those traceability records that are normal and less suspicious during the process of entering product production information. The normality of the information is judged by the hash value and production time, and the suspicion is judged by the operator's authority and working hours. The use of such traceability records, that is, target records, helps to improve the reliability of the following calculations and judgments.
[0017] Furthermore, step S200 includes:
[0018] Step S210: All target records correspond to the same product, and the product type is food. The time when the code of product Y corresponding to a target record X is assigned is set as T1. The bacterial count of product Y is monitored in real time at each time after time T1. The time when the bacterial count of product Y just exceeds the threshold is set as T2.
[0019] Step S220: Product characteristics include grayscale value, water content, and water activity. Images of product Y at time T1 and time T2 are taken and converted into grayscale images. Based on the grayscale value of each pixel in the grayscale image, pixels with the same grayscale value are aggregated to obtain grayscale histograms G1 and G2 corresponding to product Y at time T1 and time T2. The Euclidean distance between the two grayscale histograms is calculated as the histogram similarity. The average of the histogram similarities corresponding to each target record is calculated as the degree of grayscale value difference.
[0020] Create a first histogram H1 and a second histogram H2, both of which have empty elements. Measure the moisture content W1 and W2 of product Y at time T1 and time T2, respectively. Input the moisture content W1 into the first histogram H1 and the moisture content W2 into the second histogram H2. Record the moisture content of the corresponding product for each target and input it into the first histogram H1 and the second histogram H2. Calculate the Euclidean distance between the two histograms as the degree of difference in moisture content.
[0021] Establish a third histogram H3 and a fourth histogram H4 with empty elements 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 each target record, input the water activity of the product corresponding to 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 use the characteristic corresponding to the maximum degree of difference as the target characteristic of the product.
[0022] The Euclidean distance is a positive number greater than 0. 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, it is necessary to select the characteristics that are significantly different from the normal state of the food (that is, at time T1) as the target characteristics, so that subsequent analysis and calculation will be more accurate and reliable.
[0023] The principle of obtaining the target characteristics in this scheme is: since the gray value, water content and water activity belong to different physical quantities and have different units, if we want to compare the degree of difference between them from time T1 to time T2 (that is, the degree of change from time T1 to time T2), direct comparison is not rigorous enough, so in this scheme, we change the dimension for processing, that is, input them into the corresponding histogram, compare the Euclidean distance, and take the one with the largest Euclidean distance as the target characteristic.
[0024] Furthermore, step S300 includes:
[0025] Step S310: Obtain the time T1 at which the product Y corresponding to the target record X is coded, set the detection time interval to S, and take time T1 as the starting point. At the detection times S, 2×S, and n×S intervals after time T1, sequentially obtain the characteristic value of the target characteristic of product Y. If the target characteristic is a grayscale value, add the grayscale values of all pixels in the grayscale image and calculate the average value as the characteristic value. If the target characteristic is water content or water activity, use the measured corresponding water content or water activity as the characteristic value.
[0026] According to the characteristic value of each target recorded at each detection moment, the characteristic values belonging to a certain detection moment are added together to obtain the average value, which is used as the average characteristic value at a certain detection moment, and a characteristic function of the average characteristic value changing with time is established;
[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 of the k×Sth detection moment corresponding to the characteristic function and the average characteristic value of the (k+1)×Sth detection moment, then the midpoint between the detection moments k×S and (k+1)×S is taken as time T3, and the duration between the origin in the characteristic function and time T3 is taken as the characteristic duration of the product.
[0028] Furthermore, step S400 includes: obtaining the coding time corresponding to the current traceability record to be tested and the time when the traceability code is entered, subtracting the entry completion time from the coding time to obtain the target time period, and dividing the duration corresponding to the target time period by the value of the characteristic duration as the warning value of the traceability to be tested. If the warning value is greater than the preset warning threshold, a warning prompt will be issued to the traceability record to be tested and related personnel.
[0029] A full-link production traceability management system, including a target record extraction module, a target feature extraction module, a feature duration calculation module, and an early warning prompt module;
[0030] Target record extraction module: used to retrieve historical traceability records for each production link of the product; according to the execution order of each production link, several link combinations are obtained, and the production information of the production link corresponding to each link combination in the traceability record is extracted and analyzed to obtain the target value of the traceability record, and the target record in the traceability record is extracted based on the target value;
[0031] Target feature extraction module: used to detect the product features of the product corresponding to the target record, obtain the degree of difference of each product feature based on the change of each product feature, and then extract the target feature in the product;
[0032] Characteristic duration calculation module: used to monitor the characteristic value corresponding to the target characteristic within the period after the target record is coded, and establish a characteristic function of the corresponding characteristic value changing over time, and then obtain the characteristic duration of the product based on the characteristic function;
[0033] Early warning prompt module: used to obtain the coding time corresponding to the traceability record to be tested and the time when the traceability code is entered, and obtain the early warning value of the traceability record to be tested based on the characteristic duration, and determine whether to issue an early warning prompt to the relevant personnel based on the early warning value.
[0034] Furthermore, the target record extraction module includes a source record extraction unit and a target record extraction unit;
[0035] 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] Target record extraction unit: used to obtain the next production link of a certain production link in the traceability record and use it as a link combination; according to the target degree corresponding to the link combination, the target value of the traceability record is calculated to obtain the target record.
[0037] Furthermore, the feature duration calculation module includes a feature function establishment unit and a feature duration calculation unit;
[0038] Characteristic function establishment unit: used to obtain the time when the target record is corresponding to the product coding, and set the detection time interval, thereby obtaining a number of detection times, obtaining the characteristic value of the target characteristic of the product at the detection time, and establishing the characteristic function according to the characteristic value of each target record at each detection time;
[0039] Feature duration calculation unit: used to obtain the feature duration of the product based on the characteristic value 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 historical traceability records for tracing each production link of the product, obtaining the target value of the traceability record, and extracting the target record in the traceability record according to the target value; detecting the product characteristics of the product corresponding to the target record, obtaining the degree of difference of each product characteristic, and then extracting the target characteristic in the product; establishing a characteristic function of the corresponding characteristic value changing over time, and obtaining the characteristic duration of the product; obtaining the coding time corresponding to the traceability record to be detected and the time when the traceability code is entered, obtaining the warning value of the traceability record to be detected, and performing a warning prompt. The present invention analyzes the historical traceability records, combines the product characteristics of the traceable product, obtains whether the current traceability record to be detected is reasonable, and performs a warning prompt, thereby improving the reliability of the traceability system. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flow chart of a full-link production traceability management method according to the present invention;
[0042] Figure 2 This is a structural diagram of a full-link production traceability management system based on the present invention. DETAILED DESCRIPTION
[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0044] Example: Figure 1 As shown, the present invention provides a technical solution for a production traceability management method based on a full link, comprising the following steps:
[0045] Step S100: Retrieving historical traceability records for each production link of the product; obtaining several link combinations based on the execution order of each production link, extracting and analyzing the production information of the production link corresponding to each link combination in the traceability record, obtaining the target value of the traceability record, and extracting the target record in the traceability record based on the target value;
[0046] Step S110: Obtain several historical traceability records. A traceability record is a record that records the production information corresponding to each production link of a product and enters it into a traceability system built on a blockchain network for tracing. The production links in the traceability system are sorted in the order of execution, and the block header and block body corresponding to each production link in the traceability system are extracted. 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: Set the next production link of a production link A in a traceability record R as B, and set 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 link combination C A B Mark and set the initial target level to 0;
[0048] Get the operator P corresponding to link A A and operation time T A , and the operator P corresponding to link B B and operation time T B If the operator P A Operator P has the authority to enter information for link A. B Has the authority to enter information for link B, and the operation time is T A In the operator P A Working hours, operation time T B In the operator P B During the working hours, the link combination C A B The target degree is taken as 1;
[0049] Add up the target degrees of all the marked link combinations corresponding to the traceability record R to get the total target degree D, and then get the target value of the traceability record R M R =1-e -D ,If the target value is greater than the preset target threshold, the traceability record R is used as the target record, and then all target records are obtained.
[0050] Target records refer to those traceability records that are normal and less suspicious during the process of entering product production information. The normality of the information is judged by the hash value and production time, and the suspicion is judged by the operator's authority and working hours. The use of such traceability records, that is, target records, helps to improve the reliability of the following calculations and judgments.
[0051] Step S200: Detecting the product characteristics of the product corresponding to the target record, obtaining the degree of difference of each product characteristic based on the change of each product characteristic, and then extracting the target characteristics of the product;
[0052] Step S210: All target records correspond to the same product, and the product type is food. The time when the code of product Y corresponding to a target record X is assigned is set as T1. The bacterial count of product Y is monitored in real time at each time after time T1. The time when the bacterial count of product Y just exceeds the threshold is set as T2.
[0053] Step S220: Product characteristics include grayscale value, water content, and water activity. Images of product Y at time T1 and time T2 are taken and converted into grayscale images. Based on the grayscale value of each pixel in the grayscale image, pixels with the same grayscale value are aggregated to obtain grayscale histograms G1 and G2 corresponding to product Y at time T1 and time T2. The Euclidean distance between the two grayscale histograms is calculated as the histogram similarity. The average of the histogram similarities corresponding to each target record is calculated as the degree of grayscale value difference.
[0054] Create a first histogram H1 and a second histogram H2, both of which have empty elements. Measure the moisture content W1 and W2 of product Y at time T1 and time T2, respectively. Input the moisture content W1 into the first histogram H1 and the moisture content W2 into the second histogram H2. Record the moisture content of the corresponding product for each target and input it into the first histogram H1 and the second histogram H2. Calculate the Euclidean distance between the two histograms as the degree of difference in moisture content.
[0055] Establish a third histogram H3 and a fourth histogram H4 with empty elements 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 each target record, input the water activity of the product corresponding to 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 use the characteristic corresponding to the maximum degree of difference as the target characteristic of the product.
[0056] The Euclidean distance is a positive number greater than 0. 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, it is necessary to select the characteristics that are significantly different from the normal state of the food (that is, at time T1) as the target characteristics, so that subsequent analysis and calculation will be more accurate and reliable.
[0057] The principle of obtaining the target characteristics in this scheme is: since the gray value, water content and water activity belong to different physical quantities and have different units, if we want to compare the degree of difference between them from time T1 to time T2 (that is, the degree of change from time T1 to time T2), direct comparison is not rigorous enough, so in this scheme, we change the dimension for processing, that is, input them into the corresponding histogram, compare the Euclidean distance, and take the one with the largest Euclidean distance as the target characteristic.
[0058] Step S300: monitoring the characteristic value corresponding to the target characteristic within the time period after the target record is coded, and establishing a characteristic function of the corresponding characteristic value changing over time, and then obtaining the characteristic duration of the product based on the characteristic function;
[0059] Step S310: Obtain the time T1 at which the product Y corresponding to the target record X is coded, set the detection time interval to S, and take time T1 as the starting point. At the detection times S, 2×S, and n×S intervals after time T1, sequentially obtain the characteristic value of the target characteristic of product Y. If the target characteristic is a grayscale value, add the grayscale values of all pixels in the grayscale image and calculate the average value as the characteristic value. If the target characteristic is water content or water activity, use the measured corresponding water content or water activity as the characteristic value.
[0060] According to the characteristic value of each target recorded at each detection moment, the characteristic values belonging to a certain detection moment are added together to obtain the average value, which is used as the average characteristic value at a certain detection moment, and a characteristic function of the average characteristic value changing with time is established;
[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 value Z^ is between the average characteristic value of the k×Sth detection moment corresponding to the characteristic function and the average characteristic value of the (k+1)×Sth detection moment, then the midpoint between the detection moments k×S and (k+1)×S is taken as time T3, and the duration between the origin in the characteristic function and time T3 is taken as the characteristic duration of the product.
[0062] Step S400: Obtain the coding time corresponding to the traceability record to be detected and the time when the traceability code is entered, and obtain the warning value of the traceability record to be detected based on the characteristic duration, and determine whether to issue a warning prompt to relevant personnel based on the warning value.
[0063] Step S400 includes: obtaining the coding time corresponding to the current traceability record to be tested and the time when the traceability code is entered, subtracting the entry completion time from the coding time to obtain the target time period, and dividing the duration corresponding to the target time period by the value of the characteristic duration as the warning value of the traceability to be tested. If the warning value is greater than the preset warning threshold, a warning prompt will be issued to the traceability record to be tested and related 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, the same traceability code may be used for the same batch of products. For example, a batch of products needs to be processed continuously for 30 days, starting from May 1st and ending on the 30th. Assume that according to the target record corresponding to the product history, the characteristic duration of the product is 10 days, but there is only one traceability code on May 1st (May 1st is the time when the traceability code is entered). Each subsequent product is marked 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, if subsequent products still use the traceability code of May 1st, the reliability and reference value of the traceability code will gradually decrease. In this embodiment, the preset warning threshold is 0.5, which means that products after May 5th need to be re-coded.
[0065] The present invention also provides a production traceability management system based on the entire chain, such as Figure 2 As shown, it includes: target record extraction module, target feature extraction module, feature duration calculation module and early warning prompt module;
[0066] Target record extraction module: used to retrieve historical traceability records for each production link of the product; according to the execution order of each production link, several link combinations are obtained, and the production information of the production link corresponding to each link combination in the traceability record is extracted and analyzed to obtain the target value of the traceability record, and the target record in the traceability record is extracted based on the target value;
[0067] Target feature extraction module: used to detect the product features of the product corresponding to the target record, obtain the degree of difference of each product feature based on the change of each product feature, and then extract the target feature in the product;
[0068] Characteristic duration calculation module: used to monitor the characteristic value corresponding to the target characteristic within the period after the target record is coded, and establish a characteristic function of the corresponding characteristic value changing over time, and then obtain the characteristic duration of the product based on the characteristic function;
[0069] Early warning prompt module: used to obtain the coding time corresponding to the traceability record to be tested and the time when the traceability code is entered, and obtain the early warning value of the traceability record to be tested based on the characteristic duration, and determine whether to issue an early warning prompt to the relevant personnel based on the early warning value.
[0070] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
Claims
1. A production traceability management method based on the entire chain, characterized in that: The following steps are involved: Step S100: Retrieving historical traceability records for each production link of the product; obtaining several link combinations based on the execution order of each production link, extracting and analyzing the production information of the production link corresponding to each link combination in the traceability record, obtaining the target value of the traceability record, and extracting the target record in the traceability record based on the target value; Step S200: Detecting the product characteristics of the product corresponding to the target record, obtaining the degree of difference of each product characteristic based on the change of each product characteristic, and then extracting the target characteristics of the product; Step S300: monitoring the characteristic value corresponding to the target characteristic within the time period after the target record is coded, and establishing a characteristic function of the corresponding characteristic value changing over time, and then obtaining the characteristic duration of the product based on the characteristic function; Step S400: Obtain the coding time and the time when the traceability code is entered corresponding to the traceability record to be detected, obtain the warning value of the traceability record to be detected based on the characteristic duration, and determine whether to issue a warning prompt to relevant personnel based on the warning value; Step S100 includes: Step S110: Obtain several historical traceability records. The traceability records are records that record the production information corresponding to each production link of the product and enter them into the traceability system built on the blockchain network for tracing. The production links in the traceability system are sorted in the order of execution, and the block header and block body corresponding to each production link in the traceability system are extracted. 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: Set the next production link of a production link A in a traceability record R as B, and set 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 link combination C A B Mark and set the initial target level to 0; Get the operator P corresponding to link A A and operation time T A , and the operator P corresponding to link B B and operation time T B If the operator P A Operator P has the authority to enter information for link A. B Has the authority to enter information for link B, and the operation time is T A In the operator P A Working hours, operation time T B In the operator P B During the working hours, the link combination C A B The target degree is taken as 1; Add up the target degrees of all the marked link combinations corresponding to the traceability record R to get the total target degree D, and then get the target value of the traceability record R M R =1-e -D ,If the target value is greater than the preset target threshold, the traceability record R is used as the target record, and then all target records are obtained.
2. A full-link production traceability management method according to claim 1, characterized in that: Step S200 includes: Step S210: All target records correspond to the same product, and the product type is food. The time when the code of product Y corresponding to a target record X is assigned is set as T1. The bacterial count of product Y is monitored in real time at each time after time T1. The time when the bacterial count of product Y just exceeds the threshold is set as T2. Step S220: Product characteristics include grayscale value, water content, and water activity. Images of product Y at time T1 and time T2 are taken and converted into grayscale images. Based on the grayscale value of each pixel in the grayscale image, pixels with the same grayscale value are aggregated to obtain grayscale histograms G1 and G2 corresponding to product Y at time T1 and time T2. The Euclidean distance between the two grayscale histograms is calculated as the histogram similarity. The average of the histogram similarities corresponding to each target record is calculated as the degree of grayscale value difference. Create a first histogram H1 and a second histogram H2, both of which have empty elements. Measure the moisture content W1 and W2 of product Y at time T1 and time T2, respectively. Input the moisture content W1 into the first histogram H1 and the moisture content W2 into the second histogram H2. Record the moisture content of the corresponding product for each target and input it into the first histogram H1 and the second histogram H2. Calculate the Euclidean distance between the two histograms as the degree of difference in moisture content. Establish a third histogram H3 and a fourth histogram H4 with empty elements 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 each target record, input the water activity of the product corresponding to 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 use the characteristic corresponding to the maximum degree of difference as the target characteristic of the product.
3. A full-link production traceability management method according to claim 2, characterized in that: Step S300 includes: Step S310: Obtain the time T1 at which the product Y corresponding to the target record X is coded, set the detection time interval to S, and take time T1 as the starting point. At the detection times S, 2×S, and n×S intervals after time T1, sequentially obtain the characteristic value of the target characteristic of product Y. If the target characteristic is a grayscale value, add the grayscale values of all pixels in the grayscale image and calculate the average value as the characteristic value. If the target characteristic is water content or water activity, use the measured corresponding water content or water activity as the characteristic value. According to the characteristic value of each target recorded at each detection moment, the characteristic values belonging to a certain detection moment are added together to obtain an average value, which is used as the average characteristic value at the certain detection moment, and a characteristic function of the average characteristic value changing with time is established; 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 of the corresponding k×S detection moment and the average characteristic value of the (k+1)×S detection moment in the characteristic function, then the midpoint between the detection moments k×S and (k+1)×S is taken as time T3, and the duration between the origin in the characteristic function and time T3 is taken as the characteristic duration of the product.
4. A full-link production traceability management method according to claim 1, characterized in that: Step S400 includes: obtaining the coding time corresponding to the current traceability record to be tested and the time when the traceability code is entered, subtracting the entry completion time from the coding time to obtain the target time period, and dividing the duration corresponding to the target time period by the value of the characteristic duration as the warning value of the traceability to be tested. If the warning value is greater than the preset warning threshold, a warning prompt will be issued to the traceability record to be tested and related personnel.
5. A production traceability management system, used to implement a full-link production traceability management method according to any one of claims 1 to 4, characterized in that: The system includes a target record extraction module, a target feature extraction module, a feature duration calculation module and an early warning prompt module; Target record extraction module: used to retrieve historical traceability records for each production link of the product; according to the execution order of each production link, several link combinations are obtained, and the production information of the production link corresponding to each link combination in the traceability record is extracted and analyzed to obtain the target value of the traceability record, and the target record in the traceability record is extracted based on the target value; Target feature extraction module: used to detect the product features of the product corresponding to the target record, obtain the degree of difference of each product feature based on the change of each product feature, and then extract the target feature in the product; Characteristic duration calculation module: used to monitor the characteristic value corresponding to the target characteristic within the period after the target record is coded, and establish a characteristic function of the corresponding characteristic value changing over time, and then obtain the characteristic duration of the product based on the characteristic function; Early warning prompt module: used to obtain the coding time corresponding to the traceability record to be detected and the time when the traceability code is entered, and obtain the early warning value of the traceability record to be detected based on the characteristic duration, and determine whether to issue an early warning prompt to the relevant personnel based on the early warning value.
6. A production traceability management system according to claim 5, characterized in that: The target record extraction module includes a source record extraction unit and a target record extraction unit; 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; Target record extraction unit: used to obtain the next production link of a certain production link in the traceability record and use it as a link combination; according to the target degree corresponding to the link combination, the target value of the traceability record is calculated to obtain the target record.
7. A production traceability management system according to claim 5, characterized in that: The feature duration calculation module includes a feature function establishment unit and a feature duration calculation unit; Characteristic function establishment unit: used to obtain the time when the target record is corresponding to the product coding, and set the detection time interval, thereby obtaining a number of detection times, obtaining the characteristic value of the target characteristic of the product at the detection time, and establishing the characteristic function according to the characteristic value of each target record at each detection time; Feature duration calculation unit: used to obtain the feature duration of the product based on the characteristic value corresponding to each detection moment in the feature function.
Citation Information
Patent Citations
Food production information traceability management method and system
CN119990724A
Real-time alarm tracing apparatus and method in process industry production procedure
WO2023124778A1