A food safety sampling data verification method, storage medium and system

The computer program identifies the sampling link of food safety sampling data, obtains the corresponding verification rules for multiple verifications, and evaluates the validity of the verification results. It solves the problems of low verification efficiency and wrong judgment of food safety sampling data, and achieves high efficiency. , accurate calibration results are displayed.

CN118278959BActive Publication Date: 2024-09-17GUANGDONG FOOD INSPECTION INST (GUANGDONG ALCOHOL TESTING CENT)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410703152.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-17
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

The existing food safety sampling data verification efficiency is low, and it is easy to cause missed judgments and wrong judgments due to manual errors.

Method used

Design a food safety sampling data verification method executed by a computer program. By identifying the sampling links, the corresponding verification rules are obtained, multiple verifications are performed, and multiple rule evaluation indicators are used to evaluate the validity of the verification results and display the verification results. Test results come in different forms.

Benefits of technology

It improves the efficiency of food safety sampling data verification, reduces manual errors, can promptly discover and correct data that fails the verification results, and significantly reduces repeated work and incorrect judgments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118278959B
    Figure CN118278959B
Patent Text Reader

Abstract

The present invention provides a food safety sampling data verification method, storage medium and system, the method comprising the following steps: obtaining a plurality of food safety sampling data to be verified, and identifying corresponding sampling links; obtaining a plurality of verification rules corresponding to the sampling links according to the sampling links to form a rule set; verifying each food safety sampling data using the obtained one or more verification rules to obtain one or more verification results; aggregating all food safety sampling data and their verification results and verifying them again, judging whether the verification results of each food safety sampling data under the two verifications are all passed, evaluating the validity of the verification rules with verification results being failed, displaying the food safety sampling data with all verification results passed and with the food safety sampling data with incomplete verification results in different forms, and displaying the effectiveness evaluation results of the verification rules, which can omit repeated manual verification work, improve verification efficiency and reduce manual errors and omissions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a food safety sampling data verification method, storage medium and system. Background Art

[0002] As people's awareness of food safety increases, the country's supervision of food safety has gradually increased. Carrying out food safety sampling is an important part of the food safety supervision and management department's fulfillment of its food safety supervision responsibilities, and it is also an important means of food safety risk prevention and control and scientific supervision. It is an important technical support for scientific supervision of food safety. After the food safety sampling, a large amount of food safety sampling data will be obtained, among which there may be abnormal data. For this, it is necessary to use data verification rules to verify the food safety sampling data so that abnormal data can be discovered in time. However, food safety sampling involves multiple sampling links, such as sampling, acceptance, inspection, and report issuance. The data verification rules applicable to food safety sampling data in different sampling links are different. The existing data verification uses traditional manual methods to check tens of thousands of sampling data one by one, which is not only inefficient, but also causes missed judgments and wrong judgments due to the uneven ability of the staff. Summary of the invention

[0003] The technical problem to be solved by the present invention is how to improve the verification efficiency of food safety sampling data and avoid false or missed judgments.

[0004] In order to solve the above technical problems, the present invention provides a food safety sampling data verification method, comprising the following steps implemented by a computer program:

[0005] S1. Obtain multiple food safety sampling inspection data to be verified, and identify the corresponding sampling inspection link according to the data field of each food safety sampling inspection data, wherein the sampling inspection link includes sampling, acceptance, inspection and reporting;

[0006] S2. For the food safety sampling data of the sampling link, acceptance link and inspection link, according to the sampling link corresponding to each food safety sampling data, obtain multiple verification rules corresponding to the sampling link from the preset rule table to form a rule set corresponding to each sampling link, wherein each verification rule type is different;

[0007] S3. Obtain one or more corresponding verification rules from the rule set according to the data field of each food safety sampling data, and use the obtained one or more verification rules to perform one or more verifications on each food safety sampling data to obtain one or more verification results, including pass or fail;

[0008] S4. In the reporting stage, all food safety sampling inspection data and one or more verification results are summarized, and then one or more verification results of each food safety sampling inspection data are verified again to determine whether the verification results of each food safety sampling inspection data under the two verifications are passed, and the food safety sampling inspection data with both passed verification results and those with incompletely passed verification results are obtained;

[0009] S5. For the verification rules used by the food safety sampling data whose verification results are not completely passed, obtain multiple rule evaluation indicators that can evaluate the verification rules with failed verification results from different dimensions, evaluate the verification rules with failed verification results using each rule evaluation indicator, and obtain the score of each rule evaluation indicator;

[0010] S6. Obtain the weight distribution of each rule evaluation indicator, and calculate the effectiveness evaluation result of the verification rule whose verification result is failed in combination with the score of each rule evaluation indicator;

[0011] S7. Display the food safety sampling data with all verification results passed and the food safety sampling data with verification results not completely passed in different forms, among which, the food safety sampling data with verification results not completely passed also displays the effectiveness evaluation results of the verification rules used by the data with verification results not passed.

[0012] Preferably, the plurality of verification rules include:

[0013] The non-empty rule is used to check whether the data field in the food safety sampling data is empty;

[0014] The consistency rule is used to verify whether two data fields in the food safety sampling data are consistent;

[0015] Enumeration rules, which are used to verify whether the data fields in the food safety sampling data contain specific content;

[0016] Historical database rules, which are used to verify whether the data fields in the food safety sampling data match the historical data;

[0017] Column script rules are used to perform rationality checks on data fields in food safety sampling data based on custom script rules.

[0018] Preferably, in step S7, during the display process, the food safety sampling data whose verification results have all passed and the food safety sampling data whose verification results have not completely passed are displayed with different background colors.

[0019] The present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the food safety sampling data verification method as described above are implemented.

[0020] The present invention also provides a food safety sampling data verification system, comprising interconnected processors and the computer-readable storage medium as described above.

[0021] The present invention has the following beneficial effects: after identifying the sampling inspection links corresponding to each food safety sampling inspection data, for the food safety sampling inspection data of the sampling link, the acceptance link and the inspection link, a plurality of verification rules corresponding to the sampling inspection links are obtained from a preset rule table to form a rule set corresponding to each sampling inspection link, and then one or more corresponding verification rules are obtained from the rule set according to the data field of each food safety sampling inspection data, the food safety sampling inspection data is verified once or multiple times to obtain one or more verification results, and then the one or more verification results of each food safety sampling inspection data are verified again in the reporting link, and then the verification rules that can be obtained from different dimensions are obtained. Multiple rule evaluation indicators are used to evaluate the verification rules with failed verification results. The verification rules with failed verification results are evaluated by using each rule evaluation indicator to obtain the score of each rule evaluation indicator, and then the weight distribution of each rule evaluation indicator is obtained. The effectiveness evaluation results of the verification rules with failed verification results are calculated in combination with the scores of each rule evaluation indicator, and then the food safety sampling data with passed verification results and incompletely passed verification results are displayed in different forms, among which the food safety sampling data with incompletely passed verification results also display the effectiveness evaluation results of the verification rules with failed verification results used by them. The multiple verification rules used in this way are applicable to the sampling phase of the food safety sampling data to be verified. There is no need to manually select appropriate verification rules, and one or more verification results of each food safety sampling data are re-verified to know whether the food safety sampling data with failed verification results are corrected in time. The effectiveness evaluation results of the verification rules with failed verification results can also be calculated by evaluating multiple rule evaluation indicators and their weight distribution for the verification rules with failed verification results. Displaying the food safety sampling data in different forms can facilitate users to distinguish between food safety sampling data with passed verification results and food safety sampling data with incomplete passed verification results, omit repeated manual verification work, improve verification efficiency and reduce manual errors and omissions. The effectiveness evaluation results of the verification rules with failed verification results used by the food safety sampling data with incomplete passed verification results are also displayed, so that users can judge whether the verification rules with failed verification results are appropriate based on the effectiveness evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a flow chart of the food safety sampling data verification method.

[0023] Figure 2It is a system process architecture diagram of the food safety sampling data verification method.

[0024] Figure 3 It is the structural block diagram of the food safety sampling data verification system.

