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

Double random extraction method for detection and inspection Download PDF

Info

Publication number
CN115796636A
CN115796636A CN202211278233.9A CN202211278233A CN115796636A CN 115796636 A CN115796636 A CN 115796636A CN 202211278233 A CN202211278233 A CN 202211278233A CN 115796636 A CN115796636 A CN 115796636A
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.)
Granted
Application number
CN202211278233.9A
Other languages
Chinese (zh)
Other versions
CN115796636B (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 both an object to be inspected and a detection inspection main body are randomly selected in the processes of quality inspection of industrial products, law enforcement inspection and the like, so that the credibility of results is better enhanced. With the development of the Internet of things and information technology, the invention establishes a double-random automatic extraction method, carries out product quality inspection or other detection and inspection activities according to the extraction result, and can further improve the credibility of the related result.

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 sampling method for detection inspection.
Background
With the development of the internet of things and the informatization technology, automation, intellectualization and assembly line operation are trends of modern industrial large-scale production. The qualification rate of products is the key point of large-scale production attention, how to guarantee the real qualification rate of all products of the combined production line scientifically reflected under the limited detection capability, and the key point is to guarantee the randomness of the random inspection or the spot check.
Generally, for large-scale industrial production, when tens or even hundreds of production lines run simultaneously, a plurality of sets of detection equipment are used for detecting 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 a plurality of human factors such as product placement, packaging and the like, the random spot check is difficult to achieve for different production lines, the detection devices are generally convenient to consider and balanced in detection workload, and the problem that the random result of the spot check of the products is possibly influenced by the differences between the production lines and the detection devices is not considered much. This is essentially a double random problem.
On the other hand, for market supervision and management, except for special key fields, administrative inspection is performed in a double random spot inspection mode, original inspection systems and random inspection of daily supervision are replaced, supervision efficiency is improved, and burdens of enterprises and law workers are relieved. This is also a double random problem in nature.
The current double random spot check/spot check seems to randomly designate the checked object and the checked device (or the checked personnel), but the influence of human factors and surrounding environment is often ignored in the designation process, and when the number of times of the spot check is small and the constraint condition exists, the true random, fair and justice is more difficult to achieve.
Disclosure of Invention
In view of the above, the present invention provides a dual random decimation 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 detection and inspection, which at least comprises 2 random extraction objects, wherein one object is an inspected object and comprises an inspected product, an inspected enterprise or an inspected person, and the other object is an inspection main body and comprises an inspected person or inspection equipment and the like; the random extraction objects respectively comprise a set of random items a and a set of random items b, the 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 grade factors and/or efficiency factors, the probability factor constraint comprises the number of random items placed in a random pool determined according to the probability factors of the extracted random items, the frequency constraint comprises the condition that the extracted frequency of a certain random item in a certain set statistical time period cannot exceed a limited frequency, the mutual exclusion constraint comprises the 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 possible interest relations between an inspection main body and an inspected object and avoiding the phenomenon that the inspection result is not fair; the double random extraction method comprises the following steps:
s1: extracting object quantization numbers, wherein the quantization numbers comprise natural number sequential quantization numbers, and the total number of random items a is marked as M a The total number of the random terms b is M b The quantization numbers can be respectively selected from 1 to M a And 1 to M b (ii) a The random items can also adopt other different natural numbers for quantitative numbering, such as the delivery number of a product, the authentication number of equipment and the like, and also can adopt a letter or letter and number combination mode for quantitative numbering;
s2: setting a random pool, defining probability factor constraint and probability factor constraint which are contained in the constraint conditions to form a unified expression through natural number quantization levels, and then setting the random pool according to probability factors, namely whether the constraint conditions comprise the probability factor constraint or not, describing by using the probability factor constraint, wherein the level factors comprise level 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 constraint is equivalent to the probability factor constraint when the factor number is 1;
without loss of generality, a set of random items a can be defined as a set of inspected objects, wherein the grade factor refers to the credit grade of the inspected object, and the larger the number of credit grades is, the larger the inspected probability is; defining a set of random items b as an inspection subject such as an inspector or an inspection device, wherein the efficiency factor refers to the inspection efficiency of the inspection subject, and the efficiency of the inspection subject is higher and more inspection tasks are possibly undertaken; for convenience, the traditional probability factor may be defined by a decimal definition mode from 0 to 1 directly by a natural number grade, and the numerical value may not be the same as that defined by part of user habits, so that special attention is required in application;
noting the random item a i Class factor alpha of i ,α i =1,2,3,…,N a In which N is a The highest grade number of the random item a; random item b j Efficiency factor beta of j ,β j =1,2,3,…,N b In which N is b The highest efficiency factor of the random term b; the random pool includes a random term a i A sequential or non-sequential set of (A), also called a random pool (A), random items (a) i The number of sets A put in is alpha i (ii) a The random pool also includes a random term b j A sequential or non-sequential set B, also called a random pool B, random items B j The number of the put sets B is beta j (ii) a All random items to be extracted in the set A are counted as K A And the number of all random items to be extracted in the set B is K B And in respective sequence number 1,2,3 … K A And 1,2,3 … K B Respectively identifying corresponding random items in the set A and the set B, then having
K A =α 12 +…+α Ma
K B =β 12 +…+β Mb
Wherein, K A ≥M a ,K B ≥M b
S3: acquiring a random number and extracting a random item, wherein the acquiring of the random number comprises acquiring the random number by adopting a random number calculation method or acquiring the random number by adopting a random number generation function of a computer system; the random item extraction comprises the step of extracting random numbers by a method of establishing mapping between the random numbers and the extracted random items in the random pool, for example, the random numbers are mapped to numbers of the random items in the random pool by an integer 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.
Further, the method for acquiring the random number in step S3 includes the following steps:
s31: acquiring a random variable seed s, wherein the current time is used as the random variable seed;
s32: calculating a first random number
Figure SMS_1
Wherein,% is remainder operation, and each parameter selection needs to satisfy: (1) c and m are natural numbers and are mutualins; (2) d-1 can be evenly divided by the prime factors of all m; (3) if m can be divided by 4, then d-1 can also be divided by 4;
s33: calculating a second random number
R 2 =r 1 +R 1 (r 2 -r 1 )
Wherein r is 1 Given a lower bound of the second random number, r 2 Is the upper bound;
the method for extracting the random item in the step S3 comprises the following steps:
s34: determining the order number R of the extraction object 3 To R, to R 2 Rounding, i.e. R 3 =int(R 2 ) Wherein int () is a rounding operation;
s35: extracting the R-th bit in the corresponding random pool 3 A random term.
Further, the random item extraction method comprises a first random item extracted number limiting method or a second random item extracted number limiting method; that is, the number of times of random items extracted in a period of time is not more than the limited number of times, and the limited random items and the corresponding limited number of times can be different;
the first limiting method includes step S36: judging validity, if the accumulated number of times of extraction of the random item extracted this time in the statistical time period exceeds the maximum number limit delta of the random item, abandoning the extraction, starting to extract again from the step S31 until the constraint condition requirement of the number limit is met, and re-extracting only one set for the extraction this time; when the random item to be extracted is determined to meet the constraint condition, updating the number of times of extraction in the stage time of the object, namely adding 1 time to the existing number of times of extraction, finishing the stage counting time, and starting a new round of counting according to a set strategy, wherein the method is called as a re-extraction method based on the number constraint;
the second limiting method comprises the steps that when the random pool is designed in the step S2, whether the number of times of random items which are extracted in a preset statistical time period reaches the limiting number of times is judged, if yes, the random items are removed and are not placed in the random pool; if not, a random pool is set according to the step S2, and the second method is called as an elimination method based on the time constraint.
Further, the mutual exclusion constraint is a random item a i With another random term b j The mutual exclusion constraint method comprises a mutual exclusion-based re-extraction method or a mutual exclusion-based removal method;
the mutual exclusion-based re-extraction method includes step S361: judging validity, if the random item (such as random item B in set B) is extracted this time j ) With the paired random items (e.g. random item a in set A) already extracted i ) If the mutual exclusion exists, the extraction is abandoned, and the extraction is started again from the step S31 until the constraint condition requirement is met, and the extraction is performed again only for the current extraction set; if the extracted random item meets the constraint condition, updating the extracted times within the stage time of the object, namely adding 1 time to the existing extraction times, finishing the stage counting time, and starting a new round of counting according to a set strategy;
the mutually exclusive based elimination method includes step S362: and when the random items extracted in advance are mutually exclusive with the random items in the rest sets, temporarily removing the mutually exclusive random items in the rest sets to be extracted to form a temporary set, and finishing the extraction in the temporary set.
Furthermore, when the constraint conditions simultaneously comprise extracted times constraint and mutual exclusion constraint, a combined constraint elimination method or a combined constraint re-extraction method is adopted;
the combination constraint elimination method comprises the steps of eliminating random items with limited times before the set A, B is extracted to form a temporary set A, B; after the set A is extracted, judging whether a mutual exclusion item exists in the set B according to the extracted random item, if so, removing the mutual exclusion item from the set B to form a new temporary set B; extracting the set B, and recording the extraction times of the extraction result; the extraction orders of the set A, B can be exchanged, but the front and the back are consistent, and the extraction principles are not conflicted;
the combined constraint re-extraction method comprises the steps of extracting random items of the set A on line, judging whether the random items reach the limited times, and re-extracting if the random items reach the limited times until the requirements are met; and after the extraction of the set A is finished, extracting the set B, judging whether the extracted random items are random items reaching the limited times or mutually exclusive items with the matched random items in the extracted set A, and if so, re-extracting until the requirements are met.
In fact, the elimination method and the re-extraction method can be used in combination, for example, after the times constraint terms of the sets A, B are eliminated first, the two extracted sets of random terms have mutual exclusion, and optionally, one set of random terms is re-extracted.
Further, the steps S31 to S32 are replaced by the following steps:
step S321: generating a random number with a random number generating function of the computer system, wherein the random number is greater than or equal to 0 and less than or equal to 1, the random function of the computer system comprises a function such as rand (), and the second random number in step S33 is r 1 +(r 2 -r 1 )*rand()。
Further, the method comprises the following probability factor adjusting method: after the step S3 of double random extraction is completed, according to the result of the random inspection or the random inspection, for the random items in the set A, if the actual result of the random inspection or the random inspection does not meet the set requirement, if the product quality problem exists, the subsequent extraction grade factor is added with 1 until the highest grade is reached, and if the problem does not occur for a plurality of times of continuous random inspection, the subsequent extraction grade factor is subtracted with 1 until the lowest grade is reached; and for the random item in the set B, if the working efficiency is obviously improved, adding 1 to the subsequent extraction efficiency factor until the highest efficiency factor is reached, and if the working efficiency is obviously reduced, and if equipment faults exist, subtracting 1 from the subsequent extraction efficiency factor 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, 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 extracting method for detection and inspection, and provides an automatic random extracting method for product quality inspection in an industrial production process based on the Internet of things and an information technology, which can ensure that an extracted product is irrelevant to environmental factors such as a production line, a station and the like, and meanwhile, detection equipment is also irrelevant to the product and the environmental factors, so that double random of the detected product and a detection main body is realized. The invention also provides an extraction method under the constraint conditions of probability factors, extracted times, mutual exclusion and the like, can be simultaneously applied to the double random extraction requirements of other objects to be inspected and inspection teams (or personnel or equipment) in comprehensive law enforcement inspection, and can fully ensure the randomness, fairness and justice of detection inspection.
Drawings
FIG. 1 is a flow chart of a method of double random decimation for detection inspection;
fig. 2 is a flow chart of random number acquisition and random item extraction.
Detailed Description
The following description of the embodiments of the present invention will be made with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
Example 1: double random extraction method for detection and inspection
The invention designs a double random extraction method for detection and examination, 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, 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 grade factors and/or efficiency factors, the probability factor constraint comprises the number of random items placed in a random pool determined according to the probability factors of the random items to be extracted, the frequency constraint comprises the frequency that a certain random item is extracted within a certain set statistical time period and cannot exceed a limited frequency, and the mutual exclusion constraint comprises the constraint that elements in two random item sets cannot be paired when being paired and extracted; regarding the 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 object quantization numbers, wherein the quantization numbers comprise natural number sequence quantization numbers, and the total number of random items a is M a In this embodiment, the quantization number is i, i =1,2,3 … M a (ii) a The total number of the random items b is M b In this embodiment, the quantization number is j, j =1,2,3 … M b
S2: setting a random pool, defining probability factor constraint and probability factor constraint which are not in the constraint conditions through natural number quantization levels to form a unified expression, and then setting the random pool according to the probability factor;
noting random item a i By a scale factor of i ,α i =1,2,3,…,N a In which N is a The highest grade number of the random item a; inscription of random item b j Efficiency factor beta of j ,β j =1,2,3,…,N b In which N is b The highest efficiency factor of the random term b; the random pool includes a random term a i A sequential or non-sequential set of (A), also called a random pool (A), random items (a) i The number of sets A put in is alpha i (ii) a The random pool further comprises a random term b j A sequential or non-sequential set B, also called a random pool B, random items B j The number of sets B put in is beta j (ii) a All random items to be extracted in the set A are counted as K A And the number of all random items to be extracted in the set B is K B In this embodiment, the original random entries of the set A, B are all arranged in the random pool in sequence, and are given respective sequence numbers 1,2,3 … K A And 1,2,3 … K B Respectively identifying corresponding random items in the set A and the set B, then having
K A =α 12 +…+α Ma
K B =β 12 +…+β Mb
Wherein, K A ≥M a ,K B ≥M b (ii) a The embodiment gives random items a according to factors such as historical accident probability, credit level, equipment aging condition or whether penalized and the like of the extracted object i Defining a level factor alpha i The number of the random items in the random pool A is the number of the levels of the random items, the higher the level is, the more the number of the same random item in the random pool is, the higher the probability of the random item being extracted is; giving random item b according to the equipment efficiency, working efficiency or proficiency of the extracted object and the factors of station or post j Defining an efficiency factor beta j 4 levels including 1,2,3 and 4 respectively, the number of the random items in the random pool B is the efficiency factor value of the random item, the higher the efficiency is, the more the number of the same random items in the random pool is, the higher the probability of the random items being extracted is; the definitions of the level factor and the efficiency factor are essentially the probability levels of random items extracted, only the considered factors are different in types, and a user can also perform other definitions, and the setting method of the random pool must be consistent with the definitions;
the advantage of this design: on one hand, when the probability factor is set to be level 1, the constraint is basically consistent with the constraint of the probability-free factor, so that the unification of the constraint algorithm of the probability factor and the constraint algorithm of the probability-free factor can be realized without other selection or judgment; on the other hand, although the level factor and the efficiency factor may express different physical meanings, the method uses natural numbers to unify the definition modes of the level factor and the efficiency factor, and can be conveniently programmed and implemented;
s3: acquiring a random number and extracting a random item, wherein the acquiring of the random number comprises acquiring the random number by adopting a random number calculation method or acquiring the random number by adopting a random number generation function of a computer system; the random item extraction comprises the steps of establishing a random number and extracting the random number by a method of mapping the random number with the extracted random item in a random pool, for example, an integer calculation method is adopted to map the random number to the number of the random item in the random pool, one random number only corresponds to one random item of the random pool, and one random item can correspond to a random number set in a range; calculating the random number once every time of extraction, calculating the random item number corresponding to the extraction according to the random number and the mapping relation, and extracting the random item in a corresponding random pool according to the random item number; generally, the pair extraction of the set A and the set B is performed, for example, the pair combination of a random item extracted by the set A and a random item extracted by the set B can be exchanged in the extraction sequence of the set A, B, but the front and the back should be consistent, and the extraction principle is not conflicted.
Preferably, as shown in fig. 2, the method for acquiring a random number in step S3 includes the following steps:
s31: acquiring a random variable seed s, including using the current time as the random variable seed, in this embodiment, a timestamp of a computer system is directly used, and generally, an integer millisecond is used as a unit;
s32: calculating a first random number
Figure SMS_2
Wherein,% is remainder operation, and each parameter selection needs to satisfy: (1) c and m are natural numbers and are mutualins; (2) d-1 can be evenly divided by the prime factors of all m; (3) if m can be divided by 4, then d-1 can also be divided by 4; accordingly, in this embodiment, d =9301, c =49297, and m =233280 are taken.
S33: calculating a second random number
R 2 =r 1 +R 1 (r 2 -r 1 )
Wherein r is 1 Given a lower bound of the second random number, r 2 Is the upper bound; in this embodiment, r is taken when the set A is extracted 1 =1,r 2 =K A +1; r is taken when set B is extracted 1 =1,r 2 =K B +1;
The method for extracting the random item in the step S3 comprises the following steps:
s34: determining the order number R of the extraction object 3 To R, to R 2 Rounding, i.e. R 3 =int(R 2 ) Whereinint () is a rounding operation;
s35: extracting the R-th bit in the corresponding random pool 3 A random term. Generally, each extraction is only directed at one random pool or one set in the random pool, and only one random item is extracted; if the pair extraction is one-to-one, after the extraction of the set A, the steps S31 to S35 are repeated to execute the extraction of the set B, and the pairing extraction is ended; if the number of the matched random items is one or more than one, the required number of random items of the set A, B is generally extracted respectively, the single effective extraction frequency is the total number of the matched random items required by the two sets, all the random items are extracted completely, and the current matching extraction is ended.
Example 2: is constrained by the number of times of extraction
The difference from the embodiment 1 is that the random term existence is considered to be restricted by the number of times of extraction on the basis of the embodiment 1.
Preferably, the random item extraction method includes a first random item extracted number limiting method or a second random item extracted number limiting method;
the first limiting method includes step S36: judging validity, if the accumulated number of times of the random item extracted this time in the statistical time period exceeds the maximum number limit delta of the random item, abandoning the extraction, starting to extract again from the step S31 until the constraint condition requirement of the number limit is met, and extracting again only one set for the extraction this time; when the random item to be extracted is determined to meet the constraint condition, updating the number of times of extraction in the stage time of the object, namely adding 1 time to the existing number of times of extraction, finishing the stage counting time, and starting a new round of counting according to a set strategy, wherein the method is called as a re-extraction method based on the number constraint;
the second limiting method comprises the steps that when the random pool is designed in the step S2, whether the number of times of random items which are extracted in a preset statistical time period reaches the limiting number of times is judged, if yes, the random items are removed and are not placed in the random pool; if not, a random pool is set according to the step S2, and the second method is called as an elimination method based on the time constraint.
The second method is adopted in the embodiment based on the elimination method of the number constraint.
Example 3: mutual exclusion constraint
The difference from the embodiment 1 is that on the basis of the embodiment 1, mutual exclusion constraint exists between two sets of random items.
Preferably, the mutual exclusion constraint is a random item a i With another random term b j The mutual exclusion constraint method comprises a mutual exclusion-based re-extraction method or a mutual exclusion-based removal method;
the mutual exclusion-based re-extraction method includes step S361: judging validity, if the random item (such as random item B in set B) is extracted this time j ) With the pairing random item (such as the random item a in the set A) which has been extracted i ) If the mutual exclusion exists, the extraction is abandoned, and the extraction is started again from the step S31 until the constraint condition requirement is met, and the extraction is performed again only for the current extraction set; if the extracted random item meets the constraint condition, updating the extracted times within the stage time of the object, namely adding 1 time to the existing extraction times, finishing the stage counting time, and starting a new round of counting according to a set strategy;
the mutually exclusive based elimination method includes step S362: and temporarily removing the mutually exclusive random items in the rest sets to be extracted to form a temporary set when the prior extracted random items are mutually exclusive with the random items in the rest sets, and finishing the extraction in the temporary set.
The embodiment adopts the mutually exclusive based elimination method.
Example 4: extracted times constraint + mutual exclusion constraint
The difference from the embodiment 1 is that on the basis of the embodiment 1, the random items are considered to have the limitation of the number of times of being extracted, and the mutual exclusion constraint exists between the random items of the two sets.
Preferably, when the constraint conditions include the extracted times constraint and the mutual exclusion constraint, a combined constraint elimination method or a combined constraint re-extraction method is adopted;
the combination constraint elimination method comprises the steps of eliminating random items with limited times before the set A, B is extracted to form a temporary set A, B; after the set A is extracted, judging whether a mutual exclusion item exists in the set B according to the extracted random item, if so, removing the mutual exclusion item from the set B to form a new temporary set B; extracting the set B, and recording the extraction times of the extraction result; the extraction orders of the set A, B can be exchanged, but the front and the back are consistent, and the extraction principles are not conflicted;
the combined constraint re-extraction method comprises the steps of extracting random items of the set A on line, judging whether the random items reach the limited times, and re-extracting if the random items reach the limited times until the requirements are met; and after the extraction of the set A is finished, extracting the set B, judging whether the extracted random items are random items reaching the limited times or are mutually exclusive items with the matched random items in the extracted set A, and if so, extracting again until the requirements are met.
The present embodiment employs a combinatorial constraint elimination method.
In fact, the elimination method and the re-extraction method can be used in a mixed way, for example, after the times constraint items of the set A, B are eliminated first, the two extracted set random items have mutual exclusion, and the random item of one set can be selected for re-extraction.
Example 5: computer automatic random number generation
The difference from embodiment 1 is in the random number acquisition of step S3, and the steps S31 to S32 are replaced with the following steps:
step S321: generating a random number which is greater than or equal to 0 and less than or equal to 1 by using a random number generation function of the computer system, wherein the random function of the computer system comprises a function such as rand (), and the second random number in the step S33 is r 1 +(r 2 -r 1 )*rand()。
In fact, this embodiment can also be combined with embodiments 2,3 and 4 to form a new embodiment.
Example 6: probability factor adjustment
The difference from embodiment 1 is that step S3 may be added with step S4: probability factor adjustment, namely after double random extraction is completed, according to the result of spot check or spot check, for random items in the set A, if the actual result of spot check or spot check does not meet the set requirement, if the product quality problem exists, adding 1 to the subsequent extraction grade factor until the highest grade is reached, and if no problem exists in the continuous spot check for a plurality of times, subtracting 1 from the subsequent extraction grade factor until the lowest grade is reached; and for the random item in the set B, if the working efficiency is obviously improved, adding 1 to the subsequent extraction efficiency factor until the highest efficiency factor is reached, and if the working efficiency is obviously reduced, and if equipment faults exist, subtracting 1 from the subsequent extraction efficiency factor until the lowest efficiency factor is reached.
In fact, when considering that the random term limit is constrained by the number of extractions, phase statistics on the actual number of extractions is generally required.
Example 7: double random extracting computer system for detecting and checking
The computer system implements the dual random decimation method described above in connection with any one or possible combination of embodiments 1 to 6.
Example 8: double random extraction computer program for detection and examination
The computer program, when executed by a processor, implements the dual random decimation method associated with any one or possible combination of embodiments 1 to 6 described above.
The above embodiment mainly aims at 2 random item sets, and if there are a plurality of random item sets that need to be paired and extracted, the above method only needs to continue to execute step S3 to extract a new set.
The basic principle of the invention is as follows: more than two groups of random items to be extracted are quantized and numbered according to probability factors to form more than two corresponding sets, the random items are extracted according to random numbers, different sets are independently extracted, and the extraction process can simultaneously consider the extraction times constraint and the mutual exclusion constraint of the random items, so that the extracted random items are not influenced by other factors such as human factors and surrounding environments, and the random, fair and fair extraction is ensured.
The application of the invention is as follows: with the development of the internet of things technology, the identification of the influencing factors such as different products, different production lines, different stations and the like is a mature technology, and the automatic extraction is realized without technical obstacles. When the quality of the actual product is detected, the method finishes the extraction of the detected product and the detection equipment, actually the extracted product is only the serial number, and then the detected product with the corresponding serial number is transferred to the corresponding detection equipment by an automatic production line, thereby realizing the real double-random product quality detection. In urban law enforcement, the inspected objects also need to be randomly extracted from a plurality of inspected units, certainly, some key inspected objects (namely constraint conditions) exist, the inspected objects also need to be distributed to a plurality of inspectors or a plurality of inspection teams, the composition and pairing extraction of the inspected objects are random, and by adopting the double random extraction method, only the number of the relevant object is input, so that the random, fair and fair law enforcement inspection can be ensured.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, without departing from the technical principle of the present invention, several improvements and modifications can be made, including the combined use of the method of using the elimination method and the re-extraction method in the paired extraction of the set a and the set B, the random number generation method, and the like, and these improvements and modifications should also be considered as the protection scope of the present invention.

