Metal bottle cap surface electroplating defect traceability analysis method for micro defects
By constructing a process anchoring module and a temporal causal mask generator, and combining multi-source heterogeneous data and a historical case library, the problems of dynamic tracing difficulties and high misjudgment rates in the source analysis of electroplating defects in metal bottle caps are solved. This enables efficient and interpretable defect cause analysis, which is suitable for real-time optimization in industrial settings.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGGUAN YIHAN HARDWARE PRODUCTS CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies for tracing and analyzing the sources of electroplating defects on metal bottle caps suffer from problems such as difficulty in dynamic tracing, lack of interpretability, poor model flexibility, high misjudgment rate, and high deployment cost. In particular, in scenarios with multiple processes and long time spans, it is difficult to achieve accurate defect cause analysis.
By acquiring the timestamps, equipment identifiers, and key process parameters of metal bottle caps in the pre-processes of stamping, cleaning, and passivation, a process anchoring data sequence carrying multi-dimensional working condition characteristics is generated. Combined with high-resolution defect images for weak supervision alignment, a spatiotemporally aligned multi-source heterogeneous fusion dataset is generated. Causal inference is performed using a temporal causal mask matrix, and confidence is verified by combining a historical case library. Finally, a structured causal tracing report is generated.
It achieves high efficiency, interpretability, and reliability in cross-process defect tracing, reduces computational overhead, is suitable for the real-time and safety requirements of industrial sites, and provides efficient quality optimization support.
Smart Images