[0025] Figure 4 It is a schematic diagram of multiple food safety sampling data and corresponding verification rules in the sampling stage.

[0026] Figure 5 It is a schematic diagram of multiple food safety sampling data and corresponding verification rules in the acceptance stage.

[0027] Figure 6 It is a schematic diagram of multiple food safety sampling data and corresponding verification rules in the inspection link. DETAILED DESCRIPTION

[0028] The present invention is further described in detail below in conjunction with specific implementation methods.

[0029] This embodiment provides a food safety sampling data verification system, which includes a processor and a computer storage medium connected to each other, wherein a computer program is provided on the computer storage medium, and when the computer program is executed by the processor, the following is implemented: Figure 1 The food safety sampling data verification method shown includes the following steps S1, S2, S3, S4, S5, S6, and S7.

[0030] S1. Obtain multiple food safety sampling inspection data to be verified, and identify the corresponding sampling inspection links according to the data fields of each food safety sampling inspection data, where the sampling inspection links include sampling, acceptance, inspection and reporting.

[0031] In this embodiment, food inspection agencies or other market supervision channels conduct food safety sampling inspections to generate a large amount of food safety sampling data. The first step of the system is to obtain multiple food safety sampling data to be verified from food inspection agencies or other market supervision channels and store them in a temporary data table; the second step is to pre-process the food safety sampling data, including deduplication, missing value filling, outlier processing, etc., to initially optimize the data quality; the third step is to convert the data to convert the original food safety sampling data into the format and structure required for analysis; the fourth step is to perform data quality inspection, and perform quality inspection on the converted food safety sampling data to ensure the accuracy, completeness and consistency of the food safety sampling data; the fifth step is then to integrate the data, and integrate the food safety sampling data from multiple data sources into a data set to form a structured database; the sixth step is to clean the data, and clean the food safety sampling data by deleting duplicate data, deleting invalid data, correcting erroneous data, deleting inconsistent data, etc.; the seventh step is to store the data, and store the cleaned food safety sampling data in a data warehouse or database for analysis, verification and application. The system then identifies the corresponding sampling link according to the data fields of each food safety sampling data to be verified. Among them, the random inspection link is one of sampling, acceptance, inspection and reporting. For example, when a food inspection agency samples a certain food, the food safety random inspection data obtained will include relevant data fields for sampling in the random inspection link.

[0032] The data fields of the sampling link include basic sampling information, sampling site information, sampling sample information, and production enterprise information. Among them, the basic sampling information includes the source of the task, the reporting classification, the sampling order number, the major food category, the sub-category of food, the detailed food category, etc.; the sampling site information includes the unit name, unit address, sampling personnel, sampling location, contact person, business license / social credit code, license number, etc.; the sampling sample information includes the shelf life, sampling quantity, sampling quantity unit, sample name, sample specification, production date, etc.; the production enterprise information includes the production license number, producer name, enterprise address, third-party enterprise name, third-party enterprise address, third-party location, etc. The data fields of the acceptance link include the task category, major food category, detailed food category, quality grade, judgment basis, shelf life, maximum allowable limit, minimum allowable limit, allowable limit unit, etc. Among them, the maximum allowable limit refers to the maximum value of the parameter, the minimum allowable limit refers to the minimum value of the parameter, and the allowable limit unit refers to the unit of the parameter. The data fields of the inspection link include inspection items, method limit, method limit unit, method limit name, maximum allowable limit, minimum allowable limit, allowable limit unit, result unit, result judgment, etc. Among them, method limit refers to the inspection method, method limit unit refers to the parameter unit limited to the inspection method, and method limit name refers to the parameter name limited to the inspection method.

[0033] S2. For the food safety random inspection data of the sampling link, acceptance link and inspection link, according to the random inspection link corresponding to each food safety random inspection data, obtain multiple verification rules corresponding to the random inspection link from the preset rule table to form a rule set corresponding to each random inspection link, wherein each verification rule type is different.