Claims (9)

1. A double random extraction method for detection and examination 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, 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 includes a grade factor and/or an efficiency factor, the number constraint includes that the number of times that a random item is extracted in a certain set statistical period cannot exceed a limited number of times, the mutual exclusion constraint includes a constraint that objects in two random item sets cannot be paired when being paired and extracted, and the double random extraction method includes the following steps:
s1: extraction object quantization numberThe quantization number comprises a natural number sequence quantization number, and the total number of random items a is M a The total number of the random terms b is M b
S2: setting a random pool, defining probability factor constraint and probability factor constraint which are not in the constraint conditions through natural number quantization levels to form a unified expression, and then setting the random pool according to the probability factor;
noting random item a i By a scale factor of i ,α i =1,2,3,…,N a In which N is a The highest grade number of the random item a; inscription of random item b j Efficiency factor beta of j ,β j =1,2,3,…,N b In which N is b The highest efficiency factor of the random term b; the random pool includes a random term a i A sequential or non-sequential set of A, random item a i The number of sets A put in is alpha i (ii) a The random pool also includes a random term b j A sequential or non-sequential set B of random items B j The number of sets B put in is beta j (ii) a All random items to be extracted in the set A are counted as K A And the number of all random items to be extracted in the set B is K B And in respective sequence numbers 1,2,3 … K A And 1,2,3 … K B Respectively identifying corresponding random items in the set A and the set B, then having
K A =α 12 +…+α Ma
K B =β 12 +…+β Mb
S3: acquiring a random number and extracting a random item, wherein the acquiring of the random number comprises acquiring the random number by adopting a random number calculation method or acquiring the random number by adopting a random number generation function of a computer system; the random item extraction comprises the step of extracting random numbers by a method of establishing mapping between the random numbers and the extracted random items in the random pool, wherein one random number only corresponds to one random item of the random pool, and one random item can correspond to a random number set in a range.
2. The method of double random extraction for inspection according to claim 1, wherein the method of obtaining random numbers in step S3 comprises the following steps:
s31: acquiring a random variable seed s, wherein the current time is used as the random variable seed;
s32: calculating a first random number
Figure FDA0003897380820000021
Wherein,% is remainder operation, and each parameter selection needs to satisfy: (1) c and m are natural numbers and are mutualins; (2) d-1 can be evenly divided by the prime factors of all m; (3) if m can be divided by 4, then d-1 can also be divided by 4;
s33: calculating a second random number
R 2 =r 1 +R 1 (r 2 -r 1 )
Wherein r is 1 Given a lower bound of the second random number, r 2 Is the upper bound;
the method for extracting the random item in the step S3 comprises the following steps:
s34: determining the order number R of the extraction object 3 To R, to R 2 Rounding, i.e. R 3 =int(R 2 ) Wherein int () is a rounding operation;
s35: extracting the R-th bit in the corresponding random pool 3 A random term.
3. The double random extraction method for detection examination according to claim 2, wherein the method comprises a first method or a second method for limiting the number of times the random item is extracted;
the first limiting method includes step S36: judging validity, if the accumulated number of times of the random item extracted this time in the statistical time period exceeds the maximum number limit delta of the random item, abandoning the extraction, starting to extract again from the step S31 until the constraint condition requirement of the number limit is met, and extracting again only one set for the extraction this time; when the extracted random item is determined to meet the constraint condition, updating the extracted times of the object within the stage time;
the second limiting method comprises the steps that when the random pool is designed in the step S2, whether the number of times of random items which are extracted in a preset statistical time period reaches the limiting number of times is judged, if yes, the random items are removed and are not placed in the random pool; if not, a random pool is set according to the step S2.
4. The dual random decimation method for detection checking according to claim 2, wherein said mutual exclusion constraint method comprises a mutual exclusion based re-decimation method or a mutual exclusion based elimination method;
the mutual exclusion-based re-extraction method includes step S361: judging validity, if the random item extracted this time and the matched random item already extracted have mutual exclusion, giving up the extraction, starting to extract once again from step S31 until the constraint condition requirement is met, and extracting again only the set extracted this time;
the mutually exclusive based elimination method includes step S362: and when the random items extracted in advance and the random items of the rest sets are mutually exclusive, temporarily removing the mutually exclusive random items in the rest sets to be extracted to form a temporary set, and finishing the pairing extraction in the temporary set.
5. The method of claim 2, wherein when the constraint conditions include both the extracted times constraint and the mutual exclusion constraint, the method of combining constraint elimination or combining constraint re-extraction is used;
the combination constraint elimination method comprises the steps of eliminating random items with limited times before the set A, B is extracted to form a temporary set A, B; after the set A is extracted, judging whether a mutual exclusion item exists in the set B according to the extracted random item, if so, removing the mutual exclusion item from the set B to form a new temporary set 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 reach the limited times, and re-extracting if the random items reach the limited times until the requirements are met; and after the extraction of the set A is finished, extracting the set B, judging whether the extracted random items are random items reaching the limited times or are mutually exclusive items with the matched random items in the extracted set A, and if so, extracting again until the requirements are met.
6. The double random extraction method for detection inspection according to any one of claims 2 to 5, wherein the steps S31 to S32 are replaced by the following steps:
step S321: and generating a random number which is greater than or equal to 0 and less than or equal to 1 by using a random number generation function carried by the computer system.
7. The double random extraction method for the detection inspection according to any one of claims 1 to 5, comprising a probability factor adjustment method: after the step S3 of double random extraction is completed, according to the result of the random inspection or the random inspection, if the actual result of the random inspection or the random inspection in the set A does not meet the set requirement, the subsequent extraction grade factor is added with 1 until the highest grade is reached, and if no problem occurs for a plurality of times of continuous random inspection, the subsequent extraction grade factor is subtracted with 1 until the lowest grade is reached; and for the random item 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 decreased by 1 until the lowest efficiency factor is reached.
8. The double random extraction method for the detection inspection as claimed in claim 6, wherein the probability factor adjustment method comprises: after the double random extraction is completed, according to the result of the spot check or spot check, for the random items in the set A, if the actual result of the spot check or spot check does not meet the set requirement, adding 1 to the subsequent extraction grade factor until the highest grade is reached, and if no problem occurs for a plurality of times of continuous spot checks, subtracting 1 from the subsequent extraction grade factor until the lowest grade is reached; and for the random item 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 decreased by 1 until the lowest efficiency factor is reached.
9. A double random extraction computer system or program for detection checking, characterized in that the computer system implements the steps of the method of any one of claims 1 to 8; the computer program, when executed by a processor, implementing the steps of the method of any one of claims 1 to 8.
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 true CN115796636A (en) 2023-03-14
CN115796636B 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 (10)

