Food safety traceability method and system based on Internet of Things

By comparing the food safety quality detection set with standards and Internet of Things data analysis, the correlation coefficients of each stage are calculated, and the safety impact analysis model is used to solve the problem that the food safety traceability system in the existing technology is difficult to identify the root cause of the problem, and the food is realized Improve the efficiency and effectiveness of safety management.

CN119205138AActive Publication Date: 2024-12-27SHENZHEN XIANYU NUTRITIOUS FOOD CO LTD

Patent Information

Application Number
CN202411222066.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-27
Estimated Expiration
2044-09-02

AI Technical Summary

Technical Problem

The existing Internet of Things food safety traceability system lacks in-depth data analysis and risk assessment mechanisms, making it difficult to accurately identify the root causes of food safety problems. Traditional food safety traceability methods are inefficient and prone to errors.

Method used

By conducting safety testing of food, obtaining food safety quality testing sets, comparing them with the food safety quality standard set, extracting items that exceed the standard, calculating the sum of correlation coefficients of each stage, using the safety impact analysis model to analyze IoT data, and correcting food Safety concern sequence to determine the food safety traceability results.

Benefits of technology

The overall efficiency and effectiveness of food safety management have been improved, the factors affecting food safety have been accurately identified, the problems have been quickly positioned, the effectiveness of risk management and resource utilization efficiency have been improved, and the transparency of the food supply chain and consumer confidence have been enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205138A_ABST
    Figure CN119205138A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of application of the Internet of Things, in particular to a food safety traceability method and system based on the Internet of Things, solves the problems of a traditional food safety traceability method, improves the overall efficiency and effect of food safety management, and provides technical support for food safety. The method comprises the following steps: performing safety detection on food to obtain a food safety quality detection set; comparing the food safety quality detection set with a food safety quality standard set, and extracting and summarizing items with detection results exceeding the standard to obtain a food safety exceeding item set; for each standard-exceeding item, extracting a food stage correlation vector corresponding to the standard-exceeding item from a preset item stage correlation database; and calculating a processing stage correlation coefficient sum, a transportation stage correlation coefficient sum, a storage stage correlation coefficient sum and a sales stage correlation coefficient sum in all the food stage correlation vectors, and sorting the stages according to calculation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things applications, and in particular to a food safety traceability method and system based on the Internet of Things. Background Art

[0002] In the current field of food safety supervision, as the food supply chain becomes increasingly complex and globalized, ensuring that every link from production to consumption meets safety standards has become a major challenge. Traditional food safety traceability methods often rely on paper records or manual monitoring, which is not only inefficient but also prone to errors and difficult to fully cover all links in the food supply chain.

[0003] With the rapid development of Internet of Things technology, its application in the field of food safety is becoming more and more extensive. Internet of Things technology can collect data on food processing, transportation, storage, sales and other links in real time and accurately through sensors, RFID tags, GPS positioning and other means, providing strong technical support for food safety traceability. However, the existing food safety traceability systems based on the Internet of Things mostly focus on the simple collection and display of data, lack in-depth data analysis and risk assessment mechanisms, and often find it difficult to accurately identify the root causes of food safety problems. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a food safety traceability method and system based on the Internet of Things, which solves the problems existing in traditional food safety traceability methods, improves the overall efficiency and effectiveness of food safety management, and provides technical support for food safety.

[0005] In a first aspect, the present invention provides a food safety traceability method based on the Internet of Things, the method comprising:

[0006] Conducting food safety testing to obtain a food safety quality testing set; the food safety quality testing set includes test results of multiple items;

[0007] Compare the food safety quality test set with the food safety quality standard set, extract and summarize the items whose test results exceed the standard, and obtain the food safety exceeding standard item set;

[0008] For each excessive item, extract the food stage related vector corresponding to the excessive item from a preset item stage related database;

[0009] Calculate the sum of the correlation coefficients of the processing stage, the transportation stage, the storage stage, and the sales stage in all food stage correlation vectors, and sort the stages according to the calculation results to obtain the first-order food safety concern sequence;

[0010] Collect IoT data at each stage of food, extract safety impact factors from IoT data at each stage, and obtain data sets of safety impact factors at each stage;

[0011] Input the safety impact factor dataset of each stage into the pre-built safety impact analysis model to obtain the food safety impact parameters corresponding to that stage;

[0012] Based on the food safety impact parameters of each stage, the sum of the correlation coefficients in the first-order food safety concern sequence is impact-corrected, and the first-order food safety concern sequence is sequence-corrected according to the corrected result to obtain a second-order food safety concern sequence;

[0013] The stage with the largest value in the second-order food safety concern sequence is taken as the food safety traceability result.

[0014] Furthermore, the method for obtaining the set of food safety excessive items includes:

[0015] Access to food safety and quality testing suites, including results of chemical composition testing, microbiological testing, physical property testing, and other specific testing;

[0016] Obtain a collection of food safety and quality standards, including relevant laws, regulations and standard guidelines formulated by countries and regions;

[0017] Obtain the maximum allowable limit of each test item;

[0018] The mathematical expression of the food safety quality standard set is:

[0019] S={s 1 ,s 2 ,...,s n};

[0020] Where S represents the food safety standard set and includes the maximum allowable limits of all test items, s i Indicates the maximum allowable limit of the i-th test item;

[0021] Then compare the test results in the food safety quality test set with the standard limits in the food safety quality standard set item by item; for each test result R i , when R i >S i When S i It is the maximum allowable limit of the test item;

[0022] All test items exceeding the standard limit are aggregated into one set to form a food safety excess item set;

[0023] Output a summary of food safety items that exceed standards to provide data support for subsequent analysis.

[0024] Furthermore, the set of food safety exceeding standard items is:

[0025] E={d i ∈D|d i >s i ,i=1,2,...,n};

[0026] Among them, E represents the food safety exceeding standard item set and includes all test items whose test results exceed their maximum allowable limits, D represents the food safety quality test set and includes the test results of all test items, and d i represents the test result of the i-th test item, s i represents the maximum allowable limit of the i-th test item, d i >s i Indicates the test result d of the i-th test item i Exceeds its maximum allowable limit i .

[0027] Furthermore, the food stage correlation vector includes a processing stage correlation coefficient, a transportation stage correlation coefficient, a storage stage correlation coefficient and a sales stage correlation coefficient.

[0028] Furthermore, the method for obtaining the first-order food safety concern sequence includes:

[0029] Extract the food stage related vector of each exceeding standard item from the food stage related vector set;

[0030] The relevant vector for each food stage is: V i =(v i,加工 , v i,运输 , v i,储存 , v i,销售 ) contains the processing stage correlation coefficient v i,加工 , Transportation stage correlation coefficient v i,运输 , storage phase correlation coefficient v i,储存 And the sales stage correlation coefficient v i,销售 ;