Figure CN122222985A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect source analysis and cause attribution modeling in the electroplating process of metal products, and in particular to a method for source analysis of electroplating defects on the surface of metal bottle caps with minor flaws. Background Technology
[0002] Defect source tracing and causal modeling in the electroplating process of metal products has become a research hotspot in the fields of intelligent manufacturing and quality control. Traditional defect analysis methods mainly rely on knowledge graph construction, rule extraction, structural equation modeling, and association propagation based on various graph neural networks (GNNs) or Bayesian network structures to analyze and distinguish the relationship between production process data and defect representations. These methods often require detailed process flow descriptions, sufficient manually labeled samples, or strict physical mechanism assumptions. Recently, some studies have gradually introduced end-to-end deep learning representation modeling, improving the efficiency of automatic defect identification through joint training of image recognition and parameter regression. However, regardless of the above technical route, they all face significant bottlenecks and limitations in practical industrial applications.
[0003] Existing technologies generally suffer from the following shortcomings or fail to meet the following needs: It is difficult to dynamically trace the defect formation process through rule-driven or knowledge graph reasoning alone. It is also impossible to perform multi-level interpretable modeling of the actual evolution path of abnormal defects, which affects users' trust in the reasoning conclusions and is not conducive to the identification of abnormal responsibility and the formulation of continuous improvement measures in actual production scenarios.
[0004] For defect evolution involving multiple processes and long time spans, current mainstream risk path modeling based on graph neural networks, LSTM time series models, and Bayesian networks relies too heavily on the full dataset and prior knowledge definitions, lacking flexibility and portability. In scenarios where equipment parameters drift, processes change, or some process data collection is incomplete, the model attribution effect drops rapidly, and there are gaps or interpretation biases in the defect cause path.
[0005] While end-to-end generation solutions based on deep neural networks improve the efficiency of automated attribution, their "black box" nature makes it impossible for users to understand the specific role of parameters or processes in the formation of a defect. This lack of interpretability and operational verifiability reduces the willingness to adopt them in industrial decision-making scenarios.
[0006] The task of tracing the source of complex defects across processes currently lacks a unified mechanism for data alignment, dynamic weighting of variable probability, and visualization of process contribution rate, making it difficult to establish an intuitive, traceable, and easily verifiable evolution path system.
[0007] Due to the lack of accurate confidence verification and manual review loop, the existing reasoning process tends to output low-confidence or high-misjudgment attribution conclusions when encountering unconventional processes or production anomalies, which directly affects the management of anomalies and defects and the continuous optimization of processes. Summary of the Invention
[0008] This application provides a method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps with minor flaws, aiming to solve one of the problems or issues of the prior art mentioned in the background.
[0009] The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps, which addresses minor imperfections, provided in this application specifically includes: S1: Obtain the timestamps, equipment identifiers, and key process parameter snapshots of the metal bottle caps in the pre-processes of stamping, cleaning, and passivation, and map the key process parameter snapshots into process semantic embedding vectors to generate process anchoring data sequences carrying multi-dimensional working condition features.
[0010] S2: Based on the process anchoring data sequence and the high-resolution defect images collected in the subsequent electroplating process, weakly supervised alignment processing is performed, and cross-modal approximate correlation is achieved by using process semantic embedding vectors to generate a spatiotemporally aligned multi-source heterogeneous fusion dataset.
[0011] S3: Based on the coordinate information of the local texture abnormal region of the defect image in the spatiotemporally aligned multi-source heterogeneous fusion dataset, the subset of process variables within the historical process time window is activated in reverse, and the mask weight is calculated in conjunction with the variable change amplitude, process interval attenuation factor and variable physical domain to generate a temporal causal mask matrix.
[0012] S4: Map the temporal causal mask matrix to the process hierarchy space and perform a phased causal intensity projection operation. Perform a unified normalized scale transformation according to the granularity level of the top-level process chain macro-influence distribution, the middle-level single-process key parameter sensitive area distribution and the bottom-level pixel-level attribution heatmap to generate a three-layer causal heatmap.
[0013] S5: Based on the historically verified defect case library, perform similarity retrieval and deviation comparison on the defect cause evolution path generated in the three-layer causal heatmap. If the parameter combination of a certain process node in the path is detected to deviate from the historical valid range, mark the confidence decay indicator to generate a causal path candidate set with confidence verification label.
[0014] S6: For nodes with confidence decay indicators in the causal path candidate set with confidence verification labels, trigger the manual review prompt mechanism, and retain the original sensor reading index and image frame source link to generate a set of credible causal paths corrected by manual intervention.
[0015] S7: Integrate the process node contribution data and expert rule annotation layer information in the set of trusted causal paths to construct a structured data object containing an interactive timeline view and process-parameter-defect region triple links to generate a structured causal tracing report data stream.
[0016] S8: Input the structured causal tracing report data stream into the locally deployed lightweight inference engine for rendering and output, presenting a visualization interface of the stage contribution of each process node in the form of a hierarchical causal heat map, so as to complete the visualization inference closed loop of the cause path of metal bottle cap electroplating defects.
[0017] The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps, which addresses minor flaws, provided in this application has the following beneficial effects: (1) To address the challenges of tracing the causes of minor defects across processes during metal bottle cap electroplating and the poor interpretability of traditional methods in linking multi-source heterogeneous data and quantifying dynamic process influences, this application constructs a lightweight process anchoring module and a temporal causal mask generator to achieve defect evolution path modeling without the need for strong alignment labels and predefined knowledge structures. This design effectively overcomes the shortcomings of existing technologies, such as high deployment costs and weak generalization ability caused by relying on complete field matching or complex graph structure modeling. Especially in industrial environments where upstream process parameters are incomplete or time drift exists, it can still achieve cross-modal approximate association based on process semantic embedding. Furthermore, by dynamically generating inverse activation masks based on variable change magnitude, physical domain, and time decay factor, it significantly improves the robustness and physical interpretability of attribution analysis and avoids the uncontrollable decision-making risks brought about by end-to-end black box models.
[0018] (2) A three-layer causal heatmap covering the process chain, single-process parameter sensitive area and defect image pixel-level response is generated by a phased causal intensity projection mechanism. A unified normalization scale is introduced to ensure consistent expression of cross-granularity results, so that a quantifiable mapping relationship is established between macro process trends and micro defect characteristics, which greatly enhances the understanding depth and diagnostic efficiency of process engineers on defect evolution mechanism. At the same time, combined with the causal path confidence verification mechanism, similarity comparison and deviation detection are performed using a historical verified case library. When the combination of key parameters deviates from the empirical effective range, a review prompt is automatically triggered and a confidence decay mark is marked. This effectively solves the problems of traditional attribution methods being susceptible to noise interference, having a high misjudgment rate and lacking feedback loop, and significantly improves the reliability and engineering applicability of the analysis conclusions.
[0019] (3) The final structured causal tracing report integrates an interactive timeline view, process-parameter-defect region triplet links, and expert rule annotation layers. All visualization elements retain the original data tracing index, supporting drill-down from the attribution conclusion to specific sensor readings or image frames, constructing a complete and interpretable chain "from phenomenon to data". The entire system runs entirely on a localized lightweight inference engine, without relying on external large models, deep generative networks, or complex causal discovery algorithms. It features low latency, high adaptability, and strong maintainability, making it particularly suitable for manufacturing scenarios with stringent real-time and security requirements. Compared to technical solutions using graph neural network propagation, LSTM modeling, or structural equation modeling, this method significantly reduces computational overhead and deployment threshold while ensuring attribution accuracy. It truly achieves an efficient, reliable, and operable closed loop for cross-process defect tracing, providing solid technical support for continuous quality optimization of metal surface treatment processes.
[0020] In summary, this method, through collaborative mechanisms such as process semantic alignment, dynamic causal masking, multi-granularity thermal projection, and confidence verification feedback, systematically improves the interpretability, accuracy, and engineering feasibility of electroplating defect cause analysis without introducing complex model structures. It forms a complete technical closed loop from data association and causal inference to human-machine collaborative decision-making, and has outstanding industrial application value and promotion prospects. Attached Figure Description
[0021] Figure 1 This is the main flowchart of a method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps, which are designed for minor flaws.
[0022] Figure 2 This is a sub-flowchart of a method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps, which are designed for minor flaws.
[0023] Figure 3 This is another sub-flowchart of the method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps, which are aimed at minor flaws. Detailed Implementation
[0024] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0025] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0026] like Figure 1 As shown, this application provides a method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps, specifically including: S1: Obtain the timestamps, equipment identifiers, and key process parameter snapshots of the metal bottle caps in the pre-processes of stamping, cleaning, and passivation, and map the key process parameter snapshots into process semantic embedding vectors to generate process anchoring data sequences carrying multi-dimensional working condition features.
[0027] S2: Based on the process anchoring data sequence and the high-resolution defect images collected in the subsequent electroplating process, weakly supervised alignment processing is performed, and cross-modal approximate correlation is achieved by using process semantic embedding vectors to generate a spatiotemporally aligned multi-source heterogeneous fusion dataset.
[0028] S3: Based on the coordinate information of the local texture abnormal region of the defect image in the spatiotemporally aligned multi-source heterogeneous fusion dataset, the subset of process variables within the historical process time window is activated in reverse, and the mask weight is calculated in conjunction with the variable change amplitude, process interval attenuation factor and variable physical domain to generate a temporal causal mask matrix.
[0029] S4: Map the temporal causal mask matrix to the process hierarchy space and perform a phased causal intensity projection operation. Perform a unified normalized scale transformation according to the granularity level of the top-level process chain macro-influence distribution, the middle-level single-process key parameter sensitive area distribution and the bottom-level pixel-level attribution heatmap to generate a three-layer causal heatmap.
[0030] S5: Based on the historically verified defect case library, perform similarity retrieval and deviation comparison on the defect cause evolution path generated in the three-layer causal heatmap. If the parameter combination of a certain process node in the path is detected to deviate from the historical valid range, mark the confidence decay indicator to generate a causal path candidate set with confidence verification label.
[0031] S6: For nodes with confidence decay indicators in the causal path candidate set with confidence verification labels, trigger the manual review prompt mechanism, and retain the original sensor reading index and image frame source link to generate a set of credible causal paths corrected by manual intervention.
[0032] S7: Integrate the process node contribution data and expert rule annotation layer information in the set of trusted causal paths to construct a structured data object containing an interactive timeline view and process-parameter-defect region triple links to generate a structured causal tracing report data stream.
[0033] S8: Input the structured causal tracing report data stream into the locally deployed lightweight inference engine for rendering and output, presenting a visualization interface of the stage contribution of each process node in the form of a hierarchical causal heat map, so as to complete the visualization inference closed loop of the cause path of metal bottle cap electroplating defects.
[0034] Step S1: Obtain the timestamps, equipment identifiers, and snapshots of key process parameters of the metal bottle cap during the stamping, cleaning, and passivation pre-processes, and map the snapshots of key process parameters into process semantic embedding vectors to generate process anchoring data sequences carrying multi-dimensional operating condition features. Specifically, this includes: S1.1: Real-time data acquisition and processing of the sensor network deployed on the production line for metal bottle caps in the stamping, cleaning and passivation preprocessing stages, to obtain a set of original operating condition records containing timestamps, device identifiers and snapshots of key process parameters such as pH value, temperature and current density.
[0035] Parallel status scanning is performed on the various types of sensor nodes deployed in the production lines for the stamping, cleaning, and passivation preprocesses. The sensor driver interface bound to each process type is called to initialize the acquisition thread and establish a time synchronization mechanism to ensure that the time reference of the sensor signals in different process segments is consistent.
[0036] Based on the multi-channel raw signal data acquired by the acquisition thread, a formatted packet is executed, mapping the continuous readings of the temperature sensor, pH sensor, and current sensor to a unified data structure, and a device identifier field is added for matching in subsequent processes.
[0037] The packet data stream is injected with a timestamp. A high-precision clock source bound to the production line main control system is used to generate a unique timestamp for each acquired event and store it in the database according to the process sequence.
[0038] For continuously acquired temperature, current density, and pH signals, instantaneous sampling and process stage slicing are performed to calculate snapshot values of key process parameters for each slice.
[0039] The snapshot values of each process stage are bound to the corresponding timestamps and equipment identifiers through multi-dimensional indexing to generate a set of original working condition records and store them in the local data buffer, ensuring that the records are traceable and verifiable.
[0040] Through the above-mentioned real-time acquisition, packetization, time injection, slicing and index binding processing methods, the production line status of the previous step is transformed into a set of original operating condition records containing timestamps, equipment identifiers and snapshots of key process parameters, thereby achieving accurate capture and structured storage of cross-process data.
[0041] S1.2: Perform data cleaning and standardization preprocessing operations based on the original set of operating condition records to eliminate dimensional differences and generate a standardized process parameter snapshot sequence with uniform time granularity and numerical range.
[0042] Based on the original set of operating condition records obtained in the previous step, which includes timestamps, equipment identifiers, and snapshots of key process parameters such as pH, temperature, and current density, data cleaning and standardization preprocessing are performed on the target data. Missing value detection is performed on each process parameter field in the original operating condition record set, and interpolation or historical mean imputation strategies are used to complete missing data to maintain data continuity. Outlier data is identified using statistical outlier detection, employing the three-standard-deviation principle to determine and remove records that significantly deviate from the normal range, thus avoiding interference from extreme data in subsequent feature mapping. Dimensional standardization is performed on each process parameter field, converting temperature to degrees Celsius, current density to amperes per square centimeter, and retaining pH according to the standard acidity / alkalinity definition, eliminating differences in physical units. Normalization is performed on numerical parameters of different magnitudes, using range standardization to map data to a unified numerical range. Timestamp fields are converted to a unified time granularity, mapping all record timestamps to a uniform second or millisecond precision to ensure timing consistency during cross-process alignment. Through the above multi-stage processing method, the original set of operating condition records from the previous step is transformed into a standardized process parameter snapshot sequence with a unified time granularity and numerical range, thereby achieving the standardization of input data required for subsequent textual encoding and process semantic mapping.
[0043] For example, in the stamping process, the sensor acquisition cycle is set to 100 milliseconds, resulting in a temperature range of 20°C to 80°C, a current density between 0.01 A / cm² and 0.5 A / cm², and a pH value between 4.5 and 8.5. During the data cleaning stage, 0.3% of the temperature field records were found to be missing, which were filled using linear interpolation; 5 abnormal records in the current density field with values higher than 0.6 A / cm² were removed. After dimensional standardization, range normalization was performed on the temperature values, mapping the 20°C to 80°C range to the 0 to 1 range. Calculations were then performed for a temperature value of 55°C. =55, =20, =80, and its normalized result is: = ≈0.583. The normalized result for a current density of 0.25 A / cm² in the range of 0.01 to 0.5 is... = ≈0.490. Timestamps are standardized to millisecond precision to ensure consistency in time window selection during subsequent cross-process data matching. After the above processing, the generated standardized process parameter snapshot sequence significantly improves semantic encoding accuracy in the subsequent S1.3 textual encoding process and effectively reduces noise introduced by numerical differences during the cross-modal alignment stage.
[0044] S1.3: The standardized process parameter snapshot sequence is text-encoded using a pre-trained process domain dictionary to convert numerical parameters and equipment status descriptions into discrete process parameter token sequences carrying process context information.
[0045] Based on the obtained standardized process parameter snapshot sequence, the numerical-semantic mapping rule set in the pre-trained process domain dictionary is invoked to perform semantic tag retrieval processing on the numerical parameters in each time slice, and the corresponding numerical range is matched to the semantic category encoding of the parameter in the specific process context.
[0046] The semantic category encoding sequence obtained by matching is combined with the device status description field to perform field concatenation and position-sensitive encoding processing, transforming the device working mode, status flag and other descriptive information into index codes that can be discretized and represented, and forming a one-to-one corresponding encoding pair with the semantic category encoding of the numerical parameters according to the position of the parameter field.
[0047] The above-mentioned set of encoded pairs is processed by word segmentation and serialization methods. The continuous numerical-semantic pairs and equipment status codes are divided into discrete process parameter token units according to the granularity of the process domain dictionary, and a multidimensional token vector sequence is generated in time series order.
[0048] The generated multidimensional token vector sequence is subjected to hash mapping and deduplication optimization. Tokens that appear repeatedly in the same time slice retain a unique index, and the key-value mapping method of the hash table ensures that tokens of the same semantic category have a consistent encoding representation in different time slices.
[0049] By using the above text-based encoding method, the standardized process parameter snapshot sequence is transformed into a discrete process parameter token sequence that carries rich process context information and meets the requirements of subsequent semantic embedding processing, thereby realizing the structured migration of parameter data to the semantic space.
[0050] For example, in the stamping process, the standardized process parameter snapshot sequence includes a pH value of 7.2, a temperature of 25.0℃, a current density of 1.5A / m², and the equipment status "Operating Mode 1". A pre-trained process domain dictionary is invoked to map the pH value of 7.2 to the semantic code for "neutral acid-base state", the temperature of 25.0℃ to the semantic code for "room temperature condition", the current density of 1.5A / m² to the semantic code for "low current density", and the equipment status "Operating Mode 1" to the corresponding mode category code. The semantic codes and equipment status codes are concatenated and segmented into token units according to dictionary entries, forming the token sequence {neutral acid-base state, room temperature condition, low current density, mode 1}. For cases where the temperature and current density tokens appear repeatedly in multiple time slices, hash deduplication is performed to ensure consistency of the codes within the same category. In this scenario, the token sequence length is 4, and the time series index is bound to the token vector sequence for semantic embedding mapping in S1.4. This enables the process semantic encoder to identify the combination of physical environment and equipment state in the time slice, and the corresponding embedding vector significantly improves cross-modal matching accuracy in spatial correlation analysis.
[0051] S1.4: Based on the discrete process parameter token sequence, input to the lightweight process semantic encoder to perform nonlinear mapping transformation processing to extract implicit physical correlation features and generate a high-dimensional dense process semantic embedding vector.
[0052] S1.5: The process semantic embedding vector is structurally encapsulated and fused with the corresponding timestamp and device identifier to generate a process anchoring data sequence carrying multi-dimensional working condition features.
[0053] Step S2: Based on the process anchoring data sequence and the high-resolution defect images acquired in subsequent electroplating processes, weakly supervised alignment processing is performed. Cross-modal approximate association is achieved using process semantic embedding vectors to generate a spatiotemporally aligned multi-source heterogeneous fusion dataset. Specifically, this includes: S2.1: Perform local texture anomaly region detection processing on the high-resolution defect images acquired in subsequent electroplating processes, extract pixel-level coordinate sets, and generate defect region positioning vector sequences that characterize the physical location of defects.
[0054] For high-resolution defect images acquired during subsequent electroplating processes, the original pixel matrix output from the imaging sensor is used as input. Resolution thresholds and illumination equalization conditions are set to ensure stable execution of the detection algorithm. The original pixel matrix undergoes color space conversion, mapping the RGB format to grayscale or a multi-channel gradient space of interest, thereby eliminating color redundancy interference and enhancing edge detail. Gradient operators are applied to the converted image data to calculate the gradient magnitude and direction of each pixel, using combinations of Sobel, Scharr, or Prewitt operators to cover local texture variations in multiple directions. The gradient magnitude matrix is input into a saliency map to construct a model. Normalization and a brightness compression function are used to enhance the global distribution of gradient magnitudes, improving the saliency response of potential defect areas. Pixel-level threshold segmentation is performed based on the saliency map matrix, with dynamic thresholds set according to the formula for calculating the mean and standard deviation of global gradient magnitudes. in The average gradient magnitude. The standard deviation of the gradient magnitude. The adjustable coefficients ensure adaptive extraction of abnormal pixel sets under different noise levels. Connectivity analysis is performed on the segmented binary saliency map to calculate the centroid coordinates of connected components satisfying the minimum area constraint and record them in the localization vector sequence. Through this processing, the image input result from the previous step is transformed into pixel-level coordinate data containing the physical location of the defects, achieving high-precision generation of the defect region localization vector sequence.
[0055] For example, in an online inspection scenario on a metal bottle cap electroplating production line, a defect image with a resolution of 2048×2048 pixels is acquired. After RGB to grayscale conversion, the gradient magnitude matrix is calculated using the Sobel operator. The mean gradient magnitude is calculated as follows: The standard deviation is ,coefficient Set as The threshold is obtained according to the formula. = After segmentation, regions with a connected area of no less than 50 pixels are extracted from the binary image. The calculated centroid coordinates include positions such as (512,768) and (1024,640). The final generated defect region localization vector sequence accurately covers the physical locations of defects such as scratches and rough particles on the bottle cap surface, significantly improving the input quality for subsequent temporal alignment and causal inference.
[0056] S2.2: Based on the timestamp information in the defect area location vector sequence and the process anchoring data sequence generated in the preceding steps, perform dynamic time warping matching operation, and use the sliding time window mechanism to filter out the candidate process anchoring subset that has a causal lag relationship with the time of defect formation, so as to generate candidate working condition feature data blocks with temporal neighborhood attributes.
[0057] Based on the timestamp information in the defect region location vector sequence and the process anchoring data sequence generated by the preceding steps, the defect region location vector sequence is first parsed using a time index to extract the corresponding defect formation time signal and convert it into a time encoding format consistent with the process anchoring data sequence, achieving time domain benchmark alignment. A time difference calculation operation is performed on the aligned time-encoded data to obtain the time interval value between each process anchoring data record and the defect formation time, forming an original time interval vector set. A sliding time window mechanism is established based on this time interval vector set. The window length is set according to the maximum value of the physical transmission delay of the equipment process and the process operation cycle, and the window step size uses the reciprocal of the defect location accuracy as the iteration step to ensure that all potential causal lag relationship time segments are captured. The sliding time window is applied one by one in the process anchoring data sequence to filter out target anchoring data records within the window range and whose time interval values are within a preset lag interval, forming a candidate process anchoring subset. Neighborhood attribute labeling is performed on the candidate process anchoring subset, and a temporal neighborhood index table is established based on temporal adjacency and process flow sequence, providing accurate temporal boundary constraints for subsequent cross-modal correlation calculations. Through the above dynamic time warping matching and sliding time window filtering process, the image spatial information corresponding to the defect formation time is mapped and associated with the process parameter records with causal lag relationship, generating candidate working condition feature data blocks with temporal neighborhood attributes, and achieving accurate temporal matching effect between the defect time and the preceding process data.
[0058] For example, in a metal bottle cap electroplating production line, the defect formation time corresponding to the defect area location vector sequence is 2023-07-15 10:23:45.126. This time is encoded into a UTC millisecond value of 1626345825126 through time index parsing, and then differentially calculated at the millisecond level with all timestamps in the process anchor data sequence to generate a time interval vector. For instance, if the timestamp recorded in a stamping process is 1626345820126, then the time interval value is... Milliseconds. The sliding time window length is set to... milliseconds, step size is Milliseconds, filter time interval values within the window The records within milliseconds form a candidate process anchor subset. The time interval value of a passivation process record in the candidate subset is... The milliseconds satisfy the lag interval condition and establish a sequential connection with the stamping process in the neighborhood index table. Through this matching mechanism, the candidate working condition feature data block contains the defect formation time and parameter snapshots and equipment information of the preceding process. This can significantly improve the temporal localization accuracy of defect cause tracing when used for cross-modal similarity association.
[0059] S2.3: Perform cross-modal similarity measurement calculation on the semantic embedding vectors of the process contained in the candidate working condition feature data block, quantify the implicit association strength between the image texture feature vector and the semantic embedding vectors of each process, so as to generate a semantic alignment weight matrix that characterizes the degree of cross-modal approximate association.
[0060] S2.4: Based on the semantic alignment weight matrix, perform weighted fusion reconstruction processing on the candidate working condition feature data block, use the attention mechanism to aggregate the high-weight process semantic embedding vector and map it to the spatial coordinate system of the defect image to generate a spatiotemporal alignment feature tensor carrying multi-dimensional working condition context information.
[0061] S2.5: The spatiotemporal alignment feature tensor is structurally encapsulated and bound to the original high-resolution defect image and the corresponding process anchoring data sequence to establish a strong index association between pixel coordinates, process parameter snapshots and equipment identifiers, so as to generate a spatiotemporally aligned multi-source heterogeneous fusion dataset for causal inference.
[0062] The spatiotemporal alignment feature tensor generated by weighted fusion reconstruction is used as input along with the corresponding original high-resolution defect image data and process anchoring data sequence. A bidirectional mapping construction process is performed on the spatial coordinate index in the spatiotemporal alignment feature tensor to unify the pixel coordinate system of the defect image with the timestamp, equipment identifier, and key process parameter snapshot system in the process anchoring data sequence. Structured index encoding rules are applied to the unified coordinate index to generate multidimensional index key-value pairs, establishing a static binding relationship between each pixel-level coordinate and a unique process parameter snapshot and equipment identifier. Index redundancy elimination and conflict detection are performed on the binding relationship, and hash verification is used to confirm the uniqueness of each set of associated mappings in the global index table, avoiding duplicate bindings or incorrect mappings. Based on the unique binding index table, metadata injection processing is performed on the original high-resolution defect image, embedding process context information into the pixel data structure to form a composite unit that contains both visual features and embedded process parameters. The composite unit is constructed into a temporally linked list structure according to the timestamp and equipment identifier to ensure that the causal relationship between each pixel and its source process can be traced sequentially. By using a structured encapsulation process, the results of the previous step are transformed into a spatiotemporally aligned multi-source heterogeneous fusion dataset with strong index binding of pixel-process parameter-device identifier, thereby realizing integrated causal reasoning input for cross-modal data.
[0063] For example, in the stamping, cleaning, and passivation processes of a metal bottle cap electroplating production line, the process anchoring data sequence includes timestamps with millisecond precision, equipment identifiers of 8 alphanumeric characters, and process parameters including pH (range 6.8 to 7.2), temperature (range 20 to 25 degrees Celsius), and current density (range 1.5 to 2.0 amperes per square centimeter). High-resolution defect images have a resolution of 4096 × 2160 pixels, and the set of pixel coordinates corresponding to the local texture anomaly region location vectors ranges from 500 to 1200 pixels. During index binding, a unique index key of 32 bytes is generated using a hash function, and the pixel coordinates (m... x , m y A strong index is built to link the pixel coordinates (1023, 756) with the process anchoring fields. For example, pixel coordinates (1023, 756) correspond to pH 7.0, temperature 22.1 degrees Celsius, current density 1.6 amperes per square centimeter, equipment ID "AB1234XZ", and timestamp "2024-05-12 14:56:32.123". The uniqueness of this binding relationship is confirmed by hash verification in the global index table. The bound pixel units are embedded into the data structure of the original defect image, and a time-series linked list is constructed by sorting by timestamp. The final spatiotemporally aligned multi-source heterogeneous fusion dataset can directly perform contribution inference based on the process context of the pixels during subsequent causal mask calculation, significantly improving the accuracy of causal weight calculation.
[0064] like Figure 2 As shown, step S3 involves: based on the coordinate information of the local texture anomaly region in the defect image of the spatiotemporally aligned multi-source heterogeneous fusion dataset, reversibly activating a subset of process variables within the historical process time window, and collaboratively calculating mask weights by combining the variable change magnitude, process interval attenuation factor, and variable physical scope to generate a temporal causal mask matrix. Specifically, this includes: S3.1: The coordinate information of the local texture abnormal region of the defect image in the spatiotemporally aligned multi-source heterogeneous fusion dataset is parsed and processed. The pixel-level coordinates are converted into physical spatial position vectors by spatial mapping in order to determine the boundary range of the physical domain to be traced.
[0065] S3.2: Based on the physical domain boundary range, perform a reverse retrieval operation within the historical process time window, and use the time-series sliding window mechanism to filter out the original sequence of process variables that have potential physical contact or environmental influence with the current defect location, so as to generate a subset of candidate process variables.
[0066] S3.3: Perform numerical fluctuation analysis on the original sequences of each process variable in the candidate process variable subset, extract the deviation values of each variable in the corresponding time slice, and generate a set of variable change amplitude parameters characterizing the stability of the operating condition.
[0067] Numerical signals are extracted from the original sequences of each process variable in the subset of candidate process variables and used as the input for analysis.
[0068] For each process variable's original sequence, the sliding window data segmentation module is called to divide it into continuous, equal-length time slices to ensure the time consistency of statistical calculations.
[0069] The numerical signals within the time slice are centered, and the sequence is offset by the slice mean to eliminate overall trend bias.
[0070] The deviation of the centered numerical signal is calculated using the following formula: in For variables In time slice number The value of the point, This is the mean of the slice. This represents the number of data points in the slice.
[0071] The calculated standard deviation is used as a variable volatility indicator and associated with the variable identifier to form a single element of the variable change amplitude parameter set.
[0072] Iterate through all variables in the candidate process variable subset, repeat the standard deviation calculation and encapsulate the results to form a complete set of variable change magnitude parameters.
[0073] By combining the standard deviation statistic with the physical domain range, the original sequence of candidate process variables from the previous step is transformed into quantitative parameters characterizing the stability of the operating conditions, thus providing a numerical basis for subsequent attenuation factor calculation and time-series causal mask matrix generation.
[0074] For example, in a metal bottle cap stamping production line, the candidate process variable subset includes stamping pressure, die temperature, and stamping speed. The original sequence sampling frequency is 1Hz, and the time slice length is set to 60 seconds. After performing slice division and centering on the stamping pressure sequence, the mean of a certain slice is 800kPa, the sum of the squares of the deviations at each point is 250,000, and the number of data points n is 60. Substituting these values into the standard deviation formula, the result is... The fluctuation amplitude was found to be 65.22 kPa. The mold temperature sequence, after the same processing, showed a fluctuation amplitude of 3.8℃ in a certain slice, while the stamping speed sequence showed a fluctuation amplitude of 0.12 m / s. Binding these three fluctuation amplitudes to variable identifiers yielded a complete parameter set. In the subsequent attenuation factor calculation, the high fluctuation value of the stamping pressure was given a larger weight, while the mold temperature and stamping speed, due to their smaller fluctuation amplitudes, received lower weights. Ultimately, this resulted in the stamping pressure contributing a significantly higher probability to defect formation than other variables when generating the mask matrix.
[0075] S3.4: Based on the set of variable change magnitude parameters and the timestamp information of the original sequence of each process variable, perform the decay coefficient calculation operation, use the exponential decay function model combined with the process interval duration to derive the time weight factor, so as to generate a process interval decay factor sequence that reflects the retention rate of historical influence.
[0076] When calculating the attenuation coefficient based on the set of variable variation amplitude parameters and the timestamp information of the original sequences of each process variable, the input object is set as the standard deviation statistics of the candidate process variable subset and its index number on the historical process timeline. The difference between the timestamp of the original process variable sequence and the formation time of the current defect location is calculated to obtain the process interval duration vector, which is used as the independent variable of the attenuation function. An exponential attenuation function model is used to perform a nonlinear mapping on the interval duration. Each element in the variable variation amplitude parameter set is paired with its corresponding time weight factor to form a preliminary attenuation factor matrix, while retaining the physical domain boundary range as a calculation constraint. The attenuation factor matrix is normalized to distribute the weight values of different process interval durations on a uniform scale, avoiding extreme value shifts caused by differences in time span. The normalized attenuation factor matrix is output as a process interval attenuation factor sequence, providing a retention rate weight basis for subsequent multidimensional tensor fusion calculations. Through this processing method, the numerical fluctuation analysis results of the previous step are transformed into quantifiable historical impact retention rate data indicators, realizing time attenuation modeling of cross-process causal mask weights.
[0077] S3.5: Perform multidimensional tensor fusion processing on the set of variable change magnitude parameters, process interval attenuation factor sequence and physical domain boundary range, and use weighted product operation logic to collaboratively calculate the contribution probability value of each process variable to the formation of defects, so as to generate the final time-series causal mask matrix that represents the cross-process causal relationship.
[0078] Multidimensional corresponding index matching is performed on the input data of variable change magnitude parameter set, process interval attenuation factor sequence and physical domain boundary range to establish a unified variable dimension identification structure to ensure accurate alignment of parameter positions during tensor fusion.
[0079] The set of variable variation magnitude parameters and the sequence of process interval decay factors are converted into numerical tensors of the same dimension and scale, respectively. The differential normalization method is applied to eliminate the dimensional differences between data from different sources, and the physical domain boundary range is retained as a spatial constraint mask matrix.
[0080] Element-level multiplication is performed based on the normalized variable change magnitude tensor and the process interval decay factor tensor. The multiplication operation is limited to the scope coverage area by the physical scope mask matrix to calculate the temporal influence factor of each process variable at a specific spatial location.
[0081] The aforementioned temporal influence factors are further weighted and multiplied with the coverage area weights in the physical domain mask matrix to form a comprehensive contribution value tensor, which comprehensively reflects the synergistic effect of variable numerical fluctuations, time decay characteristics, and spatial range of influence.
[0082] A threshold filtering strategy is used to filter the comprehensive contribution value tensor, delete redundant variable entries below the set contribution threshold, retain the effective variable index that has a significant impact on defect formation, and fill the corresponding contribution value into the final temporal causal mask matrix to realize the explicit quantitative expression of cross-process causal relationship.
[0083] By using multidimensional tensor fusion and weighted product processing, the set of variable change magnitude parameters, process interval attenuation factor sequence and physical domain boundary range from the previous step are transformed into a time-series causal mask matrix that characterizes the probability of each process variable contributing to defect formation, thereby achieving accurate modeling and interpretable presentation of cross-process causal relationships.
[0084] For example, in the source analysis of electroplating defects in metal bottle caps, the set of variable variation parameters includes three key process variables: pH value variation of 0.8, temperature variation of 5.2, and current density variation of 0.4, with process interval attenuation factor sequences of 0.65, 0.48, and 0.72, respectively, and a physical domain boundary coverage rate of 0.9. In implementation, the above parameter set is first normalized to ensure its values are distributed between 0 and 1; then, the normalized variable variation amplitude is multiplied element-wise with the corresponding attenuation factor. For example, the time-series influence factor of pH value is calculated as follows: Then, multiply the contribution value by the coverage weight within the physical scope to obtain the overall contribution value: The calculation results are used as the contribution probability values of the variable at the corresponding physical location in the mask matrix. The same processing is applied to the temperature and current density variables to form a comprehensive contribution value tensor. This tensor is then filtered using a set threshold of 0.3, retaining variable indices with contribution values of 0.468 and 0.259, respectively. The fused temporal causal mask matrix demonstrates the significant effect of process temperature changes on defect formation during subsequent causal intensity projection. While the contribution of current density changes is lower, it still has reference value in locally sensitive areas. The overall interpretability of the model is significantly improved, supporting fine-grained quality control in the production process.
[0085] like Figure 3 As shown, step S4 involves mapping the temporal causal mask matrix to the process hierarchy space and performing a phased causal intensity projection operation. A unified normalized scale transformation is performed according to the granularity levels of the top-level process chain macro-influence distribution, the middle-level single-process key parameter sensitive area distribution, and the bottom-level pixel-level attribution heatmap to generate a three-layer causal heatmap. Specifically, this includes: S4.1: Obtain the original mask weight data in the temporal causal mask matrix, and perform spatial resampling processing on the original mask weight data based on the topological structure defined by the process semantic embedding vector to generate a process hierarchy mapping tensor with process node alignment attributes.
[0086] The process hierarchy space is a multi-level structured analysis space built upon the topology of the metal bottle cap electroplating process chain. It maps the original weight data in the temporal causal mask matrix to the process node dimension for hierarchical analysis. This space consists of three granular levels: top-level process chain nodes, mid-level physical domain nodes within processes, and bottom-level process parameter nodes. The specific construction method is as follows: Top-level process chain node definition: Based on the metal bottle cap electroplating process flow diagram, the four main processes of stamping, cleaning, passivation, and electroplating are defined as top-level process chain nodes. Each top-level node corresponds to an independent process stage. Directed connections are established between nodes according to the process flow sequence to form a process chain topology, which is used to characterize the sequential dependence of each process in the time dimension.
[0087] Definition of Physical Domain Nodes within Mid-Layer Processes: Within each top-level process node, multiple physical domain sub-nodes are defined based on the physicochemical mechanisms of that process. Specifically: the stamping process includes pressure, temperature, and deformation rate domains; the cleaning process includes cleaning agent concentration, cleaning time, and temperature domains; the passivation process includes passivation solution pH, passivation time, and redox potential domains; and the electroplating process includes current density, plating solution temperature, electroplating time, and anode-cathode distance domains. Each physical domain sub-node establishes a mapping with its corresponding process variable through process semantic embedding vectors, serving as the basic unit for calculating mid-layer granularity causal strength.
[0088] Definition of underlying process parameter nodes: Within each physical domain sub-node, further subdivisions are made into specific measurable and controllable process parameter nodes, such as pressure setpoints, measured temperature values, and instantaneous concentration values. These underlying process parameter nodes directly correspond to the raw data collected by sensors and are quantified using the raw mask weight values in the time-series causal mask matrix.
[0089] The topological mapping rules of the process hierarchy space are as follows: The nodes of the above three layers are combined into a process hierarchy topological coordinate index matrix according to the predefined adjacency relationship. The mapping rules are as follows: each original mask weight value must uniquely correspond to a bottom process parameter node; each bottom process parameter node must belong to a physical domain child node; each physical domain child node must belong to a top process chain node.
[0090] Through this mapping rule, the original weight data in the temporal causal mask matrix can be spatially resampled to generate a process-level mapping tensor with process node alignment attributes. Its dimension is represented as L×M×N, where L is the number of top-level process nodes, M is the number of physical domain nodes in each process, and N is the number of process parameter nodes in each domain.
[0091] The construction of this process hierarchy provides a unified granularity benchmark and a computable topological index basis for the phased causal intensity projection operation in the subsequent S4 step, ensuring that the calculation results of the macroscopic influence distribution of the top-level process chain, the sensitive area distribution of key parameters of the middle-level single process, and the pixel-level attribution heatmap of the bottom layer have semantic consistency and hierarchical traceability.
[0092] Data extraction is performed on the original mask weight data in the temporal causal mask matrix to establish a weight index list, which clarifies the corresponding process variables and process node identifiers. Based on the process semantic embedding vector generated in the preceding steps, a pre-defined process chain topology structure definition table is invoked to map the adjacency relationships of each process node in the topology into a computable node coordinate index matrix. Node alignment processing is performed on the original mask weight data, establishing a one-to-one correspondence between each record in the weight index list and the process-level topology node, and determining the weight distribution differences of adjacent nodes. Node interpolation and diffusion operations are used to complete missing or discontinuous weight data, ensuring that the generated mapping tensor has consistency and continuity in the topological space. For the completed node weight data, normalization processing is performed to map mask weight values from different node sources to a unified scale range, and the standardized weight values of each node are calculated. The normalized weight values are rearranged and combined according to the topological structure to form a process-level mapping tensor with process node alignment attributes, which is used for subsequent global aggregation and local gradient analysis. By using the above spatial resampling and normalization processing methods, the temporal causal mask matrix of the previous step is transformed into process node mapping data that can directly support the phased causal intensity projection of the process hierarchy, thereby realizing the accurate conversion of cross-process causal relationships from the temporal domain to the process topology domain.
[0093] For example, in the scenario of analyzing defects in metal bottle cap electroplating, the input temporal causal mask matrix contains original mask weight values corresponding to 90 process variables, with weights ranging from 0.12 to 0.87. The process chain topology consists of four main process nodes: stamping, cleaning, passivation, and electroplating, with each process node corresponding to multiple physical domain child nodes. After associating each record in the weight index list with the topology coordinate index matrix, the 7 missing weight values for adjacent nodes are filled in. Normalization is then performed using... =0.12 and =0.87, calculate the original weight of a certain node in the stamping process. The normalized value of =0.53 is All normalized weight values are rearranged according to the process hierarchy to form a mapping tensor of size 4×N, where N is the total number of nodes in each process. Validation results show that this mapping tensor can stably extract the cumulative contribution value of each process chain in subsequent global aggregation operations, and significantly improve the accuracy of locating sensitive areas of key parameters in local gradient analysis.
[0094] S4.2: Perform global aggregation operation based on the process hierarchy mapping tensor to calculate the cumulative contribution value of each preceding process node to the formation of the final defect, so as to generate a macro causal intensity vector that characterizes the macro-influence distribution of the top-level process chain.
[0095] S4.3: Perform local gradient analysis based on the macro-causal intensity vector and process hierarchy mapping tensor, and extract the sensitivity extreme value region of key process parameters in a single process by combining the physical domain constraints of variables, so as to generate a parameter sensitivity heat map that characterizes the distribution of sensitive areas of key parameters in a mid-level single process.
[0096] The input dependency relationship is established based on the macro-causal intensity vector and the process level mapping tensor. The local gradient operator is called to perform block parsing of the process level mapping tensor to separate the weight distribution matrix of key process parameters within each process.
[0097] The gradient operator is used to calculate the rate of change of the weight distribution matrix in the parameter space, forming the corresponding sensitivity gradient field data.
[0098] The sensitivity gradient field data is multiplied by the macro causal intensity vector to extract the gradient peak positions that are highly consistent with the macro influence intensity, forming a preliminary set of sensitive region coordinates.
[0099] By combining the physical domain constraints of the variables, the initial sensitive area coordinate set is cross-validated with the physical domain model to eliminate redundant sensitive areas that exceed the actual parameter control range.
[0100] Within the retained effective sensitive area, extreme value extraction is performed according to the absolute value of the gradient to obtain the sensitivity extreme value area of the key process parameter in a single process. This sensitivity extreme value area is then mapped into a two-dimensional heat matrix to form a parameter sensitivity heat map that characterizes the distribution of the sensitive area of the key parameter in the middle layer of a single process.
[0101] in The integral value of sensitivity intensity, The sensitivity gradient field matrix, For macroscopic causal strength vector, This refers to the parameter space scope.
[0102] By using local gradient analysis and physical constraint mapping, the process level mapping tensor and macro-causal intensity vector from the previous step are transformed into a parameter-sensitive heat map carrying spatial location and intensity information, thereby achieving accurate quantification and visualization of the sensitive areas of key parameters in a single process.
[0103] For example, in the parameter space of the metal bottle cap stamping process, the gradient operator type is configured as the Sobel operator, with horizontal and vertical convolution kernels of [-1,0,1] and [-1,0,1], respectively. T The sensitivity gradient field calculation resolution is 0.1 parameter units. The macroscopic causal intensity vector is obtained from the previous layer aggregation operation, with values ranging from 0 to 5, and the maximum value corresponding to the stamping process pressure parameter. The physical domain is defined by stamping pressure controlled between 300 and 500 MPa. After physical constraint cross-validation, the initial sensitive region coordinate set retains pressure parameter nodes and temperature parameter nodes. The absolute value of the gradient of the pressure parameter nodes is extracted, and the maximum gradient value is... The corresponding sensitivity intensity integral value is calculated using the formula: This forms a high-temperature region in the pressure parameter space. The resulting parameter-sensitive thermal map shows a significant thermal peak at the pressure node, which has been verified to greatly improve the positioning accuracy of electroplating defects caused by pressure abnormalities in the stamping process.
[0104] S4.4: Based on the coordinate information of the local texture abnormality region of the parameter-sensitive heatmap and the defect image, perform back projection mapping to refine the spatial features of the middle-layer parameter-sensitive heatmap to the pixel level, so as to generate a pixel-level attribution weight matrix that represents the bottom-layer pixel-level attribution heatmap.
[0105] A spatial index mapping table is constructed based on the pixel coordinate information of the local texture abnormality region of the parameter-sensitive heat map and the defect image. A one-to-one mapping relationship is established between the sensitivity heat value and the corresponding pixel position to clarify the coordinate alignment benchmark.
[0106] Physical size normalization is performed on the extreme value regions of sensitivity for each parameter in the sensitive heat map, mapping the heat values at different resolutions and scales to a spatial pixel grid consistent with the defect image, ensuring that the interpolation input has a uniform scale.
[0107] On a normalized spatial grid, two-dimensional interpolation is performed on the parameter sensitivity heatmap. Interpolation weights are constructed using the heat values of four adjacent points in both the horizontal and vertical directions. Local continuous value estimation is achieved through a formula: in, and These are the normalized position coordinates of the interpolation point within the cell. The sensitivity values are the values of four adjacent points.
[0108] The interpolation results are remapped to the original resolution of the defective image according to pixel coordinates, forming a pixel-level attribution weight matrix covering the entire image.
[0109] Boundary smoothing is performed on the interpolated pixel attribution weight matrix, and Gaussian filtering is used to eliminate local continuity breaks introduced by the interpolation process, ensuring the stability of the spatial distribution of attribution weights.
[0110] By using bilinear interpolation and boundary smoothing, the parameter sensitivity heatmap results from the previous step are transformed into an attribution weight matrix that can be directly used for pixel-level causal path analysis, thus achieving a refined mapping from the mid-level parameter sensitivity distribution to the bottom-level image pixel attribution.
[0111] For example, in the defect analysis of the electroplating process of metal bottle caps, the input parameter heatmap resolution is 64×64, the defect image resolution is 512×512, and the coordinate range of the local texture anomaly region is [120, 180] × [200, 260]. Through spatial normalization, the heatmap is mapped to the area corresponding to the defect. Figure 1 A 512×512 grid is used. For the coordinate point (150.4, 210.7), calculate its position within the normalized cell. =0.4, =0.7, the heat value of four adjacent points is =0.62, =0.70, =0.58, =0.65. Substituting the bilinear interpolation formula, we obtain the interpolation result. =0.642, and then mapped to the corresponding position in the attribution weight matrix. A smoothing filter with a radius of 2 pixels and a Gaussian kernel σ=1 is applied to the global attribution weight matrix, which significantly eliminates fluctuations at the interpolation boundary, achieves uniform and continuous pixel-level attribution weight distribution, and improves the visualization accuracy and stability of causal path projection.
[0112] S4.5: Based on the macroscopic causal intensity vector, parameter-sensitive heatmap and pixel-level attribution weight matrix, perform multi-scale unified normalization transformation, and use the range standardization method to eliminate the dimensional differences between different granularity levels to generate a three-layer causal heatmap with cross-granularity consistent expression capability.
[0113] Based on the top-level macro-causal intensity vector, the middle-level parameter sensitivity heatmap, and the bottom-level pixel-level attribution weight matrix, the multi-scale normalization processing module is invoked to perform a unified scale transformation operation on the data at three different granularity levels.
[0114] The range standardization calculation is performed on the input macro causal intensity vector, the maximum and minimum values of the node weights of each process are read, and the node weights are mapped to the [0,1] interval.
[0115] Pixel-wise range normalization is performed on the matrix data of the mid-level parameter sensitivity heatmap. The global maximum and minimum values of all elements in the matrix are read, and the same normalization formula is used to eliminate the dimensional differences of the parameter sensitivity values while maintaining the gradient of the heat distribution.
[0116] Local window range standardization is performed on the underlying pixel-level attribution weight matrix. The highest and lowest attribution weights in each local coordinate block are used as the upper and lower limits of the window range standardization, respectively, to map the attribution weights to a uniform scale.
[0117] Establish cross-granularity consistency mapping rules to merge and encode the normalized data of the three levels in a unified numerical domain, forming a three-level causal heatmap data structure with consistent expression capabilities.
[0118] By using the above-mentioned range standardization and unified scale transformation processing methods, the macroscopic causal intensity vector, the mid-level parameter sensitivity heat map and the bottom-level pixel-level attribution weight matrix generated in the previous step are transformed into a multi-granularity heat map with unified dimensions, so as to achieve comparability and consistent expression effect between different granularity levels.
[0119] For example, in the scenario of analyzing electroplating defects in metal bottle caps, the original weight values of the macroscopic causal intensity vector range from 2.5 to 9.8, the values of the mid-layer parameter sensitivity heatmap range from 15 to 63, and the values of the bottom-layer pixel-level attribution weight matrix within the local window range from 0.002 to 0.017. For the macroscopic causal intensity vector, using... For the maximum value, To find the minimum value, apply the formula. The normalized result is approximately The mid-level parameter sensitivity heatmap uses the global maximum value. Minimum value For the original value Execute formula The calculation and normalization result are approximately A window in the underlying pixel-level attribution weight matrix is at its maximum value. Minimum value For the original value Execute formula The calculation and normalization result are approximately The three normalized results are all mapped to a unified [0,1] scale, which allows for direct comparison and comprehensive analysis of causal contributions at different levels. The resulting three-layer causal heatmap achieves cross-granularity consistency in color coding and numerical display, which helps to intuitively present the stage contribution relationship between the process chain, parameter sensitive area and defect area in the visualization interface.
[0120] Step S5: Based on the historically verified defect case library, perform similarity retrieval and deviation comparison on the defect cause evolution paths generated in the three-layer causal heatmap. If the parameter combination of a certain process node in the path is detected to deviate from the historical valid range, mark it with a confidence decay indicator to generate a causal path candidate set with confidence verification labels. Specifically, this includes: S5.1: Perform multi-dimensional feature vector extraction processing on the top-level process chain macro-impact distribution, the middle-level single-process key parameter sensitive area distribution, and the bottom-level pixel-level attribution heatmap in the three-layer causal heatmap to generate a feature sequence of the current defect cause evolution path containing spatiotemporal topology and parameter sensitivity information.
[0121] When performing multi-dimensional feature vector extraction on the top-level macro-influence distribution of the three-layer causal heatmap, the middle-level key parameter sensitive area distribution of a single process, and the bottom-level pixel-level attribution heatmap, the input object is the structured data of the three-layer causal heatmap generated in step S4. The top-level macro-causal intensity vector is expanded according to the process node order, and an ordered arrangement is performed using the process hierarchy index mapping table to generate macro-influence feature sub-vectors containing temporal location information. Based on the middle-level parameter sensitivity heatmap, parameter index positions with sensitivity exceeding a preset threshold are retrieved, and single-process sensitive parameter feature sub-vectors are generated by combining physical domain constraints. Sparse coding transformation is performed on the bottom-level pixel-level attribution weight matrix, mapping the high-weight pixel coordinate set to the defect area template index, extracting cross-pixel distribution pattern features, and generating pixel attribution feature sub-vectors. The above three sub-vectors are concatenated in hierarchical order to form a multi-dimensional feature combination vector containing macro, meso, and micro granular information. Normalization is performed on the combination vector, and the range standardization method is used to eliminate the differences in dimensions between different levels, ensuring the scale consistency of subsequent similarity retrieval. A multi-domain joint encoder is employed to perform nonlinear embedding transformation on the normalized feature combination vector, extracting cross-level spatiotemporal topological correlation patterns, and generating a final feature sequence of the current defect causal evolution path containing spatiotemporal topological structure and parameter sensitivity information. Through the above processing method, the three-layer causal heatmap results from the previous step are transformed into a multi-dimensional feature sequence that can be compared with historical case databases, achieving high-precision representation of path features.
[0122] For example, in the scenario of tracing the source of electroplating defects in metal bottle caps, the input data is the top-level macroscopic causal intensity vector [0.42, 0.35, 0.23]. The sensitivity values of the middle-level parameter sensitivity heatmap obtained by local extremum detection are 65.3, 58.7, and 49.2, respectively. The weight pattern vector extracted after sparse encoding of the bottom-level pixel-level attribution matrix is [0.91, 0.88, 0.76]. Range standardization is performed on each sub-vector. After standardization, the numerical range of each sub-vector is unified to the 0-1 interval. For example, the macroscopic vector [0.42, 0.35, 0.23] is standardized to [1.0, 0.5, 0.0], the sensitivity parameter vector [65.3, 58.7, 49.2] is standardized to [1.0, 0.72, 0.0], and the pixel attribution vector [0.91, 0.88, 0.76] is standardized to [1.0, 0.85, 0.0]. The three sets of standardized results were concatenated to form a 9-dimensional combined feature vector [1.0, 0.5, 0.0, 1.0, 0.72, 0.0, 1.0, 0.85, 0.0]. This vector was then mapped to the embedding space using a multi-domain joint encoder to obtain the embedded feature sequence {0.83, 0.64, 0.57, 0.91, 0.75, 0.48, 0.88, 0.80, 0.45}. The search results in the historical electroplating defect case database showed that it was highly similar to a defect path with abnormal process parameters across the stamping-cleaning-passivation three-process stage. This demonstrated accurate extraction of cross-granularity features and a significantly improved matching degree for subsequent comparisons.
[0123] S5.2: Based on the feature sequence of the current defect cause evolution path, perform a high-dimensional space similarity retrieval operation in the historical verified defect case library to obtain the set of historical standard defect cause evolution paths with the maximum neighborhood overlap with the current path.
[0124] The historical verified defect case library is a structured data collection that stores records of complete defect cause paths and corresponding process parameters, which have been manually reviewed and confirmed or verified through production. The construction and maintenance of this case library includes the following elements: The data in the case library comes from: real defect events that occurred in historical production, which were manually reviewed and confirmed before being included; and standard defect patterns generated through process experiments or simulations, which were verified by experts and entered as benchmark cases.
[0125] Case content structure: Each case contains the following fields: unique case identifier (ID); defect type label (including common electroplating defects such as pinholes, pitting, peeling, and exposed substrate); defect cause evolution path: including a complete three-layer causal heat map structured data from the top-level process chain macro-impact distribution, the middle-level single-process key parameter sensitive area distribution to the bottom-level pixel-level attribution heat map; parameter combination values of each process node (including timestamp, equipment ID, process parameter values, etc.); historical valid range corresponding to each parameter (each process parameter of each process node in the case library, determined based on the statistical distribution of the parameter in historical successful cases, which can guarantee the normal fluctuation range of product quality); confidence weight (reflecting the reliability of the case as a standard reference, with a value range of [0,1]); original sensor data index and defect image link, supporting data backtracking verification.
[0126] The case study library is updated using an incremental learning strategy. When a new defect is manually verified, the system automatically adds its feature vector and path data to the case study library. Cluster analysis is then used to dynamically optimize the coverage and representativeness of the library, avoiding redundant storage. The case study library undergoes regular version iterations, retaining historical versions to support trend analysis.
[0127] The case library uses high-dimensional vector indexing technology (including algorithms such as HNSW and FAISS) to index the feature sequence of the defect cause evolution path of each case, and supports fast approximate nearest neighbor retrieval based on Euclidean distance or cosine similarity to meet the needs of real-time similarity comparison.
[0128] The historically verified defect case library provides a standard reference benchmark for the similarity retrieval of defect cause paths, ensuring that the generated causal path candidate set has traceable and verifiable characteristics.
[0129] S5.3: Utilize the historical effective interval parameter boundaries of each node in the historical standard defect cause evolution path set to perform layer-by-layer deviation comparison calculations on the process node parameter combinations in the current defect cause evolution path feature sequence, so as to generate a process node dynamic deviation quantitative index that characterizes the degree of parameter deviation.
[0130] S5.4: Execute threshold judgment logic based on the value of the dynamic deviation quantification index of the process node. If the deviation value of any process node exceeds the preset tolerance range, add a confidence decay flag to the node to generate an initial causal path verification object with an anomaly mark.
[0131] S5.5: The initial causal path verification object with anomaly markers is encapsulated in a structured manner, and the confidence decay marker is associated with the original path feature data to generate a final causal path candidate set with confidence verification labels that can be used for manual review and screening.
[0132] Using an initial causal path verification object with anomaly markers as input data, the path feature data index table is invoked to locate the original feature vector set of the corresponding top-level process chain macro-impact distribution, the middle-level single-process key parameter sensitive area distribution, and the bottom-level pixel-level attribution heatmap in the three-layer causal heatmap. Attribute binding processing is performed on the located original feature vector set, establishing a one-to-one mapping relationship between each disposal confidence decay indicator and its corresponding process node feature vector, ensuring a strict correspondence between the indicator and the source parameter data. Structured encapsulation is used to package the bound mapping relationship into multi-dimensional data, encapsulating the process level index, parameter combination value, sensitivity weight, and confidence status into a unified structured object, and generating an index key that supports cross-level retrieval. The multi-source data binding module is invoked to associate and fuse the process node features in the structured object with historical valid interval parameter boundaries, deviation quantification indicators, and original sensor reading position pointers, ensuring that the original data can be directly located and retrieved during subsequent manual review. The format normalization process converts the encapsulated object into a preset candidate set data format, including JSON-encoded causal path topology, node weight distribution, and confidence label fields, to meet the input interface requirements of the downstream manual review and screening module. Through the above structured encapsulation process, the anomaly marker object from the previous step is transformed into a causal path candidate set with confidence verification labels that can be traced back to the original data, achieving the goals of visualization and data consistency before manual review.
[0133] For example, when a stamping process node is detected as having excessively large temperature parameter deviations, a binding mapping table is formed by binding the feature vector set of that node (macroscopic contribution of 37.5, mid-layer temperature sensitivity of 4.8, and bottom-layer pixel attribution weight average of 0.62) with a confidence decay identifier. During encapsulation, the process index ID is set to C001, the parameter combination values include temperature 83℃, current density 15.2A / m², sensitivity weight of 4.8, and confidence status set to "low". In the correlation and fusion stage, the node is compared with the boundary data and deviation quantization index of the historical effective temperature range of 75℃ to 80℃. The formula is used for binding, where the numerator represents the difference between the current temperature value and the upper limit boundary, and the denominator represents the temperature difference range of the effective interval. The calculation result is 0.6, significantly higher than the preset tolerance threshold of 0.3, thus retaining the confidence decay indicator. The final generated candidate set object includes the process topology, parameters and sensitivity weights of each node, confidence labels, and sensor data positioning pointers, meeting the needs of manual review and screening. In the quality inspection terminal interface, the node can be directly clicked to retrieve the temperature curve and high-resolution defect image, realizing the ability to trace the source before review.
[0134] Step S6: For nodes with confidence decay indicators in the candidate causal path set with confidence verification labels, a manual review prompt mechanism is triggered, and the original sensor reading index and image frame source tracing link are retained to generate a set of credible causal paths corrected by manual intervention. Specifically, this includes: S6.1: Perform a traversal retrieval process on the causal path candidate set with confidence verification labels to extract the target process node and its corresponding parameter combination deviation interval data carrying confidence decay indicators.
[0135] S6.2: Based on the target process node and its corresponding parameter combination deviation interval data, call the original sensor reading index mapping table to locate and obtain the original sensor reading sequence and high-resolution image frame traceability link of the historical moment that is strictly bound to the target process node.
[0136] S6.3: Construct a multimodal verification context data package by linking the original sensor reading sequence at the historical moment with the high-resolution image frame source link, so as to generate manual verification prompt interface rendering data containing time series parameter fluctuation curves and local texture anomaly screenshots.
[0137] S6.4: Trigger the external manual intervention instruction receiving process based on the rendered data of the manual review prompt interface to obtain the path retention confirmation signal or parameter threshold correction instruction made by the expert user for the target process node.
[0138] The input manual review prompt interface rendering data includes time-series parameter fluctuation curves, screenshots of local texture anomalies, and parameter combination deviation range information for the target process node. An external manual intervention command monitoring module is initialized based on this rendering data to establish a real-time communication channel with the expert interaction terminal. Based on the data stream in the communication channel, an event parsing unit is invoked to decode the interactive control identifiers in the interface rendering data to generate a node index table that can trigger interactive events. Using the node index table, expert clicks, swipes, or input signals are mapped to standardized intervention command codes, including two types of operation identifiers: path retention confirmation signals and parameter threshold correction commands. For parameter threshold correction commands, a command parser is invoked to extract the name and value of the target parameter to be corrected, and the corrected parameter deviation compensation amount is calculated. The calculated compensation amount is logically merged with the deviation range data to form an updated parameter constraint set, which is then marked as manually corrected. Through the joint encapsulation of intervention command codes and parameter constraint sets, the review prompt interface rendering data from the previous step is transformed into a standardized intervention result confirmed or corrected by the expert, achieving structured input of manual review information.
[0139] For example, on a metal bottle cap electroplating production line, the data rendered on the manual review prompt interface includes a temperature deviation range of 190℃ to 195℃ for the target process node "stamping," with a historical effective range of 180℃ to 185℃. The time series curve shows that the deviation occurred 60 minutes before electroplating. An external expert inputs a parameter threshold correction command through an interactive terminal, setting the corrected temperature threshold to 184℃. The intervention command code corresponds to "correction command - temperature - 184." The command parser extracts the parameter name "temperature" and the value 184, and calculates the compensation amount. This indicates that the temperature needs to be reduced by 6℃ after correction to return to the effective range. This compensation amount is then merged with the original deviation range data to form an updated temperature constraint set [184℃ to 185℃], and the correction is marked as complete. The final output of the standardized intervention result includes the path retention signal and the temperature constraint set. After this processing, subsequent causal path logic reconstruction can eliminate spurious associations with temperatures above 185℃ based on the corrected data, significantly improving the reliability and industrial applicability of defect cause tracing.
[0140] S6.5: Based on the path retention confirmation signal or parameter threshold correction instruction, perform logical reconstruction and state update operations on the causal path candidate set with confidence verification label to generate a set of credible causal paths that have been manually corrected, eliminating false associations and retaining true physical causal relationships.
[0141] Based on the path retention confirmation signal or parameter threshold correction instruction, the node index mapping table of the causal path candidate set is invoked to locate the target process node data structure that needs to be updated.
[0142] For the parameter combinations and corresponding deviation ranges bound in the target process node data structure, perform a logical replacement operation. If it is to retain the confirmation signal, maintain the original parameter value and reset the confidence to the full value. If it is a threshold correction instruction, overwrite the original parameter value with the correction value and adjust the confidence weight factor accordingly.
[0143] A consistency check is applied to the adjusted set of parameter values. Each parameter value is compared with the physical scope and the historical standard interval. If the check result meets the consistency condition, the state is marked as valid. If it does not meet the condition, the node is removed to eliminate false associations.
[0144] Perform path structure reconstruction operation on the remaining valid process nodes, rearrange the temporal index of the process nodes and call the topology update function to refresh the adjacency matrix of the process chain, ensuring that the topological connection of the path conforms to the physical order of defect evolution.
[0145] The contribution weights of each node in the reconstructed path are recalculated using a weighted normalization function.
[0146] Through the above-mentioned logical reconstruction and state update processing, the causal path candidate set results of the previous step are transformed into a set of credible causal paths that have been manually corrected, eliminating false associations and retaining real physical causal relationships, thereby achieving a dual improvement in path usability and interpretability.
[0147] For example, in the quality control scenario of metal bottle cap electroplating, a passivation process node in the causal path candidate set with confidence verification labels is corrected, and the confidence adjustment factor corresponding to the confirmation signal of the input path is retained. Set as Retain the original contribution level for The corrected weights calculated using the formula are: To maintain the integrity of the physical association, another cleaning process node received a threshold correction command and changed the temperature parameter from... Adjusted to Celsius Celsius, confidence adjustment factor set to Original contribution for The corrected weights calculated by the formula are: After consistency verification, the adjusted value was confirmed to be within the historical valid range, and the node was ultimately retained. After reconstruction, the connection order of each node in the path was adjusted to stamping → cleaning → passivation → electroplating. The topology adjacency matrix was refreshed, and the output set of reliable causal paths showed a significant improvement in the accuracy of defect cause tracing in the verification test, supporting the subsequent generation process of visualization reports.
[0148] Step S7: Integrate the process node contribution data and expert rule annotation layer information from the trusted causal path set to construct a structured data object containing an interactive timeline view and process-parameter-defect region triple links, thereby generating a structured causal tracing report data stream. Specifically, this includes: S7.1: Obtain the process node contribution data sequence from the set of credible causal paths that have been corrected by manual intervention, and use the multidimensional tensor reconstruction method to standardize the weight distribution of each process stage in the process node contribution data sequence to generate a normalized contribution feature matrix with unified dimensions.
[0149] S7.2: Based on the process level index information in the normalized contribution feature matrix, call the preset expert rule knowledge base to perform semantic matching operation, inject the process constraints and anomaly judgment logic defined by domain experts into the corresponding process node attributes, so as to generate an enhanced causal path object carrying an expert rule annotation layer.
[0150] The expert rule knowledge base is loaded during system initialization and dynamically updated through manual review during system operation. The expert rule knowledge base is constructed based on the experience and knowledge of experts in the electroplating process field, formalizing process constraints, anomaly judgment logic, and defect cause explanation rules into computable structured rule entries. Each rule includes: applicable process node, triggering condition, rule description text, suggested remedial measures, and confidence level correction coefficient; rule entries are organized according to process hierarchy, forming an expert rule index tree corresponding to the process topology.
[0151] The content of the annotation layer information: The expert rule annotation layer for each process node includes the following fields: rule unique identifier, rule description text, trigger condition description, suggested handling measures, confidence correction coefficient, and associated historical case ID.
[0152] S7.3: For the key process variables and defect image pixel coordinates in the enhanced causal path object, perform cross-modal entity alignment processing to establish a strong correlation mapping relationship between the snapshot of the preceding process parameters, the intermediate process state variables and the final surface defect area, so as to generate a process-parameter-defect area triplet link set.
[0153] For the key process variables and defect image pixel coordinates in the enhanced causal path object, the cross-modal feature alignment module is called to perform corresponding matching calculations between the normalized weights of each process variable in the process node contribution matrix and the spatial texture feature vector of the defect image.
[0154] Based on the timestamp index relationship, the continuous sensor record sequences such as temperature, pH value, and current density in the previous process parameter snapshot are extracted and mapped to the intermediate process state variable set according to the process level, so as to ensure the temporal consistency and physical correlation of the parameters.
[0155] The correlation coefficient between the matched parameter sequence and the pixel features of the defect region is calculated using the Pearson correlation coefficient formula: in For a numerical sequence of process variables, This is a sequence of feature values for defective pixels. and These are the mean values of the corresponding sequences.
[0156] The correlation coefficient results are threshold-filtered, and pairs with a significance level higher than the preset level are included in the strong correlation mapping candidate set, while those with a significance level lower than the threshold are filtered out to improve the accuracy of the correlation mapping.
[0157] For each set of process variables, state variables and defect area mapping relationships in the candidate set, a triplet data record containing process identifier, parameter name, state variable description and defect area coordinates is generated and uniquely encoded and bound to ensure consistency in subsequent visualization calls.
[0158] Through the above cross-modal entity alignment and association mapping processing, the enhanced causal path object of the previous step is transformed into a triplet link set of process-parameter-defect region, realizing the precise correspondence between the physical variables of each key node in the defect cause path and the surface defect manifestation.
[0159] For example, in the stamping process of metal bottle caps, the temperature sensor records continuous values of 26.5℃, 27.0℃, and 27.8℃; the pH sensor records values of 7.1, 7.3, and 7.4; the current density records values of 3.5A / m², 3.6A / m², and 3.8A / m²; and the local texture feature values in the defect image are 112, 115, and 118. Applying the Pearson correlation coefficient formula described above, the correlation coefficient between temperature and texture features is calculated, yielding... The value is significantly higher than the preset threshold of 0.8, thus entering the strong correlation mapping candidate set; the correlation coefficient between pH value and texture features is calculated as follows: It also entered the candidate set; the correlation coefficient results between current density and texture features are as follows: Records below the threshold are filtered out. The final generated triplet set contains two records: (stamping, temperature, defect coordinate set) and (stamping, pH, defect coordinate set). Validation results show that this set can significantly improve the ability of the subsequent visualization module to interpret the defect cause path.
[0160] S7.4: Using the timestamp sequence in the process-parameter-defect region triplet link set, construct a dynamic interactive timeline view data structure, and serialize and encapsulate the stage contribution change curves of each process node and the expert rule triggering events in chronological order to generate an interactive view data stream with time-series backtracking capability.
[0161] S7.5: Integrate the interactive view data stream with time-series backtracking capability with the full metadata in the enhanced causal path object, perform JSON schema serialization encoding processing, and package the multi-source heterogeneous causal inference results into a single data transmission unit to generate a structured causal tracing report data stream.
[0162] A two-way index binding relationship is established between the interactive view data stream with time-series backtracking capability and the full metadata in the enhanced causal path object. The time series structure information and process node attribute data are formed into a unified reference table in memory to ensure accurate field mapping in the subsequent serialization process.
[0163] Field path parsing is performed on the process level index and triplet link set in the interactive view data flow to extract key elements such as timestamp, process identifier, parameter value, and defect area coordinates, forming a multi-source heterogeneous field set.
[0164] The JSON schema template generator is invoked on the field set to construct a nested structure blueprint containing a top-level timeline index, a middle-level process parameter mapping, and a bottom-level defect area coordinate chain based on the preset field hierarchy, while maintaining the causal logical context between each field.
[0165] Field injection processing is performed on the expert rule annotation layer carried in the enhanced causal path object, embedding the rule description and triggering conditions into the attribute structure of the corresponding process node in the blueprint, realizing the coexistence of visualization and rule logic in the encoding.
[0166] The blueprints containing injected rules are processed to unify data types. Multidimensional tensor normalization operations are used to convert numerical contribution weights, textual rule descriptions, coordinate defect locations, etc., into a serializable secure format in accordance with JSON standard requirements.
[0167] The unified blueprint is serialized and encoded to map the multi-source heterogeneous causal reasoning results into a single JSON data transmission unit. A unique data identifier is generated through hash indexing and output as a structured causal tracing report data stream.
[0168] By using index binding, nested structure construction, and serialization encoding, the interactive view data stream and enhanced causal path object from the previous step are transformed into a structured causal origination report with cross-modal consistent expression capabilities, thus enabling interactive and visual closed-loop inference data preparation.
[0169] Step S8: The structured causal tracing report data stream is input into a locally deployed lightweight inference engine for rendering and output, presenting a visual interface of the stage contribution of each process node in the form of a hierarchical causal heatmap, so as to complete the visual inference closed loop of the cause path of electroplating defects in metal bottle caps. Specifically, it includes: S8.1: Parse and process the structured causal traceability report data stream, extract the interactive timeline view data, process parameter defect area triplet link data, and expert rule annotation layer data contained therein, to generate a multi-dimensional visualization source data set to be rendered.
[0170] S8.2: Based on the process node contribution data in the multi-dimensional visualization source data set to be rendered, a hierarchical mapping transformation operation is performed using a locally deployed lightweight inference engine to uniformly map the top-level process chain macro-impact distribution, the middle-level single-process key parameter sensitive area distribution, and the bottom-level pixel-level attribution heatmap data to a three-dimensional spatial coordinate system to generate a multi-level spatial mapping matrix.
[0171] The locally deployed lightweight inference engine is a software framework designed specifically for industrial deployments, capable of running efficiently on resource-constrained edge computing devices. It is used for real-time parsing, rendering, and interactive presentation of structured causal attribution report data streams. Employing a lightweight architecture, this engine does not rely on cloud computing power or large-scale database support and can be directly integrated into production line quality inspection terminals, industrial tablets, or local servers to achieve a low-latency, highly secure visual inference closed loop.
[0172] The inference engine consists of the following five core modules: The data parser receives the structured causal attribution report data stream, extracts the interactive timeline view data, process-parameter-defect region triplet link data, and expert rule annotation layer data, and converts it into an internally unified in-memory data model. The data parser supports streaming input and incremental updates, ensuring high processing efficiency in continuous reporting scenarios.
[0173] Spatial Mapping Engine: Based on the parsed multi-dimensional visualization source data set, it performs hierarchical mapping transformation operations. Specifically, this includes: mapping the macroscopic impact distribution of the top-level process chain to the X-axis (process sequence) and Y-axis (contribution intensity) of the three-dimensional spatial coordinate system; mapping the sensitive area distribution of key parameters of the middle-level single process to the Z-axis depth (sensitivity level) and corresponding parameter labels; aligning the bottom-level pixel-level attribution weight matrix with the defect image coordinates to generate the heatmap base grid. Through the above mapping, a multi-level spatial mapping matrix is generated, providing geometric and intensity benchmarks for subsequent rendering.
[0174] Dynamic Color Gradient Encoder: This encoder uses non-linear color mapping to convert the contribution values of each node at each level into visually perceptible color intensity. It supports multiple preset color gamuts (such as red-yellow-green, blue-white-red, etc.) and automatically adjusts the color gradient curve based on normalized scale information, highlighting key contribution areas while maintaining overall visual consistency. For extreme points exceeding the dynamic range, truncation or highlighting flashing is used as a warning.
[0175] The interaction logic controller binds an event response mechanism to each interactive element (process node, parameter-sensitive area, defect pixel area) in the rendered pixel array. Specifically, this includes: binding the original sensor reading index, supporting a real-time numerical tooltip to pop up when the mouse hovers over it; binding image frame tracing links, supporting a jump to the corresponding high-resolution defect image when clicked; and binding an expert rule annotation layer, supporting the expansion of detailed information such as process explanation, historical valid range, and confidence level label for the node when double-clicked. The interaction logic controller adopts an event-driven architecture, ensuring millisecond-level response in the local rendering environment and improving the user experience.
[0176] Lightweight rendering pipeline: Built on embedded graphics APIs such as OpenGL ES or Vulkan, optimized for low-power GPUs or GPU-less environments. The rendering pipeline enables real-time synthesis of layered heatmaps, including: a bottom-layer defect image as a background layer; a middle-layer parameter-sensitive area heatmap as a semi-transparent overlay layer; a top-layer process node contribution bar chart / pie chart as a labeling layer; and a heat detection layer for interactive elements. The rendering output resolution adapts to the display terminal, supporting zooming, panning, and multi-view switching.
[0177] After the engine starts, it loads the preset process topology template, expert rule base, and default color configuration. After receiving the structured data stream, it dynamically builds the visualization interface.
[0178] S8.3: Based on the normalized scale information of each level of data in the multi-level spatial mapping matrix, apply dynamic color gradient coding to perform visual feature transformation processing on the stage contribution values of the process nodes, so as to generate a hierarchical causal heatmap pixel array carrying contribution intensity information.
[0179] S8.4: For the interactive element nodes in the layered causal heatmap pixel array, bind the original sensor reading index and image frame tracing link event response mechanism, and construct an interactive logic control flow that supports clicking to expand the expert rule annotation layer, so as to generate an interactive visual rendering object with drill-down tracing capability.
[0180] S8.5: Output the interactive visualization rendering object with drilling and tracing capabilities to the display terminal for final drawing, and present a visualization interface of the stage contribution of each process node in the form of a layered causal heat map, so as to complete the visualization reasoning closed loop of the cause path of metal bottle cap electroplating defects.
[0181] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
[0182] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.
[0183] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps, specifically including: S1: Obtain the timestamps, equipment identifiers and key process parameter snapshots of the metal bottle cap in the pre-processes of stamping, cleaning and passivation, map the key process parameter snapshots into process semantic embedding vectors, and generate process anchoring data sequences. S2: Based on the process anchoring data sequence and the high-resolution defect images collected in the electroplating process, weakly supervised alignment is performed, and cross-modal approximate correlation is performed to generate a multi-source heterogeneous fusion dataset. S3: Generate a temporal causal mask matrix based on a multi-source heterogeneous fusion dataset; S4: Map the temporal causal mask matrix to the process hierarchy space to generate a three-layer causal heatmap; S5: Based on the historically verified defect case library, perform similarity retrieval and deviation comparison on the defect cause evolution path generated in the three-layer causal heatmap. If the parameter combination of a certain process node in the path is detected to deviate from the historical valid range, mark the confidence decay flag and generate a causal path candidate set with confidence verification label. S6: For nodes in the causal path candidate set that have confidence decay indicators, trigger the manual review prompt mechanism to generate a set of credible causal paths that have been manually corrected; S7: Integrate the process node contribution data of the credible causal path set with the expert rule annotation layer information, construct a structured data object, and generate a structured causal tracing report data stream; S8: Input the structured causal tracing report data stream into the lightweight inference engine, and render the output to present a visualization interface of the stage contribution of each process node in the form of a hierarchical causal heatmap.
2. The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps for minor flaws, as described in claim 1, is characterized in that... The cross-modal approximation association utilizes process semantic embedding vectors.
3. The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps for minor flaws, as described in claim 1, is characterized in that... The step of generating a temporal causal mask matrix based on a multi-source heterogeneous fusion dataset specifically involves using the coordinate information of the local texture abnormality region of the defect image in the spatiotemporally aligned multi-source heterogeneous fusion dataset to inversely activate a subset of process variables within the historical process time window, and then combining the variable change magnitude, process interval attenuation factor, and variable physical domain to collaboratively calculate the mask weights and generate a temporal causal mask matrix.
4. The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps for minor imperfections according to claim 1, characterized in that, The process of mapping the temporal causal mask matrix to the process hierarchy space to generate a three-layer causal heatmap involves mapping the temporal causal mask matrix to the process hierarchy space, performing a phased causal intensity projection, and performing a unified normalized scale transformation according to the granularity levels of the top-level process chain macro-influence distribution, the middle-level single-process key parameter sensitive area distribution, and the bottom-level pixel-level attribution heatmap to generate a three-layer causal heatmap.
5. The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps for minor flaws, as described in claim 1, is characterized in that... The structured data object includes an interactive timeline view and process-parameter-defect region triplet links.
6. The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps for minor imperfections according to claim 1, characterized in that, Step S3 specifically includes: The coordinate information of the local texture abnormality region of the defect image in the spatiotemporally aligned multi-source heterogeneous fusion dataset is analyzed, and the pixel-level coordinates are converted into physical spatial position vectors to determine the boundary range of the physical domain to be traced. Based on the physical domain boundary range, a reverse search is performed within the historical process time window to filter out a subset of process variables that have potential physical contact or environmental influence with the current defect location, and to generate a subset of candidate process variables. For each process variable in the candidate process variable subset, the deviation values of each variable within the corresponding time slice are extracted from the original sequence of each process variable, and a set of variable change magnitude parameters characterizing the stability of the operating condition is generated. Based on the set of variable change magnitude parameters and the timestamp information of the original sequences of each process variable, a sequence of process interval decay factors reflecting the retention rate of historical impact is generated. Multidimensional tensor fusion is performed on the set of variable change magnitude parameters, process interval attenuation factor sequence and physical domain boundary range to calculate the contribution probability value of each process variable to defect formation, and finally generate a time-series causal mask matrix that represents the cross-process causal relationship.
7. The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps for minor imperfections according to claim 6, characterized in that, The process interval attenuation factor sequence that reflects the retention rate of historical impact is generated based on the set of variable change magnitude parameters and the timestamp information of the original sequence of each process variable. Specifically, the attenuation coefficient is calculated based on the set of variable change magnitude parameters and the timestamp information of the original sequence of each process variable, and the time weight factor is derived by using the exponential attenuation function model combined with the process interval duration to generate the process interval attenuation factor sequence that reflects the retention rate of historical impact.
8. The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps for minor imperfections according to claim 1, characterized in that, Step S4 specifically includes: Obtain the original mask weight data in the temporal causal mask matrix, and spatially resample the original mask weight data based on the topological structure defined by the process semantic embedding vector to generate a process hierarchy mapping tensor with process node alignment attributes. The cumulative contribution of each preceding process node to the formation of the final defect is calculated based on the process hierarchy mapping tensor, and a macro causal intensity vector representing the macro influence distribution of the top-level process chain is generated. Based on the mapping tensor between the macro-causal intensity vector and the process hierarchy, a parameter sensitivity heat map is generated to represent the distribution of sensitive areas of key parameters in a single process at the middle level. Based on the coordinate information of the local texture anomaly region in the parameter-sensitive heatmap and the defect image, back projection mapping is performed to refine the spatial features of the middle-layer parameter-sensitive heatmap to the pixel level, generating a pixel-level attribution weight matrix that represents the bottom-layer pixel-level attribution heatmap. Multi-scale unified normalization transformation is performed based on macroscopic causal intensity vector, parameter-sensitive heatmap and pixel-level attribution weight matrix to eliminate dimensional differences between different granular levels and generate a three-layer causal heatmap with cross-granularity consistent expression capability.
9. The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps for minor imperfections according to claim 8, characterized in that, The method of generating a parameter sensitivity heatmap based on the macro-causal intensity vector and process level mapping tensor to represent the distribution of sensitive areas of key parameters in a single process at the intermediate level specifically involves performing local gradient analysis based on the macro-causal intensity vector and process level mapping tensor, extracting the sensitivity extreme value region of key process parameters within a single process by combining the physical domain constraints of variables, and generating a parameter sensitivity heatmap representing the distribution of sensitive areas of key parameters in a single process at the intermediate level.
10. The method for tracing and analyzing the source of electroplating defects on the surface of metal bottle caps for minor imperfections according to claim 1, characterized in that, Step S5 specifically includes: Multidimensional feature vectors are extracted from the three-layer causal heatmap to generate a feature sequence of the current defect cause evolution path. Based on the feature sequence of the current defect cause evolution path, a search is conducted in the historical verified defect case library to obtain the set of historical standard defect cause evolution paths with the maximum neighborhood overlap with the current path; By utilizing the historical effective interval parameter boundaries of each node in the historical standard defect cause evolution path set, the process node parameter combination in the current defect cause evolution path feature sequence is compared and calculated layer by layer to generate a dynamic deviation quantitative index for the process node. The threshold judgment logic is executed based on the value of the dynamic deviation quantification index of the process node. If the deviation value of any process node exceeds the preset tolerance range, a confidence decay flag is added to the node, and an initial causal path verification object with an anomaly mark is generated. The initial causal path verification object is structured and encapsulated, and the confidence decay identifier is associated and bound with the original path feature data to generate a final causal path candidate set with confidence verification labels that can be used for manual review and screening.