A method for constructing a sequential sampling inspection model based on prior information
By constructing a sequential sampling inspection model based on prior information, the problem of deviation in sampling inspection results in the prior art is solved, and more efficient and accurate sampling inspection is achieved, and the cost is reduced.
Patent Information
- Application Number
- CN202510057496.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-01-14
AI Technical Summary
The existing sequential sampling inspection model ignores a priori information, resulting in a large deviation from the actual situation, poor accuracy, and increased time and economic costs.
Build a sequential sampling inspection model based on prior information, establish an impact relationship by determining the inspection target and prior information, setting the sampling quantity, frequency and error range, grouping data using data mining technology, setting qualified critical values, and optimizing sampling strategies to improve accuracy and efficiency.
On the premise of meeting the predetermined accuracy requirements, the efficiency and accuracy of sampling inspection are significantly improved, and the sample size and time cost are reduced.
Smart Images

Figure CN119849981B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of sequential sampling test model construction, and specifically relates to a method for constructing a sequential sampling test model based on prior information. Background Art
[0002] In the fields of industrial production, quality control, etc., sampling inspection is an important means to ensure product quality. Sequential sampling inspection is one of the more common inspection methods among sampling inspection methods. Sequential sampling inspection, also known as successive sampling inspection or continuous sampling inspection, is a statistical sampling method used for sampling inspection without predetermining the total number of samples. Its basic idea is a method that does not specify the total number of samples in advance, but only takes one or a group of samples each time, and decides whether to continue sampling or stop sampling based on the probability of the previous n test results. This method can dynamically adjust the number of samples according to the actual situation, thereby minimizing the number of samples while ensuring the accuracy of the inspection, improving inspection efficiency, and reducing the amount of test samples and test time.
[0003] However, most current sequential sampling test models often ignore the guidance and influence of prior information on the test objectives, resulting in the blindness of the sequential sampling test models during the sampling process. This leads to a large deviation between the sampling test results and the actual situation, resulting in poor accuracy. At the same time, a larger sample size is required to achieve the expected test accuracy during the sampling process, which increases the time and economic costs of the test and reduces the test efficiency. Therefore, a method for constructing a sequential sampling test model based on prior information is urgently needed to improve the efficiency and accuracy of sampling tests. Summary of the Invention
[0004] The present application provides a method for constructing a sequential sampling inspection model based on prior information, aiming to solve the problems in the prior art of large deviations between sampling inspection results and actual conditions, poor accuracy and reduced inspection efficiency.
[0005] The method comprises:
[0006] S1: Determine the inspection objectives and prior information of the product;
[0007] S2: Construct and optimize the sequential sampling test model, establish the influence relationship between the test target and prior information based on the sequential sampling test model, and obtain the prior information variable X;
[0008] The specific steps of S2 are as follows:
[0009] S2.1: Data processing: pre-processing and integration of collected prior information data;
[0010] S2.2: Model Construction: Select the sequential probability ratio test method and statistical model to construct the sequential sampling test model;
[0011] S2.3: Set parameters: Based on the historical test data in the prior information, set the preliminary sampling number, sampling frequency, sampling error range and regression coefficient for the sequential sampling test model, and convert the statistical model into a specific algorithm;
[0012] S2.4: Optimization model: The production parameters and material properties of the product in the prior information are used as simulation data input. The prior information is processed and analyzed through the sequential sampling inspection model to obtain the inspection target prediction results;
[0013] S2.5: Use data mining techniques to divide a large amount of prior information data into n groups, so that the similarity of data points in the same category is high and the similarity of data points between different groups is low, thus obtaining n groups of prior information variables X;
[0014] S3: Based on the prior information variable X in S2, the impact degree Y of the prior information on the inspection target is analyzed, and the qualified critical value H is preset; the impact degree Y is used to represent a certain quality characteristic of the product;
[0015] The S3 specifically includes the following steps:
[0016] S3.1: Quantify the influence Y of the grouped prior information on the test target based on statistical analysis techniques to determine the relationship between the prior information and the test target and provide a basis for the subsequent critical value.
[0017] The calculation formula for the impact degree Y is: ,
[0018] in, is the regression coefficient, is n sets of prior information;
[0019] S3.2: Based on the prior information of the product, set a priori qualified critical value H and input it into the sequential sampling inspection model;
[0020] S4: Incorporate prior information and qualified critical value H into the sequential sampling test model to determine the sampling strategy;
[0021] S5: Obtain relevant information of the product to be tested and perform sampling operations based on the sequential sampling inspection model;
[0022] S6: Determine the termination condition according to the impact degree Y of the product to be tested; the termination condition is that the impact degree Y ≥ the qualified critical value H.
[0023] Optionally, the prior information includes historical inspection data, production parameters, and material properties of the product.
[0024] Optionally, the preprocessing requires cleaning and testing the data, identifying and processing missing values and duplicate values in the prior information data, and processing the prior information data.
[0025] Optionally, the sampling strategy includes setting parameters of sampling quantity, sampling interval and updating frequency of prior information.
[0026] Optionally, if the impact degree Y ≥ the qualified critical value H, it means that the product meets the quality standards, that is, the product is qualified; if the impact degree Y < the qualified critical value H, it means that the product does not meet the quality standards, that is, the product is unqualified.
[0027] Compared with the prior art, this application has at least the following beneficial effects:
[0028] This application, based on further analysis and research of existing technical issues, improves the computational accuracy of sequential sampling inspection models by incorporating prior information into them. Prior information effectively leverages previously accumulated data and experience, laying a solid foundation for the subsequent sampling process. Combined with sequential sampling, the sampling strategy is adjusted to achieve higher inspection standards with fewer samples while still meeting predetermined accuracy requirements, significantly improving the efficiency and accuracy of sampling inspections. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A flowchart of a method for constructing a sequential sampling inspection model based on prior information provided in one embodiment of the present application; DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solutions and advantages of this application more clear, this application is further described in detail below with reference to the accompanying drawings and embodiments.
[0031] like Figure 1 As shown, the present application provides a method for constructing a sequential sampling inspection model based on prior information, comprising the following steps:
[0032] S1: Determine the inspection objectives and prior information for the product; inspection objectives include the product's failure rate and quality characteristics; prior information includes the product's historical inspection data, production parameters, and material characteristics, which helps understand the distribution of product quality and influencing factors;
[0033] S2: Construct and optimize the sequential sampling test model, establish the influence relationship between the test target and prior information based on the sequential sampling test model, and obtain the prior information variable X;
[0034] The specific steps of S2 are as follows:
[0035] S2.1: Data processing: pre-processing and integration of collected prior information data;
[0036] During preprocessing, the data needs to be cleaned and tested to identify missing and duplicate values in the prior information data and process the prior information data. For example, the fillna() function of the Pandas library can be used to fill missing values, and the drop_duplicates() function of the Pandas library can be used to remove duplicate values.
[0037] The preprocessed prior information data is normalized using standardization tools, and data from different data sources are integrated to form a unified and complete data set.
[0038] S2.2: Model construction: Select the sequential probability ratio test (SPRT) method and statistical model to construct a sequential sampling inspection model; so that the model can calculate and describe the product's non-conforming rate and quality characteristics.
[0039] S2.3: Set parameters: Based on the historical test data in the prior information, set the preliminary sampling quantity, sampling frequency, sampling error range and regression coefficient for the sequential sampling inspection model, and convert the statistical model into a specific algorithm to facilitate calculation and judgment in the actual sampling inspection process.
[0040] S2.4: Optimization model: The production parameters and material properties of the products in the prior information are used as simulation data input, and the prior information is processed and analyzed through the sequential sampling inspection model to obtain the inspection target prediction results; by comparing and analyzing the relationship between the historical inspection data of the products in the prior information and the inspection target prediction results, the accuracy, sensitivity and specificity indicators of the model are evaluated to avoid deviations or deficiencies in the sequential sampling inspection model and complete the optimization process.
[0041] S2.5: Use data mining techniques to divide a large amount of prior information data into n groups (n = 1, 2, 3, ... n), such that data points within the same category have high similarity and data points between different groups have low similarity, resulting in n groups of prior information variables X. This facilitates the identification of data clusters related to the test target, thereby discovering potential patterns or trends.
[0042] S3: Based on the prior information variable X in S2, the impact degree Y of the prior information on the inspection target is analyzed, and the qualified critical value H is preset; the impact degree Y is used to represent a certain quality characteristic of the product.
[0043] The impact degree Y is used to describe the probability of defective products in product quality. As the decision-making basis of the sequential sampling inspection model, the impact degree Y can minimize the inspection cost while ensuring the accuracy of the inspection.
[0044] S3 specifically includes the following steps:
[0045] S3.1: Quantify the influence Y of the grouped prior information on the test target based on statistical analysis techniques to determine the relationship between the prior information and the test target and provide a basis for the subsequent critical value.
[0046] The calculation formula for the impact degree Y is: ,
[0047] in, is the regression coefficient, is n sets of prior information.
[0048] S3.2: Based on the product's prior information, set a priori acceptance threshold, H, and input it into the sequential sampling inspection model. This threshold, H, serves as the benchmark for determining product conformance. Before setting it, consider multiple factors, including product quality volatility, production costs, and customer demand. This ensures that the threshold is neither too lenient, resulting in inferior products entering the market, nor too strict, resulting in unnecessary waste.
[0049] S4: Incorporate prior information and the qualified critical value H into the sequential sampling test model to determine the sampling strategy.
[0050] The sampling strategy includes the setting of parameters such as the number of samples, sampling interval, and the frequency of updating prior information. During the sampling process, the prior information is updated in real time, and the sampling strategy is dynamically adjusted based on the updated prior information to ensure the representativeness and effectiveness of the sampling results.
[0051] The sample size is one of the core parameters in a sampling strategy, directly impacting statistical power. A sufficient sample size can improve statistical power and reduce the risk of failing to detect an actual effect. It is also closely related to sampling error. An appropriate sample size can keep sampling error within acceptable limits.
[0052] A reasonable sampling interval can avoid data redundancy and duplication, and improve data utilization efficiency. Too short a sampling interval may lead to high correlation between data, increasing the complexity of analysis; while too long a sampling interval may miss important information.
[0053] The sampling interval needs to be set based on the speed of data change. For rapidly changing data, a shorter sampling interval is required to capture the changing trend of the data; for slowly changing data, the sampling interval can be appropriately extended.
[0054] The update frequency of prior information should reflect the timeliness of the data. In a rapidly changing environment, prior information needs to be updated frequently to maintain its accuracy and effectiveness; in a stable environment, the update frequency can be appropriately reduced.
[0055] S5: Obtain relevant information of the products to be inspected and perform sampling based on the sequential sampling inspection model. The relevant information includes the volume, production parameters, and material characteristics of each product to be inspected.
[0056] During sampling, a certain number of samples are randomly selected from the products to be tested for testing. The testing process should strictly follow the methods and standards of the sequential sampling inspection model to ensure the accuracy of the test results.
[0057] S6: Determine the termination condition based on the impact degree Y of the product to be tested. The termination condition is that the impact degree Y ≥ the qualified critical value H.
[0058] If the impact degree Y ≥ the qualified critical value H, it means that the product meets the quality standards, that is, the product is qualified, and sampling is terminated, minimizing the number of samples while ensuring accuracy; if the impact degree Y < the qualified critical value H, it means that the product does not meet the quality standards, that is, the product is unqualified, and subsequent sampling is continued, and sampling is stopped when the requirements are met.
[0059] The data mining technology in step S2.4 generally refers to a clustering algorithm and is not limited to the K-means algorithm. For example, it can be a hierarchical clustering algorithm.
[0060] The aforementioned method for constructing a sequential sampling inspection model based on prior information improves the computational accuracy of the model by incorporating prior information into the model. Prior information effectively leverages previously accumulated data and experience, laying a solid foundation for the subsequent sampling process. Combined with sequential sampling, the sampling strategy is adjusted to achieve higher inspection standards with fewer samples while still meeting predetermined accuracy requirements, significantly improving the efficiency and accuracy of sampling inspections.
[0061] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A method for constructing a sequential sampling inspection model based on prior information, characterized in that: The method comprises: S1: Determine the inspection objectives and prior information of the product; S2: Construct and optimize the sequential sampling test model, establish the influence relationship between the test target and prior information based on the sequential sampling test model, and obtain the prior information variable X; The specific steps of S2 are as follows: S2.1: Data processing: pre-processing and integration of collected prior information data; S2.2: Model Construction: Select the sequential probability ratio test method and statistical model to construct the sequential sampling test model; S2.3: Set parameters: Based on the historical test data in the prior information, set the preliminary sampling number, sampling frequency, sampling error range and regression coefficient for the sequential sampling test model, and convert the statistical model into a specific algorithm; S2.4: Optimization model: The production parameters and material properties of the product in the prior information are used as simulation data input. The prior information is processed and analyzed through the sequential sampling inspection model to obtain the inspection target prediction results; S2.5: Use data mining techniques to divide a large amount of prior information data into n groups, so that the similarity of data points in the same category is high and the similarity of data points between different groups is low, thus obtaining n groups of prior information variables X; S3: Based on the prior information variable X in S2, the impact degree Y of the prior information on the inspection target is analyzed, and the qualified critical value H is preset; the impact degree Y is used to represent a certain quality characteristic of the product; The S3 specifically includes the following steps: S3.1: Quantify the influence Y of the grouped prior information on the test target based on statistical analysis techniques to determine the relationship between the prior information and the test target and provide a basis for the subsequent critical value. The calculation formula for the impact degree Y is: , in, is the regression coefficient, is n sets of prior information; S3.2: Based on the prior information of the product, set a priori qualified critical value H and input it into the sequential sampling inspection model; S4: Incorporate prior information and qualified critical value H into the sequential sampling test model to determine the sampling strategy; S5: Obtain relevant information of the product to be tested and perform sampling operations based on the sequential sampling inspection model; S6: Determine the termination condition according to the impact degree Y of the product to be tested; the termination condition is that the impact degree Y ≥ the qualified critical value H.
2. The method for constructing a sequential sampling inspection model based on prior information according to claim 1, characterized in that: The prior information includes historical test data, production parameters and material properties of the product.
3. The method for constructing a sequential sampling inspection model based on prior information according to claim 1, characterized in that: The preprocessing requires cleaning and testing the data, identifying and processing missing values and duplicate values in the prior information data, and processing the prior information data.
4. The method for constructing a sequential sampling inspection model based on prior information according to claim 1, characterized in that: The sampling strategy includes the setting of sampling quantity, sampling interval and updating frequency parameters of prior information.
5. The method for constructing a sequential sampling inspection model based on prior information according to claim 1, characterized in that: If the impact degree Y ≥ the qualified critical value H, it means that the product meets the quality standards, that is, the product is qualified; if the impact degree Y < the qualified critical value H, it means that the product does not meet the quality standards, that is, the product is unqualified.
Citation Information
Patent Citations
Index verification method capable of reducing test sample size
CN106407159A
Commodity qualification sampling inspection method and system based on prior information
CN117634988A