[0031] For all items exceeding the standard, the sum of the correlation coefficients of the processing stage, transportation stage, storage stage and sales stage is calculated respectively; the sum of the correlation coefficients of the processing stage is ∑v i,加工 , the sum of the correlation coefficients in the transportation stage is ∑v i,运输 , the sum of the correlation coefficients in the storage stage is ∑v i,存储 And the sum of the correlation coefficients of the sales stage is ∑v i,销售 ;

[0032] The processing, transportation, storage and sales stages are sorted according to the sum of the correlation coefficients, and the sorted sequence constitutes a first-order food safety concern sequence.

[0033] Furthermore, the first-order food safety concern sequence is:

[0034] sort(T 加工 , T 运输 , T 存储 , T 销售 );

[0035] Among them, sort is the sort function used, and T 加工 It represents the sum of the correlation coefficients of the processing stages, and the mathematical expression is:

[0036]

[0037] T 运输 It represents the sum of the correlation coefficients of the transportation stage, and the mathematical expression is:

[0038]

[0039] T 存储 Represents the sum of correlation coefficients in the storage phase, and the mathematical expression is:

[0040]

[0041] T 销售 It represents the sum of the correlation coefficients of the sales stages. The mathematical expression is:

[0042]

[0043] |E| represents the number of E elements in the set of food safety items exceeding standards.

[0044] Furthermore, the method for constructing the security impact analysis model includes:

[0045] Clean the collected food safety incident cases and related IoT data, remove outliers and fill in missing values;

[0046] Feature engineering of the dataset through feature selection, including temperature fluctuations, humidity changes, chemical exposure, physical damage, biological contamination risk, and transportation time and route;

[0047] Standardize or normalize the features;

[0048] Select machine learning models based on data characteristics and available technical tools to build security impact analysis models;

[0049] The data set is divided into a training set and a test set, and the security impact analysis model is trained using the training set;

[0050] Use grid search and random search to adjust the parameters of the security impact analysis model to optimize model performance;

[0051] After training is completed, the security impact analysis model is tested using the test set;

[0052] After the safety impact analysis model is constructed, the safety impact factor data sets of each stage are input into the corresponding safety impact analysis model;

[0053] The safety impact analysis model outputs the food safety impact parameters corresponding to each stage.

[0054] On the other hand, the present application also provides a food safety traceability system based on the Internet of Things, the system comprising:

[0055] The system comprises:

[0056] A safety testing module is used to perform safety testing on food and obtain a food safety quality testing set containing multiple testing items;

[0057] The result comparison module is used to compare the food safety quality test set with the food safety quality standard set, extract the items with test results exceeding the standard and summarize them into a food safety exceeding standard item set;

[0058] A phase-related database extraction module is used to extract, for each excessive item, a food phase-related vector corresponding to the excessive item from a preset project phase-related database;

[0059] The phase ranking module is used to calculate the sum of the correlation coefficients of all phases in the food phase correlation vectors, and generate a first-order food safety concern sequence based on the calculation results;

[0060] IoT data collection module, used to collect IoT data of food at various stages of processing, transportation, storage and sales;

[0061] The security impact factor extraction module is used to extract security impact factors from IoT data at each stage to form a data set of security impact factors at each stage;

[0062] The safety impact analysis model is used to input the safety impact factor data set of each stage into the pre-built safety impact analysis model to obtain the food safety impact parameters corresponding to the stage;

[0063] The impact correction and ranking module is used to perform impact correction on the sum of the correlation coefficients in the first-order food safety concern sequence based on the food safety impact parameters of each stage, and generate a second-order food safety concern sequence based on the corrected results;

[0064] The traceability result determination module is used to select the stage with the largest value from the second-order food safety concern sequence as the result of food safety traceability.

[0065] In a third aspect, the present application provides an electronic device, comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, and the computer program, when executed by the processor, implements the steps of any one of the above methods.

[0066] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps in any one of the above-mentioned methods when executed by a processor.

[0067] Compared with the prior art, the beneficial effects of the present invention are as follows: through the Internet of Things technology, data on food processing, transportation, storage and sales in various links can be collected in real time and accurately to ensure the comprehensiveness and accuracy of the data; the extraction of safety impact factors based on the Internet of Things data can accurately identify factors affecting food safety; by comparing the food safety quality detection set with the food safety quality standard set, items that do not meet the standards can be automatically identified, and the automated detection and summary functions of items exceeding the standards can quickly locate the problem and improve the response speed to the problem; the food stage-related vectors stored in the project stage-related database can quantify the correlation between different detection items and various stages of the supply chain to achieve data-driven risk assessment, and by calculating the sum of the correlation coefficients of different stages and sorting them, priority can be given to the stage with the highest risk, thereby improving the effectiveness of risk management; the safety impact analysis model can modify the food safety concern sequence according to the safety impact factors in the Internet of Things data, so that the risk assessment is closer to the actual situation, and through the construction of the second-order food safety concern sequence, the attention of each stage can be dynamically adjusted to ensure the flexibility of the food safety management strategy. By sorting and correcting the food safety concern sequence, regulatory resources can be allocated more reasonably, and efforts can be concentrated on solving the most urgent problems, so that regulatory authorities and enterprises can focus on high-risk links and improve resource utilization efficiency. By providing a complete traceability chain, regulatory authorities and consumers can track the entire process of food from source to table, enhance the transparency of the supply chain, improve consumer confidence, and also establish a good brand image for the company. By regularly updating the relevant database of the project phase according to new research findings and industry changes, the continuous improvement and adaptability of the food safety management system can be ensured. By collecting new food safety incident cases and adjusting the correlation coefficient, the latest correlation situation can be reflected in a timely manner to maintain the timeliness and effectiveness of the system. Through data analysis and risk assessment, data-based evidence is provided to decision makers, which helps to make more scientific and reasonable decisions, formulate more targeted food safety policies and standards, and improve the food safety level of the entire industry. The food safety traceability method based on the Internet of Things solves the problems existing in the traditional food safety traceability method, improves the overall efficiency and effectiveness of food safety management, and provides technical support for food safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1 is a flow chart of the present invention;

[0069] Figure 2 is a flowchart of a method for constructing a security impact analysis model;

[0070] Figure 3 This is a sample diagram of the database structure related to the project phase;

[0071] Figure 4 This is a structural diagram of the food safety traceability system based on the Internet of Things. DETAILED DESCRIPTION

[0072] In the description of the present application, those skilled in the art should know that the present application can be implemented as a method, an apparatus, an electronic device, and a computer-readable storage medium. Therefore, the present application can be specifically implemented in the following forms: complete hardware, complete software (including firmware, resident software, microcode, etc.), a combination of hardware and software. In addition, in some embodiments, the present application can also be implemented in the form of a computer program product in one or more computer-readable storage media, and the computer-readable storage medium contains computer program code.

[0073] The above-mentioned computer-readable storage medium may adopt any combination of one or more computer-readable storage media. Computer-readable storage media include: electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media include: portable computer disks, hard disks, random access memories, read-only memories, erasable programmable read-only memories, flash memories, optical fibers, optical disc read-only memories, optical storage devices, magnetic storage devices, or any combination of the above. In the present application, computer-readable storage media can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device.

[0074] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws.

[0075] The present application describes the provided methods, devices, and electronic devices through flowcharts and / or block diagrams.

[0076] It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions. These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine, and these computer-readable program instructions are executed by a computer or other programmable data processing device to produce a device that implements the functions / operations specified by the boxes in the flowchart and / or block diagram.

[0077] These computer-readable program instructions may also be stored in a computer-readable storage medium that enables a computer or other programmable data processing device to work in a specific manner. In this way, the instructions stored in the computer-readable storage medium produce an instruction device product including functions / operations specified in the blocks in the flowchart and / or block diagram.

[0078] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby enabling the instructions executed on the computer or other programmable data processing apparatus to provide a process for implementing the functions / operations specified in the blocks in the flowchart and / or block diagram.

[0079] The present application is described below in conjunction with the drawings in the present application.

[0080] Embodiment 1: Figures 1 to 3 As shown, the food safety traceability method based on the Internet of Things of the present invention specifically includes the following steps:

[0081] S1. Perform food safety testing to obtain a food safety quality testing set; the food safety quality testing set includes test results of multiple items;

[0082] Step S1 is the basis of the entire food safety traceability method, which involves the process of conducting food safety testing and obtaining a food safety quality testing set; the details are as follows:

[0083] First, prepare for food safety testing, including testing with high-precision chemical analyzers, microbiological detectors and other professional instruments; randomly select representative samples from the food batches to be tested according to food safety testing standards and procedures; ensure that testing personnel have received appropriate training and are familiar with operating procedures and safety regulations;

[0084] After that, the testing items of the food to be tested are classified into: chemical composition testing, microbiological testing, physical property testing and nutritional component testing; chemical composition testing is to test whether the additives, heavy metals, pesticide residues and other chemical substances in the food exceed the standard; microbiological testing is to check the contamination of microorganisms such as bacteria, molds, yeasts, etc.; physical property testing is to measure the physical indicators of food such as moisture content, pH value, fat content, etc.; nutritional component testing is to conduct specific tests according to different types of food, such as testing protein, fat, carbohydrates, etc.;

[0085] After food testing is completed, the test data should be recorded, including: using an electronic recording system to record all data during the testing process to ensure the accuracy and traceability of the data; using a standardized format to record the test results for subsequent analysis and processing;

[0086] When testing food, a strict quality control system needs to be established to ensure the reliability and consistency of the test results; and the testing equipment needs to be calibrated and verified regularly to ensure accuracy;

[0087] Aggregate the test results of all test items into a food safety quality test set; ensure that the food safety quality test set is stored in a structured form to facilitate subsequent processing;

[0088] The mathematical expression of the food safety quality detection set is:

[0089] D={(A i ,R i )|i=1,2,...,n};

[0090] Among them, D represents the product safety and quality inspection set, A i represents the i-th test item, R i Represents the test result of the i-th test item.

[0091] Ensure the accuracy of test results by using high-precision chemical analyzers, microbiological detectors and other professional instruments; randomly select representative samples from the food batches to be tested in accordance with food safety testing standards and procedures to ensure the representativeness of the samples and improve the effectiveness of test results; ensure that test personnel have received appropriate training and are familiar with operating procedures and safety regulations to improve the accuracy and safety of testing; comprehensively evaluate food safety through chemical composition testing, microbiological testing, physical property testing and other specific testing methods to ensure that all factors affecting food safety are covered; use an electronic recording system to record all data during the testing process to ensure the accuracy and traceability of the data, and use a standardized format to record the test results for subsequent data analysis and processing; establish a strict quality control system to ensure the reliability and consistency of test results, and regularly calibrate and verify testing equipment to ensure the accuracy of the equipment; summarize the test results of all test items into a food safety quality test set, and ensure that the set is stored in a structured form to facilitate subsequent data processing and utilization; provide strong technical support for food safety by forming an efficient, accurate and reliable food safety quality testing method.

[0092] S2. Compare the food safety quality test set with the food safety quality standard set, extract and summarize the items whose test results exceed the standard, and obtain a food safety exceeding standard item set;

[0093] Step S2 is to compare the food safety quality test set with the food safety quality standard set, determine which test results exceed the safety standard limit, and aggregate these exceeded items to form a food safety exceeded item set; the details are as follows:

[0094] Obtaining the food safety quality test set in step S1, the food safety quality test set including the results of chemical composition testing, microbial testing, physical property testing and other specific testing;

[0095] Obtain a set of food safety quality standards, including the maximum allowable limits for each test item based on relevant laws, regulations and standard guidelines formulated by the country and region; standard limits include national food safety standards, industry recommended standards or other applicable standards;

[0096] The food safety quality standard set is:

[0097] S={s 1 ,s 2 ,...,s n};

[0098] Where S represents the food safety standard set and includes the maximum allowable limits of all test items, s i Indicates the maximum allowable limit of the i-th test item;

[0099] Then compare the test results in the food safety quality test set with the standard limits in the food safety quality standard set item by item; for each test result R i , when R i >S i When S i It is the highest permissible limit of the test item; when comparing, a computer program is used to automatically perform the comparison process to improve efficiency and accuracy;

[0100] Aggregate all test items that exceed the standard limit into a set to form a food safety exceeding standard item set; output the aggregated food safety exceeding standard item set to provide data support for subsequent analysis;

[0101] The food safety exceeding standard items are as follows:

[0102] E={d i ∈D|d i >s i ,i=1,2,...,n};

[0103] Among them, E represents the food safety exceeding standard item set and includes all test items whose test results exceed their maximum allowable limits, D represents the food safety quality test set and includes the test results of all test items, and d i represents the test result of the i-th test item, si represents the maximum allowable limit of the i-th test item, d i >s i Indicates the test result d of the i-th test item i Exceeds its maximum allowable limit i .

[0104] By using high-precision professional instruments for testing, the accuracy of the test results is guaranteed. A strict quality control system is established, and the testing equipment is calibrated and verified regularly to ensure that the test results are accurate. By properly training the test personnel and familiarizing them with the operating procedures and safety specifications, the consistency and standardization of operations are ensured. The test results are recorded in a standardized format to facilitate subsequent analysis and processing. All test data are recorded through an electronic record system to ensure the accuracy and traceability of the data. The test results are stored in a structured manner to facilitate subsequent processing and query. Unqualified items are discovered in a timely manner by quickly comparing the food safety quality test set with the food safety quality standard set. Exceeding items are aggregated into a set for subsequent tracking and processing. The relevant laws, regulations and standard guidelines formulated by the country and region are followed to ensure the legality of the testing work, and the food safety is ensured to meet the regulatory requirements by comparing with the official food safety standards and industry recommended standards. A clear list of exceeding standards is provided so that regulatory authorities, manufacturers and consumers can understand the specific problems of food. Through the collection of food safety exceeding standards, the efficiency of food safety management is effectively improved, the quality and safety of food is ensured, and the health of consumers is protected.

[0105] S3. For each excessive item, extract the food stage related vector corresponding to the excessive item from a preset project stage related database; the food stage related vector includes a processing stage related coefficient, a transportation stage related coefficient, a storage stage related coefficient and a sales stage related coefficient;

[0106] Step S3 is to extract the food stage related vector corresponding to the exceeded item from the preset item stage related database; the details are as follows:

[0107] First, build the project phase related database, including:

[0108] List all food safety testing items, including chemical composition testing, such as heavy metal and pesticide residue testing; microbial testing, such as bacteria and mold testing; physical property testing, such as moisture content and pH value testing; nutritional component testing, such as protein, fat, and carbohydrate testing;

[0109] Identify the various stages in the food process from production to consumption, including processing, transportation, storage and marketing;

[0110] Collect past food safety incident cases, including detailed descriptions of the incidents, types of food affected, test items, and stages when the problems occurred, and analyze food safety incident cases to determine which test items are associated with which stages;

[0111] Organize a food safety expert group to evaluate the correlation between each test item and different stages. The expert group assigns a correlation coefficient to each test item and each stage based on their experience and expertise;

[0112] The correlation coefficients between each test item and each stage such as processing, transportation, storage, and sales are entered into the database. Each test item has a corresponding stage correlation vector. The food stage correlation vector is:

[0113] V=(v 加工 , v 运输 , v 储存 , v 销售 );

[0114] The correlation coefficient v takes a value between 0 and 1, where 0 indicates no correlation and 1 indicates a high correlation;

[0115] Regularly update the database related to the project phase to reflect new research findings or industry changes; collect new food safety incident cases and adjust the correlation coefficients to reflect the latest correlations;

[0116] like Figure 3 As shown in the figure, an example of the database structure related to project phases is shown, which uses a matrix to represent the correlation coefficients between these projects and phases, where:

[0117] A, B, C, and D represent chemical composition testing, microbiological testing, physical property testing, and nutritional component testing, respectively; processing, transportation, storage, and sales represent supply chain status;

[0118] exist Figure 3 The correlation coefficient between item A and the processing stage is 0.8, which means that the item is highly correlated with the processing stage; the correlation coefficient between item B and the transportation stage is 0.7, which means that the item is highly correlated with the transportation stage; and so on, so that it is easy to see the correlation between each item and each stage;

[0119] For example:

[0120] Test item A, such as pesticide residues:

[0121] The correlation coefficient for the processing stage was 0.8, indicating that pesticide residues were highly correlated with the processing stage;

[0122] The correlation coefficient of the transport stage was 0.4, indicating that pesticide residues were somewhat correlated with the transport stage;

[0123] The correlation coefficient for the storage stage was 0.3, indicating that the pesticide residues were less correlated with the storage stage;

[0124] The correlation coefficient of the sales stage was 0.2, indicating that pesticide residues had the lowest correlation with the sales stage;

[0125] Test item B, such as bacterial contamination:

[0126] The correlation coefficient for processing stage was 0.2, indicating that bacterial contamination was less correlated with processing stage;

[0127] The correlation coefficient for the transport stage was 0.7, indicating that bacterial contamination was highly correlated with the transport stage;

[0128] The correlation coefficient of the storage stage was 0.5, indicating that bacterial contamination was somewhat correlated with the storage stage;

[0129] The correlation coefficient of sales stage was 0.1, indicating that bacterial contamination had the lowest correlation with sales stage;

[0130] After the relevant database of the project phase is built, each excessive item P is selected from the set of food safety excessive items obtained in step S2. i ; For each exceeding standard item P i , find the corresponding entry in the project phase related database; the food phase related vector V in this entry i for:

[0131] V i =(v i,加工 , v i,运输 , v i,储存 , v i,销售 );

[0132] Among them, v i,加工 , v i,运输 , v i,储存 and v i,销售 Respectively represent the correlation coefficients between the exceeding standard items and the processing, transportation, storage, and sales stages;

[0133] For each exceeding standard item P i , calculate its food stage related vector V i The sum of the correlation coefficients of each stage.

[0134] By building a project phase-related database, we systematically analyze the correlation between different food safety testing items and the processing, transportation, storage and sales stages in the food supply chain; by evaluating the degree of correlation between each testing item and different stages, we can manage food safety issues in a refined manner and identify the key links where problems occur in a targeted manner; by quantifying the correlation coefficients between testing items and different stages, we can make more scientific decisions based on data rather than relying on experience and intuition; we regularly update the project phase-related database to reflect new research findings or industry changes to ensure that food safety management strategies keep pace with the times; we collect cases of food safety incidents that have occurred in the past and analyze the correlation between testing items and the stages where problems occur, providing empirical evidence for food safety management; we organize a food safety expert group to evaluate the degree of correlation between testing items and different stages to ensure the accuracy and credibility of the correlation coefficients; by analyzing the stage-related vectors, we can predict potential food safety risk points and take preventive measures in advance; we can clarify which testing items are highly correlated with which stages, helping regulatory authorities and food production companies to allocate resources more effectively and focus on high-risk links; by extracting the food stage-related vectors corresponding to the exceeded items in the construction of the project phase-related database, we can improve the efficiency and accuracy of food safety management and ensure that every link in the food supply chain meets safety standards.

[0135] S4. Calculate the sum of the correlation coefficients of the processing stage, the transportation stage, the storage stage, and the sales stage in all food stage correlation vectors, and sort the stages according to the calculation results to obtain a first-order food safety concern sequence;

[0136] The goal of step S4 is to calculate the sum of the correlation coefficients of the processing stage, transportation stage, storage stage, and sales stage in all food stage correlation vectors, and sort these stages according to the calculation results to obtain a first-order food safety concern sequence; specifically, as follows:

[0137] Extracting the food stage related vector of each exceeding standard item from the food stage related vector set obtained in step S3;

[0138] The relevant vector for each food stage is: V i =(v i,加工 , v i,运输 , v i,储存 , v i,销售 ) contains the processing stage correlation coefficient v i,加工 , Transportation stage correlation coefficient v i,运输 , storage phase correlation coefficient v i,储存 And the sales stage correlation coefficient v i,销售 ;

[0139] For all items exceeding the standard, the sum of the correlation coefficients of the processing stage, transportation stage, storage stage and sales stage is calculated respectively; the sum of the correlation coefficients of the processing stage is ∑v i,加工 , the sum of the correlation coefficients in the transportation stage is ∑v i,运输 , the sum of the correlation coefficients in the storage stage is ∑v i,存储 And the sum of the correlation coefficients of the sales stage is ∑v i,销售 ;

[0140] According to the sum of the correlation coefficients of the processing stage, transportation stage, storage stage and sales stage, they are sorted and the sorted sequence constitutes the first-order food safety concern sequence;

[0141] The first-order food safety concern sequence is:

[0142] sort(T 加工 , T 运输 , T 存储 , T 销售 );

[0143] Among them, sort is the sort function used, and T 加工 It represents the sum of the correlation coefficients of the processing stages, and the mathematical expression is:

[0144]

[0145] T 运输 It represents the sum of the correlation coefficients of the transportation stage, and the mathematical expression is:

[0146]

[0147] T 存储 Represents the sum of correlation coefficients in the storage phase, and the mathematical expression is:

[0148]

[0149] T 销售 It represents the sum of the correlation coefficients of the sales stages. The mathematical expression is:

[0150]

[0151] |E| represents the number of E elements in the set of food safety items exceeding standards.

[0152] By comparing the food safety quality test set with the food safety quality standard set, it is possible to systematically identify which test results exceed the safety standard limit; and it covers all major aspects of food safety testing, including chemical composition testing, microbial testing, physical property testing and other specific tests, and builds a project stage-related database, covering the entire process of food production to consumption, including processing, transportation, storage and sales; by extracting food stage-related vectors related to the exceeded items, it is easy to determine the specific stage where the problem occurs; the expert group evaluates the degree of correlation between each test item and different stages, making the problem location more accurate; uses the correlation coefficient to measure the correlation between different stages and food safety incidents, providing quantitative indicators; calculates The sum of the correlation coefficients at each stage provides clear data support for decision makers, making it easier to identify key areas for priority treatment; regularly updates the relevant database of the project stage to ensure that the information promptly reflects the latest research findings and industry changes; the continuous maintenance and updating of the database helps to improve the food safety management system and adapt to changing situations; through the calculated first-order food safety concern sequence, it guides regulatory authorities and enterprises to take targeted measures to give priority to solving problems in high-risk links; outputs a summarized set of food safety exceeding standard items to increase the transparency of food safety test results; by providing a comprehensive framework to identify and solve food safety problems, it can also guide the effective allocation of resources through quantitative analysis, thereby improving the efficiency and effectiveness of food safety management.

[0153] S5. Collect IoT data of food at each stage, extract safety impact factors from IoT data at each stage, and obtain a data set of safety impact factors at each stage;

[0154] The goal of step S5 is to collect IoT data at each stage of food, extract safety impact factors from IoT data at each stage, and obtain a data set of safety impact factors at each stage; the details are as follows:

[0155] Deploy various IoT sensors and devices at different stages of the food supply chain, such as temperature sensors, humidity sensors, pressure sensors, location trackers, and RFID tags; sensors and devices cover key nodes in the food supply chain, including processing, transportation, storage, and sales, and can capture and transmit data in real time; the types of data collected are diverse, including temperature, humidity, light intensity, location information, timestamps, and food status; data collection should ensure real-time and accuracy, and reflect changes in food status;

[0156] Process the collected data, including removing noise data, duplicate data, erroneous data, etc., to ensure the accuracy and consistency of the data;

[0157] The processed output is sent to a central server or cloud platform through wireless networks such as Wi-Fi, 4G / 5G, LoRaWAN, etc. The collected data is stored using database management systems such as MySQL, MongoDB, etc. to ensure data security and accessibility;

[0158] Use data analysis tools and techniques, such as Python's Pandas library and R language, to pre-process the collected data, such as cleaning and formatting; extract key safety factors from the processed data, including: temperature fluctuations, humidity changes, chemical exposure, physical damage, biological contamination risks, transportation time and transportation routes;

[0159] Among them, temperature fluctuations that are too high or too low may cause food quality to deteriorate or spoil, and temperature that is too high will accelerate chemical reactions in food, resulting in loss of nutrients or the production of harmful substances. Temperature that is too low may cause some foods to freeze, changing the taste or texture. Inappropriate temperature may also promote the growth of microorganisms, especially bacteria and fungi, which may lead to food spoilage. In humidity changes, humidity that is too high or too low may affect the preservation state of food. In a high humidity environment, food is easy to absorb moisture, resulting in increased moisture content, affecting taste and quality. Excessive humidity may also promote mold growth, especially for grains and dry foods. A low humidity environment may cause some foods to lose moisture, become dry or hardened. Chemical exposure refers to harmful chemicals that food is exposed to during processing, packaging or transportation, and exposure to harmful chemicals, such as plasticizers in some plastic products and heavy metals in metal containers, may lead to chemical pollution. Substances can migrate into food, posing a potential threat to human health; physical damage generally refers to mechanical damage to food during processing, packaging or transportation, and physical damage can destroy the integrity of food, making it easier for microorganisms to invade the damaged area. Damage can also cause the appearance and taste of food to deteriorate, reducing its market value; biological contamination risk mainly refers to food contamination caused by organisms such as bacteria, viruses, and fungi, and microbial contamination can cause food to spoil and deteriorate, produce toxins, and pose a threat to human health. Biological contamination can also cause foodborne diseases such as food poisoning; transportation time and transportation route refer to the length of time and path that food experiences during the logistics process from the place of production to the point of sale, and longer transportation time can increase the risk of food deterioration during transportation. Inappropriate transportation routes can lead to poor temperature and humidity conditions, affecting the preservation of food. Delays that may be encountered during transportation can also increase the risk of food spoilage.

[0160] Integrate the extracted safety impact factors into a data set for subsequent analysis; use data visualization tools such as Tableau, PowerBI, etc. to present the data in the form of charts to help intuitively understand the data.