[0034] Before verifying the food safety sampling data, the user configures the rule table on the system. Specifically, the user selects the rule type and the corresponding verification rule, and then configures the sampling link that needs to be verified as needed. In this way, the rule type, verification rule, and sampling link are bound to generate a rule configuration in the rule table. Among them, the rule types include non-empty rules, consistency rules, enumeration rules, historical library rules, and column script rules. Each rule type corresponds to multiple different verification rules. The non-empty rule is used to verify whether the data field in the food safety sampling data is empty, the consistency rule is used to verify whether the two data fields in the food safety sampling data are consistent, the enumeration rule is used to verify whether the data field in the food safety sampling data is specific content, the historical library rule is used to verify whether the data field in the food safety sampling data matches the historical data, and the column script rule is used to perform rationality verification on the data field in the food safety sampling data according to the customized script rules.

[0035] After identifying the sampling links corresponding to each food safety sampling data, for the food safety sampling data of the sampling link, acceptance link and inspection link, the system obtains multiple verification rules corresponding to the sampling links from the preset rule table according to the sampling links corresponding to each food safety sampling data, and forms a rule set corresponding to each sampling link, wherein each verification rule has a different type, specifically: from the multiple verification rules corresponding to the non-empty rule, select the verification rule corresponding to the identified sampling link; from the multiple verification rules corresponding to the consistency rule, select the verification rule corresponding to the identified sampling link; from the multiple verification rules corresponding to the enumeration rule, select the verification rule corresponding to the identified sampling link; from the multiple verification rules corresponding to the historical library rule, select the verification rule corresponding to the identified sampling link; from the multiple verification rules corresponding to the column script rule, select the verification rule corresponding to the identified sampling link.

[0036] S3. Obtain one or more corresponding verification rules from the rule set according to the data field of each food safety sampling data, and use the obtained one or more verification rules to verify each food safety sampling data once or multiple times to obtain one or more verification results, which include pass or fail.

[0037] After obtaining multiple verification rules of different types and forming a rule set corresponding to each sampling link, one or more corresponding verification rules are obtained from the rule set according to the data field of each food safety sampling data, and each food safety sampling data is verified once or multiple times using the obtained one or more verification rules to obtain one or more verification results, which include pass or fail. The one or more verification rules used in this way are applicable to the sampling link of the food safety sampling data to be verified, and there is no need to manually select appropriate verification rules, which is highly efficient.

[0038] For example Figure 4As shown in the sampling link, the data field of the first food safety sampling data is a major category of food, and the data content is beverages. The system obtains the corresponding non-empty rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results; the data field of the second food safety sampling data is a minor category of food, and the data content is other types of drinking water. The system obtains the corresponding non-empty rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results; the third food safety sampling data The data field of the sampling data is the sampling link, and the data content is circulation. The system obtains the corresponding non-empty rules and column script rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules and column script rules to verify the food safety sampling data respectively, and obtains two verification results; the data field of the fourth food safety sampling data is the sampling site unit name, and the data content is Guangzhou XX Supermarket, the system obtains the corresponding column script rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained column script rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results; the data field of the fifth food safety sampling data is the sampling site unit name, and the data content is Guangzhou XX Supermarket, the system obtains the corresponding column script rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained column script rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results; The first segment is the producer name, and the data content is Guangdong Province XX Company. The system obtains the corresponding non-empty rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results; the data field of the sixth food safety sampling data is the production license number, and the data content is 12345678910123456. The system obtains the corresponding non-empty rules, historical library rules and column script rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules, historical library rules and column script rules to verify the food safety sampling data respectively, and obtains three verification results. Results; The data field of the seventh food safety sampling data is the sample name, and the data content is packaged drinking water. The system obtains the corresponding non-empty rules, historical library rules, and column script rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules, historical library rules, and column script rules to verify the food safety sampling data respectively, and obtains three verification results; The data field of the eighth food safety sampling data is the sample specification, and the data content is 500mL. The system obtains the corresponding non-empty rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results;The data field of the ninth food safety sampling data is the production date, and the data content is 2024 / 4 / 1. The system obtains the corresponding non-empty rule from the rule set according to the data field of the food safety sampling data, and verifies the food safety sampling data using the obtained non-empty rule to obtain a verification result; the data field of the tenth food safety sampling data is the shelf life, and the data content is 12 months. The system obtains the corresponding non-empty rule and historical library rule from the rule set according to the data field of the food safety sampling data, and verifies the food safety sampling data using the obtained non-empty rule and historical library rule, respectively, to obtain two verification results. ;

[0039] Another example Figure 5 As shown in the acceptance link, the data field of the first food safety sampling data is the task category, and the data content is 2024 national sampling supervision. The system obtains the corresponding non-empty rule from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rule to verify the food safety sampling data to obtain a verification result; the data field of the second food safety sampling data is the food category, and the data content is beverages, then the system obtains the corresponding non-empty rule and historical library rule from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rule and historical library to verify the food safety sampling data respectively, and obtains two verification results; the data field of the third food safety sampling data is food If the data content is other types of drinking water, the system obtains the corresponding non-empty rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results; the data field of the fourth food safety sampling data is quality grade, and the data content is empty, the system obtains the corresponding column script rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained column script rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results; the data field of the fifth food safety sampling data is the judgment basis, and the data content is GB 19298-2014 "National Food Safety Standard for Packaged Drinking Water", the system obtains the corresponding non-empty rules and column script rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules and column script rules to verify the food safety sampling data respectively, and obtains two verification results; the data field of the sixth food safety sampling data is the shelf life, and the data content is 12 months, the system obtains the corresponding non-empty rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results.

[0040] Another example Figure 6 As shown in the inspection link, the data field of the first food safety sampling data is the inspection item, and the data content is the oxygen consumption (measured in O2). The system obtains the corresponding non-empty rules and column script rules from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rules and column script rules to verify the food safety sampling data respectively, and obtains two verification results; the data field of the second food safety sampling data is the method limit, and the data content is 0.05. The system obtains the corresponding column script rules and historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained column script rules and historical library rules to verify the food safety sampling data respectively, and obtains two verification results; the data field of the third food safety sampling data is the maximum allowable limit, and the data content is 2.0. The system obtains the corresponding historical library rules from the rule set according to the data field of the food safety sampling data, and uses the obtained historical library rules to verify the food safety sampling data, and obtains to a verification result; the data field of the fourth food safety sampling data is the allowable limit unit, and the data content is mg / L, then the system obtains the corresponding historical library rule from the rule set according to the data field of the food safety sampling data, and uses the obtained historical library rule to verify the food safety sampling data to obtain a verification result; the data field of the fifth food safety sampling data is the result unit, and the data content is mg / L, then the system obtains the corresponding non-empty rule and historical library rule from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rule and historical library rule to verify the food safety sampling data respectively, and obtains two verification results; the data field of the sixth food safety sampling data is the result judgment, and the data content is qualified, then the system obtains the corresponding non-empty rule and column script rule from the rule set according to the data field of the food safety sampling data, and uses the obtained non-empty rule and column script rule to verify the food safety sampling data respectively, and obtains two verification results.

[0041] S4. In the reporting stage, all food safety sampling inspection data and one or more verification results thereof are summarized, and then one or more verification results of each food safety sampling inspection data are verified again to determine whether the verification results of each food safety sampling inspection data have passed the two verifications, and the food safety sampling inspection data whose verification results have passed and the food safety sampling inspection data whose verification results have not completely passed are obtained.

[0042] After verifying all food safety sampling data and obtaining the corresponding one or more verification results, the system will summarize all food safety sampling data and one or more verification results together in the reporting link, and then verify the one or more verification results of each food safety sampling data again to find out whether the food safety sampling data that fail the verification results are corrected in time, specifically, to determine whether the verification results of each food safety sampling data are passed in two verifications, and obtain the food safety sampling data with both the verification results passed and the food safety sampling data with the verification results not completely passed. For example, for a certain food safety sampling data, in step S3, the food safety sampling data is verified once or multiple times using the one or more verification rules obtained, and after obtaining one or more verification results, the verification results are summarized in step S4, and then the food safety sampling data is verified once or multiple times using the same one or more verification rules, so as to determine whether the verification results of the food safety sampling data are passed in two verifications, and obtain the food safety sampling data with both the verification results passed and the food safety sampling data with the verification results not completely passed.