* 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
CN109033409A (en) * 2018-08-03 2018-12-18 华北水利水电大学 A kind of pair is randomly selected method
CN109163913A (en) * 2018-09-30 2019-01-08 深圳市元征科技股份有限公司 A kind of Diagnosis method of automobile faults and relevant device
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
CN112287909A (en) * 2020-12-24 2021-01-29 四川新网银行股份有限公司 Double-random in-vivo detection method for randomly generating detection points and interactive elements
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
WO2022028033A1 (en) * 2020-08-01 2022-02-10 广西大学 Hierarchical mapping-based automatic balancing storage method for ceph storage system

Patent Citations (10)

* 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
CN109033409A (en) * 2018-08-03 2018-12-18 华北水利水电大学 A kind of pair is randomly selected method
CN109163913A (en) * 2018-09-30 2019-01-08 深圳市元征科技股份有限公司 A kind of Diagnosis method of automobile faults and relevant device
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
WO2022028033A1 (en) * 2020-08-01 2022-02-10 广西大学 Hierarchical mapping-based automatic balancing storage method for ceph storage system
CN112381407A (en) * 2020-11-16 2021-02-19 浪潮软件股份有限公司 Credit weighting double-random supervision method based on random algorithm
CN112287909A (en) * 2020-12-24 2021-01-29 四川新网银行股份有限公司 Double-random in-vivo detection method for randomly generating detection points and interactive elements
CN113743796A (en) * 2021-09-08 2021-12-03 交通运输部公路科学研究所 Multi-constraint condition double random spot check method based on weight

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
YA SU: "Robust Anomaly Detection for Multivariate Time Series through Stochastic Recurrent Neural Network", 《PROCEEDINGS OF THE 25TH ACM SIGKDD INTERNATIONAL CONFERENCE ON KNOWLEDGE DISCOVERY & DATA MINING》 *
狄伟: "信息化技术在双随机执法检查工作中的应用", 《现代冶金》, vol. 48, no. 3 *
狄伟;: "信息化技术在双随机执法检查工作中的应用", 现代冶金, no. 03 *
郝然;艾芊;朱宇超;: "基于多智能体一致性的能源互联网协同优化控制", 电力系统自动化, no. 15 *