[0161] Real-time data collection enables regulators to respond quickly to potential safety issues and reduce the risk of food contamination or spoilage. By covering key nodes throughout the food supply chain, data from all important links can be captured and analyzed. Data cleaning ensures data accuracy and consistency and reduces the possibility of false positives. An efficient database management system is used to store data to ensure data security and accessibility. Advanced data analysis tools and techniques are used to extract valuable information from data to help identify food safety risks. Data visualization tools are used to make complex data easy to understand, so that people with non-technical backgrounds can quickly grasp the situation. The data sets provided can be directly used in subsequent safety impact analysis models to provide scientific basis for decision makers. Real-time data sharing enhances supply chain transparency and facilitates the establishment of consumer trust. Adjustments and expansions are made based on new needs and technological advances to ensure the continued effectiveness and advancement of the system. By effectively collecting IoT data at all stages of the food supply chain and extracting key elements related to food safety, support is provided for subsequent risk assessment and food safety traceability.

[0162] S6. Input the safety impact factor data set for each stage into the pre-built safety impact analysis model to obtain the food safety impact parameters corresponding to that stage;

[0163] The goal of step S6 is to input the safety impact factor dataset of each stage into the pre-built safety impact analysis model to obtain the food safety impact parameters corresponding to the stage; the details are as follows:

[0164] First, build a security impact analysis model, including:

[0165] Clean the collected food safety incident cases and related IoT data, remove outliers and fill in missing values;

[0166] Perform feature engineering on the dataset through feature selection or feature transformation to ensure that the input of the safety impact analysis model is the most predictive feature; features include temperature fluctuations, humidity changes, chemical exposure, physical damage, biological contamination risks, and transportation time and route; standardize or normalize the features to ensure that the features are of the same magnitude;

[0167] Consider the characteristics of the data and available technical tools to select rule-based models, statistical models, or machine learning models to build security impact analysis models;

[0168] The data set is divided into a training set and a test set. The security impact analysis model is trained with the training set. The parameters of the security impact analysis model are adjusted using grid search, random search and other methods to optimize the model performance.

[0169] After training, the security impact analysis model is tested using the test set; cross-validation and other techniques are used to prevent overfitting; evaluation indicators such as accuracy, precision, recall, F1 score, etc. are used to evaluate the performance of the model, and the best model is selected based on the evaluation results;

[0170] After the safety impact analysis model is constructed, the safety impact factor data sets of each stage are input into the corresponding safety impact analysis model; the safety impact analysis model outputs the food safety impact parameters corresponding to each stage, and the food safety impact parameters corresponding to each stage reflect the potential impact of that stage on food safety;

[0171] The safety impact analysis model is M, which is used to calculate the safety impact parameter p. For each stage of the safety impact factor data set X s , the output of the security impact analysis model M is p s ;

[0172] For the processing stage, the safety impact factor dataset is X 加工 , then the food safety impact parameter in the processing stage is p 加工 =M(X 加工 );

[0173] For the transportation phase, the safety impact factor dataset is X 运输 , then the food safety impact parameter in the transportation stage is p 运输 =M(X 运输 );

[0174] For the storage phase, the security impact factor dataset is X 存储 , then the food safety impact parameter during the storage stage is p 存储 =M(X 存储 );

[0175] For the sales stage, the safety impact factor dataset is X 销售 , then the food safety impact parameter at the sales stage is p 销售 =M(X 销售 ).

[0176] The safety impact parameters calculated by the safety impact analysis model provide an in-depth understanding of the impact of each stage on food safety; the safety impact analysis model can provide quantitative risk assessment results, which is convenient for accurately identifying the root causes of food safety problems; the safety impact parameters provide a scientific basis for decision makers and support more effective resource allocation and risk management; the safety impact analysis model is adjusted and optimized based on new data and knowledge to adapt to changing situations; advanced data analysis and machine learning technologies are used to improve the efficiency and accuracy of food safety supervision; real-time data collection enables regulators to respond quickly to potential safety issues and reduce the risk of food contamination or deterioration; covers key nodes of the entire food supply chain to ensure data at all important links can all be captured and analyzed; data cleaning ensures the accuracy and consistency of the data and reduces the possibility of false alarms; an efficient database management system is used to store data to ensure data security and accessibility; advanced data analysis tools and techniques are used to extract valuable information from the data to help identify food safety risks; through data visualization tools, complex data becomes easy to understand, allowing people with non-technical backgrounds to quickly grasp the situation; the provided data set can be directly used in subsequent safety impact analysis models to provide a scientific basis for decision makers; through the safety impact analysis model, food safety impact parameters can be effectively extracted from the safety impact factor data sets at each stage, providing strong support for subsequent food safety traceability and risk assessment.

[0177] S7. Based on the food safety impact parameters of each stage, the sum of the correlation coefficients in the first-order food safety concern sequence is impact-corrected, and the first-order food safety concern sequence is sequence-corrected according to the corrected result to obtain a second-order food safety concern sequence;

[0178] Step S7 is how to further refine and modify the first-order food safety concern sequence obtained through data analysis based on the food safety impact parameters provided by the IoT data, so as to obtain a more accurate second-order food safety concern sequence; the steps are as follows:

[0179] Obtain the food safety impact parameters p at each stage of processing, transportation, storage and sales from step S6 加工 、p 运输 、p 存储 and p 销售 ;

[0180] The correction coefficient c is defined to indicate the influence of food safety influencing parameters on the food safety concern sequence;

[0181] For each stage, the correction coefficient c is used to adjust the sum of the correlation coefficients of that stage; the corrected sum of the correlation coefficients S i ′ multiplied by the correction factor c;

[0182] Rearrange each stage according to the corrected sum of correlation coefficients to form a new sequence Seq′; the new sequence Seq′ is the second-order food safety concern sequence;

[0183] The second-order food safety concern sequence Seq′ is:

[0184] First, obtain the food safety impact parameters, including: food safety impact parameters p in the processing stage 加工 ; Food safety impact parameter p during the transportation stage 运输 ; Food safety impact parameter p during storage 存储 ; Food safety impact parameter p at the sales stage 销售 ;

[0185] The correction coefficient c is a linear function of the food safety influencing parameter p, then c = k·p+b, where k and b are constants;

[0186] For the processing stage, c 加工 = k·p 加工 +b; for transport stage c 运输 = k·p 运输 +b; for storage phase c 存储 = k·p 存储 +b; for sales stage c 销售 = k·p 销售 +b;

[0187] The sum of the original correlation coefficients in the processing stage is S 加工 , then the sum of the corrected correlation coefficients is: S′ 加工 =S 加工 ·(k·p 加工 +b); Similarly, the sum of the corrected correlation coefficients in the transport phase is: S′ 运输 =S 运输 ·(k·p 运输 +b); the sum of the corrected correlation coefficients in the storage phase is: S′ 存储 =S 存储 ·(k·p 存储 +b); The sum of the corrected correlation coefficients in the sales stage is: S′ 销售 =S 销售 ·(k·p 销售 + b);

[0188] According to the corrected sum of correlation coefficients S′ 加工 , S′ 运输 , S′ 存储 , S′ 销售 Sort each stage to form a new sequence Seq′;

[0189] The second-order food safety concern sequence Seq′ is:

[0190] sort(S′ 加工 , S′ 运输 , S′ 存储 , S′ 销售 );

[0191] Among them, sort is the sort function used.

[0192] By introducing food safety impact parameters, the potential impact of different stages on food safety can be assessed more accurately; the revised sequence can more accurately indicate which stages have the greatest impact on food safety, thereby guiding further investigations and improvement measures; the revised sequence provides a more scientific basis for decision makers and supports more effective resource allocation and risk management; it is adjusted and optimized based on new data and knowledge to adapt to changing situations; advanced data analysis technology is used to improve the efficiency and accuracy of food safety supervision; by extracting food safety impact parameters from the safety impact factor data set of each stage, and revising the food safety concern sequence accordingly, support is provided for subsequent food safety traceability and risk assessment.

[0193] S8. The stage with the largest value in the second-order food safety concern sequence is taken as the food safety traceability result;

[0194] Step S8 is to determine the stage where food safety issues are most likely to occur from the revised food safety concern sequence; the details are as follows:

[0195] Obtain the modified second-order food safety concern sequence Seq′ from step S7;

[0196] Find the sum of correlation coefficients with the largest value in the second-order food safety concern sequence Seq′; the stage with the largest sum of correlation coefficients is the stage where food safety problems are most likely to occur;

[0197] When the second-order food safety concern sequence Seq′ contains the corrected sum of correlation coefficients S′ 加工 , S′ 运输 , S′ 存储 , S′ 销售 ;

[0198] Find the sum of correlation coefficients S′ with the largest value in Seq′ max , when S′ max S′ 加工 , then food safety problems are most likely to occur in the processing stage; when S′ max S′ 运输 , then food safety problems are most likely to occur during the transportation stage; when S′ max S′ 存储, then food safety problems are most likely to occur during the storage stage; when S′ max S′ 销售 , then food safety issues are most likely to occur during the sales stage.

[0199] By determining the stage at which food safety problems are most likely to occur, targeted measures can be taken to improve the efficiency of problem solving; provide decision makers with clear information on the source of food safety problems to support more effective resource allocation and risk management; determine the stage at which the problem occurs and concentrate resources to improve that stage to reduce the occurrence of food safety problems; determine the stage at which food safety problems are most likely to occur through automated methods to save manpower and material costs; effectively extract food safety impact parameters from the safety impact factor data set at each stage, and accordingly modify the food safety concern sequence, ultimately determine the stage at which food safety problems are most likely to occur, providing strong support for subsequent food safety traceability and risk assessment.

[0200] Embodiment 2: Figure 4 As shown, the food safety traceability system based on the Internet of Things of the present invention specifically includes the following modules:

[0201] A safety testing module is used to perform safety testing on food and obtain a food safety quality testing set containing multiple testing items;

[0202] The result comparison module is used to compare the food safety quality test set with the food safety quality standard set, extract the items with test results exceeding the standard and summarize them into a food safety exceeding standard item set;

[0203] A phase-related database extraction module is used to extract, for each excessive item, a food phase-related vector corresponding to the excessive item from a preset project phase-related database;

[0204] The phase ranking module is used to calculate the sum of the correlation coefficients of all phases in the food phase correlation vectors, and generate a first-order food safety concern sequence based on the calculation results;

[0205] IoT data collection module, used to collect IoT data of food at various stages such as processing, transportation, storage, and sales;

[0206] The security impact factor extraction module is used to extract security impact factors from IoT data at each stage to form a data set of security impact factors at each stage;

[0207] The safety impact analysis model is used to input the safety impact factor data set of each stage into the pre-built safety impact analysis model to obtain the food safety impact parameters corresponding to the stage;

[0208] The impact correction and ranking module is used to perform impact correction on the sum of the correlation coefficients in the first-order food safety concern sequence based on the food safety impact parameters of each stage, and generate a second-order food safety concern sequence based on the corrected results;

[0209] The traceability result determination module is used to select the stage with the largest value from the second-order food safety concern sequence as the result of food safety traceability.

[0210] Through automated food safety testing and data comparison, human errors are reduced and efficiency is improved; by quantifying food safety risk factors at different stages, it helps to identify which links will have food safety problems; by utilizing IoT technologies such as sensors, RFID tags, etc., real-time data collection is achieved to ensure data accuracy and timeliness; by analyzing IoT data, key factors affecting food safety are extracted to improve the accuracy of problem identification; through machine learning or other advanced data analysis technologies, safety influencing factors at each stage are analyzed to provide accurate risk assessments; by dynamically adjusting the focus based on the latest data analysis results, new food safety hazards are easily discovered in a timely manner; through comprehensive analysis, the root causes of food safety problems are determined to provide scientific basis for regulatory authorities and improve the accuracy of decision-making; by allowing more data sources and technical improvements to be added in the future, it is easier to better respond to changing food safety challenges; by providing detailed food supply chain information, consumers and regulators’ confidence in food safety is improved; by combining IoT technology and advanced data analysis methods, efficient, accurate and comprehensive solutions are provided for food safety supervision, the efficiency of food safety management is improved, and the ability to prevent food safety problems is enhanced.

[0211] The various variations and specific embodiments of the food safety traceability method based on the Internet of Things in the aforementioned embodiment 1 are also applicable to the food safety traceability system based on the Internet of Things in this embodiment. Through the aforementioned detailed description of the food safety traceability method based on the Internet of Things, those skilled in the art can clearly know the implementation method of the food safety traceability system based on the Internet of Things in this embodiment, so for the sake of brevity of the specification, it will not be described in detail here.

[0212] In addition, the present application also provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are respectively connected via a bus. When the computer program is executed by the processor, each process of the above-mentioned method for controlling output data is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0213] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A food safety traceability method based on the Internet of Things, characterized in that: The method comprises: Conducting food safety testing to obtain a food safety quality testing set; the food safety quality testing set includes test results of multiple items; Compare the food safety quality test set with the food safety quality standard set, extract and summarize the items whose test results exceed the standard, and obtain the food safety exceeding standard item set; For each excessive item, extract the food stage related vector corresponding to the excessive item from a preset item stage related database; Calculate the sum of the correlation coefficients of the processing stage, the transportation stage, the storage stage, and the sales stage in all food stage correlation vectors, and sort the stages according to the calculation results to obtain the first-order food safety concern sequence; Collect IoT data at each stage of food, extract safety impact factors from IoT data at each stage, and obtain data sets of safety impact factors at each stage; Input the safety impact factor dataset of each stage into the pre-built safety impact analysis model to obtain the food safety impact parameters corresponding to that stage; Based on the food safety impact parameters of each stage, the sum of the correlation coefficients in the first-order food safety concern sequence is impact-corrected, and the first-order food safety concern sequence is sequence-corrected according to the corrected result to obtain a second-order food safety concern sequence; The stage with the largest value in the second-order food safety concern sequence is taken as the food safety traceability result.