[0043] S5. For the verification rules used for the food safety sampling data whose verification results are not completely passed, obtain multiple rule evaluation indicators that can evaluate the verification rules with failed verification results from different dimensions, use each rule evaluation indicator to evaluate the verification rules with failed verification results, and obtain the score of each rule evaluation indicator.

[0044] For the verification rules used in the food safety sampling data whose verification results are not completely passed, the system obtains multiple rule evaluation indicators that can evaluate the verification rules with failed verification results from different dimensions. For example, for the verification rules with failed verification results, the verification rules can be evaluated from three dimensions: rule specification, rule operation, and audit result. Therefore, the system obtains three rule evaluation indicators that can evaluate the verification rules with failed verification results from these three dimensions, namely: normative indicators for the rule specification dimension, operational indicators for the rule operation dimension, and audit indicators for the audit result dimension.

[0045] The normative indicators are mainly analyzed from two aspects, namely: the consistency of the relationship between the verification rules and the data standards associated with the food safety sampling data they verify, that is, the standard consistency indicator; the completeness of the SQL script description specification of the verification rules, that is, the integrity indicator. Specifically: the standard consistency indicator is to analyze whether the inspection condition parameters in the verification rules are consistent with the inspection condition parameters defined in the data standard associated with the food safety sampling data verified by the verification rules, such as analyzing whether the character length parameters in the verification rules of the character length detection class are consistent with the character length parameters defined in the data standard associated with the food safety sampling data verified by the verification rules; the integrity indicator is to analyze whether the description of the SQL script generated by the verification rules conforms to the SQL specification and whether it is complete, such as analyzing whether there are select, from, table name, table alias, field alias, conditional statements, etc. in the SQL script of the verification rules.

[0046] The operation indicators are mainly analyzed from the two operation conditions of the operation efficiency and operation results of the verification rules, including operation efficiency indicators and operation result indicators. Specifically: the operation efficiency indicator refers to the amount of data processed per unit time when the analysis and verification rules are running, that is, the data processing speed when the analysis and verification rules are running, and the unit is data / minute; the operation result indicator refers to the result of the success or failure of the analysis and verification rules.

[0047] Audit indicators are mainly analyzed from the results of data verification problems obtained from the operation of verification rules, including result accuracy indicators and business consistency indicators. Specifically: result accuracy indicators refer to analyzing the proportion of running results that are actually data verification problems to all running result problem data by statistically analyzing the running result problem data of verification rules; business consistency indicators refer to analyzing whether the verification logic described in the business verification rules (a business logic that verifies through textual verification rules) of the food safety sampling data it verifies is consistent, that is, analyzing whether the verification condition parameters of the verification rules meet the conditional restrictions described in the business verification rules.

[0048] The system uses various rule evaluation indicators to evaluate the verification rules with failed verification results and obtains the scores of various rule evaluation indicators.

[0049] Taking the standard consistency index as an example, the system analyzes whether the verification condition parameters of the verification rules are consistent with the inspection condition parameters defined in the data standard associated with the food safety sampling data verified by the verification rules. If they are consistent, the standard consistency index score is 1; if not, the standard consistency index score is 0.

[0050] Taking the integrity index as an example, the system analyzes the proportion of descriptions in the SQL scripts generated by the verification rules that conform to the SQL specifications, and uses this proportion as the score of the integrity index. The score of the integrity index is between [0, 1]. If the description of the SQL script fully conforms to the SQL specifications, the integrity index score is 1. If the description of the SQL script does not conform to the SQL specifications at all, the integrity index score is 0.