Also Published As

Publication number Publication date
CN115796636B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
Ghosh et al. Outliers: An evaluation of methodologies
CN103226743B (en) Aircraft equipment technology maturity based on TRL assesses information processing method
CN106022826A (en) Cheating user recognition method and system in webcast platform
Gorard Rethinking ‘quantitative’methods and the development of new researchers
CN106611298A (en) Hospital human resource quantitative configuration method based on queuing theory model
CN107545422A (en) A kind of arbitrage detection method and device
CN105303311B (en) Evaluation index selection method and device based on data envelope analysis
CN110336838A (en) Account method for detecting abnormality, device, terminal and storage medium
CN107302564B (en) event information processing method and device, computer equipment and storage medium
CN113657805A (en) Method, device, equipment and storage medium for constructing weights of assessment index system
Sivakumar et al. The Odd generalized exponential log-logistic distribution group acceptance sampling plan
CN107085757B (en) Method and device for determining risk type user
CN115796636A (en) Double random extraction method for detection and inspection
CN110209656B (en) Data processing method and device
Nanda et al. A tri-stage cluster identification model for accurate analysis of seismic catalogs
CN115809795A (en) Digitalized production team bearing capacity evaluation method and device
Spasojević-Brkić et al. TRANSPORT AND MINING MACHINES OPERATORS’BEHAVIORAL ATTITUDES IN SAFETY CLIMATE CONTEXT
CN111753928B (en) Customs detection rule generation method based on knowledge graph and tree model construction
CN113643127A (en) Risk guarantee circle determination method and device, electronic equipment and readable storage medium
Hidayat et al. Process model extension using heuristics miner:(Case study: Incident management of Volvo IT Belgium)
Metcalf et al. Private forest landowners: Estimating population parameters
Afrizal et al. Analysis of the readiness of e-Government implementation at the ministerial level of the Republic of Indonesia
CN114677057B (en) Green energy financial data acquisition and evaluation method and system based on machine learning
CN111428951A (en) Personnel post matching method, device, equipment and storage medium
CN104199828A (en) Method for establishing social network based on transaction log data

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