A system and method for product quality tracing
Data is collected and parsed through AOI devices, anomaly detection model is established, and ES clusters are used to optimize storage and retrieval, which solves the problems of low traceability efficiency and improper resource management in traditional quality control, and realizes efficient and accurate quality traceability and early warning, which improves the Production line response speed and flexibility.
Patent Information
- Application Number
- CN202411057415.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-08-02
AI Technical Summary
Traditional quality control methods are difficult to achieve fast and accurate quality traceability in efficient automation and large-scale production environments. The existing anomaly detection mechanism has limited ability to identify complex and new defects. The lack of intelligent management of data storage and access resource allocation, resulting in information Isles and waste of resources.
Collect product quality detection data through AOI devices, parse and extract metadata, establish an abnormal detection model, use ES cluster to associate storage and optimize data importance and node performance, realize efficient storage and rapid retrieval, and provide defect analysis and early warning functions.
It realizes the full-chain traceability from raw materials to finished products, improves the accuracy of the test results, reduces false alarms and missed reports, optimizes data storage and retrieval efficiency, timely identify defects and triggers early warnings, helps enterprises prevent quality problems and reduces the risk of Yield rate.
Smart Images

Figure CN118569744B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information management technology, and in particular to a system and method for product quality tracing. Background Art
[0002] With the rapid development of the manufacturing industry and increasingly fierce market competition, product quality control has become one of the key factors for the survival and development of enterprises. Traditional quality control methods rely on manual inspection and paper records, which are not only inefficient but also difficult to achieve fast and accurate quality traceability, especially in highly automated and large-scale production environments. The rise of automated optical inspection (AOI) technology has provided the manufacturing industry with a powerful online quality monitoring method that can capture defect information in the production process in real time, significantly improving detection efficiency and accuracy.
[0003] However, the amount of data generated by AOI equipment is huge and complex, including images, video streams, and multi-dimensional detection parameters. Traditional data management systems often have difficulty in efficiently storing, processing, and analyzing these data, resulting in information islands, weak information integration capabilities, and difficulty in achieving deep data mining and value maximization. Although AOI can initially screen out possible defects, how to quickly build an accurate anomaly detection model based on these data and provide real-time feedback on the detection results is a major challenge currently faced. Existing anomaly detection mechanisms often rely on fixed rules or simple threshold judgments, and have limited ability to identify complex and new defects, which are prone to false positives or omissions. Resource allocation often lacks intelligent management during data storage and access. Storage resources are not optimally configured based on the importance and access frequency of data, resulting in the possibility that high-value data may be lost due to storage limitations, or low-value data may occupy too many resources, affecting system efficiency. When faced with quality issues, existing early warning systems often react slowly and lack the ability to accurately predict defect trends and quickly identify new defect types. Summary of the invention
[0004] Based on the above problems, the present application provides a system and method for product quality traceability, which integrates data from the entire chain from raw materials to finished products, uses advanced technologies such as machine learning to establish an accurate anomaly detection model, and intelligently allocates storage resources based on data importance and node performance to achieve efficient data storage and rapid retrieval. At the same time, it provides defect analysis and early warning functions to provide strong decision-making support for enterprises.
[0005] The purpose of this application is achieved by the following technical solutions:
[0006] The present application provides a method for product quality tracing, the method comprising:
[0007] Collect file data during product quality inspection through AOI equipment; parse the file data to extract key metadata information;
[0008] Determine the detection results through real-time data and anomaly detection models; determine the data importance score based on the anomaly detection model;
[0009] Establish accurate mapping between production batches, product data time, and AOI equipment numbers; associate and store the parsed metadata with the original file data and test results through the ES cluster; store the data based on data importance scores and node scores;
[0010] In response to the product data time, production batch and / or AOI equipment number of the retrieval interface, the inspection image, metadata and defect statistics corresponding to the data time, production batch and / or AOI equipment number are returned; quality backtracking of defect images of unqualified products is performed based on the statistical results;
[0011] Analyze and count defects, and issue early warning prompts based on the analysis and statistical results.
[0012] Preferably, before collecting the file data in the product quality inspection process by the AOI equipment; the method further comprises:
[0013] Integrate and record each product’s raw material source, batch number, supplier information, and component pre-test data.
[0014] Preferably, the method of collecting file data in the product quality inspection process by AOI equipment; parsing the file data to extract key metadata information includes:
[0015] For each detected component, product or assembly, collect its model, location, orientation and number of solder joints;
[0016] Acquire images and / or video streams of components, products or assemblies;
[0017] Record the production parameters related to the test; the production parameters include but are not limited to printing parameters, mounting parameters and reflow soldering temperature curve;
[0018] Record the inspection time and production batch of each component, product or assembly;
[0019] Record the environmental conditions during the test, including light intensity, temperature and humidity;
[0020] Identify key metadata through historical data and / or knowledge base;
[0021] The file data is parsed to extract key metadata information.
[0022] Preferably, the method of determining the detection result by using real-time data and anomaly detection model comprises:
[0023] Build anomaly detection models using raw file data and key metadata;
[0024] Determine the detection results through real-time data and anomaly detection models.
[0025] Preferably, the method of establishing an anomaly detection model through original file data and key metadata; and determining the importance of data according to the anomaly detection model comprises:
[0026] Classify known anomalies to obtain multiple anomaly categories;
[0027] For different anomaly categories, anomaly detection models are established respectively; a first score of each parameter is obtained through the anomaly detection model; the first score may be a weight of the parameter obtained through the model;
[0028] Obtaining an importance score of the parameter according to first scores of the parameter obtained by the multiple anomaly detection models;
[0029] The importance scores are:
[0030]
[0031] in, Score the importance of the kth parameter; is the first score obtained by the kth parameter through the jth anomaly detection model; u is the number of anomaly detection models that use the kth parameter; is the maximum value of the first score obtained by the kth parameter through u anomaly detection models, is the first weight coefficient.
[0032] Preferably, the process of establishing an accurate mapping between the production batch and the product data time and the AOI equipment number; associating and storing the parsed metadata with the original file data through the ES cluster includes:
[0033] Define the index field type and establish accurate mapping between production batch and product data time and AOI equipment number;
[0034] Determine the number of primary shards for the index based on the known or estimated total data volume;
[0035] Determine the maximum number of shards for the index based on the number of computing nodes and the computing resources of each node, and perform tests to verify it.
[0036]
[0037] in, is the maximum number of shards of the index; Ecc is the total number of effective CPU cores of computing resources; Emg is the total effective memory of computing resources; Egb is the total effective disk space of computing resources; CPU requirements for a single shard, is the memory requirement for a single shard, is the disk requirement for a single shard; min() is the minimum value;
[0038] Determine the number of secondary shards based on the number of primary shards, maximum number of shards, data query volume, and latency requirements for the index;
[0039] The parsed metadata is associated with the original file data and stored through the ES cluster.
[0040] Preferably, storing the data based on the data importance score and the node score comprises:
[0041] Obtain node scores based on the continuous operation time, failure rate, and response time of the nodes within a preset time period; and sort the node scores first;
[0042] Cluster the parameters according to the degree of association to obtain the first classification;
[0043] Obtain a comprehensive score for the first category based on the parameter importance scores in the first category and the access frequency within a preset time period;
[0044] The second ranking of the first category is obtained according to the comprehensive score;
[0045] According to the second sorting, the node at the front of the first sorting is preferentially selected as the main storage node corresponding to the second sorting data.
[0046] Preferably, the performing of statistical analysis on the defects and issuing of early warning prompts according to the statistical analysis results include:
[0047] If the defect rate of any defect type in any batch, any time period or any equipment is greater than the preset threshold, an early warning will be issued;
[0048] If the total defect rate of any batch, any time period or any equipment is greater than the preset threshold, an early warning will be issued;
[0049] If a new defect type appears in any batch, any time period or any equipment, an early warning will be issued;
[0050] If the severity of any defect in any batch, any time period or any equipment exceeds the preset threshold, an alarm will be issued.
[0051] The present application provides a system for product quality tracing, the system comprising:
[0052] The data acquisition module is used to collect file data in the product quality inspection process through the AOI equipment; parse the file data and extract key metadata information;
[0053] The detection and scoring module is used to determine the detection results through real-time data and anomaly detection models; and determine the data importance score based on the anomaly detection model;
[0054] The data storage module is used to establish an accurate mapping between production batches and product data time and AOI equipment numbers; associate and store the parsed metadata with the original file data and the test results through the ES cluster; and store the data based on the data importance score and the node score;
[0055] The query module is used to respond to the product data time, production batch and / or AOI equipment number of the retrieval interface, return the inspection image, metadata and defect statistics corresponding to the data time, production batch and / or AOI equipment number; and perform quality backtracking on the defect images of unqualified products according to the statistical results;
[0056] The early warning module is used to analyze and count defects and issue early warning prompts based on the analysis and statistical results.
[0057] The present application also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any method described in the present application when executing the computer program.
[0058] The beneficial effects of the present invention include: by integrating the source of raw materials, batch number, supplier information and pre-test data, combined with the comprehensive test file data collected by the AOI equipment, the whole chain traceability from raw materials to final products is realized, ensuring the coverage of quality control without omissions; at the same time, the production batch, product data time and AOI equipment number are accurately mapped, which is convenient for quickly locating the source of the problem. An anomaly detection model based on real-time data and historical data is constructed, which can classify and model different types of anomalies, improve the accuracy of the detection results, reduce false positives and false negatives, and make quality control more targeted and effective. By intelligently analyzing the importance of data and combining node scoring, hierarchical storage of data is realized, which not only ensures the efficient access of key data, but also reasonably utilizes storage resources, solving the bottleneck problem of big data management. The use of ES cluster enhances the retrievability and relevance of data and improves data processing efficiency. Through in-depth analysis and statistics of defects, not only can the defect rate exceeding the preset threshold or the newly emerging defect type be identified in time, but also early warning can be triggered according to the severity of the defect, helping enterprises to take measures in advance, effectively prevent the occurrence of quality problems, reduce the defective rate, and protect the brand image. By optimizing the index field type and sharding strategy, the efficiency of data storage and retrieval is ensured, the cycle from problem discovery to problem solving is shortened, and immediate and accurate data support is provided for production management and decision-making, which enhances the flexibility and responsiveness of the production line. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 It is a schematic diagram of a method for product quality tracing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] Below, the present application is further described in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.
[0061] See also Figure 1 Some embodiments of the present application provide a method for product quality tracing, the method comprising:
[0062] Collect file data during product quality inspection through AOI equipment; parse the file data to extract key metadata information;
[0063] Determine the detection results through real-time data and anomaly detection models; determine the data importance score based on the anomaly detection model;
[0064] Establish accurate mapping between production batches, product data time, and AOI equipment numbers; associate and store the parsed metadata with the original file data and test results through the ES cluster; store the data based on data importance scores and node scores;
[0065] In response to the product data time, production batch and / or AOI equipment number of the retrieval interface, the inspection image, metadata and defect statistics corresponding to the data time, production batch and / or AOI equipment number are returned; quality backtracking of defect images of unqualified products is performed based on the statistical results;
[0066] Analyze and count defects, and issue early warning prompts based on the analysis and statistical results.
[0067] The working principle of the above technical solution is as follows: This method uses automated optical inspection (AOI) equipment to automatically collect product inspection file data during the production process. These data include but are not limited to images, videos, and inspection parameters. Subsequently, key metadata information such as product model, inspection time, AOI equipment number, etc. are extracted from these file data through parsing algorithms to provide a basis for subsequent traceability and analysis; combined with real-time production data and a pre-established anomaly detection model, the system can automatically identify and determine product inspection results. The model is based on historical data and machine learning algorithms and can identify normal and abnormal patterns. On this basis, according to the model output, the data items are scored for importance to distinguish which data is most critical for quality control. In order to achieve efficient traceability, the system establishes an accurate mapping relationship between production batches, product inspection time, and AOI equipment number; using the powerful indexing and search capabilities of the Elasticsearch (ES) cluster, the parsed metadata, original file data, and inspection results are stored in association. The storage strategy further considers the data importance score and the performance score of each node in the ES cluster to ensure that important data is stored on high-performance nodes first, thereby improving data access efficiency. Through the search interface, users can query relevant information based on product data time, production batch or AOI equipment number. The system can quickly return the corresponding inspection images, metadata and defect statistics results, helping to quickly locate problematic products and batches. For unqualified products found, through in-depth analysis of their defect images, quality backtracking is achieved to find the root cause of the problem. By analyzing and counting the collected defect data, the system can automatically identify events with high defect rates, new defect types or excessive severity, and issue early warning prompts in a timely manner. The early warning mechanism is based on preset thresholds to help managers respond quickly, take corrective measures, and prevent the spread of quality problems.
[0068] The effects of the above technical solutions are as follows: Automated and intelligent detection and data processing processes significantly speed up product quality detection and traceability, reduce the need for manual intervention, and reduce the error rate. Accurate data mapping and efficient retrieval mechanisms enable each link from raw materials to final products to be accurately traced, improving the accuracy of problem location. Intelligent storage strategies based on data importance and node performance effectively utilize storage resources, ensure fast access to key data, and balance system resources.
[0069] In some embodiments, before collecting the file data in the product quality inspection process by the AOI equipment; the method further includes:
[0070] Integrate and record each product’s raw material source, batch number, supplier information, and component pre-test data.
[0071] The working principle of the above technical solution is: extract or manually enter the detailed source information of raw materials from the supply chain management system or production planning system to ensure the traceability of each batch of raw materials; at the same time, record the unique batch number of each product to facilitate subsequent association with various links in the production process. Maintain a supplier database to record in detail the qualifications, reputation, historical supply quality and other information of each supplier. This step is crucial for evaluating the quality of raw materials and controlling supply chain risks. Before the components are assembled into the final product, pre-testing may be performed to screen out potential defects. This part of the data includes the test time, results, test standards used, etc., providing a baseline reference for subsequent AOI testing.
[0072] The effect of the above technical solution is: through the pre-prepared raw materials and component pre-test data records, the product quality can be grasped from the source, ensuring that every element entering the production line meets the quality standards, laying a solid foundation for the high quality of the final product. Once a product has a quality problem, this pre-integrated information can quickly help trace the source of the problem. Whether it is a raw material batch problem, a supplier problem or a defect in the component itself, it can be identified in time to speed up the problem-solving process. By recording and analyzing supplier information, companies can evaluate and select more reliable suppliers, optimize the supply chain structure, and reduce quality risks caused by supply chain problems.
[0073] In some embodiments, the step of determining the detection result by using the real-time data and the anomaly detection model includes:
[0074] Build anomaly detection models using raw file data and key metadata;
[0075] Determine the detection results through real-time data and anomaly detection models.
[0076] In some embodiments, the process of establishing an anomaly detection model using original file data and key metadata and determining data importance according to the anomaly detection model includes:
[0077] Classify known anomalies to obtain multiple anomaly categories;
[0078] For different anomaly categories, anomaly detection models are established respectively; a first score of each parameter is obtained through the anomaly detection model; the first score may be a weight of the parameter obtained through the model;
[0079] Obtaining an importance score of the parameter according to first scores of the parameter obtained by the multiple anomaly detection models;
[0080] The importance scores are:
[0081]
[0082] in, Score the importance of the kth parameter; is the first score obtained by the kth parameter through the jth anomaly detection model; u is the number of anomaly detection models that use the kth parameter; is the maximum value of the first score obtained by the kth parameter through u anomaly detection models; is the first weight coefficient.
[0083] The working principle of the above technical solution is:
[0084] Raw file data: including images and video streams collected by AOI equipment. These data intuitively display the inspection status of the product and are the basis for anomaly detection.
[0085] Key metadata: Information with diagnostic significance extracted from the original file data, such as detection time, location, environmental parameters, etc., to provide contextual information for the model.
[0086] Anomaly classification: First, based on historical data and expert knowledge, known anomaly types are classified, such as missing solder joints on circuit boards, component offsets, etc., laying the foundation for establishing a unique recognition model for each anomaly.
[0087] Anomaly detection model construction:
[0088] Multi-model strategy: For each anomaly category, a separate anomaly detection model is built. These models may be based on machine learning algorithms (such as support vector machines, neural networks, random forests, etc.), and learn the characteristic patterns of different anomalies through training.
[0089] Parameter scoring: During the model training process, the parameters involved in the detection (such as image pixel features, production parameters in metadata, etc.) are evaluated and each parameter is given a "first score", which represents the contribution or weight of the parameter in the specific anomaly detection model, reflecting the sensitivity and discrimination of the parameter.
[0090] Data importance score calculation:
[0091] Comprehensive scoring mechanism: In order to comprehensively evaluate the overall importance of each parameter in anomaly detection,
[0092] in, represents the first score of the kth parameter in the jth anomaly detection model, and the sum of the scores of all related models reflects the universal applicability of the parameter; is the highest score obtained by the parameter, reflecting its extreme importance in a specific anomaly detection; while α and β are the first weight coefficients, which are used to adjust the relative contribution of the two parts of the score.
[0093] Parameter importance ranking: Based on the calculated importance scores, all parameters can be ranked to identify the key parameters that have the greatest impact on the test results, which helps with subsequent optimization and resource allocation.
[0094] Real-time detection and decision-making:
[0095] On the production line, the detection data collected in real time is input into the corresponding anomaly detection model; the model compares the input data with the pre-learned abnormal features to quickly determine whether the product is qualified or what type of anomaly exists; based on the detection results and data importance scores, the system can dynamically adjust the detection strategy, conduct more detailed monitoring of key parameters or high-risk areas, and optimize resource allocation to ensure detection efficiency and accuracy.
[0096] In summary, this series of embodiments not only improves the accuracy and efficiency of anomaly detection, but also makes resource utilization more reasonable, by establishing detection models for different anomaly categories and comprehensively evaluating the importance of data based on the data parameter scores assigned by the models, providing strong technical support for product quality control and traceability.
[0097] The effect of the above technical solution is: through the detection models established for different abnormality categories, various abnormalities in the production process can be more accurately identified and classified, false positives and missed negatives can be reduced, and the accuracy and efficiency of detection can be improved. This helps to timely discover and solve production problems, reduce the production of defective products, and improve product quality. According to the data importance scoring mechanism determined by the anomaly detection model, the key parameters that have the greatest impact on the detection results can be identified. This enables production managers to focus resources and attention on the most important factors, make targeted improvements and optimizations, and avoid ineffective allocation of resources. The combination of real-time data and anomaly detection models enables the system to respond quickly to changes on the production line, detect anomalies in time and initiate corresponding corrective measures. This instant feedback mechanism greatly shortens the time from problem identification to solution, and enhances the flexibility and adaptability of production. Through the systematic classification and modeling of known anomalies, enterprises can accumulate valuable knowledge bases and provide data support for subsequent production optimization and process improvement. At the same time, the scoring system based on data importance can guide preventive maintenance, predict potential failure points, implement preventive measures, and reduce downtime and costs.
[0098] In summary, this method not only improves the anomaly detection capability in the production process, but also comprehensively improves production efficiency and product quality by optimizing resource allocation, enhancing response speed, and promoting continuous improvement, laying a solid foundation for realizing intelligent manufacturing and refined management.
[0099] In some embodiments, the process of establishing an accurate mapping between production batches, product data time, and AOI device numbers; and associating and storing the parsed metadata with the original file data through an ES cluster includes:
[0100] Define the index field type and establish accurate mapping between production batch and product data time and AOI equipment number;
[0101] Determine the number of primary shards for the index based on the known or estimated total data volume;
[0102] Determine the maximum number of shards for the index based on the number of computing nodes and the computing resources of each node, and perform tests to verify it.
[0103]
[0104]
[0105]
[0106]
[0107]
[0108] in, is the maximum number of shards of the index; Ecc is the total number of effective CPU cores of computing resources; Emg is the total effective memory of computing resources; Egb is the total effective disk space of computing resources; CPU requirements for a single shard, is the memory requirement for a single shard, is the disk requirement for a single shard; min() is the minimum value;
[0109] Cci is the number of CPU cores of the i-th node; Mgi is the memory of the i-th node; Gbi is the disk space of the i-th node; n is the total number of current computing nodes, wi is the second weight coefficient, f1, f2, f3 are the reservation rates; the range is 20%~40%; mi is the number of queries for the i-th node data within the preset time period, di is the amount of data queries for the i-th node within the preset time period, is the network congestion coefficient of the i-th node in the preset time period; x1, x2, x3 are the third weight coefficients;
[0110] Determine the number of secondary shards based on the number of primary shards, maximum number of shards, data query volume, and latency requirements of the index; Use regression analysis or machine learning models (such as linear regression, random forest, neural network, etc.) to establish a predictive query latency model. The goal of the model is to predict query latency as a function of the number of secondary shards; Determine the number of secondary shards based on the predicted results and the preset query threshold; Model input includes parameters such as the number of secondary shards, query volume, data distribution characteristics, hardware resource status, historical query status, and the output is the predicted query latency; Data distribution characteristics include the degree of data dispersion and the proportion of hot data; Query patterns within a preset time in the past, such as query time distribution and query type; Use node resources and the maximum number of shards as constraints, and node resources include CPU, memory, and disk space usage exceeding the safety threshold;
[0111] The parsed metadata is associated with the original file data and stored through the ES cluster.
[0112] The working principle of the above technical solution is: first, by defining the index field type, an accurate mapping relationship is created for the production batch, product data time and AOI equipment number; this step is the basis for establishing efficient query and retrieval, ensuring that the data is organized in an orderly manner in the index, facilitating the rapid location of the required information.
[0113] The number of primary shards for an index is determined based on the estimated total data volume. Primary shards are the basic unit of data storage, and their number should be set based on the amount of data to ensure balanced distribution of data in the cluster while avoiding management overhead caused by over-segmentation. The size of a single shard is generally between 20G and 50G.
[0114] Considering the number of CPU cores, memory, and disk space of all nodes in the cluster, combined with the reservation rate (f1, f2, f3) and the query activity of each node (mi, di, Li) and the second weight coefficient (x1, x2, x3), the maximum number of shards is calculated. This process ensures the rationality of resource allocation, avoids resource overload, and provides sufficient capacity planning for data storage. After determining the number of primary shards and the maximum number of shards, test verification is performed to ensure that the theoretical calculation matches the actual cluster performance, and the number of secondary shards is further determined based on the data query volume and latency requirements. The secondary shard is a copy of the primary shard, which is used to improve the concurrency of data reading and system fault tolerance; the parsed metadata is associated with the original file data and stored through the ES cluster; this step uses the index structure set previously to ensure that the data is evenly distributed and easy to query on the physical storage, and the primary and secondary shard mechanism ensures high availability and fast retrieval of data.
[0115] In summary, this technical solution achieves efficient and reliable storage and management of a large amount of product quality traceability data in the ES cluster through sophisticated data mapping, resource evaluation and optimized sharding strategy, supports fast data retrieval and analysis, and provides a powerful data support platform for quality control and production optimization.
[0116] The effect of the above technical solution is: by accurately mapping the production batch, time and equipment number, an efficient data index structure is constructed, which greatly improves the data retrieval speed and accuracy. This helps to quickly locate the inspection information of a specific batch, time or equipment, and speed up the product quality traceability and problem diagnosis process.
[0117] Based on the characteristics of the Elasticsearch cluster, the number of primary shards is determined according to the estimated data volume, ensuring balanced data distribution, avoiding resource pressure on a single node, and improving the efficiency of data writing and querying. At the same time, the maximum number of shards is determined through accurate evaluation of computing resources (CPU, memory, disk space), ensuring efficient use of cluster resources and avoiding resource waste or shortage.
[0118] By using the calculation formula, combined with the reservation rate and the real-time resource usage of each node, the index configuration can dynamically adapt to the changes in cluster resources, enhancing the elasticity and stability of the system. In addition, the weight coefficients including the network congestion coefficient are taken into account, making resource allocation more intelligent and able to be optimized according to the actual load and performance of the node. Through the calculation of Ecc, Emg, and Egb, a certain reservation rate (f1, f2, f3) can be deducted based on the actual resources (CPU core number, memory, disk space) of all computing nodes in the cluster, ensuring that the resources allocated to the data shards not only meet the current needs, but also leave room for future fluctuations, avoiding over-allocation or under-allocation of resources; the calculation of wi introduces a dynamic weight adjustment mechanism, which dynamically adjusts the importance of the node according to the historical query times (mi), data query volume (di) and network congestion coefficient (Li) of each node, as well as the second weight coefficient (x1, x2, x3); nodes with high activity and fast response will be given higher weights, which will be reflected in resource allocation, helping to improve overall query efficiency and service quality. By considering the amount of data queries (di) and the number of queries (mi), this method can better adapt to the access patterns of different nodes, ensure that the nodes where the frequently accessed data is located have more resources, reduce query latency, and improve user experience; use the minimum principle to determine the maximum number of shards to ensure that the shard configuration can achieve the optimal balance under the constraints of CPU, memory, or disk space, avoid any resource becoming a bottleneck, and improve the stability and scalability of the system. By comprehensively considering the network congestion coefficient (Li), it is possible to effectively avoid allocating too many data shards to nodes with poor network conditions, thereby improving the response speed and stability of the entire cluster.
[0119] The number of secondary shards is determined based on the number of primary shards, the maximum number of shards, the amount of data queries, and latency requirements. This strategy can effectively balance query performance and data redundancy, improve the concurrency of data reading, reduce query latency, and improve user experience. Reasonable configuration of secondary shards increases data redundancy and provides high data availability. Even if some nodes fail, data can still be obtained from other secondary shards, ensuring the continuous operation of the system and the integrity of the data. This method takes into account the resource reservation rate and dynamic adjustment strategy, reserves space for future data growth and cluster expansion, and ensures long-term system stability and scalability.
[0120] In summary, this embodiment not only optimizes the efficiency of data storage and retrieval through refined resource management and intelligent data distribution strategy, but also enhances the stability and flexibility of the system, providing an efficient and reliable underlying technical support platform for product quality traceability.
[0121] In some embodiments, storing the data based on the data importance score and the node score includes:
[0122] Obtain node scores based on the continuous operation time, failure rate, and response time of the nodes within a preset time period; and sort the node scores first;
[0123] Cluster the parameters according to the degree of association to obtain the first classification;
[0124] Obtain a comprehensive score for the first category based on the parameter importance scores in the first category and the access frequency within a preset time period;
[0125] Among them, the comprehensive score of the first category is:
[0126]
[0127] in, is the comprehensive score of the g-th first category, Score the importance of the vth parameter in the gth first category; is the access frequency of the vth parameter in the gth first category within the preset time period; max() is the maximum value; y1, y2 are the fourth weight coefficients;
[0128] The second ranking of the first category is obtained according to the comprehensive score;
[0129] According to the second sorting, the node at the front of the first sorting is preferentially selected as the main storage node corresponding to the second sorting data.
[0130] The working principle of the above technical solution is as follows: First, the nodes are scored based on the performance of each computing node within a preset time period, including the length of time of continuous uninterrupted operation, the frequency of failures, and the average response time to requests. These indicators reflect the stability and efficiency of the nodes. All nodes are scored according to the above evaluation criteria and sorted first to ensure that nodes with high scores (i.e. nodes with better performance and more stability) are at the top.
[0131] The parameters in the data are clustered according to the degree of association between them to form different first categories. This clustering helps to identify and manage data sets with associations.
[0132] In each category, the existing parameter importance scores are used, combined with the access frequency of these parameters in the preset time period, to further evaluate the comprehensive importance of the data. Parameters with high access frequency usually mean that the data is frequently queried, and there are high requirements for real-time performance and access speed.
[0133] Using the formula:
[0134]
[0135] in, is the comprehensive score of the g-th first category, Score the importance of the vth parameter in the gth first category; is the access frequency of the vth parameter in the gth first category within the preset time period; max() is the maximum value; y1, y2 are the fourth weight coefficients, which are used to adjust the contribution ratio of importance and access frequency to the comprehensive score. By taking the maximum value operation, special consideration is ensured for high-importance or high-frequency access parameters.
[0136] The first category is sorted a second time based on the comprehensive score. This sorting takes into account the comprehensive importance and access frequency of the parameters, further refining the data priority. According to the order of the second sorting, the high-performance nodes that are at the top of the first sorting are preferred as the primary storage nodes; this means that the most important and frequently accessed data will be stored on the most stable and high-performance nodes, thus ensuring fast access and high availability of data.
[0137] The effects of the above technical solution are as follows: by combining data importance scoring and node scoring to make data storage decisions, it is ensured that key data and high-access frequency data are preferentially stored on nodes with better performance and higher stability. This can maximize the use of storage resources, improve data access efficiency and system response speed, and reduce data access delays; clustering according to the degree of correlation of parameters and comprehensive scoring combined with access frequency can ensure that frequently accessed data blocks or key data sets are stored in more suitable locations, thereby reducing unnecessary I / O operations and network transmission during data retrieval, improving user experience and system processing capabilities; by considering the continuous operation time, failure rate and response time of the node to score and sort the nodes, giving priority to nodes with stable operation, low failure rate and fast response speed to store important data, it can effectively reduce the risk of data unavailability caused by node failure and enhance the overall stability and reliability of the system; the comprehensive scoring mechanism takes into account the importance and access frequency of data, so that the storage strategy can be dynamically adjusted according to the changes in the actual data access mode, ensuring that when the data access mode changes, the storage layout can also adapt quickly to maintain an efficient data processing process. By dynamically adjusting the storage location of data, we can not only reduce the pressure on hot nodes, but also achieve balanced distribution of resources within the cluster, avoid excessive concentration of resources on a few nodes, and improve the operating efficiency and service life of the overall cluster.
[0138] In summary, the data storage strategy provided in this embodiment significantly improves the efficiency of data storage and access, enhances the stability and reliability of the system through fine data classification, intelligent node selection and dynamic resource adjustment, while optimizing resource utilization, reducing maintenance costs, and providing strong support for large-scale data management and quality traceability.
[0139] In some embodiments, the performing of statistical analysis on the defects and issuing of early warning prompts according to the statistical analysis results include:
[0140] If the defect rate of any defect type in any batch, any time period or any equipment is greater than the preset threshold, an early warning will be issued;
[0141] If the total defect rate of any batch, any time period or any equipment is greater than the preset threshold, an early warning will be issued;
[0142] If a new defect type appears in any batch, any time period or any equipment, an early warning will be issued;
[0143] If the severity of any defect in any batch, any time period or any equipment exceeds the preset threshold, an alarm will be issued.
[0144] The principle and effect of the above technical solution are as follows: the system continuously tracks and records the number of various defects in each batch, each time period, and each device. By calculating the proportion (defect rate) of a specific defect type in the corresponding batch, time period or device, and comparing it with the preset allowable threshold; once the defect rate of any type of defect exceeds the threshold, the system immediately triggers an early warning signal, prompting relevant personnel to pay attention to the abnormal increase of such defects, and may need to check the production process or raw material quality. In addition to focusing on a single defect type, the system also summarizes the overall ratio of all defects. If the overall defect rate reaches the preset warning level, it indicates that there may be widespread problems in the production process, which may be caused by abnormalities in the production environment, equipment status or operating procedures. At this time, the system will also issue an early warning, prompting management to conduct a comprehensive quality audit and improvement measures. The system has the ability to learn and identify defect types that have not appeared in historical data. When any new, previously unrecorded defect type is detected, regardless of its frequency of occurrence, the system will automatically issue an early warning, which helps to respond quickly and prevent the spread of new problems, while adding new content to the defect database and enriching future anomaly detection models. During the monitoring process, the system also evaluates the severity of each defect, which is usually based on the impact of the defect on the product's function, safety or appearance. If the severity of any defect is found to exceed the predetermined standard, even a single case will trigger an early warning. This mechanism ensures that even a small number of serious defects can receive timely attention to prevent them from affecting product quality and customer satisfaction.
[0145] In summary, this working principle achieves comprehensive and dynamic management of quality defects in the production process through a multi-dimensional monitoring and early warning mechanism; it can not only quickly respond to the deterioration of known problems, but also effectively identify and warn of new potential risks, providing a means of active defense for quality control in the manufacturing industry, helping to continuously improve product quality and reduce the production of defective products.
[0146] The present application provides a system for product quality tracing, the system comprising:
[0147] The data acquisition module is used to collect file data in the product quality inspection process through the AOI equipment; parse the file data and extract key metadata information;
[0148] The detection and scoring module is used to determine the detection results through real-time data and anomaly detection models; and determine the data importance score based on the anomaly detection model;
[0149] The data storage module is used to establish an accurate mapping between production batches and product data time and AOI equipment numbers; associate and store the parsed metadata with the original file data and the test results through the ES cluster; and store the data based on the data importance score and the node score;
[0150] The query module is used to respond to the product data time, production batch and / or AOI equipment number of the retrieval interface, return the inspection image, metadata and defect statistics corresponding to the data time, production batch and / or AOI equipment number; and perform quality backtracking on the defect images of unqualified products according to the statistical results;
[0151] The early warning module is used to analyze and count defects and issue early warning prompts based on the analysis and statistical results.
[0152] In some embodiments, the data acquisition module further includes:
[0153] Integration module, used to integrate and record the raw material source, batch number, supplier information, and pre-test data of components for each product.
[0154] In some embodiments, the data acquisition module includes:
[0155] A first acquisition unit is used to collect the model, location, direction and number of solder joints of each detected component, product or assembly;
[0156] A second acquisition unit, acquiring images and / or video streams of components, products or assemblies;
[0157] A first recording unit, used to record production parameters related to the test; the production parameters include but are not limited to printing parameters, mounting parameters and reflow soldering temperature curve;
[0158] The second recording unit is used to record the inspection time and production batch of each component, product or assembly;
[0159] A third recording unit, used to record environmental conditions during detection, wherein the environmental conditions include light intensity, temperature and humidity;
[0160] A key metadata determination unit, used to determine key metadata through historical data and / or knowledge base;
[0161] The parsing unit is used to parse the file data and extract key metadata information.
[0162] In some embodiments, the detection and scoring module includes:
[0163] A modeling unit, used to build an anomaly detection model through original file data and key metadata;
[0164] The detection unit is used to determine the detection result through real-time data and anomaly detection model.
[0165] In some embodiments, the detection and scoring module includes:
[0166] An anomaly classification unit is used to classify known anomalies to obtain multiple anomaly categories;
[0167] A first modeling unit is used to establish anomaly detection models for different anomaly categories;
[0168] A first scoring unit, configured to obtain a first score for each parameter through an anomaly detection model; the first score may be a weight of the parameter obtained through the model;
[0169] An importance scoring unit, configured to obtain an importance score of the parameter according to a first score of the parameter obtained by the multiple anomaly detection models;
[0170] The importance scores are:
[0171]
[0172] in, Score the importance of the kth parameter; is the first score obtained by the kth parameter through the jth anomaly detection model; u is the number of anomaly detection models that use the kth parameter; is the maximum value of the first score obtained by the kth parameter through u anomaly detection models, is the first weight coefficient.
[0173] In some embodiments, the data storage module includes:
[0174] Mapping establishment unit, used to define the index field type and establish accurate mapping between production batch and product data time and AOI equipment number;
[0175] A primary shard number determination unit, used to determine the number of primary shards of an index based on a known or estimated total data volume;
[0176] The maximum shard number determination unit is used to determine the maximum shard number of the index according to the number of computing nodes and the computing resources of each node; and perform testing and verification;
[0177]
[0178]
[0179]
[0180]
[0181]
[0182] in, is the maximum number of shards of the index; Ecc is the total number of effective CPU cores of computing resources; Emg is the total effective memory of computing resources; Egb is the total effective disk space of computing resources; CPU requirements for a single shard, is the memory requirement for a single shard, is the disk requirement for a single shard; min() is the minimum value;
[0183] Cci is the number of CPU cores of the i-th node; Mgi is the memory of the i-th node; Gbi is the disk space of the i-th node; n is the total number of current computing nodes, wi is the second weight coefficient, f1, f2, f3 are the reservation rates; the range is 20%~40%; mi is the number of queries for the i-th node data within the preset time period, di is the amount of data queries for the i-th node within the preset time period, is the network congestion coefficient of the i-th node in the preset time period; x1, x2, x3 are the third weight coefficients;
[0184] The secondary shard number determination unit is used to determine the number of secondary shards according to the number of primary shards of the index, the maximum number of shards, the data query volume and the latency requirement; use regression analysis or machine learning models (such as linear regression, random forest, neural network, etc.) to establish a prediction query latency model, the goal of the model is to predict the query latency as a function of the number of secondary shards; determine the number of secondary shards through the prediction results and the preset query threshold; the model input includes parameters such as the number of secondary shards, query volume, data distribution characteristics, hardware resource status, historical query status, etc., and the output is the predicted query latency; the data distribution characteristics include the degree of data dispersion and the proportion of hot data; the query mode within the preset time in the past, such as query time distribution and query type; the node resources and the maximum number of shards are used as constraints, and the node resources include CPU, memory, and disk space usage exceeding the safety threshold;
[0185] The associated storage unit is used to associate and store the parsed metadata with the original file data through the ES cluster.
[0186] In some embodiments, the data storage module includes:
[0187] A first sorting unit is used to obtain node scores according to the continuous operation time, failure rate, and response time of the nodes within a preset time period; and to perform a first sorting on the node scores;
[0188] A first classification unit, used for clustering the parameters according to the degree of association to obtain a first classification;
[0189] A comprehensive scoring unit, used to obtain a comprehensive score of the first category according to the parameter importance score in the first category and the access frequency in a preset time period;
[0190] Among them, the comprehensive score of the first category is:
[0191]
[0192] in, is the comprehensive score of the g-th first category, Score the importance of the vth parameter in the gth first category; is the access frequency of the vth parameter in the gth first category within the preset time period; max() is the maximum value; y1, y2 are the fourth weight coefficients;
[0193] A second ranking unit, used for obtaining a second ranking of the first category according to the comprehensive score;
[0194] The main storage node determination unit is used to preferentially select the node with the highest priority in the first sorting according to the second sorting as the main storage node corresponding to the second sorting data.
[0195] In some embodiments, the early warning module includes:
[0196] The first warning module is used to issue a warning if the defect rate of any defect type in any batch, any time period or any equipment is greater than a preset threshold;
[0197] The second warning module is used to issue a warning if the total defect rate of any batch, any time period or any equipment is greater than a preset threshold;
[0198] The third early warning module is used to issue an early warning if a new defect type appears in any batch, any time period or any equipment;
[0199] The fourth warning module is used to issue a warning if the severity of any defect in any batch, any time period or any equipment exceeds a preset threshold.
[0200] The working principle and effect of the above technical solution are the same as those in the embodiment of the method of the present application and will not be described in detail here.
[0201] The present application also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any method described in the present application are implemented.
[0202] This application is explained from the perspectives of purpose of use, effectiveness, progress and novelty, and has met the functional enhancement and usage requirements emphasized by the Patent Law. The above description and drawings of this application are only the preferred embodiments of this application, and are not intended to limit this application. Therefore, all structures, devices, features, etc. that are similar or identical to this application, that is, all equivalent replacements or modifications made in accordance with the scope of the patent application of this application, should fall within the scope of protection of the patent application of this application.
Claims
1. A method for product quality tracing, characterized in that: The method comprises: Collect file data during product quality inspection through AOI equipment; parse the file data to extract key metadata information; Using machine learning, we build an anomaly detection model using raw file data and key metadata; we determine the detection results using real-time data and the anomaly detection model; and we determine the data importance score based on the anomaly detection model. Establish accurate mapping between production batches, product data time and AOI equipment numbers; associate and store the parsed key metadata with the original file data and test results through the ES cluster; store the key metadata and original file data based on data importance scores and node scores; In response to the product data time, production batch and / or AOI equipment number of the retrieval interface, the inspection image, key metadata and defect statistics of the corresponding data time, production batch and / or AOI equipment number are returned; quality backtracking of defect images of unqualified products is performed based on the statistical results; Analyze and count defects, and issue early warning prompts based on the analysis and statistical results; The method includes establishing an anomaly detection model through original file data and key metadata; and determining the importance of data according to the anomaly detection model; including: Classify known anomalies to obtain multiple anomaly categories; For different anomaly categories, anomaly detection models are established respectively; a first score of each parameter is obtained through the anomaly detection model; the first score is the weight of the parameter obtained through the anomaly detection model; Obtaining an importance score of the parameter according to first scores of the parameter obtained by the multiple anomaly detection models; The importance scores are: ; in, Score the importance of the kth parameter; is the first score obtained by the kth parameter through the jth anomaly detection model; u is the number of anomaly detection models that use the kth parameter; is the maximum value of the first score obtained by the kth parameter through u anomaly detection models, is the first weight coefficient; The storing of the key metadata and the original file data based on the data importance score and the node score comprises: Obtain node scores based on the continuous operation time, failure rate, and response time of the nodes within a preset time period; and sort the node scores first; Cluster the parameters according to the degree of association to obtain the first classification; Obtain a comprehensive score for the first category based on the parameter importance scores in the first category and the access frequency within a preset time period; Among them, the comprehensive score of the first category is: ; in, is the comprehensive score of the g-th first category, Score the importance of the vth parameter in the gth first category; is the access frequency of the vth parameter in the gth first category within the preset time period; max() is the maximum value; y1, y2 are the fourth weight coefficients; The second ranking of the first category is obtained according to the comprehensive score; According to the second sorting, the node at the front of the first sorting is preferentially selected as the main storage node corresponding to the second sorting data.
2. The method according to claim 1, characterized in that: Before collecting the file data in the product quality inspection process by the AOI equipment; the method further includes: Integrate and record each product’s raw material source, batch number, supplier information, and component pre-test data.
3. The method according to claim 1, characterized in that The document data collected during the product quality inspection process is collected through the AOI equipment; Parsing the file data to extract key metadata information; including: For each detected component, product or assembly, collect its model, location, orientation and number of solder joints; Acquire images and / or video streams of components, products or assemblies; Record the production parameters related to the test; the production parameters include but are not limited to printing parameters, mounting parameters and reflow soldering temperature curve; Record the inspection time and production batch of each component, product or assembly; Record the environmental conditions during the test, including light intensity, temperature and humidity; Identify key metadata through historical data and / or knowledge base; The file data is parsed to extract key metadata information.
4. The method according to claim 1, characterized in that The establishment of accurate mapping of production batches, product data time and AOI equipment number; The ES cluster is used to associate and store the parsed key metadata with the original file data and the detection results, including: Define the index field type and establish accurate mapping between production batch and product data time and AOI equipment number; Determine the number of primary shards for the index based on the known or estimated total data volume; Determine the maximum number of shards for the index based on the number of computing nodes and the computing resources of each node, and perform tests to verify it. ; in, is the maximum number of shards of the index; Ecc is the total number of effective CPU cores of computing resources; Emg is the total effective memory of computing resources; Egb is the total effective disk space of computing resources; CPU requirements for a single shard, is the memory requirement for a single shard, is the disk requirement for a single shard; min() is the minimum value; Determine the number of secondary shards based on the number of primary shards, maximum number of shards, data query volume, and latency requirements for the index; The parsed key metadata is associated and stored with the original file data through the ES cluster.
5. The method according to claim 1, characterized in that The above-mentioned defect analysis and statistics, and issuing early warning prompts according to the analysis and statistics results, include: If the defect rate of any defect type in any batch, any time period or any equipment is greater than the preset threshold, an early warning will be issued; If the total defect rate of any batch, any time period or any equipment is greater than the preset threshold, an early warning will be issued; If a new defect type appears in any batch, any time period or any equipment, an early warning will be issued; If the severity of any defect in any batch, any time period or any equipment exceeds the preset threshold, an alarm will be issued.
6. A system for product quality tracing, characterized in that: The system comprises: The data acquisition module is used to collect file data in the product quality inspection process through the AOI equipment; parse the file data and extract key metadata information; The detection and scoring module uses machine learning to build an anomaly detection model through original file data and key metadata; determines the detection results through real-time data and the anomaly detection model; and determines the data importance score based on the anomaly detection model; The data storage module is used to establish an accurate mapping between production batches and product data time and AOI equipment numbers; associate and store the parsed key metadata with the original file data and the test results through the ES cluster; and store the key metadata and original file data based on the data importance score and the node score; The query module is used to respond to the product data time, production batch and / or AOI equipment number of the retrieval interface, return the inspection image, key metadata and defect statistics corresponding to the data time, production batch and / or AOI equipment number; and perform quality backtracking on the defect images of unqualified products according to the statistical results; The early warning module is used to analyze and count defects and issue early warning prompts based on the analysis and statistical results; The method includes establishing an anomaly detection model through original file data and key metadata; and determining the importance of data according to the anomaly detection model; including: Classify known anomalies to obtain multiple anomaly categories; For different anomaly categories, anomaly detection models are established respectively; a first score of each parameter is obtained through the anomaly detection model; the first score is the weight of the parameter obtained through the anomaly detection model; Obtaining an importance score of the parameter according to first scores of the parameter obtained by the multiple anomaly detection models; The importance scores are: ; in, Score the importance of the kth parameter; is the first score obtained by the kth parameter through the jth anomaly detection model; u is the number of anomaly detection models that use the kth parameter; is the maximum value of the first score obtained by the kth parameter through u anomaly detection models, is the first weight coefficient; The storing of the key metadata and the original file data based on the data importance score and the node score comprises: Obtain node scores based on the continuous operation time, failure rate, and response time of the nodes within a preset time period; and sort the node scores first; Cluster the parameters according to the degree of association to obtain the first classification; Obtain a comprehensive score for the first category based on the parameter importance scores in the first category and the access frequency within a preset time period; Among them, the comprehensive score of the first category is: ; in, is the comprehensive score of the g-th first category, Score the importance of the vth parameter in the gth first category; is the access frequency of the vth parameter in the gth first category within the preset time period; max() is the maximum value; y1, y2 are the fourth weight coefficients; The second ranking of the first category is obtained according to the comprehensive score; According to the second sorting, the node at the front of the first sorting is preferentially selected as the main storage node corresponding to the second sorting data.
7. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program.