[0051] Taking the operation efficiency index as an example, the system analyzes the amount of data processed per unit time when the verification rules are running, that is, analyzes the data processing speed when the verification rules are running: if the data processing speed is above 100 pieces / minute, the operation efficiency index score is 1; if the data processing speed is above 40 pieces / minute but less than 100 pieces / minute, the operation efficiency index score is 0.8; if the data processing speed is above 10 pieces / minute but less than 40 pieces / minute, the operation efficiency index score is 0.6; if the data processing speed is above 5 pieces / minute but less than 10 pieces / minute, the operation efficiency index score is 0.4; if the data processing speed is above 1 piece / minute but less than 5 pieces / minute, the operation efficiency index score is 0.2; if the data processing speed is less than 1 piece / minute, the operation efficiency index score is 0.1.

[0052] Taking the operation result indicator as an example, the system analyzes whether the verification rule runs successfully or fails. If the operation is successful, the operation result indicator score is 1, and if the operation fails, the operation result indicator score is 0.

[0053] Taking the result accuracy index as an example, the system analyzes the proportion of running results that are truly data verification problems among all running result problem data by counting the running result problem data of the verification rules, and uses this proportion as the score of the result accuracy index. The score of the result accuracy index is between [0, 1]. If all running result problem data are data verification problems, the result accuracy index score is 1. If all running result problem data are not data verification problems, the result accuracy index score is 0.

[0054] Taking the business consistency index as an example, the system analyzes whether the verification rules are consistent with the verification logic described in the business verification rules of the food safety sampling data it checks. If they are consistent, the business consistency index score is 1; if not, the business consistency index score is 0.

[0055] S6. Obtain the weight distribution of each rule evaluation indicator, and calculate the effectiveness evaluation result of the verification rule whose verification result is failed in combination with the score of each rule evaluation indicator.

[0056] After obtaining the evaluation indicators of each rule, the system obtains the preset weight distribution for each rule evaluation indicator, and calculates the effectiveness evaluation results of the verification rules with failed verification results in combination with the scores of each rule evaluation indicator. Among them, the weight of the influence of rule specifications on the effectiveness of verification rules is 0.7153, the weight of the influence of rule operation on the effectiveness of verification rules is 0.0977, and the weight of the influence of audit results on the effectiveness of data quality inspection rules is 0.1870; the weight of the influence of standard consistency indicators on rule specifications is 0.75, and the weight of the influence of integrity indicators on rule specifications is 0.25; the weight of the influence of operation efficiency indicators on rule operation is 0.2, and the weight of the influence of operation result indicators on rule operation is 0.8; the weight of the influence of result accuracy indicators on audit results is 0.1667, and the weight of the influence of business consistency indicators on audit results is 0.8333.

[0057] In this embodiment, the scores of each rule evaluation indicator are: the score of the standard consistency indicator is 1, the score of the integrity index is 1, the score of the operation efficiency index is 0.6, the score of the operation result index is 1, the score of the result accuracy index is 0.8, and the score of the business consistency index is 1.

[0058] The score of normative indicators = the weight of the impact of standard consistency indicators on rules and regulations * the score of standard consistency indicators + the weight of the impact of integrity indicators on rules and regulations * the score of integrity indicators = 0.75*1+0.25*1=1.

[0059] The score of the operation index = the weight of the impact of the operation efficiency index on the rule operation * the score of the operation efficiency index + the weight of the impact of the operation result index on the rule operation * the score of the operation result index = 0.2*0.6+0.8*1=0.92.

[0060] The score of audit indicators = the weight of the impact of result accuracy indicators on audit results * the score of result accuracy indicators + the weight of the impact of business consistency indicators on audit results * the score of business consistency indicators = 0.1667*0.8+0.8333*1=0.96666.

[0061] Then the system calculates the total score of the effectiveness of the verification rules according to the weight distribution and score of each rule evaluation indicator, thereby obtaining the effectiveness evaluation result of the verification rules with failed verification results. Specifically: The total score of the effectiveness of the verification rules = the weight of the influence of rule specifications on the effectiveness of the verification rules * the score of normative indicators + the weight of the influence of rule operation on the effectiveness of the verification rules * the score of operation indicators + the weight of the influence of audit results on the effectiveness of data quality check rules * the score of audit indicators = 0.7153*1+0.0977*0.92+0.1870*0.96666=0.99561602.

