Food testing item extraction method, device, equipment and storage medium
By analyzing random inspection requests, identifying risk parameters, sorting and screening, and extracting food testing items, the problem of inefficient food safety supervision and random inspection in the existing technology is solved, and the efficiency and effectiveness of food testing items are improved.
Patent Information
- Application Number
- CN202110607826.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-01
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-06-01
AI Technical Summary
The existing food safety supervision and sampling efficiency are inefficient and the selection effect is poor, resulting in weak ability to discover problems.
By receiving food testing project extraction requests, analyzing relevant information for random inspections, determining the food to be inspected, inputting risk parameter identification model, obtaining risk parameters, sorting and screening, extracting risk items and related information, and selecting appropriate food testing items.
It improves the efficiency of testing items selection during food sampling, improves the selection effect, and realizes the automatic extraction of risky foods and testing items recommended for sampling.
Smart Images

Figure CN113283768B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a method, device, equipment and storage medium for extracting food testing items. Background Art
[0002] Food safety supervision random inspection is an important means of food safety supervision in my country. However, due to the characteristics of random inspection, the situations of "no detection" and "representing the whole with a single point" often occur, resulting in the weak ability of food safety supervision random inspection to discover problems. Therefore, it is very important to choose the type of food to be inspected and the food testing items for each random inspection.
[0003] In the prior art, sampling personnel generally select sampling foods and food testing items based on historical experience or in a random manner, which is inefficient and has poor selection effects. Summary of the invention
[0004] The main purpose of the present invention is to solve the technical problems of low efficiency and poor selection effect when extracting food testing items in the prior art.
[0005] The first aspect of the present invention provides a method for extracting food inspection items, comprising: receiving a food inspection item extraction request, and parsing at least one sampling-related information carried in the food inspection item extraction request, wherein the sampling-related information includes sampling time information and sampling area information; determining the corresponding food to be inspected according to the sampling time information and the sampling area information; inputting the food to be inspected into a preset risk parameter identification model in sequence to identify food risk parameters, and obtaining the risk parameters of the food to be inspected; sorting the food to be inspected according to the risk parameters to obtain a food risk sequence; screening the food risk sequence according to preset risk screening rules to obtain risky foods recommended for sampling; extracting risk items and corresponding risk association information from a preset food risk knowledge graph according to the risky foods recommended for sampling, and screening out corresponding food inspection items according to the risk association information.
[0006] Optionally, in a first implementation method of the first aspect of the present invention, the risk parameters include detection risk parameters and public opinion risk parameters, and the food to be inspected is input into a preset risk parameter identification model in sequence to identify the food risk parameters, and obtaining the risk parameters of the food to be inspected includes: screening out relevant historical sampling data of the food to be inspected in a pre-established historical food sampling database according to the sampling time information and the sampling area information, and calculating the detection risk information based on the relevant historical sampling data; determining the public opinion time range according to the sampling time information and the sampling area information, and obtaining the public opinion risk information of the food to be inspected within the public opinion time range; calling a preset risk parameter identification model to identify the food risk parameters according to the detection risk information and the public opinion risk information, and obtaining the risk parameters of the food to be inspected.
[0007] Optionally, in a second implementation manner of the first aspect of the present invention, the detection risk information includes historical risk information, regional risk information and climate risk information, and the relevant historical sampling data of the food to be inspected is screened out in a pre-established historical food sampling database according to the sampling time information and the sampling area information, and the detection risk information is calculated based on the relevant historical sampling data. The steps include: determining the range of historical sampling time information according to the sampling time information, screening and obtaining a first sampling data set from the historical food sampling data according to the range of historical sampling time information, and calculating the historical risk information based on the first sampling data set; screening sampling data that is the same as the sampling area information from the historical sampling data according to the sampling area information to obtain a second sampling data set, and calculating the regional risk information based on the second sampling data set; obtaining the expected sampling climate information according to the sampling time information and the sampling area information, screening sampling data that is the same as the expected sampling climate information from the historical sampling data according to the sampling area information to obtain a third sampling data set, and calculating the climate risk information based on the third sampling data set.
[0008] Optionally, in a third implementation method of the first aspect of the present invention, determining the public opinion time range according to the sampling time information and the sampling area information, and obtaining the public opinion risk information of the food to be inspected within the public opinion time range includes: determining the public opinion time range according to the sampling time information; obtaining public opinion information related to the food to be inspected and complaint and reporting information on a food complaint and reporting platform within the public opinion time range; performing data normalization processing on the public opinion information and complaint and reporting information to obtain public opinion data and complaint and reporting data; and calculating the public opinion risk information of the food to be inspected within the public opinion time range based on the public opinion data and complaint and reporting data.
[0009] Optionally, in a fourth implementation manner of the first aspect of the present invention, the preset risk screening rules include grade evaluation rules and grade screening rules, and the screening of the food risk sequence according to the preset risk screening rules to obtain risky foods recommended for sampling includes: evaluating the risk level of the food risk sequence according to the grade evaluation rules to obtain the risk level of the food to be inspected; and screening out risky foods recommended for sampling based on the risk level and sorting information in the food risk sequence according to the grade screening rules.
[0010] Optionally, in the fifth implementation method of the first aspect of the present invention, after extracting risk items and corresponding risk association information from a preset food risk knowledge graph for the risky food recommended for sampling, and screening out corresponding food inspection items based on the risk association information, it also includes: obtaining factor association information of risk items and risk factors contained in the food risk knowledge graph; querying the project risk factors corresponding to the food inspection items based on the factor association information; and generating a detailed list of inspection items based on the risky food recommended for sampling, the food inspection items and the corresponding project risk factors.
[0011] Optionally, in a sixth implementation method of the first aspect of the present invention, before receiving a food inspection item extraction request and parsing at least one sampling-related information carried in the food inspection item extraction request, it also includes: obtaining historical sampling data containing unqualified items from a pre-established historical food sampling database to obtain an unqualified sampling data set; counting the number of unqualified items of each food in the unqualified sampling data set, and generating risk items for each food based on the number of unqualified items; obtaining risk factors for the risk items in an existing knowledge base, and generating a food risk knowledge graph based on food types, risk items and risk factors.
[0012] The second aspect of the present invention provides a food inspection item extraction device, comprising: an acquisition module, used to receive a food inspection item extraction request, and parse at least one sampling-related information carried in the food inspection item extraction request, wherein the sampling-related information includes sampling time information and sampling area information; a module for determining the scope of inspection, used to determine the corresponding food to be inspected according to the sampling time information and the sampling area information; an identification module, used to input the food to be inspected into a preset risk parameter identification model in sequence to identify the food risk parameters, and obtain the risk parameters of the food to be inspected; a sorting module, used to sort the food to be inspected according to the risk parameters, and obtain a food risk sequence; a screening module, used to screen the food risk sequence according to preset risk screening rules, and obtain risk foods recommended for sampling; an output module, used to extract risk items and corresponding risk association information from a preset food risk knowledge graph according to the risk foods recommended for sampling, and screen out corresponding food inspection items according to the risk association information.
[0013] Optionally, in a first implementation method of the second aspect of the present invention, the risk parameters include detection risk parameters and public opinion risk parameters, and the identification module includes: a detection risk information calculation unit, which is used to screen out relevant historical sampling data of the food to be inspected in a pre-established historical food sampling database according to the sampling time information and the sampling area information, and calculate the detection risk information based on the relevant historical sampling data; a public opinion risk information calculation unit, which is used to determine the public opinion time range according to the sampling time information and the sampling area information, and obtain the public opinion risk information of the food to be inspected within the public opinion time range; a parameter identification unit, which is used to call a preset risk parameter identification model to identify food risk parameters according to the detection risk information and the public opinion risk information, and obtain the risk parameters of the food to be inspected.
[0014] Optionally, in a second implementation method of the second aspect of the present invention, the detection risk information includes historical risk information, regional risk information and climate risk information, and the detection risk information calculation unit includes: a historical risk information calculation subunit, used to determine the range of historical sampling time information according to the sampling time information, filter and obtain a first sampling data set in the historical food sampling data according to the historical sampling time information range, and calculate the historical risk information based on the first sampling data set; a regional risk information calculation subunit, used to filter out sampling data that is the same as the sampling area information in the historical sampling data according to the sampling area information, obtain a second sampling data set, and calculate the regional risk information based on the second sampling data set; a climate risk information calculation subunit, used to obtain the expected sampling climate information according to the sampling time information and the sampling area information, filter out the sampling data that is the same as the expected sampling climate information in the historical sampling data according to the sampling area information, obtain a third sampling data set, and calculate the climate risk information based on the third sampling data set.
[0015] Optionally, in a third implementation method of the second aspect of the present invention, the public opinion risk information calculation unit includes: a time range determination subunit, used to determine the public opinion time range according to the sampling time information; an information acquisition subunit, used to obtain the public opinion information related to the food to be inspected within the public opinion time range and the complaint and reporting information on the food complaint and reporting platform; a data processing subunit, used to perform data normalization processing on the public opinion information and complaint and reporting information to obtain public opinion data and complaint and reporting data; a calculation subunit, used to calculate the public opinion risk information of the food to be inspected within the public opinion time range based on the public opinion data and complaint and reporting data.
[0016] Optionally, in a fourth implementation of the second aspect of the present invention, the screening module includes: a grade evaluation unit, used to evaluate the risk level of the food risk sequence according to the grade evaluation rules to obtain the risk level of the food to be inspected; and a food screening unit, used to screen out risky foods recommended for sampling based on the risk level and the sorting information in the food risk sequence according to the grade screening rules.
[0017] Optionally, in a fifth implementation of the second aspect of the present invention, the food inspection item extraction device also includes a inspection item detail generation module, which is specifically used to: obtain factor association information between risk items and risk factors contained in the food risk knowledge graph; query the project risk factors corresponding to the food inspection items based on the factor association information; and generate a inspection item detail table based on the risky foods recommended for sampling, the food inspection items and the corresponding project risk factors.
[0018] Optionally, in a sixth implementation manner of the second aspect of the present invention, the food inspection item extraction device also includes a knowledge graph generation unit, which is specifically used to: obtain historical sampling data containing unqualified items in a pre-established historical food sampling database to obtain an unqualified sampling data set; count the number of unqualified items of each food in the unqualified sampling data set, and generate risk items for each food based on the number of unqualified items; obtain risk factors for the risk items in an existing knowledge base, and generate a food risk knowledge graph based on food types, risk items and risk factors.
[0019] The third aspect of the present invention provides a food inspection item extraction device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the food inspection item extraction device performs the steps of the above-mentioned food inspection item extraction method.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of the above-mentioned method for extracting food inspection items.
[0021] In the technical solution provided by the present invention, at least one sampling inspection related information carried by the food inspection project extraction request is received and parsed; the corresponding food to be inspected is determined according to the sampling inspection related information, and then the risk parameters of the food to be inspected are sequentially input into the preset risk parameter identification model; the food to be inspected is sorted according to the risk parameters to obtain a food risk sequence; the food risk sequence is screened according to the preset risk screening rules to obtain the risky food recommended for sampling; the risk items and the corresponding risk association information are extracted from the food risk knowledge graph to screen out the corresponding food inspection items. In the embodiment of the present invention, the method can automatically extract the risky foods and food inspection items recommended for sampling, improve the efficiency of selecting food inspection items during food sampling, and improve the selection effect of selecting food inspection items. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a schematic diagram of a first embodiment of a method for extracting food detection items in an embodiment of the present invention;
[0023] Figure 2 It is a schematic diagram of a second embodiment of the method for extracting food detection items in an embodiment of the present invention;
[0024] Figure 3 It is a schematic diagram of a third embodiment of the method for extracting food detection items in an embodiment of the present invention;
[0025] Figure 4It is a schematic diagram of a fourth embodiment of the method for extracting food detection items in an embodiment of the present invention;
[0026] Figure 5 It is a schematic diagram of an embodiment of a device for extracting food detection items in an embodiment of the present invention;
[0027] Figure 6 It is a schematic diagram of another embodiment of the food detection item extraction device in the embodiment of the present invention;
[0028] Figure 7 It is a schematic diagram of an embodiment of a food testing item extraction device in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The embodiment of the present invention provides a method, device, equipment and storage medium for extracting food inspection items. The method receives a request for extracting food inspection items, and parses at least one sampling-related information carried in the request for extracting food inspection items, wherein the sampling-related information includes sampling time information and sampling area information; determines the corresponding food to be inspected according to the sampling time information and the sampling area information; inputs the food to be inspected into a preset risk parameter identification model in sequence to identify the food risk parameters, and obtains the risk parameters of the food to be inspected; sorts the food to be inspected according to the risk parameters to obtain a food risk sequence; screens the food risk sequence according to a preset risk screening rule to obtain the risk food recommended for sampling; extracts the risk items and the corresponding risk association information from the preset food risk knowledge graph according to the risk food recommended for sampling, and screens the corresponding food inspection items according to the risk association information. The method can automatically extract the risk food and food inspection items recommended for sampling, improve the efficiency of selecting food inspection items during food sampling, and improve the selection effect of selecting food inspection items.
[0030] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1The first embodiment of the method for extracting food detection items in the embodiment of the present invention includes:
[0032] 101. Receive a food testing item extraction request, and parse at least one sampling inspection related information carried in the food testing item extraction request;
[0033] It is understandable that the execution subject of the present invention can be a food inspection item extraction device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example. After receiving the food inspection item extraction request, the server obtains the request information field contained in the extraction request, parses the content contained in the request information field, and obtains at least one sampling inspection related information. Among them, the sampling inspection related information may include sampling inspection time information; it may also include sampling inspection area information or other sampling inspection related information. In addition, before this step, a food category table is pre-established, wherein the food category table includes various names of various types of food, so as to facilitate the classification of food related information. According to the relevant information in the food category table, a variety of foods can be classified for subsequent data processing.
[0034] 102. Determine the corresponding food to be inspected based on the sampling time information and sampling area information;
[0035] According to the acquired sampling time information and sampling area information, the food to be inspected corresponding to the sampling time information and the sampling area information is determined, wherein when the specific food to be inspected is determined, it can be determined by pre-entering a table to be inspected, in which different foods to be inspected are generated in advance according to different regions and sampling time information.
[0036] 103. Input the food to be inspected into a preset risk parameter identification model in sequence to identify the food risk parameters, and obtain the risk parameters of the food to be inspected;
[0037] The food to be inspected obtained in the above steps is input into a preset risk parameter identification model. Based on the sampling-related information obtained in the above steps, the risk parameter identification model is called to identify food risk parameters to obtain risk parameters of multiple foods.
[0038] Among them, the preset risk parameter identification model can identify the risk parameters of the food to be inspected based on the acquired sampling-related information to obtain the risk parameters. The risk parameter identification model can be pre-acquired historical food sampling data, and the historical food sampling data is screened and processed to obtain a historical food risk data set, and the historical food risk data set is called for training. Specifically, the risk parameter identification model in this embodiment is established based on the historical risk data set to a data classification tool preset with a clustering algorithm.
[0039] 104. Sort the food to be inspected according to the risk parameters to obtain the food risk sequence;
[0040] 105. Screen the food risk sequence according to the preset risk screening rules to obtain risky foods recommended for sampling;
[0041] In the aforementioned steps, after the risk parameters of multiple foods are obtained, the foods are sorted according to the obtained risk parameters to obtain a food risk sequence.
[0042] After obtaining the food risk sequence, the food risk sequence obtained in the above steps is screened according to the preset risk screening rules to obtain the recommended food for sampling. In this embodiment, the food risk sequence can be firstly assessed for risk level according to the preset risk level evaluation rules to obtain the risk level of the food; after obtaining the risk level, the risk level and the sorting information in the food risk sequence are comprehensively screened to obtain the risky food recommended for sampling.
[0043] 106. Based on the risky foods recommended for sampling, risk items and corresponding risk-related information are extracted from the preset food risk knowledge graph, and corresponding food testing items are screened out based on the risk-related information.
[0044] In this step, it is first necessary to obtain a food risk knowledge graph that is pre-established based on historical sampling data. The food risk knowledge graph specifically includes risk information for each food, including information such as unqualified items, unqualified grades, and unqualified factors that appeared during historical testing.
[0045] Subsequently, according to the recommended sampling foods obtained in the previous step, the corresponding recommended sampling items of risky foods are found in the food risk knowledge map pre-established based on historical sampling data. Finally, the recommended sampling risky foods and the corresponding recommended testing items are sorted according to the risk level and output, thus completing the extraction of risky foods and their testing items.
[0046] The technical solution in the embodiment of the present invention can automatically extract risky foods and food testing items recommended for random inspection, improve the efficiency of selecting food testing items during food random inspection, and improve the selection effect of food testing items.
[0047] See also Figure 2 The second embodiment of the method for extracting food detection items in the embodiment of the present invention includes:
[0048] 201. Obtain historical sampling data containing unqualified items from a pre-established historical food sampling database to obtain an unqualified sampling data set;
[0049] Before this step, a historical food sampling database should be established in advance, wherein the historical food sampling database can be a collection of historical sampling data, and the historical sampling data containing unqualified items in all historical sampling data are obtained, and these sampling data containing unqualified items are combined into an unqualified sampling data set, wherein each food has different sampling items, such as microbial items, mycotoxin items, additive items, quality items, pesticide residue items and other items; these unqualified items and the foods of unqualified items are marked, and the obtained data are combined into an unqualified sampling data set.
[0050] 202. Count the number of unqualified items of each food in the unqualified sampling data set, and generate risk items for each food based on the number of unqualified items;
[0051] The number of unqualified items of each food in the unqualified sampling data set is counted, and the unqualified index of the unqualified items of each food is calculated according to the number of unqualified times and the number of inspections of each food; the unqualified items of each food are sorted according to the unqualified index to obtain the unqualified item sequence. Obtain the unqualified item sequence. According to the preset risk item screening rules, the risk items of each food are screened out according to the unqualified item sequence. Among them, the preset risk item screening rules can be to screen out the unqualified items ranked in the top several in the unqualified item sequence as risk items, or to screen out the unqualified items ranked in the top several percentages in the unqualified item sequence as risk items or others.
[0052] 203. Obtain risk factors of risk items in the existing knowledge base, and generate a food risk knowledge graph based on food types, risk items and risk factors;
[0053] The risk factors of risk items are obtained from the existing knowledge base, wherein the knowledge base is pre-established and includes various possible factors of non-conforming items determined by food safety knowledge, such as human factors, improper storage factors, etc. Food types and risk items are taken as entities, and risk factors and other relational data such as the aforementioned non-conforming index data are taken as entity relationships to generate a food risk knowledge graph.
[0054] 204. Receive a food testing item extraction request, and parse at least one sampling inspection related information carried in the food testing item extraction request;
[0055] 205. Determine the corresponding food to be inspected according to the sampling time information and sampling area information;
[0056] The specific contents of step 204 and step 205 in this embodiment are substantially the same as those of step 101 and step 102 in the above-mentioned embodiment, and thus will not be described in detail here.
[0057] 206. Filter relevant historical sampling data of the food to be inspected from a pre-established historical food sampling database according to the sampling time information and the sampling area information, and calculate the detection risk information based on the relevant historical sampling data;
[0058] In this step, first, relevant historical sampling data are filtered out in a pre-established historical food sampling database based on the acquired sampling related information, wherein the sampling related information may be multiple, such as sampling time information and sampling area information, and relevant historical sampling data are filtered out in the historical sampling database based on the multiple sampling related information, and the detection risk information is calculated based on the relevant historical sampling data.
[0059] 207. Determine the time range of public opinion based on the sampling time information and sampling area information, and obtain the public opinion risk information of the food to be inspected within the time range of public opinion;
[0060] After obtaining the detection risk information based on the historical sampling data, in this embodiment, the public opinion-related time range is obtained based on the sampling time information and the sampling area information in the sampling-related information, and the public opinion information on food is obtained based on the public opinion-related time range, such as screening hot food-related information in news websites or social networking websites in the past two weeks or a month, and judging the correlation analysis with food safety, positive and negative sentiment judgment, and related food type analysis of the public opinion information to obtain the public opinion risk information.
[0061] 208. Calling a preset risk parameter identification model to identify food risk parameters according to the detection risk information and public opinion risk information, and obtaining risk parameters of the food to be inspected;
[0062] After obtaining the detection risk information and public opinion risk information, the preset risk parameter identification model is called according to the detection risk information and public opinion risk information to perform food risk identification, and the risk parameters of multiple foods are obtained. Among them, the preset risk parameter identification model can identify the risk parameters of food according to the obtained sampling related information. The risk parameter identification model can obtain historical food sampling data in advance, and obtain a historical food risk data set after screening and processing the historical food sampling data, and call the historical food risk data set to train and establish a data classification tool with a preset clustering algorithm based on the historical risk data set.
[0063] 209. Sort the food to be inspected according to the risk parameters to obtain a food risk sequence;
[0064] In the aforementioned steps, after the risk parameters of multiple foods are obtained, the foods are sorted according to the obtained risk parameters to obtain a food risk sequence.
[0065] 210. Evaluate the risk level of the food risk sequence according to the grade evaluation rules to obtain the risk level of the food to be inspected;
[0066] After obtaining the food risk parameters, various food types are first sorted according to the food risk parameters to obtain a food risk sequence, and the food risk sequence is then assessed for risk level according to preset risk level evaluation rules to obtain the risk level of the food to be inspected. Finally, the risk level information and the information in the food risk sequence are combined to screen out the recommended foods for sampling from the various foods to be inspected.
[0067] Next, a specific example is used to illustrate that various foods are graded once according to the preset primary grading rules. In this embodiment, the primary grading operation will divide various foods into four levels, and the four levels of risk are represented as P0', P1', P2' and P3' from high to low; and the primary grading in this step is performed according to the obtained food risk parameters. For example, in this step, food risk parameters greater than or equal to 0.4 are classified as P0' level, food types with food risk parameters less than 0.4 and greater than or equal to 0.2 are classified as P1' level, food types with food risk parameters less than 0.2 and greater than or equal to 0.1 are classified as P2' level, and food types with food risk parameters less than 0.1 and greater than or equal to 0.05 are classified as P3' level.
[0068] Subsequently, various foods are secondary graded according to the preset secondary grading rules. In this embodiment, a grading operation will divide various foods into four levels, and the four levels of risk are represented as P0", P1", P2" and P3" from high to low; and the secondary grading in this step is secondary grading based on the obtained food risk parameters. Specifically, firstly, the risk warning average value m and the risk warning value standard deviation s are calculated according to all food risk parameters, and the food risk parameter is greater than or equal to m+s as the P0" level, the food risk parameter is less than m+s and greater than or equal to m+a*s. The food types are divided into P1" level, the food risk parameter is less than m+a*s and greater than or equal to m+b*s. The food types are divided into P2" level, and the food risk parameter is less than m+b*s and greater than or equal to m+c*s. The food types are divided into P3" level; wherein, the coefficients a, b, and c are preset values, which are related to the number of food types, and their value ranges are all [0,1].
[0069] 211. According to the grade screening rules, based on the risk level and the ranking information in the food risk sequence, screen out the risky foods recommended for sampling;
[0070] Finally, the risk level of each food type is evaluated based on the food risk sequence and the grading results of the first grading and the second grading. Specifically, the food risk level is divided into four levels, and the four levels of risk are represented as P0, P1, P2 and P3 from high to low. Among them, the food types that are in the top 10, P0' and P0" levels of the food risk sequence are rated as food risk level P0; the food types except the P0 level that are in the top 12, P1' and P3 of the food risk sequence after removing the P0 level are rated as food risk level P0. The food types in the P1" level are rated as food risk level P1; the food types except the P0 and P1 levels that are also in the top 15, P2' and P2" levels after removing the P0 and P1 levels from the food risk sequence are rated as food risk level P2; the food types except the P0, P1P2 levels that are also in the top 18, P3' and P3" levels after removing the P0, P1 and P2 levels from the food risk sequence are rated as food risk level P3. In this example, after screening out the food types of P0, P1, P2 and P3, these food types are output to obtain the risky foods recommended for sampling.
[0071] 212. Based on the risky foods recommended for sampling, risk items and corresponding risk-related information are extracted from the preset food risk knowledge graph, and corresponding food testing items are screened out based on the risk-related information.
[0072] The specific content of this step is substantially the same as that of step 106 in the aforementioned embodiment, and thus will not be described in detail here.
[0073] The technical solution in the embodiments of the present invention can automatically extract risky foods and food testing items recommended for random inspection, and a pre-established food risk knowledge graph can determine the recommended testing items corresponding to the risky foods based on the knowledge graph, thereby improving the efficiency of selecting food testing items during food random inspections and improving the selection effect of food testing items.
[0074] See also Figure 3 , a third embodiment of the method for extracting food detection items in the embodiment of the present invention includes:
[0075] 301. Receive a food testing item extraction request, and parse at least one sampling inspection related information carried in the food testing item extraction request;
[0076] 302. Determine the corresponding food to be inspected according to the sampling time information and the sampling area information;
[0077] The specific contents of step 301 and step 302 in this embodiment are substantially the same as those of step 101 and step 102 in the aforementioned embodiment, and thus will not be described in detail herein.
[0078] 303. Determine a range of historical sampling time information according to the sampling time information, screen and obtain a first sampling data set from historical food sampling data according to the range of historical sampling time information, and calculate historical risk information based on the first sampling data set;
[0079] In this embodiment, the sampling-related information includes sampling time information, sampling area information and sampling predicted climate information, and the detection risk information includes historical risk information, regional risk information and climate risk information; in this embodiment, the historical risk information, regional risk information and climate risk information are calculated respectively based on the sampling time information, sampling area information and sampling predicted climate information.
[0080] Specifically, firstly, based on the sampling data in the obtained multiple sampling data sets, the unqualified index of each food in the multiple different historical time periods is calculated to obtain multiple sampling unqualified indexes. Then, the multiple sampling unqualified indexes are weighted according to the pre-set unqualified index weights to obtain historical risk information.
[0081] For example, when the weight indexes of all historical unqualified indexes, historical unqualified indexes for the same period, historical unqualified indexes for the same period and the previous and next months, unqualified indexes for the most recent month, unqualified indexes for the most recent three months, unqualified indexes for the most recent six months and unqualified indexes for the most recent year are a1, a2, a3, a4, a5, a6 and a7 respectively, then: Historical risk information = a1*all historical unqualified indexes+a2*historical unqualified indexes for the same period+a3*historical unqualified indexes for the same period and the previous and next months+a4*unqualified index for the most recent month+a5*unqualified index for the most recent three months+a6*unqualified index for the most recent six months+a6*unqualified index for the most recent year.
[0082] 304. Filter out sampling data with the same sampling area information from the historical sampling data according to the sampling area information to obtain a second sampling data set, and calculate the regional risk information based on the second sampling data set;
[0083] Secondly, based on the sampling area information contained in the sampling related information, the sampling data of various foods in the area are obtained, and multiple second sampling data sets are formed based on the sampling data. The regional risk information of various foods in historical sampling in the area is calculated based on the information in the second sampling data sets.
[0084] 305. Obtain the sampling predicted climate information according to the sampling time information and the sampling area information, select the sampling data with the same sampling predicted climate information from the historical sampling data according to the sampling predicted climate information, obtain the third sampling data set, and calculate the climate risk information based on the third sampling data set;
[0085] In this embodiment, the climate forecast information of the area to be sampled is first obtained, wherein the climate forecast information includes weather forecast information, temperature forecast information and humidity forecast information, and the historical sampled data that are the same or similar to the above climate forecast information are respectively selected from the historical sampled data according to these forecast information, and multiple third sampled data sets are respectively generated based on the extracted historical sampled data, and then the historical sampled data in the multiple third sampled data sets are weightedly calculated according to the correlation between each sampled predicted climate information and the unqualified parameters to obtain the climate risk information. Among them, the correlation between the sampled predicted climate information and the unqualified parameters is the correlation between the test items and the sampled predicted climate information calculated by the Pearson algorithm after obtaining a large amount of sampled data in the historical sampled data sets.
[0086] 306. Determine the time range of public opinion based on the sampling time information and sampling area information, and obtain the public opinion risk information of the food to be inspected within the time range of public opinion;
[0087] The specific content of step 306 in this embodiment is substantially the same as that of step 207 in the above embodiment, and thus will not be described in detail here.
[0088] 307. Calling a preset risk parameter identification model to identify food risk parameters according to the detection risk information and public opinion risk information, and obtaining the risk parameters of the food to be inspected;
[0089] After obtaining the detection risk information and the public opinion risk information, a preset risk parameter identification model is called according to the detection risk information and the public opinion risk information to perform food risk identification and obtain risk parameters of multiple foods.
[0090] Among them, the detection risk information described in this step includes the historical risk information, regional risk information and climate risk information described in the aforementioned embodiments; the preset risk parameter identification model can identify the risk parameters of food based on the acquired sampling related information, and the risk parameter identification model can be pre-acquired historical food sampling data, and the historical food sampling data is screened and processed to obtain a historical food risk data set, and the historical food risk data set is called to train and establish a data classification tool based on a preset clustering algorithm based on the historical risk data set.
[0091] 308. Sort the food to be inspected according to the risk parameters to obtain a food risk sequence;
[0092] In the above steps, after the risk parameters of multiple foods are obtained, the foods to be inspected are sorted according to the obtained risk parameters to obtain a food risk sequence.
[0093] 309. Screen the food risk sequence according to the preset risk screening rules to obtain risky foods recommended for sampling;
[0094] 310. Based on the risky foods recommended for sampling, extract risk items and corresponding risk association information from the preset food risk knowledge graph, and screen out corresponding food testing items based on the risk association information;
[0095] The specific contents of step 309 and step 310 in this embodiment are substantially the same as those of step 105 and step 106 in the above-mentioned embodiment, and thus will not be described in detail here.
[0096] 311. Obtain the factor association information of risk items and risk factors contained in the food risk knowledge graph;
[0097] Obtain a pre-established food risk knowledge graph, read the content in the knowledge graph, and obtain the factor association information between the risk items and risk factors contained in the food risk knowledge graph.
[0098] 312. Query the project risk factors corresponding to the food testing project based on the factor association information;
[0099] According to the read factor association information, the project risk factors corresponding to the food testing items obtained in the above steps are queried, wherein the food testing items may specifically include microbial items, mycotoxin items, additive items, quality items, pesticide residue items and other items, and the corresponding project risk factors may specifically include human factors, improper storage factors, etc.
[0100] 313. Generate a detailed list of testing items based on the risky foods recommended for sampling, food testing items and corresponding project risk factors.
[0101] A detailed list of testing items can be generated based on the risky foods recommended for sampling, food testing items and corresponding project risk factors, and the detailed list of testing items can be saved in the database. Subsequently, the detailed list of testing items can be output together with the risky foods recommended for sampling and the corresponding recommended testing items as needed.
[0102] The technical solution in the embodiment of the present invention can determine different historical sampling information based on multiple factors, and automatically extract risky foods and food testing items recommended for sampling based on the different sampling information obtained, thereby greatly improving the efficiency of selecting food testing items during food sampling and improving the selection effect of food testing items.
[0103] See also Figure 4 The fourth embodiment of the method for extracting food detection items in the embodiment of the present invention includes:
[0104] 401. Obtain historical sampling data containing unqualified items from a pre-established historical food sampling database to obtain an unqualified sampling data set;
[0105] 402. Count the number of unqualified items of each food in the unqualified sampling data set, and generate risk items for each food based on the number of unqualified items;
[0106] 403. Obtain risk factors of risk items in the existing knowledge base, and generate a food risk knowledge graph based on food types, risk items and risk factors;
[0107] The specific contents of steps 401-403 in this embodiment are substantially the same as those of steps 201-203, and thus will not be described in detail herein.
[0108] 404. Receive a food testing item extraction request, and parse at least one sampling inspection related information carried in the food testing item extraction request;
[0109] 405. Determine the corresponding food to be inspected according to the sampling time information and the sampling area information;
[0110] The specific contents of step 403 and step 404 in this embodiment are substantially the same as those of step 101 and step 102 in the above-mentioned embodiment, and thus will not be described in detail here.
[0111] 406. Determine a range of historical sampling time information according to the sampling time information, screen and obtain a first sampling data set from historical food sampling data according to the range of historical sampling time information, and calculate historical risk information based on the first sampling data set;
[0112] 407. Select sampling data with the same sampling area information from the historical sampling data according to the sampling area information to obtain a second sampling data set, and calculate the regional risk information based on the second sampling data set;
[0113] 408. Obtain sampling predicted climate information according to the sampling time information and the sampling area information, select sampling data with the same sampling predicted climate information from the historical sampling data according to the sampling predicted climate information, obtain a third sampling data set, and calculate climate risk information based on the third sampling data set;
[0114] The specific contents of steps 406-408 in this embodiment are substantially the same as those of steps 303-305, and thus will not be described in detail herein.
[0115] 409. Determine the time range of public opinion based on the sampling time information;
[0116] In this embodiment, before this step, a food category table is pre-established, wherein the food category table includes various names of various foods, so as to classify the relevant information of the foods. According to the relevant information in the food category table, a variety of foods can be classified for subsequent data processing.
[0117] First, the public opinion time range is determined according to the sampling time information based on the preset time division rules. In this embodiment, the public opinion time range can be a time range set before the sampling time information point, such as selecting the past two weeks or one month as the public opinion time range.
[0118] 410. Obtain public opinion information related to the food to be inspected within the public opinion time range and complaint and reporting information on the food complaint and reporting platform;
[0119] 411. Perform data normalization processing on public opinion information and complaint and report information to obtain public opinion data and complaint and report data;
[0120] 412. Calculate the public opinion risk information of the food to be inspected within the public opinion time range based on the public opinion data and complaint and reporting data;
[0121] Obtain public opinion information related to food safety on the Internet through crawler tools or other data extraction tools in a preset time period, such as screening hot food related information on news websites or social networking sites in the past two weeks or a month, and determine the correlation analysis with food safety, positive and negative sentiment judgments, and related food types for the public opinion information to obtain the public opinion information value; perform numerical normalization processing on the public opinion information value according to the pre-set public opinion normalization calculation rules to obtain the public opinion index of food.
[0122] Obtain food complaint and report information with permission, compile statistics on various food complaint and report information and specific reasons for the complaints and reports, perform numerical normalization on the food complaint and report information according to pre-set food complaint and report normalization calculation rules, and obtain the food complaint and report index.
[0123] Subsequently, a pre-established method for calculating public opinion risk information is obtained. The method for calculating public opinion risk information may be a weighted calculation or other calculation method. In this embodiment, weighted calculation is used as an example to pre-set the weight value of each index. The obtained public opinion data and complaint and reporting data are calculated according to each weight value to obtain the public opinion risk information.
[0124] 413. Calling a preset risk parameter identification model to identify food risk parameters according to the detection risk information and public opinion risk information, and obtaining the risk parameters of the food to be inspected;
[0125] The specific content of this step is substantially the same as that of step 307 in the aforementioned embodiment, and thus will not be described in detail here.
[0126] 414. Sort the food to be inspected according to the risk parameters to obtain a food risk sequence;
[0127] In the aforementioned steps, after the risk parameters of multiple foods are obtained, the foods are sorted according to the obtained risk parameters to obtain a food risk sequence.
[0128] 415. Evaluate the risk level of the food risk sequence according to the grade evaluation rules to obtain the risk level of the food to be inspected;
[0129] 416. According to the grade screening rules, based on the risk level and the ranking information in the food risk sequence, screen out the risky foods recommended for sampling;
[0130] The specific contents of steps 415-416 in this embodiment are substantially the same as those of steps 210-211, and thus will not be described in detail herein.
[0131] 417. Based on the risky foods recommended for sampling, extract risk items and corresponding risk association information from the preset food risk knowledge graph, and screen out corresponding food testing items based on the risk association information;
[0132] The specific content of this step is substantially the same as that of step 106 in the aforementioned embodiment, and thus will not be described in detail here.
[0133] 418. Obtaining factor association information between risk items and risk factors contained in the food risk knowledge graph;
[0134] 419. Query the project risk factors corresponding to the food testing project based on the factor association information;
[0135] 420. Generate a detailed list of testing items based on the risky foods recommended for sampling, food testing items and corresponding project risk factors.
[0136] The specific contents of steps 418-420 in this embodiment are substantially the same as those of steps 311-313, and thus will not be described in detail herein.
[0137] The technical solution in the embodiment of the present invention can determine different historical sampling information based on multiple factors, automatically extract risky foods and food testing items recommended for sampling based on the different sampling information obtained, and pre-establish a food risk knowledge graph, and determine the food testing items corresponding to the risky foods based on the knowledge graph, thereby greatly improving the efficiency of selecting food testing items during food sampling and improving the selection effect of food testing items.
[0138] The above describes the method for extracting food detection items in the embodiment of the present invention. The following describes the device for extracting food detection items in the embodiment of the present invention. Figure 5 , an embodiment of the food detection item extraction device in the embodiment of the present invention includes:
[0139] The acquisition module 501 is used to receive a food inspection item extraction request and parse at least one sampling inspection related information carried in the food inspection item extraction request, wherein the sampling inspection related information includes sampling inspection time information and sampling inspection area information;
[0140] A module 502 for determining a range to be inspected is used to determine the corresponding food to be inspected according to the sampling inspection time information and the sampling inspection area information;
[0141] The identification module 503 is used to sequentially input the food to be inspected into a preset risk parameter identification model to identify the food risk parameters, thereby obtaining the risk parameters of the food to be inspected;
[0142] A sorting module 504 is used to sort the food to be inspected according to the risk parameters to obtain a food risk sequence;
[0143] Screening module 505, used to screen the food risk sequence according to preset risk screening rules to obtain risky foods recommended for sampling;
[0144] The output module 506 is used to extract risk items and corresponding risk association information from a preset food risk knowledge graph according to the risky foods recommended for sampling, and screen out corresponding food testing items according to the risk association information.
[0145] The technical solution in the embodiment of the present invention can automatically extract risky foods and food testing items recommended for random inspection, improve the efficiency of selecting food testing items during food random inspection, and improve the selection effect of food testing items.
[0146] See also Figure 6 Another embodiment of the food detection item extraction device in the embodiment of the present invention includes:
[0147] An acquisition module 501 is used to receive a food inspection project extraction request and parse at least one sampling-related information carried in the food inspection project extraction request, wherein the sampling-related information includes sampling time information and sampling area information; a module 502 for determining a range of inspection to determine the corresponding food to be inspected according to the sampling time information and the sampling area information; an identification module 503 is used to input the food to be inspected into a preset risk parameter identification model in sequence to identify the food risk parameters and obtain the risk parameters of the food to be inspected; a sorting module 504 is used to sort the food to be inspected according to the risk parameters to obtain a food risk sequence; a screening module 505 is used to screen the food risk sequence according to preset risk screening rules to obtain risk foods recommended for sampling; an output module 506 is used to extract risk items and corresponding risk association information from a preset food risk knowledge graph according to the risk foods recommended for sampling, and screen out corresponding food inspection items according to the risk association information.
[0148] Optionally, the risk parameters include detection risk parameters and public opinion risk parameters, and the identification module 503 includes: a detection risk information calculation unit 5031, which is used to screen out relevant historical sampling data of the food to be inspected in a pre-established historical food sampling database according to the sampling time information and the sampling area information, and calculate the detection risk information based on the relevant historical sampling data; a public opinion risk information calculation unit 5032, which is used to determine the public opinion time range according to the sampling time information and the sampling area information, and obtain the public opinion risk information of the food to be inspected within the public opinion time range; a parameter identification unit 5033, which is used to call a preset risk parameter identification model to identify food risk parameters according to the detection risk information and the public opinion risk information, and obtain the risk parameters of the food to be inspected.
[0149] Optionally, the detection risk information includes historical risk information, regional risk information and climate risk information, and the detection risk information calculation unit 5031 includes: a historical risk information calculation subunit, used to determine the range of historical sampling time information according to the sampling time information, filter and obtain a first sampling data set in the historical food sampling data according to the historical sampling time information range, and calculate the historical risk information based on the first sampling data set; a regional risk information calculation subunit, used to filter out sampling data that is the same as the sampling area information in the historical sampling data according to the sampling area information, obtain a second sampling data set, and calculate the regional risk information based on the second sampling data set; a climate risk information calculation subunit, used to obtain the expected sampling climate information according to the sampling time information and the sampling area information, filter out sampling data that is the same as the expected sampling climate information in the historical sampling data according to the sampling area information, obtain a third sampling data set, and calculate the climate risk information based on the third sampling data set.
[0150] Optionally, the public opinion risk information calculation unit 5032 includes: a time range determination subunit, used to determine the public opinion time range according to the sampling time information; an information acquisition subunit, used to obtain the public opinion information related to the food to be inspected within the public opinion time range and the complaint and reporting information on the food complaint and reporting platform; a data processing subunit, used to perform data normalization processing on the public opinion information and complaint and reporting information to obtain public opinion data and complaint and reporting data; a calculation subunit, used to calculate the public opinion risk information of the food to be inspected within the public opinion time range based on the public opinion data and complaint and reporting data.
[0151] Optionally, the screening module 505 includes: a level evaluation unit 5051, used to evaluate the risk level of the food risk sequence according to the level evaluation rules to obtain the risk level of the food to be inspected; a food screening unit 5052, used to screen out risky foods recommended for sampling based on the risk level and the sorting information in the food risk sequence according to the level screening rules.
[0152] Optionally, the food inspection item extraction device also includes a inspection item detail generation module, which is specifically used to: obtain factor association information between risk items and risk factors contained in the food risk knowledge graph; query the project risk factors corresponding to the food inspection items based on the factor association information; and generate a inspection item detail table based on the risky foods recommended for sampling, the food inspection items and the corresponding project risk factors.
[0153] Optionally, the food inspection item extraction device also includes a knowledge graph generation unit, which is specifically used to: obtain historical sampling data containing unqualified items from a pre-established historical food sampling database to obtain an unqualified sampling data set; count the number of unqualified items of each food in the unqualified sampling data set, and generate risk items for each food based on the number of unqualified items; obtain the risk factors of the risk items in an existing knowledge base, and generate a food risk knowledge graph based on food types, risk items and risk factors.
[0154] The technical solution in the embodiment of the present invention can determine different historical sampling information based on multiple factors, automatically extract risky foods and food testing items recommended for sampling based on the different sampling information obtained, and pre-establish a food risk knowledge graph, and determine the food testing items corresponding to the risky foods based on the knowledge graph, thereby greatly improving the efficiency of selecting food testing items during food sampling and improving the selection effect of food testing items.
[0155] above Figure 5 and Figure 6 The food inspection item extraction device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The food inspection item extraction device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0156] Figure 7 7 is a schematic diagram of the structure of a food detection item extraction device provided by an embodiment of the present invention. The food detection item extraction device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 710 (for example, one or more processors) and a memory 720, and one or more storage media 730 (for example, one or more massive storage devices) storing application programs 733 or data 732. Among them, the memory 720 and the storage medium 730 can be short-term storage or permanent storage. The program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the food detection item extraction device 700. Furthermore, the processor 710 may be configured to communicate with the storage medium 730 to execute a series of instruction operations in the storage medium 730 on the food detection item extraction device 700.
[0157] The food detection item extraction device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and / or one or more operating systems 731, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 7 The structure of the food inspection item extraction device shown does not constitute a limitation on the food inspection item extraction device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0158] The present invention also provides a computer device, which can be any device capable of executing the food inspection item extraction method described in the above embodiments, and the computer device includes a memory and a processor, and the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the steps of the food inspection item extraction method in the above embodiments.
[0159] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0160] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the food detection item extraction method.
[0161] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0162] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0163] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for extracting food testing items, characterized in that: The method for extracting food detection items comprises: Receive a food testing item extraction request, and parse at least one sampling inspection related information carried in the food testing item extraction request, wherein the sampling inspection related information includes sampling inspection time information and sampling inspection area information; Determine the corresponding food to be inspected according to the sampling inspection time information and the sampling inspection area information; Inputting the food to be inspected into a preset risk parameter identification model in sequence to identify the food risk parameters, thereby obtaining the risk parameters of the food to be inspected; Sorting the foods to be inspected according to the risk parameters to obtain a food risk sequence; Screening the food risk sequence according to preset risk screening rules to obtain risky foods recommended for random inspection; According to the risky foods recommended for sampling, risk items and corresponding risk association information are extracted from a preset food risk knowledge graph, and corresponding food testing items are screened out according to the risk association information; The risk parameters include detection risk parameters and public opinion risk parameters. The food to be inspected is sequentially input into a preset risk parameter identification model to identify the food risk parameters. The risk parameters of the food to be inspected include: According to the sampling time information and the sampling area information, relevant historical sampling data of the food to be inspected are screened from a pre-established historical food sampling database, and detection risk information is calculated based on the relevant historical sampling data; Determine the public opinion time range according to the sampling inspection time information and the sampling inspection area information, and obtain the public opinion risk information of the food to be inspected within the public opinion time range; Calling a preset risk parameter identification model to identify food risk parameters according to the detection risk information and public opinion risk information to obtain the risk parameters of the food to be inspected; The detection risk information includes historical risk information, regional risk information and climate risk information. The relevant historical sampling data of the food to be inspected are screened out from a pre-established historical food sampling database according to the sampling time information and the sampling region information, and the detection risk information is calculated based on the relevant historical sampling data, including: Determine the range of historical sampling time information according to the sampling time information, screen and obtain a first sampling data set in historical food sampling data according to the range of historical sampling time information, and calculate the historical risk information based on the first sampling data set; According to the sampling area information, sampling data with the same sampling area information as the sampling area information is selected from the historical sampling data to obtain a second sampling data set, and the regional risk information is calculated based on the second sampling data set; Acquire the sampling predicted climate information according to the sampling time information and the sampling area information, select the sampling data with the same sampling predicted climate information from the historical sampling data according to the sampling predicted climate information, obtain a third sampling data set, and calculate the climate risk information based on the third sampling data set; The climate risk information is calculated based on the third sampling data set, including: performing weighted calculation on the historical sampling data in the third sampling data set according to the correlation between each sampling predicted climate information and the unqualified parameter, to obtain the climate risk information; wherein the correlation between the sampling predicted climate information and the unqualified parameter is the correlation between the detection item and the sampling predicted climate information calculated by using the Pearson algorithm after obtaining a large amount of sampling data in the historical sampling data set.
2. The method for extracting food detection items according to claim 1, characterized in that: Determining the public opinion time range according to the sampling inspection time information and the sampling inspection area information, and obtaining the public opinion risk information of the food to be inspected within the public opinion time range includes: Determine the time range of public opinion according to the sampling time information; Obtain public opinion information related to the food to be inspected within the public opinion time range and complaint and reporting information on the food complaint and reporting platform; Performing data normalization processing on the public opinion information and complaint and report information to obtain public opinion data and complaint and report data; The public opinion risk information of the food to be inspected within the public opinion time range is calculated based on the public opinion data and complaint and reporting data.
3. The method for extracting food detection items according to claim 2, characterized in that: The preset risk screening rules include grade evaluation rules and grade screening rules. The food risk sequence is screened according to the preset risk screening rules, and the risky foods recommended for sampling include: Evaluate the risk level of the food risk sequence according to the level evaluation rule to obtain the risk level of the food to be inspected; According to the grade screening rules, risky foods recommended for sampling are screened based on the risk grades and the ranking information in the food risk sequence.
4. The method for extracting food detection items according to claim 3, characterized in that: After extracting risk items and corresponding risk association information from a preset food risk knowledge graph according to the risk food sampled according to the recommendation, and screening out corresponding food testing items according to the risk association information, the method further includes: Obtaining factor association information of risk items and risk factors included in the food risk knowledge graph; According to the factor association information, query the project risk factor corresponding to the food testing project; A detailed list of testing items is generated based on the risky foods recommended for sampling, the food testing items and the corresponding project risk factors.
5. The method for extracting food detection items according to any one of claims 1 to 4, characterized in that: Before receiving the food inspection item extraction request and parsing at least one sampling inspection related information carried in the food inspection item extraction request, the method further includes: Acquire historical sampling data containing unqualified items in a pre-established historical food sampling database to obtain an unqualified sampling data set; Counting the number of unqualified items of each food in the unqualified sampling data set, and generating a risk item for each food based on the number of unqualified items; The risk factors of the risk items are obtained from an existing knowledge base, and a food risk knowledge graph is generated based on food types, risk items and risk factors.
6. A device for extracting food testing items, characterized in that: The food detection item extraction device comprises: An acquisition module, used to receive a food inspection item extraction request, and parse at least one sampling inspection related information carried in the food inspection item extraction request, wherein the sampling inspection related information includes sampling inspection time information and sampling inspection area information; A module for determining the scope of inspection, used to determine the corresponding food to be inspected according to the inspection time information and the inspection area information; An identification module, used to sequentially input the food to be inspected into a preset risk parameter identification model to identify food risk parameters, and obtain the risk parameters of the food to be inspected; A sorting module, used to sort the food to be inspected according to the risk parameters to obtain a food risk sequence; A screening module, used to screen the food risk sequence according to preset risk screening rules to obtain risky foods recommended for random inspection; An output module is used to extract risk items and corresponding risk association information from a preset food risk knowledge graph according to the risky foods recommended for sampling, and screen out corresponding food testing items according to the risk association information; An identification module is used to filter out relevant historical sampling data of the food to be inspected in a pre-established historical food sampling database according to the sampling time information and the sampling area information, and calculate the detection risk information based on the relevant historical sampling data, wherein the detection risk information includes historical risk information, regional risk information and climate risk information; determine the public opinion time range according to the sampling time information and the sampling area information, and obtain the public opinion risk information of the food to be inspected within the public opinion time range; call a preset risk parameter identification model to identify food risk parameters according to the detection risk information and the public opinion risk information, and obtain the risk parameters of the food to be inspected; wherein the risk parameters include detection risk parameters and public opinion risk parameters, an identification module, for determining a range of historical sampling time information according to the sampling time information, screening historical food sampling data according to the range of historical sampling time information to obtain a first sampling data set, and calculating the historical risk information based on the first sampling data set; screening sampling data identical to the sampling area information from the historical sampling data according to the sampling area information to obtain a second sampling data set, and calculating the regional risk information based on the second sampling data set; acquiring sampling predicted climate information according to the sampling time information and the sampling area information, screening sampling data identical to the sampling predicted climate information from the historical sampling data according to the sampling predicted climate information to obtain a third sampling data set, and calculating the climate risk information based on the third sampling data set; An identification module is used to perform weighted calculation on the historical sampling data in the third sampling data set according to the correlation between each type of sampling predicted climate information and the unqualified parameters to obtain climate risk information; wherein the correlation between the sampling predicted climate information and the unqualified parameters is the degree of correlation between the test items and the sampling predicted climate information calculated by using the Pearson algorithm after obtaining a large amount of sampling data in the historical sampling data set.
7. A food testing item extraction device, characterized in that: The food testing item extraction device comprises: a memory and at least one processor, wherein the memory stores instructions; The at least one processor calls the instructions in the memory to enable the food inspection item extraction device to perform the steps of the food inspection item extraction method according to any one of claims 1-5.
8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the method for extracting food detection items as described in any one of claims 1 to 5 are implemented.
