Method and device for formulating secondary sampling inspection scheme and electronic equipment
By calculating the sample size and probability threshold of the target product, and using a double cycle to generate a secondary sampling inspection scheme, the problem of uneven risk in traditional solutions is solved, and the balanced coverage of the risks of the producer and the receiver under limited samples is achieved.
Patent Information
- Application Number
- CN202311844173.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-07-08
AI Technical Summary
The traditional secondary sampling inspection plan fails to balance the risk probability of the producer and the receiver, and cannot cover all situations. The existing standard multiple sampling inspection plan does not provide a method for formulation.
By obtaining the sample size of the target product, the probability threshold of the producer and the receiver, the received and rejected quantity is calculated using a double cycle, the rejected and received probability is calculated, and stored in the sampling inspection scheme matrix to generate a secondary sampling inspection scheme.
It achieves an effective balance of risks for the producer and receiver under limited samples, covers various sampling inspection situations, and generates appropriate secondary sampling plans.
Smart Images

Figure CN120277313A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of quality inspection, and particularly to a method, device, electronic device, and storage medium for formulating a double sampling inspection plan. Background Art
[0002] When conducting quality inspection on a batch of target products, if the quantity of the batch of target products is large enough, standard single sampling inspection or sequential sampling inspection can be used for product quality inspection; if the quantity of the batch of target products is small, multiple sampling inspection needs to be used for quality inspection, so as to meet the preset inspection quality setting standard under the condition of insufficient sample quantity and as few actual sample inspection quantities as possible.
[0003] However, the traditional multiple sampling inspection plan standards are multiple sampling inspection plans in various typical situations, which cannot cover all situations of multiple sampling inspection, and do not disclose the method for formulating the sampling inspection plan. Moreover, the traditional multiple sampling inspection plan focuses more on the producer, and only considers the risk probability threshold in fewer situations for the receiver. Summary of the Invention
[0004] The main technical problem to be solved by the embodiments of the present application is that the traditional double sampling inspection plan does not balance the risk probabilities of the producer and the receiver and cannot cover all situations of double sampling inspection.
[0005] To solve the above technical problem, the first technical solution adopted by the embodiments of the present application is: to provide a method for formulating a double sampling inspection plan, including: obtaining the sampling sample quantity of the target product, the first nonconforming probability and the first rejection probability threshold associated with the producer, and the second nonconforming probability and the second acceptance probability threshold associated with the receiver; calculating and determining the second acceptance quantity according to a preset second acceptance probability formula, and calculating the second rejection quantity based on the second acceptance quantity; traversing and generating the first acceptance quantity and the first rejection quantity in a double-loop manner, and using the first acceptance quantity and the first rejection quantity through a preset first rejection probability formula and a preset first acceptance probability formula to calculate the corresponding first rejection probability and first acceptance probability respectively; inputting the first rejection probability and the first acceptance probability obtained in each loop into a preset verification formula to obtain the inspection effect value of the sampling plan; storing the inspection effect value, the sampling sample quantity, the first acceptance quantity, the first rejection quantity, the second acceptance quantity, the second rejection quantity, the first rejection probability, and the first acceptance probability into a row vector in a preset sampling inspection plan matrix; when the double loop ends, setting each row vector in the preset sampling inspection plan matrix as a double sampling inspection plan.
[0006] Optionally, the step of calculating and determining the second acceptance quantity according to a preset second acceptance probability formula and calculating the second rejection quantity based on the second acceptance quantity includes: setting the second acceptance quantity to increment from a preset first quantity in steps of a preset second quantity, and using the incremented second acceptance quantity to calculate the second acceptance probability through the preset second acceptance probability formula; if the second acceptance probability is greater than the second acceptance probability threshold, stopping the increment operation of the second acceptance quantity; when the increment of the second acceptance quantity stops, adding a preset third quantity to the corresponding second acceptance quantity to obtain the second rejection quantity.
[0007] Optionally, the second acceptance probability formula is expressed as: where p t represents the second acceptance probability, A2 represents the second acceptance quantity, p1 represents the second non - conformity probability, n represents the sampling sample size, represents the number of combination schemes of selecting i samples from 2n samples.
[0008] Optionally, the preset first rejection probability formula is expressed as:
[0009] , where p a represents the first rejection probability, A1 represents the first acceptance quantity, A2 represents the second acceptance quantity, R1 represents the first rejection quantity, p0 represents the first non - conformity probability, n represents the sampling sample size, represents the number of combination schemes of selecting i samples from n samples, represents the number of combination schemes of selecting j samples from n samples.
[0010] Optionally, the preset first acceptance probability formula is expressed as: where p b represents the first acceptance probability, A1 represents the first acceptance quantity, A2 represents the second acceptance quantity, R1 represents the first rejection quantity, p1 represents the second non - conformity probability, n represents the sampling sample size, represents the number of combination schemes of selecting i samples from n samples, represents the number of combination schemes of selecting j samples from n samples.
[0011] Optionally, the preset verification formula is expressed as: e = max(0, p a -α)+max(0, p b -β), where e represents the test effect value, p a represents the first rejection probability, p bLet \(P\) represent the first acceptance probability, \(\alpha\) represent the first rejection probability threshold, and \(\beta\) represent the second acceptance probability threshold.
[0012] Optionally, after the step of setting each row vector in the preset sampling inspection plan matrix as a double sampling inspection plan, the method further includes: adjusting the first data of each row vector in the sampling inspection plan matrix to the inspection effect value; sorting the sampling inspection plan matrix in ascending order of the inspection effect value; generating a target double sampling inspection plan using the row vector with the smallest inspection effect value.
[0013] To solve the above technical problems, the second technical solution adopted in the embodiments of the present application is: to provide a device for formulating a double sampling inspection plan, including: a data acquisition module, configured to acquire the sampling sample size of a target product, the first nonconforming probability and the first rejection probability threshold associated with the producer, and the second nonconforming probability and the second acceptance probability threshold associated with the receiver; a first data calculation module, configured to calculate and determine the second acceptance quantity according to a preset second acceptance probability formula, and calculate the second rejection quantity based on the second acceptance quantity; a second data calculation module, configured to traverse and generate the first acceptance quantity and the first rejection quantity in a double-loop manner, and calculate the corresponding first rejection probability and the first acceptance probability respectively by using the first acceptance quantity and the first rejection quantity through a preset first rejection probability formula and a preset first acceptance probability formula; a data verification module, configured to input the first rejection probability and the first acceptance probability obtained in each loop into a preset verification formula to obtain the inspection effect value of the sampling plan; a data storage module, configured to store the inspection effect value, the sampling sample size, the first acceptance quantity, the first rejection quantity, the second acceptance quantity, the second rejection quantity, the first rejection probability, and the first acceptance probability into the row vector in a preset sampling inspection plan matrix; a plan generation module, configured to, when the double-loop ends, set each row vector in the preset sampling inspection plan matrix as a double sampling inspection plan.
[0014] To solve the above technical problems, the third technical solution adopted in the embodiments of the present application is: to provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for formulating a double sampling inspection plan as described above.
[0015] To solve the above technical problems, the fourth technical solution adopted in the embodiments of this application is: to provide a non-volatile computer-readable storage medium storing computer-executable instructions, which when executed by an electronic device, cause the electronic device to execute the method for formulating the above-mentioned double sampling inspection plan.
[0016] Different from the related art, the above-mentioned method, device, electronic device and non-volatile computer-readable storage medium for formulating a double sampling inspection plan obtain the sampling sample size of the target product, then calculate and determine the second acceptance number according to the preset second acceptance probability formula, and calculate the second rejection number based on the second acceptance number; traverse to generate the first acceptance number and the first rejection number, and use the first acceptance number and the first rejection number through the preset first rejection probability formula and the preset first acceptance probability formula to calculate the corresponding first rejection probability and the first acceptance probability respectively; verify the first rejection probability and the first acceptance probability through the preset verification formula to obtain the inspection effect value of the sampling plan; store the data associated with the inspection effect value into the row vector in the preset sampling inspection plan matrix; when the double loop ends, set each row vector in the preset sampling inspection plan matrix as a double sampling inspection plan. This method not only generates double sampling inspection plans covering various situations through a double loop, but also effectively balances the risk probabilities of the producer and the receiver. Description of the Drawings
[0017] One or more embodiments are exemplarily illustrated by the corresponding drawings. These exemplary illustrations do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the drawings do not constitute a proportional limitation.
[0018] Figure 1 is a schematic diagram of an application environment of the method for formulating a double sampling inspection plan provided by an embodiment of this application;
[0019] Figure 2 is a flowchart of the method for formulating a double sampling inspection plan provided by an embodiment of this application;
[0020] Figure 3 is a graph of the acceptance probability results obtained by the method for formulating a double sampling inspection plan provided by an embodiment of this application and the simulation method;
[0021] Figure 4 is the simulation result of the average sample number for the actual completion of inspection of various target products by the method for formulating a double sampling inspection plan provided by an embodiment of this application;
[0022] Figure 5It is a schematic structural diagram of a device for formulating a double sampling inspection plan provided by an embodiment of the present application;
[0023] Figure 6 It is a schematic hardware structure diagram of an electronic device for executing the method for formulating a double sampling inspection plan provided by an embodiment of the present application;
[0024] Figure 7 It is a double sampling inspection plan matrix generated during the process of executing the method for formulating a double sampling inspection plan provided by an embodiment of the present application. Detailed implementation manners
[0025] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0026] It should be noted that if there is no conflict, the various features in the embodiments of the present application can be combined with each other, and all are within the protection scope of the present application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different module division from that in the device schematic diagram or a different order from that in the flowchart.
[0027] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific implementation manners and are not used to limit this application.
[0028] When sampling and inspecting a batch of products, if the quantity of this batch of products is large enough, standard single sampling inspection or sequential sampling inspection can be used for product quality inspection. At this time, a qualified sampling inspection plan can ensure that both the risk probability of the product manufacturer and the risk probability of the product receiver are less than their respective risk probability thresholds. However, if the quantity of this batch of products is small and insufficient to support the sample quantity required by standard single sampling inspection or sequential sampling inspection, then multiple sampling inspection needs to be used for product quality inspection at this time, so as to achieve the verification effect that both the risk rates of the manufacturer and the receiver are less than their respective risk thresholds under the condition that the original sample quantity is insufficient and the actual sample inspection quantity is as small as possible. For example, a series of double sampling inspection plans and seven-time sampling inspection plans in the publicly available standard numbered GJB179A-96 can be used for sampling inspection operations when the acceptable quality level of the product is within the applicable range of the foregoing plans.
[0029] Among them, in the aforementioned standard, the counting inspection refers to classifying the unit products into qualified products or unqualified products according to the inspection results in accordance with the requirements specified in the product technical standard. The double sampling inspection plan means: first, extract and inspect the first batch of samples according to the sampling inspection plan, and record the number of unqualified products found. If the number of unqualified products is less than or equal to the first acceptance number, accept this batch of products; if the number of unqualified products is equal to or greater than the first rejection number, reject this batch of products. If the number of unqualified products is greater than the first acceptance number and less than the first rejection number, extract the second batch of samples for inspection, and accumulate the number of unqualified products in the first batch of samples and the second batch of samples. If the accumulated number of unqualified products is less than or equal to the second acceptance number, accept this batch of products; if the accumulated number of unqualified products is equal to or greater than the second rejection number, reject this batch of products.
[0030] However, in a series of publicly available sampling inspection standards, they are multiple sampling inspection plans under various typical circumstances, which cannot cover all situations of sampling inspection, and the formulation methods of the corresponding inspection plans are not publicly available. In addition, since the number of samples available for sampling inspection is insufficient at this time, it is no longer possible to meet the requirement of "the producer's risk probability and the consumer's risk probability are less than their respective risk probability thresholds". Therefore, the aforementioned standard only focuses on the producer or the consumer for discussion. For example, in the standard numbered GJB179A-96, more attention is paid to the producer, and only two situations where the risk probability thresholds are 0.05 and 0.1 are considered for the consumer. All in all, when the actual acceptable quality level of the product is not within the scope of use of the aforementioned standard, or for example, the consumer's risk probability threshold is not 0.05 or 0.1, the aforementioned standard plan cannot be used for sampling inspection operations at this time.
[0031] All in all, when the number of sampling samples is limited and determined, and the risk requirements of both parties (the producer and the consumer) need to be balanced, there is currently a lack of an effective and commonly used method for formulating a counting double sampling inspection plan, and it is difficult to meet the complex and changing requirements of product sampling inspection. The defects existing in the above-mentioned plan are all the results obtained by the applicant through practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by this application for the above problems in the following text should be the contributions made by the applicant to this application during the disclosure process of this application.
[0032] For the convenience of understanding this embodiment, first, a method for formulating a double sampling inspection plan disclosed in the embodiments of this application will be introduced in detail. The execution subject of the method for formulating a double sampling inspection plan provided in the embodiments of this application is generally an electronic device with certain computing capabilities, such as Figure 1 the computer device in, in some possible implementation manners, this method for formulating a double sampling inspection plan can be implemented by a processor invoking computer-readable instructions stored in a memory.
[0033] Among them, Figure 1 the computer device can be, but is not limited to, various personal computers and laptop computers. The computer device can also be a server, which can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. It can be understood that Figure 1 the number of computer devices in [[ ]] is merely illustrative and can be expanded to any number according to actual needs.
[0034] Hereinafter, taking the execution subject as a computer device as an example, the method for formulating the secondary sampling inspection plan provided by the embodiments of the present application will be described.
[0035] In some embodiments, as Figure 2 shown, a method for formulating a secondary sampling inspection plan is provided. Taking the application of this method in the Figure 1 computer device in [[ ]] as an example, the method includes the following steps:
[0036] S11. Obtain the sampling sample size of the target product, the first nonconforming probability and the first rejection probability threshold associated with the producer, and the second nonconforming probability and the second acceptance probability threshold associated with the receiver.
[0037] Specifically, the sampling sample size refers to the sample size extracted from the target product for the first time and the sample size extracted for the second time. In some more specific embodiments, the sample size extracted for the first time is equal to the sample size extracted for the second time. When determining the sampling sample size of the target product, it is required that the sampling plan can make both "the probability of rejecting the target product is less than the first rejection probability threshold" and "the probability of accepting the target product is less than the second acceptance probability threshold" hold simultaneously.
[0038] S12. Calculate and determine the second acceptance quantity according to the preset second acceptance probability formula, and calculate the second rejection quantity based on the second acceptance quantity.
[0039] Specifically, first set the second acceptance quantity to start from a preset first quantity (for example, start from 0) and increment by a preset second quantity (for example, increment by 1 as the step), and calculate the second acceptance probability using the incremented second acceptance quantity through the preset second acceptance probability formula; then, if the calculated second acceptance probability is greater than the second acceptance probability threshold, stop the increment operation of the second acceptance quantity; finally, when the second acceptance quantity stops incrementing, add a preset third quantity (for example, add 1) to the corresponding second acceptance quantity to obtain the second rejection quantity.
[0040] In some other embodiments, the second acceptance probability formula is expressed as:
[0041]
[0042] where p t represents the second acceptance probability, A2 represents the second acceptance quantity, p1 represents the second non - compliance probability, n represents the sampling sample size, represents the number of combination schemes of selecting i samples from 2n samples.
[0043] S13. Traverse to generate the first acceptance quantity and the first rejection quantity in a double - loop manner, and use the preset first rejection probability formula and the preset first acceptance probability formula with the first acceptance quantity and the first rejection quantity to calculate the corresponding first rejection probability and first acceptance probability respectively.
[0044] In some embodiments, the outer loop of the double - loop traverses to generate the first acceptance quantity. Among them, the range of the first acceptance quantity traversed is from 0 to the second acceptance quantity minus 1, and the step size of the first acceptance quantity during traversal is 1. Correspondingly, the inner loop traverses to generate the first rejection quantity. Among them, the range of the first rejection quantity traversed is from the current first acceptance quantity of the outer loop plus 2 to the second acceptance quantity, and the step size of the first rejection quantity during traversal is 1.
[0045] In some embodiments, the preset first rejection probability formula is expressed as:
[0046]
[0047] where p a represents the first rejection probability, A1 represents the first acceptance quantity, A2 represents the second acceptance quantity, R1 represents the first rejection quantity, p0 represents the first non - compliance probability, n represents the sampling sample size, represents the number of combination schemes of selecting i samples from n samples, represents the number of combination schemes of selecting j samples from n samples.
[0048] In some embodiments, the preset first acceptance probability formula is expressed as:
[0049]
[0050] where p b represents the first acceptance probability, A1 represents the first acceptance quantity, A2 represents the second acceptance quantity, R1 represents the first rejection quantity, p1 represents the second non - compliance probability, n represents the sampling sample size, represents the number of combination schemes of selecting i samples from n samples, Represents the number of combination schemes for selecting j samples from n samples.
[0051] S14. Input the first rejection probability and the first acceptance probability obtained in each loop into a preset verification formula to obtain the verification effect value of the sampling plan.
[0052] In some embodiments, the preset verification formula is expressed as:
[0053] e = max(0, p a - α) + max(0, p b - β)
[0054] where e represents the verification effect value, p a represents the first rejection probability, p b represents the first acceptance probability, α represents the first rejection probability threshold, and β represents the second acceptance probability threshold. It should be noted that e reflects the degree to which the current double-sampling inspection plan meets the requirements that "the probability of rejecting the target product is less than the first rejection probability threshold" and "the probability of accepting the target product is less than the second acceptance probability threshold".
[0055] S15. Store the verification effect value, the sampling sample size, the first acceptance quantity, the first rejection quantity, the second acceptance quantity, the second rejection quantity, the first rejection probability, and the first acceptance probability into the row vector in the preset sampling inspection plan matrix.
[0056] In some embodiments, a verification effect threshold range can also be set. If the verification effect value obtained in the current loop is not within the verification effect threshold range, then discard the verification effect value obtained in the current loop and enter the next loop.
[0057] S16. When the double loop ends, set each row vector in the preset sampling inspection plan matrix as a double-sampling inspection plan.
[0058] In some embodiments, after the double loop ends to obtain the sampling inspection plan matrix, adjust the first data of each row vector in the sampling inspection plan matrix to the verification effect value; then, sort the sampling inspection plan matrix in ascending order of the verification effect value; finally, use the row vector with the smallest verification effect value to generate the target double-sampling inspection plan.
[0059] In a more specific example, for a certain batch of target products, the sampling sample size of the target products is 30, the first non-conformance probability associated with the producer is 0.1, the first rejection probability threshold associated with the producer is 0.1, the second non-conformance probability associated with the receiver is 0.2, and the second acceptance probability threshold associated with the receiver is 0.1. If a standard single sampling inspection plan is adopted, 86 samples need to be randomly selected for inspection. When the number of non-conforming products is no more than 12, this batch of products can be accepted; otherwise, this batch of target products will be rejected. However, the number of available samples for inspection cannot exceed 60. Therefore, the method for formulating the aforementioned double sampling inspection plan is applied to obtain a suitable double sampling inspection plan.
[0060] Specifically, after the aforementioned steps, the second acceptance quantity is obtained as 8, and the second rejection quantity is set as 9. Then, a double sampling plan is generated by double-loop traversal and sorted in ascending order according to the inspection effectiveness value, resulting in Figure 7 the double sampling inspection plan matrix shown as follows. From Figure 7 the sampling inspection plan matrix shown, it can be seen that the inspection effectiveness values of the first 4 rows of the matrix do not differ much, and one of them can be selected as the final double sampling inspection plan for the target products. If the first row is adopted as the final double sampling inspection plan, the first rejection probability of the producer is 0.142, and the first acceptance probability of the receiver is 0.127, which is relatively close to the risk requirements of the producer and the receiver.
[0061] It should be specifically noted that when the aforementioned obtained double sampling inspection plan is applied, the acceptance probability of any target product can be accurately calculated. A simulation can be established to simulate the acceptance probability results of the double sampling inspection plan for any target product. Figure 3 is the acceptance probability result graph obtained by using the simulation method and the method for formulating the double sampling inspection plan proposed in this application within the range of the product non-conformance rate (0, 0.3). From Figure 3 it can be seen that the results of the two are almost the same. Figure 4 is the simulation result of the average sample quantity actually completed for various target products by applying the method for formulating the double sampling inspection plan proposed in this application. When the non-conformance rate of the target products deviates further from 0.1 or 0.2, the actual number of samples inspected is less. In some cases, it may be possible to obtain an acceptance or rejection conclusion by using 30 product samples, which also achieves the purpose of reducing the inspection workload.
[0062] The method for formulating a double sampling inspection plan provided by the embodiment of the present application obtains the sampling sample size of the target product, then calculates and determines the second acceptance number according to a preset second acceptance probability formula, and calculates the second rejection number based on the second acceptance number; traverses and generates the first acceptance number and the first rejection number, and uses the first acceptance number and the first rejection number through a preset first rejection probability formula and a preset first acceptance probability formula to calculate the corresponding first rejection probability and first acceptance probability respectively; checks the first rejection probability and the first acceptance probability through a preset check formula to obtain the inspection effect value of the sampling plan; stores the data associated with the inspection effect value into the row vector in a preset sampling inspection plan matrix; when the double loop ends, sets each row vector in the preset sampling inspection plan matrix as a double sampling inspection plan. It not only generates double sampling inspection plans covering various situations through a double loop method, but also effectively balances the risk probabilities of the producer and the receiver.
[0063] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0064] In some embodiments, a device for formulating a double sampling inspection plan is provided. The device for formulating a double sampling inspection plan corresponds one-to-one to the method for formulating a double sampling inspection plan in the above embodiments. As Figure 5 shown, the device for formulating a double sampling inspection plan includes a data acquisition module 51, a first data calculation module 52, a second data calculation module 53, a second data calculation module 54, a data storage module 55, and a plan generation module 56. The detailed description of each functional module is as follows:
[0065] The data acquisition module 51 is configured to acquire the sampling sample size of the target product, the first nonconforming probability and the first rejection probability threshold associated with the producer, and the second nonconforming probability and the second acceptance probability threshold associated with the receiver;
[0066] The first data calculation module 52 is configured to calculate and determine the second acceptance number according to a preset second acceptance probability formula, and calculate the second rejection number based on the second acceptance number;
[0067] The second data calculation module 53 is configured to traverse and generate the first acceptance number and the first rejection number in a double loop manner, and use the first acceptance number and the first rejection number through a preset first rejection probability formula and a preset first acceptance probability formula to calculate the corresponding first rejection probability and first acceptance probability respectively;
[0068] A data verification module 54, configured to input the first rejection probability and the first acceptance probability obtained in each loop into a preset verification formula to obtain a test effect value of the sampling plan;
[0069] A data storage module 55, configured to store the test effect value, the sampling sample size, the first acceptance quantity, the first rejection quantity, the second acceptance quantity, the second rejection quantity, the first rejection probability, and the first acceptance probability into a row vector in a preset sampling inspection plan matrix;
[0070] A plan generation module 56, configured to, when the double loop ends, set each row vector in the preset sampling inspection plan matrix as a double sampling inspection plan.
[0071] In some embodiments, the first data calculation module 52 is specifically configured to set the second acceptance quantity to increment from a preset first quantity with a preset second quantity as a step size, and use the incremented second acceptance quantity to calculate a second acceptance probability through a preset second acceptance probability formula; if the second acceptance probability is greater than the second acceptance probability threshold, then stop the increment operation of the second acceptance quantity; when the increment of the second acceptance quantity stops, add a preset third quantity to the corresponding second acceptance quantity to obtain the second rejection quantity.
[0072] In some embodiments, the second acceptance probability formula in the first data calculation module 52 is expressed as:
[0073]
[0074] where p t represents the second acceptance probability, A2 represents the second acceptance quantity, p1 represents the second nonconforming probability, n represents the sampling sample size, represents the number of combination schemes of selecting i samples from 2n samples.
[0075] In some embodiments, the preset first rejection probability formula in the second data calculation module 53 is expressed as:
[0076]
[0077] where p a represents the first rejection probability, A1 represents the first acceptance quantity, A2 represents the second acceptance quantity, R1 represents the first rejection quantity, p0 represents the first nonconforming probability, n represents the sampling sample size, represents the number of combination schemes of selecting i samples from n samples, represents the number of combination schemes of selecting j samples from n samples.
[0078] In some embodiments, the preset first reception probability formula in the second data calculation module 53 is expressed as:
[0079]
[0080] where p b represents the first reception probability, A1 represents the first received quantity, A2 represents the second received quantity, R1 represents the first rejected quantity, p1 represents the second non - compliance probability, n represents the sampling sample size, represents the number of combination schemes for selecting i samples from n samples, represents the number of combination schemes for selecting j samples from n samples.
[0081] In some embodiments, the preset verification formula in the data verification module 54 is expressed as:
[0082] e = max(0, p a - α)+max(0, p b - β)
[0083] where e represents the inspection effect value, p a represents the first rejection probability, p b represents the first reception probability, α represents the first rejection probability threshold, and β represents the second reception probability threshold.
[0084] In some embodiments, the scheme generation module 56 further includes:
[0085] A row vector adjustment sub - module, configured to adjust the first data of each row vector in the sampling inspection scheme matrix to the inspection effect value;
[0086] A row vector sorting sub - module, configured to sort the sampling inspection scheme matrix in ascending order of the inspection effect value;
[0087] An optimal scheme generation sub - module, configured to generate a target double - sampling inspection scheme using the row vector with the smallest inspection effect value.
[0088] It should be noted that the above - mentioned apparatus for formulating a double - sampling inspection scheme can execute the method for formulating a double - sampling inspection scheme provided in the embodiments of the present application, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in the embodiments of the apparatus for formulating a double - sampling inspection scheme can be referred to the method for formulating a double - sampling inspection scheme provided in the embodiments of the present application.
[0089] Figure 6FIG. 600 is a schematic hardware structure diagram of an electronic device for implementing the method for formulating a double sampling inspection plan provided by an embodiment of the present application. The electronic device may specifically be the above-mentioned computer device, such as Figure 6 As shown, the electronic device 600 includes:
[0090] One or more processors 610 and a memory 620. Figure 6 Here, one processor 610 is taken as an example.
[0091] The processor 610 and the memory 620 may be connected through a bus or other means. Figure 6 Here, connection through a bus is taken as an example.
[0092] The memory 620, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the method for formulating a double sampling inspection plan in the embodiment of the present application. By running the non-volatile software programs, instructions, and modules stored in the memory 620, the processor 610 executes various functional applications and data processing of the electronic device, that is, implements the method for formulating a double sampling inspection plan in the above method embodiment.
[0093] The memory 620 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the device for formulating a double sampling inspection plan, etc. In addition, the memory 620 may include a high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 620 may optionally include a memory remotely provided with respect to the processor 610, and these remote memories may be connected to the device for formulating a double sampling inspection plan through a network. Examples of the above network include but are not limited to the Internet, an enterprise internal network, a local area network, a mobile communication network, and combinations thereof.
[0094] The one or more modules are stored in the memory 620 and, when executed by the one or more processors 610, execute the method for formulating a double sampling inspection plan in any of the above method embodiments. For example, execute the method steps S11 to S16 described above, and implement Figure 2 the functions of the modules 51-56 in Figure 5
[0095] The above product can execute the method provided by the embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present application.
[0096] An embodiment of the present application provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, for example Figure 6 by one of the processors 610 in [reference], the above one or more processors can execute the method for formulating the secondary sampling inspection plan in any of the above method embodiments. For example, execute the method steps S11 to S16 described above Figure 2 in [reference] to implement Figure 5 the functions of the modules 51-56 in [reference].
[0097] An embodiment of the present application provides a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by the electronic device, the electronic device can execute the method for formulating the secondary sampling inspection plan in any of the above method embodiments. For example, execute the method steps S101 to S104 described above Figure 1 in [reference], Figure 3 the method steps S101 to S105 in [reference] to implement Figure 4 the functions of the modules 21-25 in [reference].
[0098] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0099] Through the description of the above embodiments, those of ordinary skill in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course also by hardware. Those of ordinary skill in the art can understand that all or part of the processes of implementing the above embodiment methods can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM), etc.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; under the idea of the present application, the technical features in the above embodiments or different embodiments can also be combined, and the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above. For the sake of brevity, they are not provided in detail; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for formulating a double sampling inspection plan, characterized in that, Including: Obtain the sampling sample size of the target product, the first nonconformance probability and the first rejection probability threshold associated with the producer, and the second nonconformance probability and the second acceptance probability threshold associated with the receiver; Calculate and determine the second acceptance quantity according to a preset second acceptance probability formula, and calculate the second rejection quantity based on the second acceptance quantity; Traverse and generate the first acceptance quantity and the first rejection quantity in a double-loop manner, and use the first acceptance quantity and the first rejection quantity through a preset first rejection probability formula and a preset first acceptance probability formula to calculate the corresponding first rejection probability and first acceptance probability respectively; Input the first rejection probability and the first acceptance probability obtained in each loop into a preset verification formula to obtain the inspection effect value of the sampling plan; Store the inspection effect value, the sampling sample size, the first acceptance quantity, the first rejection quantity, the second acceptance quantity, the second rejection quantity, the first rejection probability and the first acceptance probability into a row vector in a preset sampling inspection plan matrix; When the double-loop ends, set each row vector in the preset sampling inspection plan matrix as a double sampling inspection plan.
2. The method for formulating the secondary sampling inspection plan according to claim 1, wherein The step of calculating and determining the second acceptance quantity according to a preset second acceptance probability formula and calculating the second rejection quantity based on the second acceptance quantity includes: Set the second acceptance quantity to increment starting from a preset first quantity with a preset second quantity as the step size, and calculate the second acceptance probability using the incremented second acceptance quantity through the preset second acceptance probability formula; If the second acceptance probability is greater than the second acceptance probability threshold, stop the increment operation of the second acceptance quantity; When the increment of the second acceptance quantity stops, add a preset third quantity to the corresponding second acceptance quantity to obtain the second rejection quantity.
3. The method for formulating the secondary sampling inspection plan according to claim 1, wherein The second acceptance probability formula is expressed as: where p t represents the second reception probability, A2 represents the second received quantity, p1 represents the second non-conformance probability, and n represents the sampling sample size. represents the number of combination schemes for selecting i samples from 2n samples.
4. The method for formulating the secondary sampling inspection plan according to claim 1, characterized in that, The preset first rejection probability formula is expressed as: Among them, p a represents the first rejection probability, A1 represents the first acceptance quantity, A2 represents the second acceptance quantity, R1 represents the first rejection quantity, p0 represents the first nonconforming probability, n represents the sampling sample size, represents the number of combination schemes for selecting i samples from n samples, represents the number of combination schemes for selecting j samples from n samples.
5. The method for formulating the secondary sampling inspection plan according to claim 1, wherein The preset first acceptance probability formula is expressed as: Among them, p b represents the first reception probability, A1 represents the first received quantity, A2 represents the second received quantity, R1 represents the first rejected quantity, p1 represents the second nonconforming probability, n represents the sampling sample size, represents the number of combination schemes for selecting i samples from n samples, represents the number of combination schemes for selecting j samples from n samples.
6. The method for formulating the secondary sampling inspection plan according to claim 1, characterized in that The preset verification formula is expressed as: e = max(0, p a - α) + max(0, p b - β) Among them, e represents the inspection effect value, p a represents the first rejection probability, p b represents the first acceptance probability, α represents the first rejection probability threshold, and β represents the second acceptance probability threshold.
7. The method for formulating the secondary sampling inspection plan according to claim 1, characterized in that, After the step of setting each row vector in the preset sampling inspection plan matrix as a double sampling inspection plan, further includes: Adjust the first data of each row vector in the sampling inspection plan matrix to the inspection effect value; Sort the sampling inspection plan matrix in ascending order of the inspection effect value; Generate a target double sampling inspection plan using the row vector with the smallest inspection effect value.
8. An apparatus for formulating a double sampling inspection plan, characterized in that, Including: A data acquisition module for obtaining the sampling sample size of the target product, the first nonconformance probability and the first rejection probability threshold associated with the producer, and the second nonconformance probability and the second acceptance probability threshold associated with the receiver; A first data calculation module for calculating and determining the second acceptance quantity according to a preset second acceptance probability formula and calculating the second rejection quantity based on the second acceptance quantity; The second data calculation module is configured to traverse and generate the first acceptance quantity and the first rejection quantity in a double-loop manner, and calculate the corresponding first rejection probability and the first acceptance probability respectively by using the preset first rejection probability formula and the preset first acceptance probability formula with the first acceptance quantity and the first rejection quantity; The data verification module is configured to input the first rejection probability and the first acceptance probability obtained in each loop into a preset verification formula to obtain the inspection effect value of the sampling plan; The data storage module is configured to store the inspection effect value, the sampling sample size, the first acceptance quantity, the first rejection quantity, the second acceptance quantity, the second rejection quantity, the first rejection probability and the first acceptance probability into the row vector in a preset sampling inspection plan matrix; The plan generation module is configured to, when the double-loop ends, set each row vector in the preset sampling inspection plan matrix as a double sampling inspection plan.
9. An electronic device, characterized in that, Comprising: At least one processor; And, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-7.
10. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by an electronic device, the electronic device executes the method according to any one of claims 1-7.
Citation Information
Patent Citations
Grouping sequential test method for exponential life type product
CN114969658A
Sequence and failure type grouping sequential test method
CN115114579A
Method, apparatus and device for performing sampling inspection on data, and storage medium
WO2022151590A1