[0062] S7. Display the food safety sampling data with all verification results passed and the food safety sampling data with verification results not completely passed in different forms, among which, the food safety sampling data with verification results not completely passed also displays the effectiveness evaluation results of the verification rules used by the verification data with verification results not passed.

[0063] After obtaining multiple verification results of all food safety sampling data, the system displays all verification results for users to view through a display device (such as a display), and changes the background color of the food safety sampling data whose verification results are not completely passed during the display process, so that the food safety sampling data whose verification results are all passed and the food safety sampling data whose verification results are not completely passed are displayed in different forms (different background colors), which is convenient for users to quickly distinguish between the food safety sampling data whose verification results are all passed and the food safety sampling data whose verification results are not completely passed, and the efficiency is high. Among them, the effectiveness evaluation results of the verification rules used by the food safety sampling data whose verification results are not completely passed are also displayed, that is, the total score of the effectiveness of the verification rules is displayed, so that users can judge whether the verification rules whose verification results are not passed are appropriate based on the total score.

[0064] The above is only an implementation method of the invention, and does not limit the scope of patent protection. Those skilled in the art can make non-substantial changes or substitutions based on the invention, which still fall within the scope of patent protection.

Claims

1. A food safety sampling data verification method, Its characteristics are: The method comprises the following steps implemented by a computer program: S1. Obtain multiple food safety sampling inspection data to be verified, and identify the corresponding sampling inspection link according to the data field of each food safety sampling inspection data, wherein the sampling inspection link includes sampling, acceptance, inspection and reporting; S2. For the food safety sampling data of the sampling link, acceptance link and inspection link, according to the sampling link corresponding to each food safety sampling data, obtain multiple verification rules corresponding to the sampling link from the preset rule table to form a rule set corresponding to each sampling link, wherein each verification rule type is different; S3. Obtain one or more corresponding verification rules from the rule set according to the data field of each food safety sampling data, and use the obtained one or more verification rules to perform one or more verifications on each food safety sampling data to obtain one or more verification results, including pass or fail; S4. In the reporting stage, all food safety sampling inspection data and one or more verification results are summarized, and then one or more verification results of each food safety sampling inspection data are verified again to determine whether the verification results of each food safety sampling inspection data under the two verifications are passed, and the food safety sampling inspection data with both passed verification results and those with incompletely passed verification results are obtained; S5. For the verification rules used by the food safety sampling data whose verification results are not completely passed, obtain multiple rule evaluation indicators that can evaluate the verification rules with failed verification results from different dimensions, evaluate the verification rules with failed verification results using each rule evaluation indicator, and obtain the score of each rule evaluation indicator; S6. Obtain the weight distribution of each rule evaluation indicator, and calculate the effectiveness evaluation result of the verification rule whose verification result is failed in combination with the score of each rule evaluation indicator; S7. Display the food safety sampling data with all verification results passed and the food safety sampling data with verification results not completely passed in different forms, among which, the food safety sampling data with verification results not completely passed also displays the effectiveness evaluation results of the verification rules used by the verification data with verification results not passed.

2. The food safety sampling data verification method according to claim 1, Its characteristics are: Multiple validation rules include: The non-empty rule is used to check whether the data field in the food safety sampling data is empty; The consistency rule is used to verify whether two data fields in the food safety sampling data are consistent; Enumeration rules, which are used to verify whether the data fields in the food safety sampling data contain specific content; Historical database rules, which are used to verify whether the data fields in the food safety sampling data match the historical data; Column script rules are used to perform rationality checks on data fields in food safety sampling data based on custom script rules.

3. The food safety sampling data verification method according to claim 1, Its characteristics are: In step S7, during the display process, the food safety sampling data whose verification results have all passed and the food safety sampling data whose verification results have not completely passed are displayed with different background colors.

4. A computer-readable storage medium having a computer program stored thereon, Its characteristics are: When the computer program is executed by a processor, the steps in the food safety sampling data verification method as described in any one of claims 1 to 3 are implemented.

5. A food safety sampling data verification system, Its characteristics are: The method comprises a processor and a computer-readable storage medium as claimed in claim 4 connected to each other.