CN115796636B - Double random extraction method for detection and inspection - Google Patents

Double random extraction method for detection and inspection Download PDF

Info

Publication number
CN115796636B
CN115796636B CN202211278233.9A CN202211278233A CN115796636B CN 115796636 B CN115796636 B CN 115796636B CN 202211278233 A CN202211278233 A CN 202211278233A CN 115796636 B CN115796636 B CN 115796636B
Authority
CN
China
Prior art keywords
random
extraction
extracted
items
constraint
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.)
Active
Application number
CN202211278233.9A
Other languages
Chinese (zh)
Other versions
CN115796636A (en
Inventor
严洪涛
杨晓君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Comprehend Information Technology Co ltd
Original Assignee
Jiangsu Comprehend Information Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Jiangsu Comprehend Information Technology Co ltd filed Critical Jiangsu Comprehend Information Technology Co ltd
Priority to CN202211278233.9A priority Critical patent/CN115796636B/en
Publication of CN115796636A publication Critical patent/CN115796636A/en
Application granted granted Critical
Publication of CN115796636B publication Critical patent/CN115796636B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a double random extraction method for detection and inspection, which aims at the requirements that the detected inspection object and the detection inspection main body are selected randomly in the processes of industrial product quality inspection, law enforcement inspection and the like, so that the reliability of a result is better enhanced. With the development of the Internet of things and information technology, the double random automatic extraction method is established, and product quality inspection or other detection and inspection activities are carried out according to the extraction result, so that the credibility of the related result can be further improved.

Description

Double random extraction method for detection and inspection
Technical Field
The invention relates to the technical field of automatic random quality sampling inspection of industrial products, in particular to a double random extraction method for detection inspection.
Background
With the development of the Internet of things and informatization technologies, automation, intellectualization and pipelining are trends of modern industrial mass production. The product qualification rate is the focus of mass production, and it is critical how to guarantee the real qualification rate of all products of the joint production line under the limited detection capability, and ensure the randomness of spot check or spot check.
Generally, for large-scale industrial production, when tens or hundreds of production lines run simultaneously, the detection equipment is also used for detecting multiple sets of detection simultaneously. Because different production lines and different detection devices may have individual differences, the traditional product qualification rate inspection is generally random spot check from all products, but because of many human factors such as product placement, packaging and the like, the random inspection is difficult to achieve for different production lines, the detection devices are generally considered to be convenient and the detection workload is balanced, and the problem that the random result of the product spot check is possibly influenced by the differences of the production lines and the detection devices is not much considered. This is essentially a double random problem.
On the other hand, for market supervision and management, the opinion of national institutes about the combination of double random and public supervision of departments in the field of market supervision is implemented, the full coverage and the supervision normalization of the supervision in the area range are realized, the spot check object directory library and the law enforcement personnel directory library are established, and administrative checks are carried out in a double random spot check mode except for the special key field, so that the original spot check and random check of daily supervision are replaced, the supervision efficiency is improved, and the burden of enterprises and legal persons is lightened. This is also essentially a double random problem.
The current double random spot check/spot check looks like randomly designating the checked object and randomly designating the checking equipment (or checking personnel), but the influence of human factors and surrounding environment is usually ignored in the designating process, and when the number of times of extraction is small and the constraint condition exists, the true random, fair and fair can not be realized.
Disclosure of Invention
In view of the above, the present invention provides a dual random extraction method for detection and inspection, which can effectively solve the above-mentioned problems in the prior art.
The invention designs a double random extraction method for detecting and checking, which at least comprises 2 random extraction objects, wherein one object is a checked object, including a checked product or a checked enterprise or a checked person, and the other object is a checking main body, including a checking person or checking equipment and the like; the random extraction object comprises a set of random items a and a set of random items b respectively, and random extraction meets constraint conditions, wherein the constraint conditions at least comprise one of random item probability factor constraint, extracted times constraint and mutual exclusion constraint; the probability factors comprise a grade factor and/or an efficiency factor, the probability factor constraint comprises determining the number of the random items placed in a random pool according to the probability factors of the extracted random items, the frequency constraint comprises that the frequency of extracting a certain random item in a certain set statistical period cannot exceed a limit frequency, the mutual exclusion constraint comprises a constraint that elements in two random item sets cannot be paired when being paired and extracted, and the mutual exclusion constraint is mainly used for limiting the influence of factors such as interest relation and the like possibly existing between an inspection main body and an inspected object so as to avoid the phenomenon that an inspection result is not fair; the double random extraction method comprises the following steps:
s1: extracting the quantization numbers of the objects, wherein the quantization numbers comprise quantization numbers in natural number sequence, and the total number of random items a is recorded as M a The total number of random terms b is M b The quantization numbers thereof can be respectively selectedIs taken as 1 to M a And 1 to M b The method comprises the steps of carrying out a first treatment on the surface of the The random item can also adopt other different natural numbers for quantization numbering, such as the factory number of the product, the body authentication number of the equipment and the like, and can also adopt letters or a mode of combining letters and numbers for quantization numbering;
s2: setting a random pool, defining a probability factor constraint and a no probability factor constraint in constraint conditions through a natural number quantization grade to form a unified expression, and setting the random pool according to the probability factors, wherein whether the constraint conditions comprise the probability factor constraint or not, the random pool can be described by using the probability factor constraint, the grade factors comprise grade factors defined based on natural numbers 1,2 and …, the efficiency factors comprise efficiency factors defined based on natural numbers 1,2 and …, and the efficiency factors are equivalent to the no probability factor constraint when the factor number is 1;
without loss of generality, the set of random terms a can be defined as a set of checked objects, and the ranking factor refers to the credit ranks of the checked objects, and the larger the credit rank number of the checked objects is, the larger the checked probability is; defining the set of random terms b as an inspection subject, such as an inspector or an inspection device, etc., wherein the efficiency factor refers to the inspection efficiency of the inspection subject, and the greater the efficiency factor, the more inspection tasks the inspection subject is likely to undertake; for convenience, the invention directly defines the traditional probability factor by using a decimal definition mode of 0 to 1 by using a natural number grade, and the numerical value is possibly different from the custom definition of part of users, so that special attention is required in application;
record random item a i Is a scale factor alpha of (2) i ,α i =1,2,3,…,N a Wherein N is a The highest ranking number of the random term a; record random item b j Is the efficiency factor beta of (2) j ,β j =1,2,3,…,N b Wherein N is b The highest efficiency factor for random term b; the random pool includes random items a i Or a non-sequential set A, also known as random pool A, random term a i The number of the put-in sets A is alpha i The method comprises the steps of carrying out a first treatment on the surface of the The random pool further comprises a random term b j Or a non-sequential set B, also called random pool B, random term B j The number of the sets B is beta j The method comprises the steps of carrying out a first treatment on the surface of the Recording the number of all random items to be extracted in the set A as K A The number of all random items to be extracted in the set B is K B And with respective sequence numbers 1,2,3 and … K A And 1,2,3, … K B The corresponding random items in the set A and the set B are respectively identified, and then
K A =α 12 +…+α Na
K B =β 12 +…+β Nb
Wherein K is A ≥M a ,K B ≥M b
S3: obtaining a random number and extracting a random item, wherein the obtaining of the random number comprises obtaining the random number by adopting a random number calculation method or obtaining the random number by adopting a random number generation function of a computer system; the method for extracting the random items comprises a method for establishing a mapping between the random numbers and the extracted random items in the random pool, wherein the random items are extracted, for example, a rounding calculation method is adopted to map the random numbers to numbers of the random items in the random pool, one random number can only correspond to one random item in the random pool, and one random item can correspond to a random number set in a range.
Further, the method for obtaining the random number in the step S3 includes the following steps:
s31: obtaining a random variable seed s, wherein the random variable seed s is obtained by using the current time;
s32: calculating a first random number
Figure GDA0004201294290000041
Wherein,% is remainder operation, and each parameter selection needs to satisfy: (1) c and m are natural numbers and each other; (2) d-1 may be divided by the prime factors of all m; (3) if m is divisible by 4, d-1 is also divisible by 4;
s33: calculating a second random number
R 2 =r 1 +R 1 (r 2 -r 1 )
Wherein r is 1 For a given second random number lower bound, r 2 Is an upper bound;
the method for extracting the random term in the step S3 comprises the following steps:
s34: determining extraction object sequence number R 3 For R 2 Rounding, i.e. R 3 =int(R 2 ) Where int () is a rounding operation;
s35: extracting the R-th in the corresponding random pool 3 Random terms.
Further, the random term extraction method comprises a first random term extraction frequency limiting method or a second random term extraction frequency limiting method; namely, the number of times that any random item is extracted within a period of time does not exceed the limit number of times, and the limited random item and the limit number of times corresponding to the limited random item can be different;
the first limiting method includes step S36: judging the effectiveness, if the accumulated extracted times of the random term in the statistical period exceeds the highest extracted times limit delta of the random term, discarding the extraction, starting to re-extract once from the step S31 until the constraint condition requirement of the times limit is met, and re-extracting only one set aiming at the extraction; when the extracted random item meets constraint conditions, updating the extracted times in the phase time of the object, namely adding 1 time to the existing extraction times, ending the phase statistics time, and starting a new round of counting according to a set strategy;
the second limiting method includes that when a random pool is designed in the step S2, whether the number of times that a random item is extracted in a preset statistical period reaches the limiting number of times is firstly judged, if yes, the random item is removed, and the random item is not placed in the random pool; if not, setting a random pool according to the step S2, wherein the method is called a removal method based on frequency constraint.
Further, the mutual exclusion constraint is as a certain random term a i With another random term b j And the mutual exclusion constraint method comprises a re-extraction method based on mutual exclusion or a removal method based on mutual exclusion;
the base is based onThe mutually exclusive re-extraction method includes step S361: validity discrimination, if the random term extracted at this time (such as random term B in set B j ) With already extracted paired random terms (e.g. random term a in set A i ) If the mutual exclusion exists, the extraction is abandoned, the extraction is restarted from the step S31 until the constraint condition requirement is met, and the extraction is restarted only aiming at the set of the extraction; if the constraint condition of the extracted times is met, updating the extracted times in the phase time of the object after determining that the extracted random term meets the constraint condition, namely adding 1 time to the existing extraction times, ending the phase counting time, and starting a new round of counting according to a given strategy;
the mutex-based removal method includes step S362: when the random items of the previous extraction and the random items of the rest sets are mutually exclusive, temporarily eliminating the mutually exclusive random items in the rest sets to be extracted to form a temporary set, and completing the extraction in the temporary set.
Further, when the constraint condition comprises the constraint of the extracted times and the mutual exclusion constraint, a combined constraint elimination method or a combined constraint re-extraction method is adopted;
the combined constraint elimination method comprises the steps of firstly eliminating random items with the number of times reaching a limit number of times before the collection A, B is extracted, and forming a temporary collection A, B; after the collection A is extracted, judging whether a mutual exclusion item exists in the collection B according to the extracted random item, and if so, removing the mutual exclusion item from the collection B to form a new temporary collection B; extracting the set B, and recording the extraction times of the extraction result; the extraction sequence of the set A, B can be interchanged, but the front and back are consistent, and the extraction principles are not conflicting;
the combined constraint re-extraction method comprises the steps of extracting random items of the set A on line, judging whether the random items are random items with limited times or not, and re-extracting if the random items are random items with limited times, until the requirements are met; after the collection A is extracted, the collection B is extracted, whether the extracted random items are random items with limited times or matched random items in the extracted collection A are mutually exclusive items is judged, and if yes, the collection B is extracted again until the requirement is met.
In fact, the method of eliminating and re-extracting may be used in combination, for example, after eliminating the constraint items of the number of times of the set A, B first, the two random items of the extracted sets have mutual exclusion, and optionally, the random item of one set may be re-extracted.
Further, the steps S31 to S32 are replaced with the following steps:
step S321: generating a random number greater than or equal to 0 and less than or equal to 1 by using a random number generation function of a computer system, wherein the random function of the computer system comprises a function of a random () type, and the second random number in step S33 is r 1 +(r 2 -r 1 )*rand()。
Further, the method comprises the following steps of: after finishing the step S3 of double random extraction, according to the sampling inspection or sampling inspection result, if the actual sampling inspection or sampling inspection result does not meet the set requirement, if the product quality problem exists, the subsequent sampling level factor is increased by 1 until the highest level is reached, and if the continuous sampling inspection is not performed for several times, the subsequent sampling level factor is decreased by 1 until the lowest level is reached; for the random term in the set B, if the working efficiency is obviously improved, the subsequent extraction efficiency factor is increased by 1 until the highest efficiency factor is reached, and if the working efficiency is obviously reduced, if equipment faults exist, the subsequent extraction efficiency factor is reduced by 1 until the lowest efficiency factor is reached.
In a second aspect, the present application further provides a dual random extraction computer system or a program product for inspection detection, wherein the computer system implements the dual random extraction method described above, and the computer program when executed by a processor implements the dual random extraction method described above.
The invention has the beneficial effects that: the invention provides a double random extraction method for detection and inspection, which provides an automatic random extraction method for product quality inspection in the industrial production process based on the Internet of things and information technology, and can ensure that the extracted product is irrelevant to environmental factors such as a production line, a station and the like, and detection equipment is also irrelevant to the product and the environmental factors, so that double randomness of the detected product and a detection main body is realized. The invention also provides a method for extracting under the constraint conditions of probability factors, extracted times, mutual exclusion and the like, which can be simultaneously applied to the double random extraction requirements of the checked objects and check teams (or personnel or equipment) in the comprehensive law enforcement check, and can fully ensure the randomness, fairness and fairness of the detection check.
Drawings
FIG. 1 is a flow chart of a dual random extraction method for detection checking;
FIG. 2 is a flow chart for obtaining random numbers and extracting random terms.
Detailed Description
The following describes the embodiments of the present invention further with reference to the drawings and examples. The following examples are only for more clearly illustrating the technical aspects of the present invention, and are not intended to limit the scope of the present invention.
Example 1: double random extraction method for detection and inspection
The invention relates to a double random extraction method for detection and inspection, which at least comprises 2 random extraction objects, wherein the random extraction objects respectively comprise a set of random items a and a set of random items b, and random extraction meets constraint conditions, and the constraint conditions at least comprise one of random item probability factor constraint, extracted times constraint and mutual exclusion constraint; the probability factors comprise a grade factor and/or an efficiency factor, the probability factor constraint comprises determining the number of the random items placed in a random pool according to the probability factors of the extracted random items, the frequency constraint comprises that the frequency of extracting a certain random item in a certain set of statistic time period cannot exceed a limit frequency, and the mutual exclusion constraint comprises that elements in two random item sets cannot be paired when being paired; regarding constraint conditions, the present embodiment mainly considers probability factor constraints.
As shown in fig. 1, the dual random extraction method includes the following steps:
s1: extracting the quantization numbers of the objects, wherein the quantization numbers comprise quantization numbers in natural number sequence, and the total number of random items a is recorded as M a In this embodiment, the quantization number value is i, i=1, 2,3 … M a The method comprises the steps of carrying out a first treatment on the surface of the Random itemb is the total amount of M b In this embodiment, the quantization number value is j, j=1, 2,3 … M b
S2: setting a random pool, defining a probability factor constraint and a non-probability factor constraint in the constraint conditions through a natural number quantization level to form a unified expression, and setting the random pool according to the probability factors;
record random item a i Is a scale factor alpha of (2) i ,α i =1,2,3,…,N a Wherein N is a The highest ranking number of the random term a; record random item b j Is the efficiency factor beta of (2) j ,β j =1,2,3,…,N b Wherein N is b The highest efficiency factor for random term b; the random pool includes random items a i Or a non-sequential set A, also known as random pool A, random term a i The number of the put-in sets A is alpha i The method comprises the steps of carrying out a first treatment on the surface of the The random pool further comprises a random term b j Or a non-sequential set B, also called random pool B, random term B j The number of the sets B is beta j The method comprises the steps of carrying out a first treatment on the surface of the Recording the number of all random items to be extracted in the set A as K A The number of all random items to be extracted in the set B is K B The set A, B of this embodiment is arranged in the random pool in order of the original random terms and with respective sequence numbers 1,2,3, … K A And 1,2,3, … K B The corresponding random items in the set A and the set B are respectively identified, and then
K A =α 12 +…+α Na
K B =β 12 +…+β Nb
Wherein K is A ≥M a ,K B ≥M b The method comprises the steps of carrying out a first treatment on the surface of the The embodiment gives random item a according to the historical accident probability, credit level, equipment aging condition or penalty or other factors of the extracted object i Definition of the ranking factor alpha i The number of the random items in the random pool A is the number of the class thereof, and the higher the class is, the more the number of the same random items in the random pool is, and the higher the probability that the random items are extracted is; according to the equipment efficiency and work efficiency of the extracted objectFactor such as rate or proficiency and station or post gives random term b j Definition of efficiency factor beta j The number of the random items in the random pool B is the efficiency factor value of the random items, the higher the efficiency is, the more the number of the same random items in the random pool is, and the higher the probability that the random items are extracted is; the definition of the level factor and the efficiency factor is the probability level of the random term being extracted, only the factor types are considered to be different, other definitions can be made by the user, and the setting method of the random pool must be matched with the definitions;
the advantage of this design: on the one hand, when the probability factor is set to be 1 level, the probability factor is basically consistent with the constraint of the no probability factor, so that the unification of the constraint algorithm with the probability factor and the constraint algorithm without the probability factor can be realized, and other selection or discrimination is not needed; on the other hand, although the grade factors and the efficiency factors possibly express different physical meanings, the method unifies the definition modes of the grade factors and the efficiency factors by natural numbers, and can be conveniently programmed and implemented;
s3: obtaining a random number and extracting a random item, wherein the obtaining of the random number comprises obtaining the random number by adopting a random number calculation method or obtaining the random number by adopting a random number generation function of a computer system; the method for extracting the random items comprises the steps of establishing a mapping method of the random numbers and the extracted random items in the random pool, and extracting the random items, wherein if the random numbers are mapped to numbers of the random items in the random pool by adopting a rounding calculation method, one random number can only correspond to one random item in the random pool, and one random item can correspond to a random number set in a range; calculating a random number once every time of extraction, calculating a random item number corresponding to the extraction according to the random number and the mapping relation, and extracting a random item in a corresponding random pool according to the random item number; the general set a and set B are paired and extracted, for example, set a extracts a random item and set B extracts a random item pairing and combination, and the extraction sequence of set A, B can be interchanged, but the extraction principles should be consistent and not conflict.
Preferably, as shown in fig. 2, the method for obtaining the random number in step S3 includes the following steps:
s31: obtaining a random variable seed s, wherein the current time is used as the random variable seed, and the embodiment directly adopts a time stamp of a computer system, and generally takes the whole millisecond number as a unit;
s32: calculating a first random number
Figure GDA0004201294290000091
Wherein,% is remainder operation, and each parameter selection needs to satisfy: (1) c and m are natural numbers and each other; (2) d-1 may be divided by the prime factors of all m; (3) if m is divisible by 4, d-1 is also divisible by 4; accordingly, this embodiment takes d=9301, c=49297, and m= 233280.
S33: calculating a second random number
R 2 =r 1 +R 1 (r 2 -r 1 )
Wherein r is 1 For a given second random number lower bound, r 2 Is an upper bound; in this embodiment, r is taken during extraction of set A 1 =1,r 2 =K A +1; taking r when extracting set B 1 =1,r 2 =K B +1;
The method for extracting the random term in the step S3 comprises the following steps:
s34: determining extraction object sequence number R 3 For R 2 Rounding, i.e. R 3 =int(R 2 ) Where int () is a rounding operation;
s35: extracting the R-th in the corresponding random pool 3 Random terms. Typically, each extraction is only for one random pool or one set of random pools, and only one random term is extracted; if the matching extraction is one-to-one, after the extraction of the set A, repeating the steps S31 to S35 to execute the extraction of the set B, and ending the matching extraction; if the random item is one-more or more, the random item extraction of the required number of the set A, B is generally completed respectively, the number of independent effective extraction is the total number of paired random items required by the two sets, all the random item extraction is completed, and the paired extraction is completed.
Example 2: constrained by the number of decimations
The difference from embodiment 1 is that the random term existence is taken into consideration on the basis of embodiment 1 at the same time as the number of times of extraction constraint.
Preferably, the random term extraction method includes a first random term extraction frequency limiting method or a second random term extraction frequency limiting method;
the first limiting method includes step S36: judging the effectiveness, if the accumulated extracted times of the random term in the statistical period exceeds the highest extracted times limit delta of the random term, discarding the extraction, starting to re-extract once from the step S31 until the constraint condition requirement of the times limit is met, and re-extracting only one set aiming at the extraction; when the extracted random item meets constraint conditions, updating the extracted times in the phase time of the object, namely adding 1 time to the existing extraction times, ending the phase statistics time, and starting a new round of counting according to a set strategy;
the second limiting method includes that when a random pool is designed in the step S2, whether the number of times that a random item is extracted in a preset statistical period reaches the limiting number of times is firstly judged, if yes, the random item is removed, and the random item is not placed in the random pool; if not, setting a random pool according to the step S2, wherein the method is called a removal method based on frequency constraint.
The embodiment adopts a method II of removing the frequency constraint.
Example 3: mutual exclusion constraint
The difference from example 1 is that a mutual exclusion constraint exists between random terms of both sets is considered on the basis of example 1.
Preferably, the mutual exclusion constraint is such as a certain random term a i With another random term b j And the mutual exclusion constraint method comprises a re-extraction method based on mutual exclusion or a removal method based on mutual exclusion;
the re-extraction method based on mutual exclusion includes step S361: validity discrimination, if the random term extracted at this time (e.g. random in set BItem b j ) With already extracted paired random terms (e.g. random term a in set A i ) If the mutual exclusion exists, the extraction is abandoned, the extraction is restarted from the step S31 until the constraint condition requirement is met, and the extraction is restarted only aiming at the set of the extraction; if the constraint condition of the extracted times is met, updating the extracted times in the phase time of the object after determining that the extracted random term meets the constraint condition, namely adding 1 time to the existing extraction times, ending the phase counting time, and starting a new round of counting according to a given strategy;
the mutex-based removal method includes step S362: when the random items of the previous extraction and the random items of the rest sets are mutually exclusive, temporarily eliminating the mutually exclusive random items in the rest sets to be extracted to form a temporary set, and completing the extraction in the temporary set.
The present embodiment employs a mutex-based culling method.
Example 4: extracted times constraint + mutex constraint
The difference from embodiment 1 is that the random term is considered to have the limit of the number of times of extraction and the mutual exclusion constraint between the random terms in two sets is considered on the basis of embodiment 1.
Preferably, when the constraint condition includes both the constraint of the extracted times and the mutual exclusion constraint, a combined constraint elimination method or a combined constraint re-extraction method is adopted;
the combined constraint elimination method comprises the steps of firstly eliminating random items with the number of times reaching a limit number of times before the collection A, B is extracted, and forming a temporary collection A, B; after the collection A is extracted, judging whether a mutual exclusion item exists in the collection B according to the extracted random item, and if so, removing the mutual exclusion item from the collection B to form a new temporary collection B; extracting the set B, and recording the extraction times of the extraction result; the extraction sequence of the set A, B can be interchanged, but the front and back are consistent, and the extraction principles are not conflicting;
the combined constraint re-extraction method comprises the steps of extracting random items of the set A on line, judging whether the random items are random items with limited times or not, and re-extracting if the random items are random items with limited times, until the requirements are met; after the collection A is extracted, the collection B is extracted, whether the extracted random items are random items with limited times or matched random items in the extracted collection A are mutually exclusive items is judged, and if yes, the collection B is extracted again until the requirement is met.
The present embodiment employs a combined constraint elimination method.
In fact, the method of eliminating and re-extracting may be used in combination, for example, after eliminating the constraint items of the number of times of the set A, B first, the two random items of the extracted sets have mutual exclusion, and optionally, the random item of one set may be re-extracted.
Example 5: computer automatic random number generation
The difference from example 1 is the random number acquisition of step S3, steps S31 to S32 being replaced with the following steps:
step S321: generating a random number greater than or equal to 0 and less than or equal to 1 by using a random number generation function of a computer system, wherein the random function of the computer system comprises a function of a random () type, and the second random number in step S33 is r 1 +(r 2 -r 1 )*rand()。
In fact, this embodiment can also be combined with embodiments 2,3, 4, respectively, to form new embodiments.
Example 6: probability factor adjustment
The difference from embodiment 1 is that step S3 may be added with step S4: after the probability factor is regulated, namely, according to the sampling or sampling result, for the random items in the set A, if the sampling or sampling actual result does not meet the set requirement, if the product quality problem exists, the subsequent sampling grade factor is increased by 1 until the highest grade is reached, and if the continuous sampling is carried out for several times, the subsequent sampling grade factor is reduced by 1 until the lowest grade is reached; for the random term in the set B, if the working efficiency is obviously improved, the subsequent extraction efficiency factor is increased by 1 until the highest efficiency factor is reached, and if the working efficiency is obviously reduced, if equipment faults exist, the subsequent extraction efficiency factor is reduced by 1 until the lowest efficiency factor is reached.
In fact, when considering that the random term limit is constrained by the number of decimations, it is generally necessary to make a stage statistic on the actual number of decimations.
Example 7: double random extraction computer system for detection and inspection
The computer system implements the dual random decimation method described above in relation to any one of embodiments 1 to 6, or a possible combination thereof.
Example 8: double random extraction computer program for detection and inspection
The computer program, when executed by a processor, implements the double random extraction method according to any one of or a possible combination of the above embodiments 1 to 6.
The above embodiment mainly aims at 2 random term sets, and if a plurality of random term sets need to be paired and extracted, the above method only needs to continue to execute the step S3 to extract a new set.
The basic principle of the invention is as follows: the method has the advantages that more than two groups of random items to be extracted are quantized according to probability factors to form more than two corresponding sets, the random items are extracted according to the random numbers, different sets are independently extracted, and the number of times constraint and mutual exclusion constraint of the random items to be extracted can be considered in the extraction process, so that the extracted random items are not influenced by other factors such as human factors, surrounding environments and the like, and the random, fair and fair extraction is ensured.
The application of the invention: along with the development of the technology of the Internet of things, the identification of influencing factors such as different products, different production lines, different stations and the like is already a mature technology, and the automatic extraction is realized by using the method and the device of the invention without technical barriers. When the quality of the actual product is detected, the method of the invention completes the extraction of the detected product and the detection equipment, the extraction is actually only numbered, and then the detected product with the corresponding number is transferred to the corresponding detection equipment by an automatic production line, thereby realizing the real double random product quality detection. For urban law enforcement inspection, the inspected objects need to be randomly extracted from a plurality of inspected units, and certain important inspected objects (namely constraint conditions) are also needed, the inspected objects are distributed to a plurality of inspectors or a plurality of inspection teams, and the composition and the pairing extraction of the inspected objects are random.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, modifications and variations can be made, including a method of mixing the stripping method with the re-extraction method in the paired extraction of the set a and the set B, a combination of random number generation methods, etc., which are also considered as the protection scope of the present invention, without departing from the technical principles of the present invention.

Claims (9)

1. The double random extraction method for detection and inspection is characterized by comprising at least 2 random extraction objects, wherein the random extraction objects respectively comprise a set of random items a and a set of random items b, and random extraction meets constraint conditions, and the constraint conditions at least comprise one of random item probability factor constraint, extracted times constraint and mutual exclusion constraint; the probability factor comprises a grade factor and/or an efficiency factor, the frequency constraint comprises that the frequency of extracting a certain random item in a certain set statistical period cannot exceed a limit frequency, the mutual exclusion constraint comprises that the two random item sets cannot be paired when the objects in the two random item sets are paired and extracted, and the double random extraction method is used for automatic random extraction based on product quality inspection in the industrial production process of the Internet of things and information technology and comprises the following steps:
s1: extracting the quantization numbers of the objects, wherein the quantization numbers comprise quantization numbers in natural number sequence, and the total number of random items a is recorded as M a The total number of random terms b is M b The method comprises the steps of carrying out a first treatment on the surface of the The random item quantitative number comprises a factory number of a product and an identity authentication number of equipment;
s2: setting a random pool, defining a probability factor constraint and a non-probability factor constraint in the constraint conditions through a natural number quantization level to form a unified expression, and setting the random pool according to the probability factors;
record random item a i Is a scale factor alpha of (2) i ,α i =1,2,3,…,N a Wherein N is a For the highest ranking number of the random term a, the ranking factor defines any of a plurality of factors including the historical accident probability, the credit ranking and the equipment aging condition of the extracted object; record random item b j Is the efficiency factor beta of (2) j ,β j =1,2,3,…,N b Wherein N is b Defining, for the highest efficiency factor of the random term b, a factor of relevance including any of a number of items of equipment effectiveness, work efficiency or proficiency, work position or post of the extracted object; the random pool includes random items a i Sequential or non-sequential set A, random term a i The number of the put-in sets A is alpha i The method comprises the steps of carrying out a first treatment on the surface of the The random pool further comprises a random term b j Sequential or non-sequential set B, random term B j The number of the sets B is beta j The method comprises the steps of carrying out a first treatment on the surface of the Recording the number of all random items to be extracted in the set A as K A The number of all random items to be extracted in the set B is K B And with respective sequence numbers 1,2,3 and … K A And 1,2,3, … K B The corresponding random items in the set A and the set B are respectively identified, and then
K A =α 12 +…+α Na
K B =β 12 +…+β Nb
S3: obtaining a random number and extracting a random item, wherein the obtaining of the random number comprises obtaining the random number by adopting a random number calculation method or obtaining the random number by adopting a random number generation function of a computer system; the method for extracting the random items comprises the steps of establishing a mapping between random numbers and extracted random items in a random pool to extract the random items, wherein one random number can only correspond to one random item in the random pool, and one random item can correspond to a random number set in a range.
2. The double random extraction method for detection inspection according to claim 1, wherein the method for obtaining the random number in step S3 comprises the steps of:
s31: obtaining a random variable seed s, wherein the random variable seed s is obtained by using the current time;
s32: calculating a first random number
Figure FDA0004201294280000021
Wherein,% is remainder operation, and each parameter selection needs to satisfy: (1) c and m are natural numbers and each other; (2) d-1 may be divided by the prime factors of all m; (3) if m is divisible by 4, d-1 is also divisible by 4;
s33: calculating a second random number
R 2 =r 1 +R 1 (r 2 -r 1 )
Wherein r is 1 For a given second random number lower bound, r 2 Is an upper bound;
the method for extracting the random term in the step S3 comprises the following steps:
s34: determining extraction object sequence number R 3 For R 2 Rounding, i.e. R 3 =int(R 2 ) Where int () is a rounding operation;
s35: extracting the R-th in the corresponding random pool 3 Random terms.
3. A double random extraction method for detection inspection according to claim 2, characterized by comprising a random term extracted number limiting method one or a limiting method two;
the first limiting method includes step S36: judging the effectiveness, if the accumulated extracted times of the random term in the statistical period exceeds the highest extracted times limit delta of the random term, discarding the extraction, starting to re-extract once from the step S31 until the constraint condition requirement of the times limit is met, and re-extracting only one set aiming at the extraction; updating the extracted times in the phase time of the object when the extracted random item meets the constraint condition;
the second limiting method includes that when a random pool is designed in the step S2, whether the number of times that a random item is extracted in a preset statistical period reaches the limiting number of times is firstly judged, if yes, the random item is removed, and the random item is not placed in the random pool; if not, a random pool is set according to the step S2.
4. A dual random extraction method for detection checking according to claim 2, wherein said mutual exclusion constraint method comprises a mutual exclusion-based re-extraction method or a mutual exclusion-based removal method;
the re-extraction method based on mutual exclusion includes step S361: judging the effectiveness, if the random item extracted at the time and the matched random item already extracted are mutually exclusive, discarding the extraction, and starting to re-extract once from the step S31 until the constraint condition requirement is met, wherein the re-extraction is only aimed at the set extracted at the time;
the mutex-based removal method includes step S362: when the random items of the previous extraction and the random items of the rest sets are mutually exclusive, temporarily eliminating the mutually exclusive random items of the rest sets to be extracted to form a temporary set, and completing the pairing extraction in the temporary set.
5. The method for detecting and checking double random extraction according to claim 2, wherein when the constraint condition includes both the extracted number constraint and the mutual exclusion constraint, a combined constraint elimination method or a combined constraint re-extraction method is adopted;
the combined constraint elimination method comprises the steps of firstly eliminating random items with the number of times reaching a limit number of times before the collection A, B is extracted, and forming a temporary collection A, B; after the collection A is extracted, judging whether a mutual exclusion item exists in the collection B according to the extracted random item, and if so, removing the mutual exclusion item from the collection B to form a new temporary collection B; extracting the set B, and recording the extraction times of the extraction result;
the combined constraint re-extraction method comprises the steps of extracting random items of the set A on line, judging whether the random items are random items with limited times or not, and re-extracting if the random items are random items with limited times, until the requirements are met; after the collection A is extracted, the collection B is extracted, whether the extracted random items are random items with limited times or matched random items in the extracted collection A are mutually exclusive items is judged, and if yes, the collection B is extracted again until the requirement is met.
6. A double random extraction method for detection inspection according to any of claims 2 to 5, characterized in that steps S31 to S32 are replaced by the following steps:
step S321: a random number greater than or equal to 0 and less than or equal to 1 is generated by a random number generation function of a computer system.
7. A dual random extraction method for detection inspection according to any one of claims 1 to 5, comprising a probability factor adjustment method: after finishing the step S3 of double random extraction, according to the sampling inspection or sampling inspection result, for random items in the set A, if the actual sampling inspection or sampling inspection result does not meet the set requirement, adding 1 to the subsequent sampling level factor until the highest level is reached, and if the continuous sampling inspection is not problematic for several times, subtracting 1 from the subsequent sampling level factor until the lowest level is reached; for the random term in the set B, if the working efficiency is obviously improved, the subsequent efficiency factor is increased by 1 until the highest efficiency factor is reached, and if the working efficiency is obviously reduced, the subsequent efficiency factor is reduced by 1 until the lowest efficiency factor is reached.
8. A dual random extraction method for detection inspection according to claim 6, comprising a probability factor adjustment method: after the double random extraction is finished, according to the sampling inspection or sampling inspection result, for random items in the set A, if the actual sampling inspection or sampling inspection result does not meet the set requirement, adding 1 to the subsequent sampling level factor until the highest level is reached, and if the continuous sampling inspection is not performed for a plurality of times, subtracting 1 from the subsequent sampling level factor until the lowest level is reached; for the random term in the set B, if the working efficiency is obviously improved, the subsequent efficiency factor is increased by 1 until the highest efficiency factor is reached, and if the working efficiency is obviously reduced, the subsequent efficiency factor is reduced by 1 until the lowest efficiency factor is reached.
9. A dual random extraction computer system or program for inspection detection, characterized in that the computer system implements the steps of the method of any one of claims 1 to 8; the computer program implementing the steps of the method of any one of claims 1 to 8 when executed by a processor.
CN202211278233.9A 2022-10-19 2022-10-19 Double random extraction method for detection and inspection Active CN115796636B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211278233.9A CN115796636B (en) 2022-10-19 2022-10-19 Double random extraction method for detection and inspection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211278233.9A CN115796636B (en) 2022-10-19 2022-10-19 Double random extraction method for detection and inspection

Publications (2)

Publication Number Publication Date
CN115796636A CN115796636A (en) 2023-03-14
CN115796636B true CN115796636B (en) 2023-07-14

Family

ID=85433206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211278233.9A Active CN115796636B (en) 2022-10-19 2022-10-19 Double random extraction method for detection and inspection

Country Status (1)

Country Link
CN (1) CN115796636B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381407A (en) * 2020-11-16 2021-02-19 浪潮软件股份有限公司 Credit weighting double-random supervision method based on random algorithm
CN113743796A (en) * 2021-09-08 2021-12-03 交通运输部公路科学研究所 Multi-constraint condition double random spot check method based on weight

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107748753A (en) * 2017-09-12 2018-03-02 广东中标数据科技股份有限公司 It is a kind of based on double random extraction systems, method and device
CN108804934A (en) * 2018-05-30 2018-11-13 西安理工大学 The more resume images of optics based on two cascade free-space propagation transformation
CN109033409B (en) * 2018-08-03 2022-03-01 华北水利水电大学 Double random extraction method
CN109163913B (en) * 2018-09-30 2021-02-09 深圳市元征科技股份有限公司 Automobile fault diagnosis method and related equipment
CN111210106A (en) * 2019-12-18 2020-05-29 航天信息股份有限公司 Double-random-based supervision and inspection method and system
CN111861365A (en) * 2020-06-03 2020-10-30 河南诺盾科技有限公司 Fire control is checked and is accepted record and spot check integration system
CN111880747B (en) * 2020-08-01 2022-11-08 广西大学 Automatic balanced storage method of Ceph storage system based on hierarchical mapping
CN112287909B (en) * 2020-12-24 2021-09-07 四川新网银行股份有限公司 Double-random in-vivo detection method for randomly generating detection points and interactive elements

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112381407A (en) * 2020-11-16 2021-02-19 浪潮软件股份有限公司 Credit weighting double-random supervision method based on random algorithm
CN113743796A (en) * 2021-09-08 2021-12-03 交通运输部公路科学研究所 Multi-constraint condition double random spot check method based on weight

Also Published As

Publication number Publication date
CN115796636A (en) 2023-03-14

Similar Documents

Publication Publication Date Title
Norris et al. Measuring electoral integrity around the world: A new dataset
CN108665159A (en) A kind of methods of risk assessment, device, terminal device and storage medium
Gorard Rethinking ‘quantitative’methods and the development of new researchers
CN107545422A (en) A kind of arbitrage detection method and device
CN110336838B (en) Account abnormity detection method, device, terminal and storage medium
Kobbacy et al. Towards an intelligent maintenance optimization system
CN106528850B (en) Gate inhibition's data exception detection method based on machine learning clustering algorithm
CN115796636B (en) Double random extraction method for detection and inspection
Struthers et al. Bridging the pond: measuring policy positions in the United States and Europe
Schutzman Trade-offs in fair redistricting
CN106055875A (en) Dermatoglyph analysis and processing apparatus based on big data
Armstrong et al. The application of data mining techniques to characterize agricultural soil profiles.
CN115809795A (en) Digitalized production team bearing capacity evaluation method and device
Domashova et al. Application of machine learning methods for risk analysis of unfavorable outcome of government procurement procedure in building and grounds maintenance domain
Wheadon Classification accuracy and consistency under item response theory models using the package classify
CN111985897B (en) Method and device for constructing professional portrait data model by using talent big data
CN105987753A (en) Spectrum expert system based on cloud calculating and usage method thereof
Wheeler et al. The impact of highly compact algorithmic redistricting on the rural-versus-urban balance
Hidayat et al. Process model extension using heuristics miner:(Case study: Incident management of Volvo IT Belgium)
CN113946579A (en) Model-based data generation method and device, computer equipment and storage medium
CN113496389A (en) Cooperative management system based on foreign trade big data
CN110837459A (en) Big data-based operation performance analysis method and system
CN108763565A (en) A kind of matched construction method of data auto-associating based on deep learning
Gupta et al. A simulation model of breast cancer incidence, progression, diagnosis and survival in India
CN112308404B (en) Project risk management method and device, electronic equipment and storage medium

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