Food safety prediction method and system based on food sampling monitoring qualified report
By constructing an enterprise graph structure and Laplace features, combined with the method of sampling time intervals and seasonal compensation values, the problems of low accuracy and poor adaptability of food safety prediction in existing technologies are solved, and food safety prediction with high accuracy and flexibility is achieved.
Patent Information
- Application Number
- CN202411907669.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The existing technologies for food safety prediction have the following problems: manual analysis consumes a lot of manpower and time, and the results are inconsistent and repeatable. Machine learning methods are affected by the single source of samples, resulting in overfitting, difficulty in generalization, low accuracy, and low efficiency.
A graph structure with enterprises as nodes is constructed. Enterprise fusion features are obtained through graph convolution processing. The comprehensive food safety value is calculated by combining Laplace features and target enterprise features. Food safety predictions are made using sampling time intervals and seasonal compensation values, and unqualified food samples are marked.
It improves the flexibility, pertinence and accuracy of food safety forecasts, has strong adaptability, can accurately reflect the overall food safety level of the enterprise, reduce the impact of data volatility, and take seasonal changes into account.
Smart Images

Figure CN119721856B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of business management and supervision technology, and in particular to a food safety prediction method and system based on food sampling and monitoring qualified reports. Background Art
[0002] The development of the food industry requires a healthy environment of order and fair competition. Through random food inspections, regulatory authorities can collect data on product quality across the industry, understanding the overall quality level and existing issues. Furthermore, to achieve positive results in random inspections, companies will proactively strengthen quality control and management, leading to a healthier and more standardized development of the food industry.
[0003] Currently, food safety of enterprises is often predicted through manual analysis. This method requires plotting a large amount of collected data into tables and assessing food safety risks through manual discussion. However, this method not only consumes a lot of manpower and time, but also has poor consistency and repeatability in prediction results. In addition, manual analysis can usually only analyze surface data in the table, and it is difficult to deeply explore the complex relationships between data, resulting in low accuracy and low efficiency in food safety prediction. Food safety prediction based on machine learning methods can improve the repeatability and computational efficiency of food safety prediction results, but due to the single source of food data samples of the target enterprise, this method is prone to overfitting problems, which makes it unable to generalize well to other possible situations, resulting in difficulty in making accurate food safety predictions through this method, affecting the long-term development of the enterprise. Summary of the Invention
[0004] The purpose of the present invention is to provide a food safety prediction method and system based on food random inspection and monitoring qualified reports.
[0005] The technical solutions of the present invention are as follows:
[0006] A food safety prediction method based on food sampling and monitoring qualified reports includes the following operations:
[0007] S1. Obtain enterprises that have cooperative relationships with the target enterprise in the food sampling and monitoring qualified report as interactive enterprises; obtain enterprises that are in the same industry as the target enterprise within the target enterprise's neighborhood as neighboring peer enterprises; construct a graph structure with the target enterprise, interactive enterprises, and neighboring peer enterprises as nodes, and the edges as enterprise connectivity; the graph structure is processed by graph convolution to obtain enterprise fusion features;
[0008] S2. Based on the edge relationship in the graph structure, obtain the Laplace feature; based on the Laplace feature, the enterprise fusion feature, and the target enterprise feature, obtain the target enterprise's food safety comprehensive value; if the target enterprise's food safety comprehensive value is not greater than the first comprehensive value threshold, mark the target enterprise; if the target enterprise's food safety comprehensive value is between the first comprehensive value threshold and the second comprehensive value threshold, execute S3; the first comprehensive value threshold is less than the second comprehensive value threshold;
[0009] S3. Obtain the sampling time and sampling pass rate of all food samples of the target enterprise within the neighborhood time, standardize the corresponding food samples based on the industry standard pass rate upper limit and the industry standard pass rate upper limit of each food sample, and obtain the standardized pass rate of different food samples at different sampling times; obtain the sampling weight of each sampling time based on the sampling time interval, the standard deviation of the sampling pass rate and the seasonal compensation value; obtain the food safety prediction value of each food sample by aggregating the standardized pass rate of each food sample with the corresponding sampling weight; mark the food samples whose food safety prediction value is less than the safety threshold.
[0010] During the graph convolution processing of S1, the adjacency matrix is formed by the enterprise connectivity between enterprises, which is based on the distance between enterprises, the number of enterprise collaborations, and the duration of enterprise collaborations. The initial enterprise summary features are based on the average enterprise product qualification rate, average enterprise product output, enterprise establishment time, total number of enterprise employees, and the quality of enterprise production equipment of all enterprises.
[0011] The Laplace features in S2 are obtained based on the activity matrix and adjacency matrix of the target enterprise. The activity matrix is obtained by taking the sum of the elements in each row of the adjacency matrix as the connection edge value of the corresponding enterprise; the connection edge values of all enterprises are formed into a diagonal matrix to obtain the activity matrix of the target enterprise.
[0012] The comprehensive food safety value of the target enterprise in S2 is achieved through the following formula:
[0013] ,
[0014] S is the comprehensive value of food safety for the target enterprise, L i is the first Laplace characteristic i row value, w i is the first Laplace characteristic i Row values correspond to weights, n.c. ,j For the j The number of common suppliers between the enterprise and the target enterprise, n ois the total number of suppliers of the target enterprise, F r For enterprise integration features, x For the target enterprise characteristics, α 、 β 、 c are the Laplace coefficient, fusion coefficient and target enterprise characteristic coefficient respectively, s is the Sigmoid function.
[0015] The sampling weight of the sampling time in S3 is obtained by the following formula:
[0016] ,
[0017] w m For the m The sampling weight at the time of the sampling inspection, m m For the m The standard deviation of the qualified rate of all food samples at the time of random inspection, ∆T m,m-1 For the m The time of the first sampling inspection is the same as the m -1 sampling time interval, c is the seasonal compensation value, a 、 b are the standard deviation coefficient and the time interval coefficient, respectively.
[0018] Aggregation processing in S3 is achieved through the following formula:
[0019] ,
[0020] s p For the p The food safety prediction value of food samples, Z p,m For the p Food samples in m The standardized qualified rate at the time of random inspection, w m For the m The sampling weight at the time of the sampling inspection, M is the total number of sampling times, and λ is the aggregation coefficient.
[0021] A food safety prediction system based on food sampling inspection and monitoring qualified reports is used to implement the above-mentioned food safety prediction method based on food sampling inspection and monitoring qualified reports, comprising:
[0022] The data storage module is used to store food sampling inspection and monitoring qualified report information, including the basic information of the enterprise and the corresponding food sampling inspection information;
[0023] Data analysis module, including enterprise integration feature generation module, food safety comprehensive value generation module and food safety prediction value generation module;
[0024] The enterprise fusion feature generation module is used to obtain enterprises that have cooperative relationships with the target enterprise from the data storage module as interactive enterprises; obtain enterprises that are in the same industry as the target enterprise within the target enterprise's neighborhood as neighboring peer enterprises; construct a graph structure with the target enterprise, interactive enterprises, and neighboring peer enterprises as nodes, and the edges as enterprise connectivity; the graph structure is processed by graph convolution to obtain enterprise fusion features;
[0025] A food safety comprehensive value generation module is used to obtain Laplace features based on edge relationships in the graph structure; obtain the target enterprise's food safety comprehensive value based on the Laplace features, enterprise fusion features, and target enterprise features; if the target enterprise's food safety comprehensive value is not greater than a first comprehensive value threshold, execute the marking module; if the target enterprise's food safety comprehensive value is between the first comprehensive value threshold and the second comprehensive value threshold, execute the food safety prediction value generation module;
[0026] The food safety prediction value generation module is used to obtain the sampling time and sampling pass rate of all food samples of the target enterprise within the neighborhood time, and standardize the corresponding food samples based on the industry standard pass rate upper limit and the industry standard pass rate upper limit of each food sample to obtain the standardized pass rate of different food samples at different sampling times; based on the sampling time interval, the standard deviation of the sampling pass rate and the seasonal compensation value, the sampling weight of each sampling time is obtained; the standardized pass rate of each food sample is respectively aggregated with the corresponding sampling weight to obtain the food safety value of each food sample; the food samples with food safety values less than the safety threshold are executed by the marking module;
[0027] Labelling module for labelling businesses and food samples.
[0028] A food safety prediction device based on food random inspection and monitoring qualified reports includes a processor and a memory, wherein the processor implements the above-mentioned food safety prediction method based on food random inspection and monitoring qualified reports when executing a computer program stored in the memory.
[0029] A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the above-mentioned food safety prediction method based on food random inspection and monitoring qualified reports.
[0030] The beneficial effects of the present invention are:
[0031] The present invention provides a food safety prediction method for food sampling and monitoring qualified reports. First, the interactive enterprises in the food sampling and monitoring qualified reports that can reflect the information of the upstream and downstream of the supply chain or other cooperative links of the target enterprise, and the neighboring peer enterprises that can reflect the common problems and similar environmental factors in the industry are combined with the target enterprise to construct a graph structure that is convenient for analyzing the relationship between enterprises, and the graph structure is subjected to graph convolution processing to obtain enterprise fusion features; then, based on the Laplace features that can reflect the impact of other enterprises on the target enterprise, the enterprise fusion features that can reflect the fusion information of the target enterprise with the interactive enterprises and neighboring peer enterprises, and the target enterprise features that focus on the target enterprise's own factors, the target enterprise food safety that can accurately reflect the overall food safety of the target enterprise is calculated. Comprehensive food safety value; then, based on the comparative relationship between the target enterprise's food safety comprehensive value and the comprehensive value threshold, choose whether to perform safety prediction of specific food samples to improve the flexibility, pertinence and accuracy of the food safety prediction method; when the target enterprise's food safety comprehensive value is between the first comprehensive value threshold and the second comprehensive value threshold, based on the sampling time interval, the standard deviation of the sampling pass rate and the seasonal compensation value, obtain the sampling weight that can balance the data volatility and consider the impact of seasonal changes on food, and aggregate it with the standardized pass rate to obtain a food safety prediction value with strong comprehensiveness and accuracy, and mark the food samples whose food safety prediction value is less than the safety threshold to ensure the food safety of the enterprise; this method is applied to the enterprise food safety prediction with high accuracy and strong adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] By reading the detailed description of the preferred embodiment below, the solutions and advantages of the present application will become clear to those skilled in the art. The accompanying drawings are only for illustrating the preferred embodiment and are not to be considered as limiting the present invention.
[0033] In the attached figure:
[0034] Figure 1 2 is a flow chart of the food safety prediction method of this embodiment. DETAILED DESCRIPTION
[0035] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings.
[0036] This embodiment first provides a food safety prediction system based on food sampling inspection and monitoring qualified reports, which is used to implement a food safety prediction method based on food sampling inspection and monitoring qualified reports, including:
[0037] The data storage module is used to store food sampling inspection and monitoring qualified report information, including the basic information of the enterprise and the corresponding food sampling inspection information;
[0038] Data analysis module, including enterprise integration feature generation module, food safety comprehensive value generation module and food safety prediction value generation module;
[0039] The enterprise fusion feature generation module is used to obtain enterprises that have cooperative relationships with the target enterprise from the data storage module as interactive enterprises; obtain enterprises that are in the same industry as the target enterprise within the target enterprise's neighborhood as neighboring peer enterprises; construct a graph structure with the target enterprise, interactive enterprises, and neighboring peer enterprises as nodes, and the edges as enterprise connectivity; the graph structure is processed by graph convolution to obtain enterprise fusion features;
[0040] A food safety comprehensive value generation module is used to obtain Laplace features based on edge relationships in the graph structure; obtain the target enterprise's food safety comprehensive value based on the Laplace features, enterprise fusion features, and target enterprise features; if the target enterprise's food safety comprehensive value is not greater than a first comprehensive value threshold, execute the marking module; if the target enterprise's food safety comprehensive value is between the first comprehensive value threshold and the second comprehensive value threshold, execute the food safety prediction value generation module;
[0041] The food safety prediction value generation module is used to obtain the sampling time and sampling pass rate of all food samples of the target enterprise within the neighborhood time, and standardize the corresponding food samples based on the industry standard pass rate upper limit and the industry standard pass rate upper limit of each food sample to obtain the standardized pass rate of different food samples at different sampling times; based on the sampling time interval, the standard deviation of the sampling pass rate and the seasonal compensation value, the sampling weight of each sampling time is obtained; the standardized pass rate of each food sample is respectively aggregated with the corresponding sampling weight to obtain the food safety value of each food sample; the food samples with food safety values less than the safety threshold are executed by the marking module;
[0042] Labelling module for labelling businesses and food samples.
[0043] This embodiment provides a food safety prediction method based on food sampling and monitoring qualified reports, see Figure 1 , the specific process is as follows.
[0044] S1. Obtain the enterprises that have cooperative relations with the target enterprise in the qualified food sampling and monitoring report as interactive enterprises; obtain the enterprises in the target enterprise's neighborhood that are in the same industry as the target enterprise as neighborhood peer enterprises; construct a graph structure with the target enterprise, interactive enterprises and neighborhood peer enterprises as nodes and the edges as enterprise connection degrees; the graph structure is processed by graph convolution to obtain enterprise fusion features.
[0045] Interactive enterprises that can reflect the information of the upstream and downstream of the supply chain or other cooperative links of the target enterprise, as well as neighboring peer enterprises that can reflect common problems and similar environmental factors in the industry, are combined with the target enterprise to construct a graph structure that is convenient for analyzing the relationship between enterprises. The graph structure is then subjected to graph convolution processing, and the various characteristics of the target enterprise, interactive enterprises and neighboring peer enterprises are integrated to obtain enterprise fusion characteristics, which can better reflect the actual status of the target enterprise in the entire enterprise relationship network, thereby providing a more accurate basis for subsequent food safety predictions.
[0046] First, companies with cooperative relationships with the target company are identified from food sampling and monitoring reports as interactive companies. These include the target company's raw material suppliers, packaging material suppliers, equipment and parts suppliers, distributors (supermarkets, convenience stores, online shops, offline vendors, etc.), advertising and marketing agencies, R&D partners, and logistics and warehousing partners. By analyzing this information, we can indirectly identify potential risk factors for the target company, enabling more comprehensive food safety predictions and improving prediction accuracy.
[0047] At the same time, companies in the same industry as the target enterprise within its immediate vicinity are collected from qualified food sampling and monitoring reports as neighboring peer companies. Proximity allows for the flow and sharing of materials between companies, and companies in close proximity often share similar geographic environments. Incorporating this information into food safety predictions allows for more accurate analysis and prediction of the potential impact of environmental factors on the target enterprise's food safety, thereby improving the comprehensiveness and accuracy of food safety predictions.
[0048] Then, a graph structure is constructed with the target enterprise, interacting enterprises, and neighboring peer enterprises as nodes, and the edges as enterprise connectivity. Enterprise connectivity is derived based on the distance between enterprises, the number of enterprise collaborations, and the duration of enterprise collaborations.
[0049] Finally, the graph structure is processed with graph convolution to integrate the various features of the target enterprise, interactive enterprises, and neighboring peer enterprises to obtain the enterprise fusion features.
[0050] The operation of graph convolution processing can be achieved by the following formula: X l+1 =σ(D -1 / 2 AD -1 / 2 X l W l ) , X l+1 For the l+1 The output of the convolutional layer ( l+1Layer enterprise integration characteristics), s is the Sigmoid function, D is the adjacency matrix A The corresponding node degree matrix, X l For the l The output of the convolutional layer, X 0 is the initial enterprise summary feature of the graph structure, W l For the l The weights of the convolutional layer.
[0051] The adjacency matrix is formed by the degree of enterprise connectivity between enterprises. In other words, the adjacency matrix is based on the edge information of the graph structure. The enterprise connectivity is based on the distance between enterprises, the number of enterprise collaborations, and the duration of enterprise collaborations.
[0052] At the same time, the initial enterprise summary characteristics X 0 This is derived from the average product qualification rate, average product output, establishment time, total number of employees, and production equipment quality across all enterprises. This improves the comprehensiveness of the prediction method and the accuracy of food safety predictions. The initial enterprise summary features in the matrix format represent different enterprises in different rows, while different columns represent the average product qualification rate, average product output, establishment time, total number of employees, and production equipment quality.
[0053] S2. Based on the edge relationship in the graph structure, obtain the Laplace feature; based on the Laplace feature, the enterprise fusion feature and the target enterprise feature, obtain the target enterprise's food safety comprehensive value; if the target enterprise's food safety comprehensive value is not greater than the first comprehensive value threshold, mark the target enterprise; if the target enterprise's food safety comprehensive value is between the first comprehensive value threshold and the second comprehensive value threshold, execute S3.
[0054] Based on the Laplace characteristics that can reflect the influence of other enterprises on the target enterprise, the enterprise fusion characteristics that can reflect the fusion information between the target enterprise and its interactive enterprises and neighboring peer enterprises, and the target enterprise characteristics that focus on the target enterprise's own factors, the target enterprise's food safety comprehensive value that can accurately reflect the overall safety level of the target enterprise's food is calculated. Then, based on the comparative relationship between the target enterprise's food safety comprehensive value and the comprehensive value threshold, it is decided whether to perform safety prediction for specific food samples to improve the flexibility, pertinence and accuracy of the food safety prediction method.
[0055] First, based on the edge relationships in the graph structure, we obtain Laplace features that reflect the closeness of the target enterprise's connections with other enterprises and the degree of influence it receives from other enterprises. Specifically, the target enterprise's Laplace features are derived from its activity matrix and adjacency matrix. The Laplace features are the difference between the activity matrix and the adjacency matrix. The activity matrix is obtained by taking the sum of each row of the adjacency matrix as the edge value for the corresponding enterprise. The edge values for all enterprises are then combined to form a diagonal matrix to obtain the target enterprise's activity matrix.
[0056] Then, based on the Laplace characteristics, enterprise fusion characteristics and target enterprise characteristics, the comprehensive food safety value of the target enterprise is obtained.
[0057] The comprehensive food safety value of the target enterprise can be obtained through the following formula:
[0058] ,
[0059] S is the comprehensive value of food safety for the target enterprise, L i is the first Laplace characteristic i row value, w i is the first Laplace characteristic i Row values correspond to weights, n.c. ,j For the j The number of common suppliers between the enterprise and the target enterprise, n o is the total number of suppliers of the target enterprise, F r For enterprise integration features, x For the target enterprise characteristics, α 、 β 、 c are the Laplace coefficient, fusion coefficient and target enterprise characteristic coefficient respectively, s is the Sigmoid function.
[0060] Finally, determine whether the target enterprise's comprehensive food safety value is less than the comprehensive value threshold, and thus determine whether the target enterprise's overall food meets the standards.
[0061] If the target enterprise's food safety comprehensive value is not greater than the first comprehensive value threshold, it means that although the food in the target enterprise meets the standards, the overall condition is poor. Therefore, the target enterprise needs to be marked and recommended to make food safety adjustments to further improve food quality. Such food safety adjustments include: improving the raw material quality and testing frequency of food samples in the target enterprise.
[0062] If the target enterprise's food safety comprehensive value is between the first comprehensive value threshold and the second comprehensive value threshold, it means that although the food in the target enterprise meets the standards, the overall situation is average, and some foods may be of low quality. Therefore, it is necessary to perform safety prediction for specific food samples in S3.
[0063] The first comprehensive value threshold is smaller than the second comprehensive value threshold.
[0064] S3. Obtain the sampling time and sampling pass rate of all food samples of the target enterprise within the neighborhood time, standardize the corresponding food samples based on the industry standard pass rate upper limit and the industry standard pass rate upper limit of each food sample, and obtain the standardized pass rate of different food samples at different sampling times; obtain the sampling weight of each sampling time based on the sampling time interval, the standard deviation of the sampling pass rate and the seasonal compensation value; obtain the food safety prediction value of each food sample by aggregating the standardized pass rate of each food sample with the corresponding sampling weight; regard food samples with food safety prediction values less than the safety threshold as marked food samples, and recommend that the target enterprise make food safety adjustments to the marked food samples.
[0065] When the target enterprise's comprehensive food safety value is between the first comprehensive value threshold and the second comprehensive value threshold, based on the sampling time interval, the standard deviation of the sampling pass rate and the seasonal compensation value, the sampling weight is obtained to balance the data volatility and consider the impact of seasonal changes on food, and is aggregated with the standardized pass rate, avoiding the limitation of relying on a single factor to assess food safety, and obtaining a food safety prediction value with strong comprehensiveness and accuracy. Adjustments are made to food samples whose food safety prediction values are less than the safety threshold to ensure food safety.
[0066] First, the sampling time and sampling pass rate of all food samples of the target enterprise within the neighborhood time are obtained from the food sampling monitoring qualification report. In order to facilitate the intuitive comparison and analysis of the sampling pass rate of food samples, the corresponding food samples are standardized based on the industry standard pass rate upper limit and the industry standard pass rate upper limit of each food sample to obtain the standardized pass rate of different food samples at different sampling times.
[0067] The normalization operation can be achieved through the following formula:
[0068] ,
[0069] Z p,m For the p Food samples in m The standardized qualified rate at the time of random inspection, Q p,m For the p Food samples inm The inspection pass rate at the time of the first inspection, U p For the p The upper limit of the industry standard pass rate corresponding to each food sample, V p For the p The lower limit of the industry standard pass rate corresponding to each food sample.
[0070] Then, based on the sampling inspection time interval, the standard deviation of the sampling inspection pass rate and the seasonal compensation value, the sampling inspection weight of each sampling inspection time is obtained.
[0071] The sampling weight of the sampling time can be realized by the following formula:
[0072] ,
[0073] w m For the m The sampling weight at the time of the sampling inspection, m m For the m The standard deviation of the qualified rate of all food samples at the time of random inspection, ∆T m,m-1 For the m The time of the first sampling inspection is the same as the m -1 sampling time interval, c is the seasonal compensation value, a 、 b are the standard deviation coefficient and the time interval coefficient, respectively.
[0074] Then, the standardized qualified rate of each food sample and the corresponding sampling weight are aggregated to obtain the food safety prediction value of each food sample.
[0075] The aggregation operation can be achieved through the following formula:
[0076] ,
[0077] s p For the p The food safety prediction value of food samples, Z p,m For the p Food samples in m The standardized qualified rate at the time of random inspection, w m For the m The sampling weight at the time of the sampling inspection, M is the total number of sampling times, and λ is the aggregation coefficient.
[0078] Finally, food samples whose food safety prediction values are lower than the safety threshold are marked, and the target companies are advised to make food safety adjustments to the marked food samples.
[0079] This embodiment also provides a food safety prediction device based on a food sampling inspection and monitoring qualified report, comprising a processor and a memory, wherein the processor implements the above-mentioned food safety prediction method based on a food sampling inspection and monitoring qualified report when executing a computer program stored in the memory.
[0080] This embodiment also provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the above-mentioned food safety prediction method based on the food random inspection and monitoring qualified report is implemented.
[0081] This embodiment provides a food safety prediction method for food sampling and monitoring qualified reports. First, the interactive enterprises in the food sampling and monitoring qualified reports that can reflect the information of the upstream and downstream of the supply chain or other cooperative links of the target enterprise, and the neighboring peer enterprises that can reflect the common problems and similar environmental factors in the industry are combined with the target enterprise to construct a graph structure that is convenient for analyzing the relationship between enterprises, and the graph structure is subjected to graph convolution processing to obtain enterprise fusion features; then, based on the Laplace features that can reflect the impact of other enterprises on the target enterprise, the enterprise fusion features that can reflect the fusion information of the target enterprise with the interactive enterprises and neighboring peer enterprises, and the target enterprise features that focus on the target enterprise's own factors, the target enterprise food safety characteristics that can accurately reflect the overall food safety of the target enterprise are calculated. Comprehensive food safety value; then, based on the comparative relationship between the target enterprise's food safety comprehensive value and the comprehensive value threshold, choose whether to perform safety prediction of specific food samples to improve the flexibility, pertinence and accuracy of the food safety prediction method; when the target enterprise's food safety comprehensive value is between the first comprehensive value threshold and the second comprehensive value threshold, based on the sampling time interval, the standard deviation of the sampling pass rate and the seasonal compensation value, obtain the sampling weight that can balance the data volatility and consider the impact of seasonal changes on food, and aggregate it with the standardized pass rate to obtain a food safety prediction value with strong comprehensiveness and accuracy, and mark the food samples whose food safety prediction value is less than the safety threshold to ensure the food safety of the enterprise; this method is applied to the enterprise food safety prediction with high accuracy and strong adaptability.
Claims
1. A food safety prediction method based on food sampling and monitoring qualified reports, characterized in that: The following operations are included: S1. Obtain enterprises that have cooperative relationships with the target enterprise in the food sampling and monitoring qualified report as interactive enterprises; obtain enterprises that are in the same industry as the target enterprise within the target enterprise's neighborhood as neighboring peer enterprises; construct a graph structure with the target enterprise, interactive enterprises, and neighboring peer enterprises as nodes, and the edges as enterprise connectivity; the graph structure is processed by graph convolution to obtain enterprise fusion features; S2. Based on the edge relationships in the graph structure, the Laplace feature is obtained. Based on the Laplace feature, the enterprise integration feature, and the target enterprise feature, the target enterprise's food safety comprehensive value is obtained. The target enterprise's food safety comprehensive value is achieved through the following formula: , S is the comprehensive value of food safety for the target enterprise, L i is the first Laplace characteristic i row value, w i is the first Laplace characteristic i Row values correspond to weights, nc ,j For the j The number of common suppliers between the enterprise and the target enterprise, n o is the total number of suppliers of the target enterprise, F r For enterprise integration features, x For the target enterprise characteristics, α 、 β 、 γ are the Laplace coefficient, fusion coefficient and target enterprise characteristic coefficient respectively, σ is the Sigmoid function; If the target enterprise's food safety comprehensive value is not greater than the first comprehensive value threshold, the target enterprise will be marked; If the target enterprise's food safety comprehensive value is between the first comprehensive value threshold and the second comprehensive value threshold, execute S3; the first comprehensive value threshold is less than the second comprehensive value threshold; S3. Obtain the sampling inspection time and sampling inspection pass rate of all food samples of the target enterprise within the neighborhood time. Based on the industry standard pass rate upper limit and the industry standard pass rate upper limit of each food sample, standardize the corresponding food samples to obtain the standardized pass rate of different food samples at different sampling inspection times; Based on the sampling inspection time interval, sampling inspection pass rate standard deviation and seasonal compensation value, the sampling inspection weight of each sampling inspection time is obtained; The standardized qualified rate of each food sample and the corresponding sampling weight are aggregated to obtain the food safety prediction value of each food sample; food samples with food safety prediction values less than the safety threshold are marked; Aggregation processing is achieved through the following formula: , s p For the p The food safety prediction value of food samples, Z p,m For the p Food samples in m The standardized qualified rate at the time of random inspection, w m For the m The sampling weight at the time of the sampling inspection, M is the total number of times corresponding to the sampling time, λ is the aggregation coefficient; The sampling weight of the sampling time is obtained by the following formula: , μ m For the m The standard deviation of the qualified rate of all food samples at the time of random inspection, ∆T m,m-1 For the m The time of the first sampling inspection is the same as the m -1 sampling time interval, c is the seasonal compensation value, a 、 b are the standard deviation coefficient and the time interval coefficient, respectively.
2. The food safety prediction method based on the food sampling and monitoring qualified report according to claim 1 is characterized in that: During the graph convolution processing of S1, The adjacency matrix is formed by the enterprise connectivity between enterprises, which is obtained based on the distance between enterprises, the number of enterprise collaborations, and the duration of enterprise collaborations; The initial enterprise summary characteristics are obtained based on the average enterprise product qualification rate, average enterprise product output, enterprise establishment time, total number of enterprise employees and enterprise production equipment quality of all enterprises.
3. The food safety prediction method based on the food sampling and monitoring qualified report according to claim 1 is characterized in that: The Laplace features in S2 are obtained based on the activity matrix and adjacency matrix of the target enterprise; The method to obtain the activity matrix is as follows: the sum of the elements in each row of the adjacency matrix is used as the connection edge value of the corresponding enterprise; The connection edge values of all enterprises are formed into a diagonal matrix to obtain the activity matrix of the target enterprise.
4. A food safety prediction system based on food sampling inspection and monitoring qualified reports, used to implement the food safety prediction method based on food sampling inspection and monitoring qualified reports according to claim 1, characterized in that: include: The data storage module is used to store food sampling inspection and monitoring qualified report information, including the basic information of the enterprise and the corresponding food sampling inspection information; Data analysis module, including enterprise integration feature generation module, food safety comprehensive value generation module and food safety prediction value generation module; An enterprise fusion feature generation module is used to obtain enterprises that have cooperative relationships with the target enterprise from the data storage module as interactive enterprises; Obtain the companies in the target enterprise's neighborhood that are in the same industry as the target enterprise as neighboring peer companies; construct a graph structure with the target enterprise, interacting companies, and neighboring peer companies as nodes, and the edges as the company connection degrees; the graph structure is processed by graph convolution to obtain the company fusion characteristics; The food safety comprehensive value generation module is used to obtain the Laplace feature based on the edge relationship in the graph structure; based on the Laplace feature, the enterprise fusion feature and the target enterprise feature, the food safety comprehensive value of the target enterprise is obtained; If the target enterprise's food safety comprehensive value is not greater than the first comprehensive value threshold, the marking module is executed; If the target enterprise's food safety comprehensive value is between the first comprehensive value threshold and the second comprehensive value threshold, the food safety prediction value generation module is executed; The food safety prediction value generation module is used to obtain the sampling time and sampling pass rate of all food samples of the target enterprise within the neighborhood time. Based on the industry standard pass rate upper limit and the industry standard pass rate upper limit of each food sample, the corresponding food samples are standardized to obtain the standardized pass rate of different food samples at different sampling times; Based on the sampling inspection time interval, the standard deviation of the sampling inspection pass rate and the seasonal compensation value, the sampling inspection weight of each sampling inspection time is obtained; the standardized pass rate of each food sample is respectively combined with the corresponding sampling inspection weight, and the food safety value of each food sample is obtained through aggregation processing; the food safety value of the food sample is executed on the food sample whose safety value is less than the safety threshold; Labelling module for labelling businesses and food samples.
5. A food safety prediction device based on food sampling and monitoring qualified reports, characterized in that: It includes a processor and a memory, wherein when the processor executes the computer program stored in the memory, it implements the food safety prediction method based on the food random inspection and monitoring qualified report as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that Used to store a computer program, wherein when the computer program is executed by a processor, it implements the food safety prediction method based on the food random inspection and monitoring qualified report as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Enterprise financial risk prediction method based on multi-source data fusion
CN118780615A
Pesticide residue detection method and system for table vinegar production
CN119107098A