2. The food safety traceability method based on the Internet of Things according to claim 1, characterized in that: The method for obtaining the set of food safety excessive items includes: Access to food safety and quality testing suites, including results of chemical composition testing, microbiological testing, physical property testing, and other specific testing; Obtain a collection of food safety and quality standards, including relevant laws, regulations and standard guidelines formulated by countries and regions; Obtain the maximum allowable limit of each test item; The mathematical expression of the food safety quality standard set is: S={s1,s2,...,s n }; Where S represents the food safety standard set and includes the maximum allowable limits of all test items, and si represents the maximum allowable limit of the i-th test item; Then compare the test results in the food safety quality test set with the standard limits in the food safety quality standard set item by item; for each test result R i , when R i >S i When S i It is the maximum allowable limit of the test item; All test items exceeding the standard limit are aggregated into one set to form a food safety excess item set; Output a summary of food safety items that exceed standards to provide data support for subsequent analysis.

3. The food safety traceability method based on the Internet of Things as claimed in claim 2, characterized in that: The food safety exceeding standard items are as follows: E={d i ∈D|d i >s i ,i=1,2,...,n}; Among them, E represents the food safety exceeding standard item set and includes all test items whose test results exceed their maximum allowable limits, D represents the food safety quality test set and includes the test results of all test items, and d i represents the test result of the i-th test item, si represents the maximum allowable limit of the i-th test item, d i >s i Represents the test result d of the i-th test item i Exceeded its maximum allowable limit si.

4. The food safety traceability method based on the Internet of Things according to claim 1, characterized in that: The food stage correlation vector includes a processing stage correlation coefficient, a transportation stage correlation coefficient, a storage stage correlation coefficient and a sales stage correlation coefficient.

5. The food safety traceability method based on the Internet of Things according to claim 1, characterized in that: The method for obtaining the first-order food safety concern sequence includes: Extract the food stage related vector of each exceeding standard item from the food stage related vector set; The relevant vector for each food stage is: V i =(v i,加工 , v i,运输 , v i,储存 , v i,销售 ) contains the processing stage correlation coefficient v i,加工 , Transportation stage correlation coefficient v i,运输 , storage phase correlation coefficient v i,储存 And the sales stage correlation coefficient v i,销售 ; For all items exceeding the standard, calculate the sum of the correlation coefficients of the processing stage, transportation stage, storage stage and sales stage respectively; The sum of the correlation coefficients in the processing stages is ∑v i,加工 , the sum of the correlation coefficients in the transportation stage is ∑v i,运输 , the sum of the correlation coefficients in the storage stage is ∑v i,存储 And the sum of the correlation coefficients of the sales stage is ∑v i,销售 ; The processing, transportation, storage and sales stages are sorted according to the sum of the correlation coefficients, and the sorted sequence constitutes a first-order food safety concern sequence.

6. The food safety traceability method based on the Internet of Things as claimed in claim 5, characterized in that: The first-order food safety concern sequence is: sort(T 加工 ,T 运输 ,T 存储 ,T 销售 ); Among them, sort is the sort function used, and T 加工 It represents the sum of the correlation coefficients of the processing stages, and the mathematical expression is: T 运输 It represents the sum of the correlation coefficients of the transportation stage, and the mathematical expression is: T 存储 Represents the sum of correlation coefficients in the storage phase, and the mathematical expression is: T 销售 It represents the sum of correlation coefficients of sales stages, and its mathematical expression is: E| represents the number of E elements in the set of food safety items exceeding standards.

7. The food safety traceability method based on the Internet of Things according to claim 1, characterized in that: The method for constructing the security impact analysis model includes: Clean the collected food safety incident cases and related IoT data, remove outliers and fill in missing values; Feature engineering of the dataset through feature selection, including temperature fluctuations, humidity changes, chemical exposure, physical damage, biological contamination risk, and transportation time and route; Standardize or normalize the features; Select machine learning models based on data characteristics and available technical tools to build security impact analysis models; The data set is divided into a training set and a test set, and the security impact analysis model is trained using the training set; Use grid search and random search to adjust the parameters of the security impact analysis model to optimize model performance; After training is completed, the security impact analysis model is tested using the test set; After the safety impact analysis model is constructed, the safety impact factor data sets of each stage are input into the corresponding safety impact analysis model; The safety impact analysis model outputs the food safety impact parameters corresponding to each stage.

8. A food safety traceability system based on the Internet of Things, characterized in that: The system comprises: A safety testing module is used to perform safety testing on food and obtain a food safety quality testing set containing multiple testing items; The result comparison module is used to compare the food safety quality test set with the food safety quality standard set, extract the items with test results exceeding the standard and summarize them into a food safety exceeding standard item set; A phase-related database extraction module is used to extract, for each excessive item, a food phase-related vector corresponding to the excessive item from a preset project phase-related database; The phase ranking module is used to calculate the sum of the correlation coefficients of all phases in the food phase correlation vectors, and generate a first-order food safety concern sequence based on the calculation results; IoT data collection module, used to collect IoT data of food at various stages of processing, transportation, storage and sales; The security impact factor extraction module is used to extract security impact factors from IoT data at each stage to form a data set of security impact factors at each stage; The safety impact analysis model is used to input the safety impact factor data set of each stage into the pre-built safety impact analysis model to obtain the food safety impact parameters corresponding to the stage; The impact correction and ranking module is used to perform impact correction on the sum of the correlation coefficients in the first-order food safety concern sequence based on the food safety impact parameters of each stage, and generate a second-order food safety concern sequence based on the corrected results; The traceability result determination module is used to select the stage with the largest value from the second-order food safety concern sequence as the result of food safety traceability.

9. An Internet of Things-based food safety traceability electronic device, comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, characterized in that: When the computer program is executed by the processor, the steps in the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Food safety tracing system based on hidden Markov model

    CN105023224A

  • Food information tracing method based on relational database

    CN105046507A

  • Meat product quality safety tracing method based on block chain

    CN111695916A

  • Food safety traceability system based on block chain technology and use method thereof

    CN111899032A

  • Milk powder quality safety tracing system and method based on HACCP

    CN112418888A

Cited By

  • Konjak food safety detection and analysis system based on Internet of Things

    CN120180281A

  • An IoT-based konjac food safety detection and analysis system

    CN120180281B

  • Quality safety traceability management method and system for food processing

    CN121235718A