Food safety prediction method and system based on food sampling inspection monitoring qualification report
By constructing the enterprise graph structure and performing graph convolution processing, combining Laplace features and sampling weights to calculate the comprehensive food safety value and prediction value, the problem of accuracy and low efficiency of food safety prediction in the existing technology is solved, and more accurate and flexible food safety prediction is achieved.
Patent Information
- Application Number
- CN202411907669.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The existing food safety prediction methods have a long time-consuming analysis and poor results consistency and repeatability. Machine learning-based methods are prone to overfitting problems and it is difficult to make accurate food safety predictions.
By constructing a graph structure with target enterprises, interactive enterprises and neighborhood peer enterprises as nodes, graph convolution processing is performed to obtain enterprise fusion characteristics; calculate the comprehensive food safety value based on Laplace characteristics, enterprise fusion characteristics and target enterprise characteristics; combine the sampling time interval, pass rate standard deviation and seasonal compensation value, calculate the sampling weight and perform aggregation to obtain the food safety prediction value.
It improves the accuracy and efficiency of food safety prediction, enhances the flexibility and pertinence of the method, can more accurately reflect the overall food safety of the target enterprise, and ensures the food safety of the enterprise.
Smart Images

Figure CN119721856A_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 qualified food sampling and monitoring reports. Background Art
[0002] The development of the food industry requires a good order and a fair competition environment. Through food sampling, regulatory authorities can collect data on the product quality of each company in the industry, understand the overall quality level of the industry and existing problems, and companies will take the initiative to strengthen quality control and management in order to obtain good results in sampling, so that the food industry will develop in a healthier and more standardized direction.
[0003] Currently, food safety of enterprises is often predicted through manual analysis. This method requires drawing a large amount of collected data into tables and evaluating food safety risks through manual discussion. However, this method not only consumes a lot of manpower 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 relationship between data, resulting in low accuracy and low efficiency of 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 impossible 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 sampling monitoring qualified report.
[0005] The technical solution of the present invention is as follows: A food safety prediction method based on food sampling monitoring qualified report includes the following operations: S1. Obtain the enterprises that have cooperative relations with the target enterprise in the qualified food sampling monitoring report as interactive enterprises; obtain the enterprises that are in the same industry as the target enterprise within the neighborhood of 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; 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; 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 and the corresponding sampling weight; mark the food safety prediction value of the food samples whose food safety prediction value is less than the safety threshold.
[0006] In the graph convolution processing of S1, the adjacency matrix is formed by the enterprise connection degree between enterprises, which is based on the distance between enterprises, the number of enterprise cooperation and the duration of enterprise cooperation; the initial enterprise summary features are based on the average qualified rate of enterprise products, the average output of enterprise products, the establishment time of enterprises, the total number of enterprise employees and the quality of enterprise production equipment of all enterprises.
[0007] 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.
[0008] The comprehensive food safety value of the target enterprise in S2 is achieved through the following formula: , S is the comprehensive value of food safety for the target enterprise, L i is the Laplace characteristic i row value, w i is the Laplace characteristic i The row value corresponds to the weight, 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 Integration features for enterprises,x The target enterprise characteristics are: α , β , c are the Laplace coefficient, fusion coefficient and target enterprise characteristic coefficient respectively. s is the Sigmoid function.
[0009] The sampling weight of the sampling time in S3 is obtained by the following formula: , w m For the m The sampling weight at the sampling time, m m For the m The standard deviation of the sampling pass rate of all food samples at the time of the first sampling inspection, ∆T m,m-1 For the m The time of the second sampling inspection is the same as that of 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.
[0010] Aggregation processing in S3 is implemented 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 the first sampling inspection, w m For the m The sampling weight at the sampling time, M is the total number of sampling times, and λ is the aggregation coefficient.
[0011] A food safety prediction system based on a qualified food sampling and monitoring report is used to implement the above-mentioned food safety prediction method based on a qualified food sampling and monitoring report, comprising: A data storage module is used to store food sampling and monitoring qualified report information, which includes basic information of the enterprise and corresponding food sampling information; Data analysis module, including enterprise fusion feature generation module, food safety comprehensive value generation module and food safety prediction value generation module; The enterprise fusion feature generation module is used to obtain enterprises that have cooperative relations 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 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; A food safety comprehensive value generation module is used to obtain Laplace features based on the edge relationship in the graph structure; obtain the target enterprise's food safety comprehensive value based on the Laplace features, the enterprise fusion features and the target enterprise features; if the target enterprise's food safety comprehensive value is not greater than the 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; 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 marked; Labelling module for labelling businesses and food samples.
[0012] A food safety prediction device based on qualified food sampling and monitoring reports comprises a processor and a memory, wherein the processor implements the above-mentioned food safety prediction method based on qualified food sampling and monitoring reports when executing a computer program stored in the memory.
[0013] A computer-readable storage medium is used to store a computer program, wherein when the computer program is executed by a processor, the above-mentioned food safety prediction method based on food random inspection and monitoring qualified report is implemented.
[0014] The beneficial effects of the present invention are: The present invention provides a food safety prediction method for a qualified food inspection and monitoring report. First, the interactive enterprises in the qualified food inspection and monitoring report that can reflect the information of the upstream and downstream of the supply chain or other cooperation 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 processed by graph convolution 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 the neighboring peer enterprises, and the target enterprise features that focus on the target enterprise's own factors, the target enterprise food that can accurately reflect the overall safety of the target enterprise's food is calculated. Safety comprehensive 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 values are less than the safety threshold to ensure the food safety of the enterprise; this method is applied to the food safety prediction of enterprise food with high accuracy and strong adaptability. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] By reading the detailed description of the preferred embodiment below, the scheme and advantages of the present application will become clear to those skilled in the art. The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention.
[0016] In the attached picture: Figure 1 4 is a flow chart of the food safety prediction method of this embodiment. DETAILED DESCRIPTION
[0017] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings.
[0018] This embodiment first provides a food safety prediction system based on a qualified food sampling and monitoring report, which is used to implement a food safety prediction method based on a qualified food sampling and monitoring report, including: A data storage module is used to store food sampling and monitoring qualified report information, which includes basic information of the enterprise and corresponding food sampling information; Data analysis module, including enterprise fusion feature generation module, food safety comprehensive value generation module and food safety prediction value generation module; The enterprise fusion feature generation module is used to obtain enterprises that have cooperative relations 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 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; A food safety comprehensive value generation module is used to obtain Laplace features based on the edge relationship in the graph structure; obtain the target enterprise's food safety comprehensive value based on the Laplace features, the enterprise fusion features and the target enterprise features; if the target enterprise's food safety comprehensive value is not greater than the 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; 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 marked; Labelling module for labelling businesses and food samples.
[0019] This embodiment provides a food safety prediction method based on food sampling monitoring qualified report, see Figure 1 , the specific process is as follows.
[0020] 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 same industry as the target enterprise within the neighborhood of 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.
[0021] The interactive enterprises that can reflect the information of the upstream and downstream of the supply chain or other cooperation links of the target enterprise, as well as 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. The graph structure is then processed by graph convolution, and the various characteristics of the target enterprise, interactive enterprise and neighboring peer enterprises are integrated to obtain the 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.
[0022] First, enterprises that have cooperative relations with the target enterprise are obtained from the qualified food sampling and monitoring reports as interactive enterprises. Interactive enterprises include: raw material suppliers, packaging material suppliers, equipment and parts suppliers, distributors (supermarkets, convenience stores, online stores, offline stalls, etc.), advertising and marketing agencies, cooperative R&D companies and logistics and warehousing partner companies of the target enterprise. By analyzing the information of these enterprises, the potential risk factors of the target enterprise can be indirectly analyzed, and a more comprehensive food safety prediction can be made for the target enterprise, thereby improving the prediction accuracy.
[0023] At the same time, the target enterprise's peer companies in the target enterprise's neighborhood are obtained from the qualified food sampling and monitoring reports as neighboring peer companies. There may be material flow and sharing between companies that are close to each other. At the same time, the geographical environment between companies that are close to each other is usually similar. Including the information of surrounding peer companies in the scope of food safety prediction can more accurately analyze and predict the potential impact of environmental factors on the target enterprise's food safety, so as to improve the comprehensiveness and accuracy of food safety prediction.
[0024] Then, a graph structure is constructed with the target enterprise, interactive enterprises and neighboring peer enterprises as nodes and the edges as enterprise connectivity. The enterprise connectivity is obtained based on the distance between enterprises, the number of enterprise cooperations and the duration of enterprise cooperation.
[0025] Finally, the graph structure is processed by graph convolution, and various features of the target enterprise, interactive enterprises and neighboring peer enterprises are integrated to obtain the enterprise fusion features.
[0026] 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 is, 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 layers.
[0027] The above adjacency matrix is formed by the enterprise connection degree between enterprises, that is, the adjacency matrix is obtained based on the edge information of the graph structure. The enterprise connection degree is obtained based on the distance between enterprises, the number of enterprise cooperations and the duration of enterprise cooperation.
[0028] At the same time, the initial enterprise summary characteristics X 0 It is based on the average qualified rate of enterprise products, average output of enterprise products, enterprise establishment time, total number of enterprise employees and quality of enterprise production equipment of all enterprises, which is conducive to improving the comprehensiveness of the prediction method and the accuracy of food safety prediction. Among them, different rows of the initial enterprise summary characteristics in the form of a matrix represent different enterprises, and different columns represent the average qualified rate of enterprise products, average output of enterprise products, enterprise establishment time, total number of enterprise employees and quality of enterprise production equipment.
[0029] 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.
[0030] Based on the Laplace characteristics that can reflect the impact 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 chosen whether to perform safety prediction for specific food samples to improve the flexibility, pertinence and accuracy of the food safety prediction method.
[0031] First, based on the edge relationship in the graph structure, the Laplace feature that can reflect the degree of connection between the target enterprise and other enterprises and the degree of influence of other enterprises on the target enterprise is obtained. Specifically, the Laplace feature of the target enterprise is obtained based on the activity matrix and adjacency matrix of the target enterprise. The Laplace feature is the difference between the activity matrix and the 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.
[0032] Then, based on the Laplace characteristics, enterprise fusion characteristics and target enterprise characteristics, the comprehensive food safety value of the target enterprise is obtained.
[0033] The comprehensive food safety value of the target enterprise can be obtained through the following formula: , S is the comprehensive value of food safety for the target enterprise, L i is the Laplace characteristic i row value, w i is the Laplace characteristic i The row value corresponds to the weight, 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 Integration features for enterprises, x The target enterprise characteristics are: α , β , c are the Laplace coefficient, fusion coefficient and target enterprise characteristic coefficient respectively. s is the Sigmoid function.
[0034] Finally, determine whether the target enterprise's comprehensive food safety value is less than the comprehensive value threshold, so as to determine whether the target enterprise's overall food meets the standards.
[0035] 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 has reached the standard, the overall situation is poor. Therefore, the target enterprise needs to be marked and recommended to make food safety adjustments to further improve food quality. The above food safety adjustments include: improving the raw material quality and testing frequency of food samples in the target enterprise.
[0036] If the target enterprise's comprehensive food safety value is between the first comprehensive value threshold and the second comprehensive value threshold, it means that although the food in the target enterprise has reached the standard, the overall situation is general, and some food may be of low quality. Therefore, it is necessary to perform safety prediction for specific food samples in S3.
[0037] The first comprehensive value threshold is smaller than the second comprehensive value threshold.
[0038] 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 the food safety prediction value less than the safety threshold as the marked food samples, and suggest the target enterprise to make food safety adjustments to the marked food samples.
[0039] When the target enterprise's comprehensive food safety value is between the first comprehensive value threshold and the second comprehensive value threshold, the sampling weights that can balance data volatility and consider the impact of seasonal changes on food are obtained based on the sampling time interval, the standard deviation of the sampling pass rate and the seasonal compensation value, and are aggregated with the standardized pass rate to avoid the limitation of relying solely on a single factor to assess food safety, and obtain a food safety prediction value that is both comprehensive and accurate. Adjustments are made to food samples whose food safety prediction values are less than the safety threshold to ensure food safety.
[0040] Firstly, 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 pass 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.
[0041] The normalization operation can be achieved through the following formula: , Z p,m For the p Food samples in m The standardized qualified rate at the time of the first sampling inspection, Q p,m For the p Food samples in m The sampling inspection pass rate at the time of the first sampling 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.
[0042] Then, 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.
[0043] The sampling weight of the sampling time can be realized by the following formula: , w m For the m The sampling weight at the sampling time, m m For the m The standard deviation of the sampling pass rate of all food samples at the time of the first sampling inspection, ∆T m,m-1 For the m The time of the second sampling inspection is the same as that of 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.
[0044] Next, 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.
[0045] The aggregation operation can be 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 the first sampling inspection, w m For the m The sampling weight at the sampling time, M is the total number of sampling times, and λ is the aggregation coefficient.
[0046] Finally, food samples whose food safety prediction values are less than the safety threshold are marked, and the target companies are advised to make food safety adjustments to the marked food samples.
[0047] This embodiment also provides a food safety prediction device based on a qualified food sampling and monitoring report, comprising a processor and a memory, wherein the processor implements the above-mentioned food safety prediction method based on a qualified food sampling and monitoring report when executing a computer program stored in the memory.
[0048] This embodiment also provides 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 report.
[0049] The present embodiment provides a food safety prediction method for a qualified food inspection and monitoring report. First, the interactive enterprises in the qualified food inspection and monitoring report that can reflect the information of the upstream and downstream of the supply chain or other cooperation 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 processed by graph convolution 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 the neighboring peer enterprises, and the target enterprise features that focus on the target enterprise's own factors, the target enterprise food that can accurately reflect the overall safety of the target enterprise's food is calculated. Safety comprehensive 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 values are less than the safety threshold to ensure the food safety of the enterprise; this method is applied to the food safety prediction of enterprise food with high accuracy and strong adaptability.
Claims
1. A food safety prediction method based on food sampling monitoring qualified report, characterized in that: The following operations are included: S1. Obtain the enterprises that have cooperative relations with the target enterprise in the qualified food sampling monitoring report as interactive enterprises; obtain the enterprises that are in the same industry as the target enterprise within the neighborhood of 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; S2. Based on the edge relationship in the graph structure, the Laplace feature is obtained; based on the Laplace feature, the enterprise fusion feature and the target enterprise feature, the comprehensive food safety 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 target enterprise is 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 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 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 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 whose predicted food safety values are less than the safety threshold are marked.
2. The food safety prediction method based on the food sampling monitoring qualified report according to claim 1 is characterized in that: In the graph convolution process of S1, The adjacency matrix is formed by the enterprise connection degree between enterprises, which is obtained based on the distance between enterprises, the number of enterprise cooperation and the duration of enterprise cooperation; The initial enterprise summary characteristics are obtained based on the average product qualification rate, average product output, enterprise establishment time, total number of employees and quality of enterprise production equipment of all enterprises.
3. The food safety prediction method based on food sampling 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 for obtaining 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. The food safety prediction method based on food sampling monitoring qualified report according to claim 1 is characterized in that: In S2, the comprehensive food safety value of the target enterprise is obtained by the following formula: , S is the comprehensive value of food safety for the target enterprise, L i is the Laplace characteristic i row value, w i is the Laplace characteristic i The row value corresponds to the weight, 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 Integration features for enterprises, x For the target enterprise characteristics, α , β , γ are the Laplace coefficient, fusion coefficient and target enterprise characteristic coefficient respectively. σ is the Sigmoid function.
5. The food safety prediction method based on food sampling monitoring qualified report according to claim 1 is characterized in that: In S3, the sampling weight of the sampling time is obtained by the following formula: , w m For the m The sampling weight at the sampling time, μ m For the m The standard deviation of the sampling pass rate of all food samples at the time of the first sampling inspection, ∆T m,m-1 For the m The time of the second sampling inspection is the same as that of 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.
6. The food safety prediction method based on food sampling monitoring qualified report according to claim 1 is characterized in that: In S3, the aggregation process is implemented by 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 the first sampling inspection, w m For the m The sampling weight at the sampling time, M is the total number of sampling times, and λ is the aggregation coefficient.
7. A food safety prediction system based on food sampling and monitoring qualified reports, used to implement the food safety prediction method based on food sampling and monitoring qualified reports as described in claim 1, characterized in that: include: A data storage module is used to store food sampling and monitoring qualified report information, which includes basic information of the enterprise and corresponding food sampling information; Data analysis module, including enterprise fusion 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 relations with the target enterprise from the data storage module as interactive enterprises; Obtain the enterprises in the same industry as the target enterprise within the target enterprise's neighborhood as the neighboring peer enterprises; construct a graph structure with the target enterprise, interactive enterprises and neighboring peer enterprises as nodes and the edges as the enterprise connection degree; the graph structure is processed by graph convolution to obtain the enterprise 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, and standardize the corresponding food samples based on the industry standard pass rate upper limit and 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 combined with the corresponding sampling weight, and the food safety value of each food sample is obtained after aggregation processing; the food samples with food safety values less than the safety threshold are marked. Labelling module for labelling businesses and food samples.
8. A food safety prediction device based on food sampling monitoring qualified report, 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 6.
9. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the food safety prediction method based on a food sampling monitoring qualified report as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
A micro-service framework system for an aquatic product quality and safety supervision system
CN109191008A
Power customer service preference method and system based on channel preference and business preference
CN110111124A
Food safety problem identification method and system based on big data
CN110400092A
Three-dimensional visualization method and device for OD relations in GIS
CN111063035A
Food enterprise credit evaluation method and device and electronic equipment
CN112766683A