CN117147781A - Food safety testing method based on random sampling - Google Patents
Food safety testing method based on random sampling Download PDFInfo
- Publication number
- CN117147781A CN117147781A CN202311421361.9A CN202311421361A CN117147781A CN 117147781 A CN117147781 A CN 117147781A CN 202311421361 A CN202311421361 A CN 202311421361A CN 117147781 A CN117147781 A CN 117147781A
- Authority
- CN
- China
- Prior art keywords
- detection
- sample
- food
- food safety
- sampling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 235000013305 food Nutrition 0.000 title claims abstract description 399
- 238000005070 sampling Methods 0.000 title claims abstract description 279
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000009781 safety test method Methods 0.000 title claims abstract description 35
- 238000001514 detection method Methods 0.000 claims abstract description 446
- 238000004458 analytical method Methods 0.000 claims abstract description 97
- 238000009826 distribution Methods 0.000 claims abstract description 58
- 238000012795 verification Methods 0.000 claims abstract description 31
- 230000004913 activation Effects 0.000 claims abstract description 18
- 239000000523 sample Substances 0.000 claims description 262
- 230000002159 abnormal effect Effects 0.000 claims description 43
- 238000010168 coupling process Methods 0.000 claims description 34
- 238000005859 coupling reaction Methods 0.000 claims description 34
- 230000004927 fusion Effects 0.000 claims description 11
- 238000012360 testing method Methods 0.000 claims description 8
- 230000003213 activating effect Effects 0.000 claims description 7
- 102100030386 Granzyme A Human genes 0.000 claims description 4
- 101001009599 Homo sapiens Granzyme A Proteins 0.000 claims description 4
- 238000012512 characterization method Methods 0.000 claims description 4
- 239000013074 reference sample Substances 0.000 claims description 2
- 238000011076 safety test Methods 0.000 abstract description 40
- 230000000694 effects Effects 0.000 abstract description 14
- 235000014594 pastries Nutrition 0.000 description 3
- 238000010276 construction Methods 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 239000000447 pesticide residue Substances 0.000 description 2
- 241001122767 Theaceae Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 235000013409 condiments Nutrition 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 229910001385 heavy metal Inorganic materials 0.000 description 1
- 244000005700 microbiome Species 0.000 description 1
- 235000015097 nutrients Nutrition 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 235000013616 tea Nutrition 0.000 description 1
- 235000013311 vegetables Nutrition 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N33/00—Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
- G01N33/02—Food
Landscapes
- Engineering & Computer Science (AREA)
- Food Science & Technology (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Medicinal Chemistry (AREA)
- Physics & Mathematics (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Investigating Or Analysing Materials By Optical Means (AREA)
Abstract
The invention discloses a food safety testing method based on random sampling, and relates to the field of food detection, wherein the method comprises the following steps: carrying out food safety-detection characteristic analysis of the first food to be detected according to the first food attribute identifier to obtain first food safety-detection characteristic distribution; based on a pre-constructed sampling trigger analysis function, obtaining H detection factors-sampling trigger degrees according to the first food safety-detection characteristic distribution; performing global sample verification on the first detection sample set, and generating a sampling activation instruction when the global sample verification result is passed; randomly sampling the first detection sample set based on the H detection factors and the sampling trigger degrees to obtain a sample random sampling result; and performing food safety detection of the sample random sampling result according to the food safety detection terminal. The technical problems of poor food safety test effect caused by low adaptability and insufficient accuracy of random sampling in the food safety test in the prior art are solved.
Description
Technical Field
The invention relates to the field of food detection, in particular to a food safety testing method based on random sampling.
Background
Random sampling is of great importance for food safety testing. For example, by means of random sampling, the influence of human factors on food detection sample collection can be avoided, the objectivity and accuracy of food detection samples are ensured, the quality of the whole batch of foods can be reflected better, and therefore the food safety test result is more accurate and has more reference value.
In the prior art, when food safety test exists, the adaptability of random sampling is low, the accuracy is not enough, and the technical problem of poor food safety test effect is caused.
Disclosure of Invention
The application provides a food safety testing method based on random sampling. The technical problems of poor food safety test effect caused by low adaptability and insufficient accuracy of random sampling in the food safety test in the prior art are solved. The method and the device have the advantages that the random sampling fitness and the random sampling accuracy of the food safety test are improved, the food safety test effect is improved, and the food safety test result is more accurate.
In view of the above, the present application provides a food safety testing method based on random sampling.
In a first aspect, the present application provides a food safety testing method based on random sampling, wherein the method is applied to a food safety testing system based on random sampling, and the method comprises the following steps: obtaining a first detection sample set of a first food to be detected, wherein the first food to be detected has a first food attribute identifier; performing food safety-detection characteristic analysis of the first food to be detected according to the first food attribute identifier to obtain a first food safety-detection characteristic distribution, wherein the first food safety-detection characteristic distribution comprises H food safety detection factors, and H is a positive integer greater than 1; based on a pre-constructed sampling trigger analysis function, carrying out sampling trigger degree analysis on the first detection sample set according to the first food safety-detection characteristic distribution to obtain H detection factors-sampling trigger degrees; performing global sample verification on the first detection sample set based on a sample verifier to obtain a global sample verification result; when the global sample checking result is passing, generating a sampling activating instruction; according to the sampling activation instruction, randomly sampling the first detection sample set based on the H detection factors and sampling trigger degrees to obtain a sample random sampling result, wherein the sample random sampling result has a food detection characteristic identifier; and based on the food detection feature identification, performing food safety detection of the sample random sampling result according to a food safety detection terminal.
In a second aspect, the present application also provides a food safety testing system based on random sampling, wherein the system comprises: the detection sample obtaining module is used for obtaining a first detection sample set of a first food to be detected, and the first food to be detected has a first food attribute identifier; the detection feature analysis module is used for carrying out food safety-detection feature analysis of the first food to be detected according to the first food attribute identification to obtain first food safety-detection feature distribution, wherein the first food safety-detection feature distribution comprises H food safety detection factors, and H is a positive integer greater than 1; the sampling trigger degree analysis module is used for carrying out sampling trigger degree analysis on the first detection sample set according to the first food safety-detection characteristic distribution based on a pre-constructed sampling trigger analysis function to obtain H detection factors-sampling trigger degrees; the global sample verification module is used for carrying out global sample verification on the first detection sample set based on a sample checker to obtain a global sample verification result; the activation instruction generation module is used for generating a sampling activation instruction when the global sample verification result is passing; the random sampling module is used for randomly sampling the first detection sample set based on the H detection factors and the sampling trigger degrees according to the sampling activation instruction to obtain a sample random sampling result, and the sample random sampling result has a food detection feature identifier;
And the food safety detection module is used for executing food safety detection of the sample random sampling result according to the food safety detection terminal based on the food detection characteristic identifier.
One or more technical schemes provided by the application have at least the following technical effects or advantages:
carrying out food safety-detection characteristic analysis of the first food to be detected through the first food attribute identifier to obtain first food safety-detection characteristic distribution; based on a pre-constructed sampling trigger analysis function, carrying out sampling trigger degree analysis on a first detection sample set according to first food safety-detection characteristic distribution to obtain H detection factors-sampling trigger degrees; performing global sample verification on the first detection sample set through a sample verifier to obtain a global sample verification result; when the global sample checking result is passing, generating a sampling activating instruction; according to the sampling activation instruction, randomly sampling the first detection sample set based on H detection factors-sampling trigger degrees to obtain a sample random sampling result; based on the food detection feature identification, food safety detection of a sample random sampling result is executed according to the food safety detection terminal. The method and the device have the advantages that the random sampling fitness and the random sampling accuracy of the food safety test are improved, the food safety test effect is improved, and the food safety test result is more accurate.
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present application, the following description will briefly explain the drawings of the embodiments of the present application. It is apparent that the figures in the following description relate only to some embodiments of the application and are not limiting of the application.
FIG. 1 is a schematic flow chart of a food safety testing method based on random sampling according to the present application;
FIG. 2 is a schematic flow chart of obtaining a factor fusion instruction in a food safety test method based on random sampling;
fig. 3 is a schematic structural diagram of a food safety testing system based on random sampling according to the present application.
Detailed Description
The application provides a food safety test method based on random sampling. The technical problems of poor food safety test effect caused by low adaptability and insufficient accuracy of random sampling in the food safety test in the prior art are solved. The method and the device have the advantages that the random sampling fitness and the random sampling accuracy of the food safety test are improved, the food safety test effect is improved, and the food safety test result is more accurate.
Example 1
Referring to fig. 1, the application provides a food safety testing method based on random sampling, wherein the method is applied to a food safety testing system based on random sampling, and the method specifically comprises the following steps:
obtaining a first detection sample set of a first food to be detected, wherein the first food to be detected has a first food attribute identifier;
and connecting the food safety testing system based on random sampling, inquiring food information to be detected, obtaining a first food to be detected and a first detection sample set corresponding to the first food to be detected. And the first food to be detected has a first food attribute identifier. The first food product to be tested may be any food product for which a food safety test is performed using the one random sampling based food safety test system. For example, the first food to be detected may be vegetables, fruits, tea leaves, pastries, condiments, etc. The first test sample set includes a plurality of test samples of a first food product to be tested. For example, when the first food to be detected is pastry a, the corresponding plurality of detection samples includes a plurality of pastries a. The first food attribute identifier comprises food type information corresponding to the first food to be detected.
Performing food safety-detection characteristic analysis of the first food to be detected according to the first food attribute identifier to obtain a first food safety-detection characteristic distribution, wherein the first food safety-detection characteristic distribution comprises H food safety detection factors, and H is a positive integer greater than 1;
obtaining a plurality of sample food attribute identifications and a plurality of sample food safety-detection feature distributions, and the plurality of sample food attribute identifications and the plurality of sample food safety-detection feature distributions having a sample attribute-detection feature relationship;
obtaining a plurality of detection feature analysis index nodes according to the plurality of sample food attribute identifiers;
obtaining a plurality of detection feature analysis response nodes according to the plurality of sample food safety-detection feature distribution;
based on the plurality of detection feature analysis index nodes and the plurality of detection feature analysis response nodes, combining the sample attribute-detection feature relation to construct a food safety-detection feature distribution tree;
and based on the food safety-detection characteristic distribution tree, carrying out food safety-detection characteristic analysis of the first food to be detected according to the first food attribute identification.
The food safety testing system based on random sampling is connected, and a plurality of sample food attribute identifiers and a plurality of sample food safety-detection characteristic distributions are collected. And the plurality of sample food attribute identifications and the plurality of sample food safety-detection feature distributions have a sample attribute-detection feature relationship. Wherein the plurality of sample food attribute identifications includes a plurality of historical food type information. Each sample food safety-detection feature distribution includes a corresponding plurality of historical food safety detection indicators for each sample food attribute identification. For example, when the sample food attribute is identified as fruit, the corresponding sample food safety-detection characteristic distribution includes a nutrient component detection index, a pesticide residue detection index, a heavy metal detection index, and the like. The sample attribute-detection feature relationship includes a correspondence between a plurality of sample food attribute identifications and a plurality of sample food safety-detection feature distributions.
Further, a plurality of sample food attribute identifications is set to a plurality of detection feature analysis inodes. The plurality of sample food safety-detection feature distributions are set to a plurality of detection feature analysis response nodes. Then, a plurality of detection feature analysis index nodes and a plurality of detection feature analysis response nodes are added to the food safety-detection feature distribution tree according to the sample attribute-detection feature relation. Inputting the first food attribute identifier into a food safety-detection characteristic distribution tree, and performing food safety detection index matching on the first food attribute identifier by the food safety-detection characteristic distribution tree to obtain first food safety-detection characteristic distribution. The food safety-detection characteristic distribution tree comprises a plurality of detection characteristic analysis index nodes and a plurality of detection characteristic analysis response nodes which are arranged according to a sample attribute-detection characteristic relation. The first food safety-detection feature profile includes H food safety detection factors. And H is a positive integer greater than 1. The H food safety detection factors comprise a plurality of food safety detection indexes corresponding to the first food attribute identifiers.
By carrying out food safety-detection characteristic analysis on the first food to be detected, accurate and comprehensive first food safety-detection characteristic distribution is obtained, so that the technical effect of random sampling reliability of food safety test is improved.
After obtaining the first food safety-detection feature profile, as shown in fig. 2, further comprises:
traversing the H food safety detection factors to perform pairwise random combination to obtain a plurality of detection factor combinations;
performing decoupling degree analysis by traversing the plurality of detection factor combinations to obtain a plurality of combination-factor decoupling degrees;
judging whether the multiple combined-factor re-coupling degrees are larger than a preset re-coupling degree or not;
if any one of the plurality of combination-factor re-coupling degrees is larger than the preset re-coupling degree, obtaining a factor fusion instruction, and optimizing the H food safety detection factors according to the factor fusion instruction.
And carrying out random combination on the H food safety detection factors to obtain a plurality of detection factor combinations. Each combination of detection factors includes any two of the H food safety detection factors. And then traversing a plurality of detection factor combinations to perform decoupling degree analysis, and obtaining a plurality of combination-factor decoupling degrees. The re-coupling degree analysis refers to similarity analysis of two food safety detection factors in each detection factor combination. The combination-factor re-coupling is data information used to characterize the similarity between two food safety test factors within each test factor combination. The higher the similarity between two food safety detection factors within a detection factor combination, the greater the corresponding combination-factor re-coupling.
Further, the preset degree of re-coupling comprises a preset determined combined-factor re-coupling threshold by the one random sampling based food safety testing system. And respectively judging whether each combined-factor re-coupling degree in the plurality of combined-factor re-coupling degrees is larger than a preset re-coupling degree. When any one of the plurality of combination-factor re-coupling degrees is larger than a preset re-coupling degree, the food safety testing system based on random sampling automatically generates a factor fusion instruction and optimizes H food safety detection factors according to the factor fusion instruction.
The factor fusion instruction is instruction information for representing that in a plurality of combination-factor re-coupling degrees, there is a combination-factor re-coupling degree larger than a preset re-coupling degree, and two food safety detection factors corresponding to the combination-factor re-coupling degree need to be optimized. For example, when the H food safety detection factors are optimized according to the factor fusion instruction, the combination-factor re-coupling degree greater than the preset re-coupling degree is set as the identification re-coupling degree, and one food safety detection factor at random in the two food safety detection factors corresponding to the identification re-coupling degree is deleted. Therefore, the independence of the H food safety detection factors is guaranteed, the food safety detection resource waste caused by the repetition of the food safety detection factors is avoided, and meanwhile, the random sampling efficiency of the food safety test is improved.
Based on a pre-constructed sampling trigger analysis function, carrying out sampling trigger degree analysis on the first detection sample set according to the first food safety-detection characteristic distribution to obtain H detection factors-sampling trigger degrees;
obtaining a first food detection precision constraint corresponding to the first food to be detected;
based on the first food detection precision constraint, matching a reference sampling trigger degree according to a preset sampling trigger degree table;
carrying out random numbering based on the first food safety-detection characteristic distribution to obtain a first food safety detection factor, a second food safety detection factor … and a H food safety detection factor, wherein H is a positive integer, and H belongs to H;
and connecting the food safety testing system based on random sampling, inquiring the food safety testing precision corresponding to the first food to be detected, and obtaining the first food detection precision constraint. And then, inputting the first food detection precision constraint into a preset sampling trigger degree table to obtain a reference sampling trigger degree. The first food detection precision constraint comprises food safety test precision corresponding to the first food to be detected. The predetermined sampling trigger metric comprises a plurality of predetermined food safety test accuracies preset and determined by the food safety test system based on random sampling, and a plurality of predetermined random sampling percentages corresponding to the plurality of predetermined food safety test accuracies. For example, the plurality of preset random sampling percentages includes 10%, 15%, 20%, etc. The reference sampling trigger degree comprises a preset random sampling percentage corresponding to the first food detection precision constraint. The greater the first food detection accuracy constraint, the higher the corresponding reference sample trigger level.
Further, the H food safety detection factors in the first food safety-detection characteristic distribution are randomly numbered to obtain a first food safety detection factor and a second food safety detection factor … H food safety detection factor. And H is a positive integer, and H belongs to H.
According to the sampling trigger analysis function and the reference sampling trigger degree, carrying out sampling trigger degree analysis on the first food safety detection factor to obtain a first detection factor-sampling trigger degree;
obtaining a detection backtracking time zone constraint based on the first food detection accuracy constraint;
traversing the H food safety detection factors to carry out anomaly detection record backtracking based on the first food attribute identification and the detection backtracking time zone constraint, and obtaining H factor detection anomaly trigger degrees;
detecting abnormal trigger degrees based on the H factors to obtain a first abnormal trigger assembly;
detecting abnormal trigger degrees according to the H factors based on the first food safety detection factors to obtain first factor detection abnormal trigger degrees;
and detecting the abnormal trigger degree based on the reference sampling trigger degree, the first abnormal trigger assembly and the first factor, and obtaining the first detection factor-sampling trigger degree according to the sampling trigger analysis function.
Constructing the sampling trigger analysis function, wherein the sampling trigger analysis function is as follows:
;
wherein SAT is h Characterizing an h detection factor-sampling trigger degree, SAD characterizing a reference sampling trigger degree, SAF h Characterization of the h factor detection of the degree of abnormal triggering, SAE h And (5) characterizing an h abnormal trigger assembly.
And setting a detection backtracking time zone constraint according to the first food detection accuracy constraint. Detecting the backtracking time zone constraint includes adaptively setting a determined historical time range in accordance with the first food detection accuracy constraint. The greater the first food detection accuracy constraint, the greater the historical time range within the corresponding detection backtracking time zone constraint. And then, carrying out anomaly detection record backtracking on the H food safety detection factors respectively according to the first food attribute identification and the detection backtracking time zone constraint to obtain the anomaly triggering degree of the detection of the H factors. The abnormal detection record backtracking refers to respectively inquiring unqualified food safety detection records of H food safety detection factors according to the first food attribute identification and the detection backtracking time zone constraint. Detecting the abnormal trigger degree by each factor comprises detecting total number of a plurality of historical unqualified food safety detection records corresponding to each food safety detection factor under the backtracking time zone constraint and the first food attribute identification.
Further, food safety detection record collection is carried out according to the first food attribute identification and the detection retrospective time zone constraint, and the total detection record number of the historical food safety detection records of the first food attribute identification is set to be the total time zone detection number in the detection retrospective time zone constraint. The historical food safety detection records comprise a plurality of historical detection records corresponding to each historical food safety detection index of the first food attribute identifier in the detection backtracking time zone constraint. The sum of the abnormal trigger degrees detected by the H factors is set as the total abnormal trigger degree, and the ratio of the total abnormal trigger degree to the total time zone detection is set as the first abnormal trigger assembly. And then detecting abnormal trigger degrees according to the H factors, and matching the first factors corresponding to the first food safety detection factors to detect the abnormal trigger degrees. The first factor detection abnormal trigger degree comprises the factor detection abnormal trigger degree corresponding to the first food safety detection factor in the H factor detection abnormal trigger degrees.
Further, the reference sampling trigger degree, the first abnormal trigger assembly and the first factor detection abnormal trigger degree are input into a sampling trigger analysis function, and the first detection factor-sampling trigger degree is obtained. The sampling trigger analysis function is as follows:
;
Wherein SAT is h Characterizing an h detection factor-sampling trigger degree, SAD characterizing a reference sampling trigger degree, SAF h Characterization of the h factor detection of the degree of abnormal triggering, SAE h And (5) characterizing an h abnormal trigger assembly.
Continuing to analyze the sampling trigger degree of the h food safety detection factor of the second food safety detection factor … according to the sampling trigger analysis function and the reference sampling trigger degree to obtain a second detection factor-sampling trigger degree … h detection factor-sampling trigger degree;
integrating the first detection factor-sampling trigger level, the second detection factor-sampling trigger level … and the H detection factor-sampling trigger level to generate the H detection factor-sampling trigger levels.
And continuing to perform sampling trigger degree analysis on the H food safety detection factor of the second food safety detection factor … according to the sampling trigger analysis function and the reference sampling trigger degree to obtain a second detection factor-sampling trigger degree … H detection factor-sampling trigger degree, and adding the first detection factor-sampling trigger degree and the second detection factor-sampling trigger degree … H detection factor-sampling trigger degree to the H detection factor-sampling trigger degrees. The H detection factor-sampling trigger degrees comprise first detection factor-sampling trigger degrees and second detection factor-sampling trigger degrees … H detection factor-sampling trigger degrees which are respectively corresponding to the first food safety detection factor and the second food safety detection factor … H food safety detection factor. The sampling trigger degree analysis method of the h-th detection factor-sampling trigger degree of the second detection factor-sampling trigger degree … is the same as that of the first detection factor-sampling trigger degree, and will not be described again here. And the sampling triggering degree analysis is respectively carried out on the H food safety detection factors through the sampling triggering analysis function, so that the adaptability and the accuracy of random sampling during food safety testing are improved.
Performing global sample verification on the first detection sample set based on a sample verifier to obtain a global sample verification result;
obtaining a first standard sample feature based on the first food to be detected;
obtaining a plurality of detection sample characteristics corresponding to a plurality of detection samples of the first detection sample set;
based on the first standard sample characteristics, comparing the plurality of detection sample characteristics to obtain a plurality of sample comparison degrees;
obtaining a preset sample comparison degree;
inputting the plurality of sample comparison degrees and the preset sample comparison degree into the sample checker, wherein the sample checker comprises a global sample check operator, the global sample check operator is that if the plurality of sample comparison degrees are smaller than the preset sample comparison degree, the obtained global sample check result is passed, otherwise, the obtained global sample check result is not passed, and a sample early warning signal is generated.
And connecting the food safety testing system based on random sampling, and carrying out standard sample image query on the first food to be detected to obtain first standard sample characteristics. The first standard sample is characterized by image data information corresponding to a normal detection sample of the first food to be detected. And then, respectively carrying out real-time image acquisition on a plurality of detection samples of the first detection sample set by the image acquisition device in the food safety test system based on random sampling to obtain a plurality of detection sample characteristics. Each test sample feature comprises a real-time image corresponding to each test sample.
Further, the plurality of detection sample features are compared with the first standard sample features respectively, and a plurality of sample comparison degrees are obtained. Sample alignment is data information used to characterize the differences between the test sample features and the first standard sample features. The greater the difference between the detected sample feature and the first standard sample feature, the higher the corresponding sample alignment. Then, the plurality of sample alignments and the preset sample alignments are input into a sample checker, which includes a global sample checker. The global sample check operator is used for obtaining a global sample check result if the comparison degrees of the samples are smaller than the preset comparison degree. Otherwise, if any one of the sample comparison degrees is greater than/equal to the preset sample comparison degree, the obtained global sample verification result is not passed, and a sample early warning signal is generated. Wherein the preset sample alignment comprises a sample alignment threshold preset and determined by the food safety testing system based on random sampling. The global sample check results in pass/fail. The sample early warning signal is early warning prompt information used for representing that the global sample checking result is failed, and the detection sample with higher difference with the first standard sample characteristic exists in the first detection sample set.
And the first detection sample set is subjected to global sample verification through the sample verifier, so that the reliability of random sampling during food safety test is improved.
When the global sample checking result is passing, generating a sampling activating instruction;
according to the sampling activation instruction, randomly sampling the first detection sample set based on the H detection factors and sampling trigger degrees to obtain a sample random sampling result, wherein the sample random sampling result has a food detection characteristic identifier;
and based on the food detection feature identification, performing food safety detection of the sample random sampling result according to a food safety detection terminal.
And when the global sample checking result is passing, the food safety testing system automatically samples the activating instruction based on random sampling. The sampling activation instruction is prompt information used for representing that the global sample verification result is passing and randomly sampling the first detection sample set. Then, according to the sampling activation instruction, randomly sampling the first detection sample set according to the H detection factors and the sampling trigger degrees to obtain a sample random sampling result, and according to the food detection feature identification, carrying out food safety detection on the sample random sampling result by the food safety detection terminal. Thereby improving the reliability of random sampling and improving the food safety test effect during the food safety test. The sample random sampling result comprises a plurality of sampling detection samples corresponding to each detection factor-sampling triggering degree. The food detection feature identification comprises food detection indexes corresponding to each sampling detection sample in the sample random sampling result. The food safety detection terminal is in communication connection with the food safety test system based on random sampling. The food safety detection terminal comprises food safety detection equipment such as a multifunctional food detector, a pesticide residue detector, a microorganism detector and the like in the prior art.
For example, when the first detection sample set is randomly sampled according to the H detection factor-sampling trigger degrees, the first detection factor-sampling trigger degree corresponding to the first food safety detection factor is 12%, then the detection samples in the first detection sample set, which are randomly 12%, are identified as a plurality of sampling detection samples corresponding to the first detection factor-sampling trigger degrees, and the first food safety detection factor is set as a food detection index corresponding to the plurality of sampling detection samples.
In summary, the food safety testing method based on random sampling provided by the application has the following technical effects:
1. carrying out food safety-detection characteristic analysis of the first food to be detected through the first food attribute identifier to obtain first food safety-detection characteristic distribution; based on a pre-constructed sampling trigger analysis function, carrying out sampling trigger degree analysis on a first detection sample set according to first food safety-detection characteristic distribution to obtain H detection factors-sampling trigger degrees; performing global sample verification on the first detection sample set through a sample verifier to obtain a global sample verification result; when the global sample checking result is passing, generating a sampling activating instruction; according to the sampling activation instruction, randomly sampling the first detection sample set based on H detection factors-sampling trigger degrees to obtain a sample random sampling result; based on the food detection feature identification, food safety detection of a sample random sampling result is executed according to the food safety detection terminal. The method and the device have the advantages that the random sampling fitness and the random sampling accuracy of the food safety test are improved, the food safety test effect is improved, and the food safety test result is more accurate.
2. And the sampling triggering degree analysis is respectively carried out on the H food safety detection factors through the sampling triggering analysis function, so that the adaptability and the accuracy of random sampling during food safety testing are improved.
Example two
Based on the same inventive concept as the food safety testing method based on random sampling in the foregoing embodiment, the present invention further provides a food safety testing system based on random sampling, please refer to fig. 3, the system includes:
the detection sample obtaining module is used for obtaining a first detection sample set of a first food to be detected, and the first food to be detected has a first food attribute identifier;
the detection feature analysis module is used for carrying out food safety-detection feature analysis of the first food to be detected according to the first food attribute identification to obtain first food safety-detection feature distribution, wherein the first food safety-detection feature distribution comprises H food safety detection factors, and H is a positive integer greater than 1;
the sampling trigger degree analysis module is used for carrying out sampling trigger degree analysis on the first detection sample set according to the first food safety-detection characteristic distribution based on a pre-constructed sampling trigger analysis function to obtain H detection factors-sampling trigger degrees;
The global sample verification module is used for carrying out global sample verification on the first detection sample set based on a sample checker to obtain a global sample verification result;
the activation instruction generation module is used for generating a sampling activation instruction when the global sample verification result is passing;
the random sampling module is used for randomly sampling the first detection sample set based on the H detection factors and the sampling trigger degrees according to the sampling activation instruction to obtain a sample random sampling result, and the sample random sampling result has a food detection feature identifier;
and the food safety detection module is used for executing food safety detection of the sample random sampling result according to the food safety detection terminal based on the food detection characteristic identifier.
Further, the system further comprises:
a first execution module for obtaining a plurality of sample food attribute identifications and a plurality of sample food safety-detection feature distributions, and the plurality of sample food attribute identifications and the plurality of sample food safety-detection feature distributions have a sample attribute-detection feature relationship;
The second execution module is used for obtaining a plurality of detection feature analysis index nodes according to the plurality of sample food attribute identifiers;
the third execution module is used for obtaining a plurality of detection feature analysis response nodes according to the plurality of sample food safety-detection feature distributions;
the distribution tree construction module is used for constructing a food safety-detection characteristic distribution tree based on the detection characteristic analysis index nodes and the detection characteristic analysis response nodes and combining the sample attribute-detection characteristic relation;
and the fourth execution module is used for carrying out food safety-detection characteristic analysis of the first food to be detected according to the first food attribute identifier based on the food safety-detection characteristic distribution tree.
Further, the system further comprises:
the factor combination module is used for traversing the H food safety detection factors to perform pairwise random combination to obtain a plurality of detection factor combinations;
the re-coupling degree analysis module is used for traversing the plurality of detection factor combinations to perform re-coupling degree analysis so as to obtain a plurality of combination-factor re-coupling degrees;
The re-coupling degree judging module is used for judging whether the multiple combined-factor re-coupling degrees are larger than a preset re-coupling degree or not;
and the factor optimization module is used for obtaining a factor fusion instruction if any one of the combination-factor re-coupling degrees is larger than the preset re-coupling degree, and optimizing the H food safety detection factors according to the factor fusion instruction.
Further, the system further comprises:
the fifth execution module is used for obtaining a first food detection precision constraint corresponding to the first food to be detected;
the reference sampling trigger degree obtaining module is used for matching the reference sampling trigger degree according to a preset sampling trigger degree table based on the first food detection precision constraint;
the factor numbering module is used for carrying out random numbering based on the first food safety-detection characteristic distribution to obtain a first food safety detection factor and a second food safety detection factor … H food safety detection factor, wherein H is a positive integer, and H belongs to H;
the first detection factor-sampling trigger degree obtaining module is used for carrying out sampling trigger degree analysis on the first food safety detection factor according to the sampling trigger analysis function and the reference sampling trigger degree to obtain a first detection factor-sampling trigger degree;
The sixth execution module is configured to continuously perform sampling trigger degree analysis on the h food safety detection factor of the second food safety detection factor … according to the sampling trigger analysis function and the reference sampling trigger degree, so as to obtain a second detection factor-sampling trigger degree … h detection factor-sampling trigger degree;
the sampling trigger level integrating module is used for integrating the first detection factor-sampling trigger level, the second detection factor-sampling trigger level … and the H detection factor-sampling trigger level to generate the H detection factor-sampling trigger levels.
Further, the system further comprises:
the time zone constraint obtaining module is used for obtaining a detection backtracking time zone constraint based on the first food detection precision constraint;
the abnormal state detection record backtracking module is used for carrying out abnormal state detection record backtracking by traversing the H food safety detection factors based on the first food attribute identification and the detection backtracking time zone constraint to obtain H factor detection abnormal state trigger degrees;
the assembly acquisition module is used for detecting abnormal trigger degrees based on the H factors and acquiring a first abnormal trigger assembly;
The abnormal trigger degree determining module is used for detecting abnormal trigger degrees according to the H factors based on the first food safety detection factors to obtain first factor detection abnormal trigger degrees;
and the seventh execution module is used for detecting the abnormal trigger degree based on the reference sampling trigger degree, the first abnormal trigger assembly and the first factor and obtaining the first detection factor-sampling trigger degree according to the sampling trigger analysis function.
Further, the system further comprises:
the function construction module is used for constructing the sampling trigger analysis function, and the sampling trigger analysis function is as follows:
;
wherein SAT is h Characterizing an h detection factor-sampling trigger degree, SAD characterizing a reference sampling trigger degree, SAF h Characterization of the h factor detection of the degree of abnormal triggering, SAE h And (5) characterizing an h abnormal trigger assembly.
Further, the system further comprises:
the standard sample characteristic obtaining module is used for obtaining first standard sample characteristics based on the first food to be detected;
the detection sample characteristic obtaining module is used for obtaining a plurality of detection sample characteristics corresponding to a plurality of detection samples of the first detection sample set;
The sample comparison degree obtaining module is used for respectively comparing the plurality of detection sample characteristics based on the first standard sample characteristics to obtain a plurality of sample comparison degrees;
the system comprises a preset sample comparison degree obtaining module, a sample comparison degree detecting module and a sample comparison degree detecting module, wherein the preset sample comparison degree obtaining module is used for obtaining preset sample comparison degree;
and the eighth execution module is used for inputting the plurality of sample comparison degrees and the preset sample comparison degree into the sample checker, the sample checker comprises a global sample check operator, the global sample check operator is that if the plurality of sample comparison degrees are smaller than the preset sample comparison degree, the obtained global sample check result is passed, otherwise, the obtained global sample check result is not passed, and a sample early warning signal is generated.
The food safety testing system based on random sampling provided by the embodiment of the invention can execute the food safety testing method based on random sampling provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
All the included modules are only divided according to the functional logic, but are not limited to the above-mentioned division, so long as the corresponding functions can be realized; in addition, the specific names of the functional modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present invention.
The application provides a food safety testing method based on random sampling, wherein the method is applied to a food safety testing system based on random sampling, and the method comprises the following steps: carrying out food safety-detection characteristic analysis of the first food to be detected through the first food attribute identifier to obtain first food safety-detection characteristic distribution; based on a pre-constructed sampling trigger analysis function, carrying out sampling trigger degree analysis on a first detection sample set according to first food safety-detection characteristic distribution to obtain H detection factors-sampling trigger degrees; performing global sample verification on the first detection sample set through a sample verifier to obtain a global sample verification result; when the global sample checking result is passing, generating a sampling activating instruction; according to the sampling activation instruction, randomly sampling the first detection sample set based on H detection factors-sampling trigger degrees to obtain a sample random sampling result; based on the food detection feature identification, food safety detection of a sample random sampling result is executed according to the food safety detection terminal. The technical problems of poor food safety test effect caused by low adaptability and insufficient accuracy of random sampling in the food safety test in the prior art are solved. The method and the device have the advantages that the random sampling fitness and the random sampling accuracy of the food safety test are improved, the food safety test effect is improved, and the food safety test result is more accurate.
Although the invention has been described in more detail by means of the above embodiments, the invention is not limited to the above embodiments, but may comprise many other equivalent embodiments without departing from the inventive concept, the scope of which is determined by the scope of the appended claims.
Claims (8)
1. A method for testing food safety based on random sampling, the method comprising:
obtaining a first detection sample set of a first food to be detected, wherein the first food to be detected has a first food attribute identifier;
performing food safety-detection characteristic analysis of the first food to be detected according to the first food attribute identifier to obtain a first food safety-detection characteristic distribution, wherein the first food safety-detection characteristic distribution comprises H food safety detection factors, and H is a positive integer greater than 1;
based on a pre-constructed sampling trigger analysis function, carrying out sampling trigger degree analysis on the first detection sample set according to the first food safety-detection characteristic distribution to obtain H detection factors-sampling trigger degrees;
performing global sample verification on the first detection sample set based on a sample verifier to obtain a global sample verification result;
When the global sample checking result is passing, generating a sampling activating instruction;
according to the sampling activation instruction, randomly sampling the first detection sample set based on the H detection factors and sampling trigger degrees to obtain a sample random sampling result, wherein the sample random sampling result has a food detection characteristic identifier;
and based on the food detection feature identification, performing food safety detection of the sample random sampling result according to a food safety detection terminal.
2. The method of claim 1, wherein performing a food safety-detection signature analysis of the first food product to be detected based on the first food product attribute identification comprises:
obtaining a plurality of sample food attribute identifications and a plurality of sample food safety-detection feature distributions, and the plurality of sample food attribute identifications and the plurality of sample food safety-detection feature distributions having a sample attribute-detection feature relationship;
obtaining a plurality of detection feature analysis index nodes according to the plurality of sample food attribute identifiers;
obtaining a plurality of detection feature analysis response nodes according to the plurality of sample food safety-detection feature distribution;
based on the plurality of detection feature analysis index nodes and the plurality of detection feature analysis response nodes, combining the sample attribute-detection feature relation to construct a food safety-detection feature distribution tree;
And based on the food safety-detection characteristic distribution tree, carrying out food safety-detection characteristic analysis of the first food to be detected according to the first food attribute identification.
3. The method of claim 1, further comprising, after obtaining the first food safety-detection feature profile:
traversing the H food safety detection factors to perform pairwise random combination to obtain a plurality of detection factor combinations;
performing decoupling degree analysis by traversing the plurality of detection factor combinations to obtain a plurality of combination-factor decoupling degrees;
judging whether the multiple combined-factor re-coupling degrees are larger than a preset re-coupling degree or not;
if any one of the plurality of combination-factor re-coupling degrees is larger than the preset re-coupling degree, obtaining a factor fusion instruction, and optimizing the H food safety detection factors according to the factor fusion instruction.
4. The method of claim 1, wherein performing a sample trigger level analysis on the first set of detection samples based on the first food safety-detection feature profile based on a pre-constructed sample trigger analysis function to obtain H detection factor-sample trigger levels, comprising:
Obtaining a first food detection precision constraint corresponding to the first food to be detected;
based on the first food detection precision constraint, matching a reference sampling trigger degree according to a preset sampling trigger degree table;
carrying out random numbering based on the first food safety-detection characteristic distribution to obtain a first food safety detection factor, a second food safety detection factor … and a H food safety detection factor, wherein H is a positive integer, and H belongs to H;
according to the sampling trigger analysis function and the reference sampling trigger degree, carrying out sampling trigger degree analysis on the first food safety detection factor to obtain a first detection factor-sampling trigger degree;
continuing to analyze the sampling trigger degree of the h food safety detection factor of the second food safety detection factor … according to the sampling trigger analysis function and the reference sampling trigger degree to obtain a second detection factor-sampling trigger degree … h detection factor-sampling trigger degree;
integrating the first detection factor-sampling trigger level, the second detection factor-sampling trigger level … and the H detection factor-sampling trigger level to generate the H detection factor-sampling trigger levels.
5. The method of claim 4, wherein performing a sample trigger level analysis on the first food safety detection factor based on the sample trigger analysis function and the reference sample trigger level to obtain a first detection factor-sample trigger level, comprising:
Obtaining a detection backtracking time zone constraint based on the first food detection accuracy constraint;
traversing the H food safety detection factors to carry out anomaly detection record backtracking based on the first food attribute identification and the detection backtracking time zone constraint, and obtaining H factor detection anomaly trigger degrees;
detecting abnormal trigger degrees based on the H factors to obtain a first abnormal trigger assembly;
detecting abnormal trigger degrees according to the H factors based on the first food safety detection factors to obtain first factor detection abnormal trigger degrees;
and detecting the abnormal trigger degree based on the reference sampling trigger degree, the first abnormal trigger assembly and the first factor, and obtaining the first detection factor-sampling trigger degree according to the sampling trigger analysis function.
6. The method of claim 5, wherein the method further comprises:
constructing the sampling trigger analysis function, wherein the sampling trigger analysis function is as follows:
;
wherein SAT is h Characterizing an h detection factor-sampling trigger degree, SAD characterizing a reference sampling trigger degree, SAF h Characterization of the h factor detection of the degree of abnormal triggering, SAE h And (5) characterizing an h abnormal trigger assembly.
7. The method of claim 1, wherein performing global sample verification on the first set of test samples based on a sample verifier to obtain a global sample verification result comprises:
Obtaining a first standard sample feature based on the first food to be detected;
obtaining a plurality of detection sample characteristics corresponding to a plurality of detection samples of the first detection sample set;
based on the first standard sample characteristics, comparing the plurality of detection sample characteristics to obtain a plurality of sample comparison degrees;
obtaining a preset sample comparison degree;
inputting the plurality of sample comparison degrees and the preset sample comparison degree into the sample checker, wherein the sample checker comprises a global sample check operator, the global sample check operator is that if the plurality of sample comparison degrees are smaller than the preset sample comparison degree, the obtained global sample check result is passed, otherwise, the obtained global sample check result is not passed, and a sample early warning signal is generated.
8. A food safety testing system based on random sampling, characterized in that it is adapted to perform the method according to any one of claims 1 to 7, said system comprising:
the detection sample obtaining module is used for obtaining a first detection sample set of a first food to be detected, and the first food to be detected has a first food attribute identifier;
The detection feature analysis module is used for carrying out food safety-detection feature analysis of the first food to be detected according to the first food attribute identification to obtain first food safety-detection feature distribution, wherein the first food safety-detection feature distribution comprises H food safety detection factors, and H is a positive integer greater than 1;
the sampling trigger degree analysis module is used for carrying out sampling trigger degree analysis on the first detection sample set according to the first food safety-detection characteristic distribution based on a pre-constructed sampling trigger analysis function to obtain H detection factors-sampling trigger degrees;
the global sample verification module is used for carrying out global sample verification on the first detection sample set based on a sample checker to obtain a global sample verification result;
the activation instruction generation module is used for generating a sampling activation instruction when the global sample verification result is passing;
the random sampling module is used for randomly sampling the first detection sample set based on the H detection factors and the sampling trigger degrees according to the sampling activation instruction to obtain a sample random sampling result, and the sample random sampling result has a food detection feature identifier;
And the food safety detection module is used for executing food safety detection of the sample random sampling result according to the food safety detection terminal based on the food detection characteristic identifier.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311421361.9A CN117147781B (en) | 2023-10-31 | 2023-10-31 | Food safety testing method based on random sampling |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311421361.9A CN117147781B (en) | 2023-10-31 | 2023-10-31 | Food safety testing method based on random sampling |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117147781A true CN117147781A (en) | 2023-12-01 |
CN117147781B CN117147781B (en) | 2023-12-26 |
Family
ID=88903036
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311421361.9A Active CN117147781B (en) | 2023-10-31 | 2023-10-31 | Food safety testing method based on random sampling |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117147781B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140317087A1 (en) * | 2013-04-22 | 2014-10-23 | Salesforce.Com, Inc. | Systems and methods for implementing and maintaining sampled tables in a database system |
WO2021198329A1 (en) * | 2020-04-03 | 2021-10-07 | Tetra Laval Holdings & Finance S.A. | A system for processing input data from a food handling line to determine trigger data for sampling, and a method thereof |
CN116302894A (en) * | 2023-03-30 | 2023-06-23 | 重庆长安汽车股份有限公司 | Application program analysis method, device, equipment and storage medium |
CN116820567A (en) * | 2023-06-27 | 2023-09-29 | 杭州阿里巴巴飞天信息技术有限公司 | Method, system, electronic device and storage medium for determining instruction consumption information |
-
2023
- 2023-10-31 CN CN202311421361.9A patent/CN117147781B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140317087A1 (en) * | 2013-04-22 | 2014-10-23 | Salesforce.Com, Inc. | Systems and methods for implementing and maintaining sampled tables in a database system |
WO2021198329A1 (en) * | 2020-04-03 | 2021-10-07 | Tetra Laval Holdings & Finance S.A. | A system for processing input data from a food handling line to determine trigger data for sampling, and a method thereof |
CN116302894A (en) * | 2023-03-30 | 2023-06-23 | 重庆长安汽车股份有限公司 | Application program analysis method, device, equipment and storage medium |
CN116820567A (en) * | 2023-06-27 | 2023-09-29 | 杭州阿里巴巴飞天信息技术有限公司 | Method, system, electronic device and storage medium for determining instruction consumption information |
Also Published As
Publication number | Publication date |
---|---|
CN117147781B (en) | 2023-12-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101706749B (en) | Comprehensive processing method based on software safety defect detection | |
CN115576738B (en) | Method and system for realizing equipment fault determination based on chip analysis | |
CN116450399B (en) | Fault diagnosis and root cause positioning method for micro service system | |
CN109657720B (en) | On-line diagnosis method for turn-to-turn short circuit fault of power transformer | |
CN114935703A (en) | Automatic testing method, device and system for frequency conversion assembly | |
CN111427928A (en) | Data quality detection method and device | |
CN117147781B (en) | Food safety testing method based on random sampling | |
CN113806343B (en) | Evaluation method and system for Internet of vehicles data quality | |
CN111879456B (en) | Building curtain wall safety detection method and system | |
CN113179195A (en) | CAN message embedded point detection method, system, device and computer readable storage medium | |
CN111309584B (en) | Data processing method, device, electronic equipment and storage medium | |
CN106485049A (en) | A kind of detection method of the NIRS exceptional sample based on Monte Carlo cross validation | |
CN114118166A (en) | Transformer fault diagnosis system and method based on intelligent frequency spectrum monitoring | |
CN101901185A (en) | Method for locating defects in object-oriented programs, characterized by organizing execution traces by categories | |
CN110991940A (en) | Ocean observation data product quality online inspection method and device and server | |
CN107103134A (en) | Low-speed wireless sensor network testability analysis method based on Bayesian network | |
CN112163189A (en) | Equipment fault diagnosis method based on test sequence probability matrix | |
CN112532481A (en) | Network quality monitoring and analyzing method, system and storage medium | |
CN106442376B (en) | Assessment method for quality of assay data | |
CN104731955A (en) | Methods and systems for diagnostic standard establishment and intelligent diagnosis of wind generation set oil monitoring | |
CN117630550A (en) | Constant temperature aging test system for modularized microwave component | |
CN114580982B (en) | Method, device and equipment for evaluating data quality of industrial equipment | |
CN115854490B (en) | Analysis method and system for dehumidifier state monitoring | |
Jilliams | Probability estimation with sample compositing techniques | |
Ninagawa et al. | Chemical Substance Management for EEE-Evaluation Method of Chemical Data Contained in Parts |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |