Multi-sensor fusion-based electrostatic spraying surrounding effect real-time sensing and compensating method
By combining multi-sensor fusion and deep reinforcement learning with an electrostatic spraying process knowledge graph, interpretable spraying parameter adjustment suggestions are generated, solving the problem of lack of transparency in existing systems and improving operator trust and collaborative efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHONGSHAN MEGUANG METAL SURFACE TREATMENT CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-04-24
AI Technical Summary
Existing intelligent spraying systems lack interpretability, making it difficult for operators to understand the reasons and expected effects of parameter adjustment suggestions, thus affecting the efficiency of human-machine collaboration.
By acquiring real-time process data through multi-sensor fusion, and combining electrostatic spraying process knowledge graph and multi-objective deep reinforcement learning, interpretable spraying parameter adjustment suggestions are generated, and transparent decision support is provided through causal reasoning and visual explanation layers.
It significantly improves the interpretability of spraying parameter output and the transparency of process logic, enhances operators' understanding of and willingness to adopt system suggestions, and realizes credible, visible, and traceable intelligent decision support.
Smart Images

Figure CN121920232A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrostatic spraying process parameter optimization technology, and in particular to a method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion. Background Technology
[0002] With the widespread application of intelligent manufacturing and automated spraying processes, multi-objective optimization has become an important technical path for adjusting electrostatic spraying parameters. Currently, the industry commonly employs multi-sensor fusion systems to perceive process conditions in real time and dynamically optimizes spraying parameters online based on algorithms such as Deep Reinforcement Learning (DRL), thereby achieving a good balance among multiple objectives such as coating uniformity, production efficiency, and energy consumption control. For example, existing technologies dynamically adjust spray gun voltage, air pressure, and travel speed parameters through a multi-objective DRL framework, effectively improving coating defects, increasing material utilization, and reducing the frequency of manual intervention. Mainstream solutions focus on data-driven decision-making strategy training, tending to utilize deep neural networks to autonomously model high-dimensional process feature vectors and output parameter suggestion vectors to achieve adaptive compensation control. However, these intelligent optimization systems generally have a high degree of "black box" characteristics; the system behavior is opaque, only outputting final parameter results or limited key indicators, making it difficult to reveal the inherent logical relationship between various input variables and decision actions, and lacking effective measures to enhance interpretability. In actual industrial implementation, the ability of process engineers to make actual judgments and intervene in spraying conditions remains indispensable. When the system outputs parameter adjustment suggestions, if there is a lack of transparent explanation of the "causes, principles, and expected effects" of the recommended results, operators find it difficult to judge the rationality and risks of the system's behavior, reducing their trust in intelligent algorithms and limiting the efficiency of human-machine collaboration in complex process scenarios. For example, when the compensation decision suggests reducing the spray gun voltage, operators need to clearly understand the main variables perceived by the data (such as abnormal film thickness distribution or electric field concentration) and their causal attribution to spraying defects in order to effectively align with their own process experience. However, current technologies are basically unable to intuitively demonstrate the influence weight or causal effect of input parameters. Summary of the Invention
[0003] In order to solve the above-mentioned technical problems, the present invention provides a method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion.
[0004] The technical solution of this invention is implemented as follows: a real-time sensing and compensation method for electrostatic spraying shroud effect based on multi-sensor fusion, comprising: S1: Acquire real-time process data from the multi-sensor fusion system. The real-time process data includes workpiece surface roughness, ambient temperature and humidity, spray gun voltage, air pressure, walking speed and real-time film thickness distribution. Perform time synchronization and normalization processing on each data item to generate a structured state input vector. S2: Based on the structured state input vector, combined with the pre-constructed electrostatic spraying process knowledge graph, identify the key influencing factors of the current spraying condition, wherein the process knowledge graph is constructed based on historical qualified coating samples and typical defect cases to provide causal prior constraints. S3: Input the structured state input vector into a multi-objective deep reinforcement learning policy network with an embedded differentiable attention mechanism, calculate the contribution weight of each input feature to the parameter adjustment action, and generate a spraying parameter adjustment proposal vector and an attention weight heatmap, wherein the attention mechanism dynamically allocates attention intensity according to the gradient response between the input features and the output action. S4: Based on the proposed vector and contribution weight of the spraying parameter adjustment, a Do-calculus operation is performed using a lightweight causal reasoning module to evaluate the causal effect intensity of each parameter adjustment under specific process deviation conditions and generate the main cause feature identification result; S5: Combining the causal effect intensity with the attention weight heatmap, a visual explanation layer is generated using gradient weighted activation mapping technology. The visual explanation layer marks the key areas and dominant variables that lead to parameter adjustment. S6: Based on the main cause feature identification result and the visualization explanation layer, generate a triplet explanation report containing the main cause feature, recommended adjustment direction and expected effect prediction, and output the triplet explanation report and spraying parameter adjustment suggestion vector to the human-computer interaction interface simultaneously. S7: Determine whether the operator has confirmed or corrected the triplet interpretation report through the human-computer interaction interface; if a correction instruction is received, use the feedback information as a supervision signal to update the weight distribution parameters in the attention mechanism; S8: Send the confirmed or updated spraying parameter adjustment suggestion vector to the execution control system to drive the dynamic adjustment of spray gun voltage, air pressure and travel speed, and continuously collect the compensation coating quality feedback data for subsequent joint optimization of strategy network and interpretation model.
[0005] The real-time sensing and compensation method for electrostatic spraying shroud effect based on multi-sensor fusion provided by this invention has the following beneficial effects: (1) This invention significantly improves the interpretability of optimized parameter output and the transparency of process logic by integrating causal attention mechanism and counterfactual interpretation generation technology. In the state perception stage, structured feature annotation and prior constraints from the process knowledge graph are introduced to ensure that input variables have clear physical meaning and process relevance. Furthermore, by embedding a differentiable attention gating mechanism, a heatmap of the influence weights of each sensor feature on action decisions is automatically generated during the policy network inference process, intuitively revealing the strength of key factors such as environmental temperature and humidity fluctuations, surface roughness differences, or local film thickness anomalies in parameter adjustment. This mechanism enables the system not only to "know what" but also to "know why," providing reliable, visible, and traceable intelligent decision support for industrial sites.
[0006] (2) This invention constructs a lightweight causal reasoning module based on Do-calculus theory and combines it with Gradient Weighted Class Activation Mapping (Grad-CAM) to generate a visual explanation layer for specific process defects, realizing a technological leap from statistical correlation to causal attribution. When the system detects typical quality deviations such as edge sagging and local thin coating, the causal module can quantitatively calculate the expected effect intensity under different parameter interventions, identify the key variable path that truly drives quality improvement, rather than relying solely on data co-occurrence patterns for speculation. On this basis, the system simultaneously outputs a triplet explanation report containing "main cause characteristics," "recommended adjustment direction," and "expected effect prediction," presenting the decision-making logic in a combination of natural language and graphics. For example, it clearly states that "due to the concentration of electric field at the edge of the workpiece (attribution score 0.83), it is recommended to reduce the spray gun voltage to weaken the enveloping effect, and the thickness fluctuation is expected to decrease from ±18% to ±12%." This kind of concrete and semantically clear feedback greatly enhances the operator's understanding and willingness to adopt the system's suggestions. Meanwhile, an interactive feedback interface is designed to allow engineers to confirm or correct the rationality of the interpretation. The feedback is used to fine-tune the attention weight distribution online, forming an interpretable continuous evolution mechanism. This enables the model to not only adapt to dynamic changes in working conditions, but also to continuously optimize the attribution accuracy with the accumulation of human experience, thereby establishing a closed-loop system for the two-way flow of human and machine knowledge. Attached Figure Description
[0007] Figure 1 The flowchart shows the real-time sensing and compensation method for electrostatic spraying shroud effect based on multi-sensor fusion according to the present invention. Figure 2 This is a sub-flowchart of the real-time sensing and compensation method for the electrostatic spraying shroud effect based on multi-sensor fusion according to the present invention. Figure 3 This is another sub-flowchart of the present invention, which is a method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion. Detailed Implementation
[0008] 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.
[0009] 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.
[0010] like Figure 1 As shown, this invention provides a real-time sensing and compensation method for the circumferential effect in electrostatic spraying based on multi-sensor fusion, specifically including: S1: Acquire real-time process data from the multi-sensor fusion system. The real-time process data includes workpiece surface roughness, ambient temperature and humidity, spray gun voltage, air pressure, walking speed and real-time film thickness distribution. Perform time synchronization and normalization processing on each data item to generate a structured state input vector. S2: Based on the structured state input vector, combined with the pre-constructed electrostatic spraying process knowledge graph, identify the key influencing factors of the current spraying condition, wherein the process knowledge graph is constructed based on historical qualified coating samples and typical defect cases to provide causal prior constraints. S3: Input the structured state input vector into a multi-objective deep reinforcement learning policy network with an embedded differentiable attention mechanism, calculate the contribution weight of each input feature to the parameter adjustment action, and generate a spraying parameter adjustment proposal vector and an attention weight heatmap, wherein the attention mechanism dynamically allocates attention intensity according to the gradient response between the input features and the output action. S4: Based on the proposed vector and contribution weight of the spraying parameter adjustment, a Do-calculus operation is performed using a lightweight causal reasoning module to evaluate the causal effect intensity of each parameter adjustment under specific process deviation conditions and generate the main cause feature identification result; S5: Combining the causal effect intensity and attention weight heatmap, a gradient-weighted activation mapping technique is used to generate a visual explanation layer, which marks the key areas and dominant variables that lead to parameter adjustment; S6: Based on the main cause feature identification result and the visualization explanation layer, generate a triplet explanation report containing the main cause feature, recommended adjustment direction and expected effect prediction, and output the triplet explanation report and spraying parameter adjustment suggestion vector to the human-computer interaction interface simultaneously. S7: Determine whether the operator has confirmed or corrected the triplet interpretation report through the human-computer interaction interface; if a correction instruction is received, use the feedback information as a supervision signal to update the weight distribution parameters in the attention mechanism; S8: Send the confirmed or updated spraying parameter adjustment suggestion vector to the execution control system to drive the dynamic adjustment of spray gun voltage, air pressure and travel speed, and continuously collect the compensation coating quality feedback data for subsequent joint optimization of strategy network and interpretation model.
[0011] Step S1: Acquire real-time process data from the multi-sensor fusion system. This real-time process data includes workpiece surface roughness, ambient temperature and humidity, spray gun voltage, air pressure, travel speed, and real-time film thickness distribution. Time synchronization and normalization processing are performed on each data item to generate a structured state input vector. Specifically, this includes: S1.1: Acquire real-time process data stream from the multi-sensor fusion system. The real-time process data stream includes surface morphology signal output by the workpiece surface roughness sensor, workshop climate parameters collected by the ambient temperature and humidity sensor, spray gun voltage and air pressure values uploaded by the PLC of the spraying equipment, walking speed pulse signal fed back by the motion control system, and real-time coating thickness distribution matrix output by the non-contact film thickness detection module, as multi-source heterogeneous data input. The input conditions include the process-related raw data stream continuously output by the multi-sensor fusion system, covering multi-source heterogeneous signals from workpiece surface roughness sensors, ambient temperature and humidity sensors, spraying equipment PLC, motion control system and non-contact film thickness detection module; A surface roughness laser displacement sensor signal acquisition method (parameters: sampling frequency 5kHz, resolution 0.1µm) is used to achieve fine texture contour scanning of the workpiece surface morphology and output the original roughness dataset expressed in the form of a two-dimensional height matrix. Furthermore, by using a hybrid ambient temperature and humidity sensor sampling method (parameters: temperature accuracy ±0.2℃, humidity accuracy ±1%RH), the synchronous measurement of workshop air temperature and humidity is achieved, and the measured values are encapsulated as time series climate parameter records for subsequent spraying stability analysis; Furthermore, by using an industrial PLC data acquisition method (parameters: Modbus-TCP protocol, sampling period 10ms), the real-time reading of the spray gun voltage and air pressure values is realized, and a control parameter data packet containing timestamps and equipment status codes is output to ensure synchronous association with motion control signals; Furthermore, by using a servo encoder motion pulse sampling method (parameters: resolution 0.01mm, pulse frequency up to 10kHz), continuous sampling of the painting robot's walking speed is achieved, and the pulse count is converted into displacement per unit time to form a vector of instantaneous speed values. Furthermore, a non-contact film thickness detection method based on infrared interferometry (parameters: measurement accuracy ±0.5µm, scanning frequency 500Hz) is used to sample the spatial matrix of the coating thickness distribution and output a film thickness distribution matrix aligned with the workpiece geometry model to drive subsequent spatial feature extraction. By synchronously acquiring multi-source heterogeneous data, the output signals of the above sensors are uniformly encapsulated into a raw multi-channel data stream, realizing full real-time input for electrostatic spraying process status perception. For example, on an automated spraying production line, the workpiece surface roughness sensor is configured in laser triangulation mode with a scanning step of 0.05 mm, and the output height matrix is a 1024×1024 dot matrix; ambient temperature and humidity sensors are placed at the entrance and exit of the spraying room, collecting stable values of 22.4℃ temperature and 58%RH humidity, respectively; the spray gun voltage is read by the PLC as 48.3kV, and the air pressure is 0.19MPa; the pulse frequency fed back by the motion control system is 250Hz, which is converted to a walking speed of 1.2m / s; the thickness matrix obtained by the film thickness detection module is between 42.5µm and 46.8µm. The above five types of data are encapsulated in real time into multi-channel data packets (4096 bytes wide, 100Hz refresh rate) through a fieldbus interface, providing full input for downstream timestamp alignment and feature standardization. This exhibits high stability and consistency under different batches of workpieces, significantly improving the completeness and accuracy of state perception. S1.2: Based on industrial communication protocols (such as Profinet or EtherCAT), perform timestamp alignment on the above multi-source heterogeneous data, use interpolation algorithms to compensate for the time offset caused by the difference in sampling frequency of each sensor, and generate a set of synchronized data frames with a unified time reference to eliminate the timing mismatch problem between cross-modal data. S1.3: For each process parameter in the synchronized data frame set, a normalization processing method based on Z-score transformation is applied to map the original values to the interval [-1, 1]. Among them, the workpiece surface roughness, ambient temperature and humidity, spray gun voltage, air pressure, walking speed and real-time film thickness distribution are converted into standardized feature components to form a preliminary standardized feature vector. S1.4: Perform spatial dimensionality reduction on the film thickness distribution matrix in the standardized feature vector, use principal component analysis (PCA) algorithm to extract the first K principal components, reconstruct them into a low-dimensional dense representation, and concatenate them with the remaining scalar parameters to generate a high-dimensional but dimension-controllable intermediate state representation vector, so as to balance information integrity and computational efficiency. S1.5: Input the intermediate state representation vector into the pre-trained anomaly detection model (based on an autoencoder architecture) and calculate its reconstruction error; if the error exceeds the preset threshold, it is determined that there is a data anomaly and the data cleaning mechanism is triggered; otherwise, the final structured state input vector is output for subsequent modules to perform causal prior matching and attention weight calculation. For the intermediate state representation vector output by S1.4, a pre-trained anomaly detection model based on an autoencoder architecture (parameters: encoding layer dimension compression ratio 0.25, activation function ReLU, optimizer Adam) is used to realize the function of unsupervised reconstruction error calculation of input features; Furthermore, the intermediate state representation vector is mapped to a low-dimensional encoding space through forward propagation, and then reconstructed to the original feature dimension using the decoder to obtain the reconstructed vector; Furthermore, the error between the original intermediate state representation vector and the reconstructed vector is measured using the mean squared error function, calculated as follows:
[0012] in, The mean square error between the original intermediate state representation vector and the reconstructed vector is given. For the i-th input feature component, For the corresponding reconstructed components, Total feature dimension; Furthermore, anomalies in the MSE value are determined by setting a preset error threshold (calculated based on the 95% confidence interval of the error distribution reconstructed from historical normal operating data). If... If the threshold is exceeded, the current data frame is marked as an abnormal sample; Furthermore, after detecting abnormal samples, a data cleaning mechanism is triggered, and a sliding window interpolation method (window length of 5 frames, interpolation strategy of spline interpolation) is used to repair missing or outlier values, and the balance of the repaired vector is checked again through normalization mapping. This anomaly detection and cleaning method transforms the intermediate state representation vector from the previous step into a structured state input vector that conforms to the statistical characteristics of normal operating conditions, thereby ensuring the quality of input data for subsequent causal prior matching and attention weight calculation. For example, on a metal plate electrostatic spraying production line, the intermediate state representation vector contains 12-dimensional scalar features and a 20-dimensional principal component vector of film thickness. An autoencoder model with a coding layer dimension compression ratio of 0.25 is used to reconstruct the film thickness vector after PCA processing, obtaining an MSE of 0.018 between the original and predicted values. When the preset threshold is 0.015, the data frame is identified as an anomalous sample. The system calls a spline interpolation method with a sliding window length of 5 frames to repair the 8th and 12th dimensions of the film thickness component. After repair, the MSE decreases to 0.012, and the mean and variance of the state input vector return to the historical normal range. This ensures that when it enters the causal inference analysis of the S2 stage, it will not introduce erroneous attribution signals due to abnormal fluctuations. In actual operation, this achieves a stable effect of automatic screening and real-time repair of anomalous data.
[0013] Step S2: Based on the structured state input vector and combined with a pre-constructed electrostatic spraying process knowledge graph, identify the key influencing factors of the current spraying condition. The process knowledge graph is constructed based on historical qualified coating samples and typical defect cases to provide causal prior constraints. Specifically, this includes: S2.1: Obtain a pre-constructed electrostatic spraying process knowledge graph. The process knowledge graph is constructed based on the multi-dimensional parameter correlation between historical qualified coating samples and typical defect cases. It uses a directed acyclic graph structure to express the causal dependency paths between four types of entities: environment, equipment, materials, and quality. Nodes represent process variables, and edges represent the direction and intensity of causal effects that have been annotated by experts and statistically verified. This is used to provide prior knowledge of the domain for the analysis of the current working conditions. Based on the final structured state input vector and historical process knowledge in the field of electrostatic spraying, a domain knowledge mining method (parameters: historical qualified coating sample set, typical defect case library) is adopted to realize the function of extracting multi-dimensional parameter correlation from massive historical data; Furthermore, through the causal structure learning algorithm (parameters: constraints are expert annotation rules, inputs are statistical significance parameters of variable pairs), the relationship between four types of entities—environment, equipment, materials, and quality—is mapped into a directed acyclic graph structure, and the causal effect direction and effect strength data between each pair of variables are obtained; Furthermore, by using a directed acyclic graph construction method (parameters: node set is the set of process variables, edges are the causal relationship matrix), the causal relationships repeatedly verified in each historical sample are solidified into a topological structured model, and a process knowledge graph index with reasoning capability is generated. Furthermore, by using a method for calculating the intensity of causal effects (parameters: conditional probability distribution between variables, prior constraints), each edge in the graph is weighted and assigned a value, and a relation matrix containing quantitative causal effect coefficients is generated. By optimizing the storage of causal graphs, the causal relationship matrix of the previous step is bound to the variable entity attribute library as a queryable data structure, thereby enabling the loading of domain prior knowledge to support the analysis of the current working condition. For example, on an automated electrostatic spraying production line, a domain knowledge mining method was used with a historical sample size of 5000 pieces, covering parameters such as spray gun voltage (range: 40-80kV), air pressure (range: 0.2-0.6MPa), ambient humidity (range: 40%-70%), and workpiece roughness (Ra value range: 1.2-3.5μm). A causal structure learning algorithm was used with a significance level α of 0.05, employing conditional independence tests to determine the directed relationships between variable pairs. When constructing the directed acyclic graph, the total number of nodes was 24, and the total number of edges was 56. The effect intensity was normalized using mutual information, ranging from 0.15 to 0.92. In the calculation of causal effect intensity, the contribution of spray gun voltage to coating uniformity was 0.87, the contribution of air pressure to edge overspray risk was 0.78, and the contribution of humidity to material utilization was 0.64. Finally, the relationship matrix is bound to the process variable attribute library to generate a knowledge graph data structure that supports querying. After inputting the current working condition, the causal prior path matching the working condition can be directly retrieved, which significantly improves the speed and accuracy of identifying key influencing factors. S2.2: Perform feature decoupling processing on the structured state input vector from S1, separate the subset corresponding to the process variables defined in the knowledge graph, including workpiece surface roughness, ambient temperature and humidity, spray gun voltage, air pressure, walking speed and real-time film thickness distribution, and map them to the observation nodes of the knowledge graph to form a state snapshot of the current working condition, which serves as the initial evidence input for causal reasoning; S2.3: Based on the state snapshot, execute the forward causal propagation algorithm on the process knowledge graph to calculate the confidence score of the impact of each observed abnormal node (such as excessive film thickness in the edge region) on its downstream quality indicators. Use the Bayesian update mechanism to fuse real-time data and prior probabilities to generate a preliminary attribution ranking list of each potential influencing factor. S2.4: For high-confidence factors in the attribution ranking list, perform reverse abductive reasoning operations. By cutting off unnecessary paths and simulating intervention operations (do-calculus-based ablation), evaluate the decrease in the overall defect prediction probability after removing a specific factor, so as to determine the strength of its dominant role in the current working condition. S2.5: Combining the forward propagation score and the reverse causation verification results, select those that meet the dual threshold condition (causal influence score). >0.7, intervention effect decay rate The set of key influencing factors (<30%) is output as the attention guidance signal for the next stage of the multi-objective reinforcement learning policy network, thereby achieving mechanism-driven feature focusing. Based on the attribution ranking list in step S2.3 and the reverse causal verification results in step S2.4, a dual-threshold screening algorithm (parameters: causal influence score threshold 0.7, intervention effect decay rate threshold 0.3) is used to achieve joint filtering of candidate process factors. Furthermore, by using a weighted fusion method (parameter: the weighting coefficients for the confidence level of forward propagation influence and the strength of reverse abduction effect are set to 0.5:0.5), a comprehensive score calculation of the bidirectional causal index is achieved, and a comprehensive utility value matrix of key factors is obtained. Furthermore, logical discriminant operations are employed to analyze the comprehensive utility value matrix that satisfies... and The factors are subjected to set operations to generate a set of key influencing factors and the data is encapsulated in a structured manner. Furthermore, the set of key influencing factors is converted into a high-dimensional sparse vector representation through the feature mapping interface, and an attention-guided signal encoding mechanism (parameter: position encoding dimension 64) is introduced to achieve feature alignment with the subsequent multi-objective reinforcement learning policy network. By using the above-mentioned dual-threshold screening and attention signal encoding processing method, the causal reasoning results of the previous step are transformed into clear and executable feature-focused inputs, thereby achieving the expected technical effect of mechanism-driven strategy optimization. For example, on an automated electrostatic spraying production line, the forward causal influence score of the "edge electric field concentration" factor calculated by S2.3 is: The forward causal effect score of the "local film thickness accumulation trend" factor is: After reverse abduction verification in S2.4, the attenuation rates of the intervention effects of the two were respectively and When inputting the two sets of data into the dual-threshold screening algorithm, a weighted fusion formula is introduced to calculate the overall utility value: ,in = , = Forward represents the forward influence score, and Backward represents the influence score after correction for reverse intervention. The scores for the two factors are calculated as follows: and And all Decay values satisfy Therefore, it was selected into the set of key influencing factors. This set was mapped to a sparse attention-guided vector, expanded to 64 dimensions through positional encoding, and input into the policy network. This allows the network to focus on the process feature regions corresponding to the above factors during subsequent parameter optimization, controlling the output parameters to optimize in the direction of reducing the clumping effect. As a result, the fluctuation range of the sprayed film thickness was significantly reduced, the material utilization rate was significantly improved, and the performance and interpretability requirements of the industrial field were met.
[0014] like Figure 2 As shown, step S3 involves inputting the structured state input vector into a multi-objective deep reinforcement learning policy network embedding a differentiable attention mechanism, calculating the contribution weight of each input feature to the parameter adjustment action, and generating a spraying parameter adjustment proposal vector and an attention weight heatmap. The attention mechanism dynamically allocates attention intensity based on the gradient response between the input features and the output action. Specifically, this includes: S3.1: Based on the structured state input vector output from the previous step, input it into a pre-trained multi-objective deep reinforcement learning policy network. The policy network adopts an Actor-Critic architecture and integrates differentiable attention gating units to perform weighted mapping processing on multi-dimensional features such as workpiece surface roughness, ambient temperature and humidity, and real-time film thickness distribution, to obtain hidden layer representations with attention weight modulation, which serve as the basis for subsequent action generation. Based on the structured state input vector output from the previous steps, it is used as the state input data of the multi-objective deep reinforcement learning policy network. The input includes multi-dimensional feature components such as workpiece surface roughness, ambient temperature and humidity, and real-time film thickness distribution after normalization and dimensionality reduction. The policy network design adopts an Actor-Critic architecture. The Actor sub-network is responsible for generating action suggestions for adjusting spraying parameters, and the Critic sub-network is responsible for evaluating the multi-objective reward value of the state-action pair combination. Differentiable attention gating units are embedded in the architecture, and their parameters are initialized based on the set of key influencing factors output by S2 to improve feature selectivity. A weighted feature mapping method is adopted (parameter: the initial value of attention weight comes from the domain prior constraint). The feature components are linearly weighted and combined in the network input layer to generate a weighted feature matrix with the initial attention intensity distribution, and then passed to the hidden layer representation module. Furthermore, through the hidden layer feature extraction algorithm (using a multilayer perceptron MLP structure with ReLU activation function), the weighted feature matrix is nonlinearly mapped to extract the high-order interaction mode of the multidimensional state vector, and the hidden layer representation tensor is obtained. The hidden layer unit and the differentiable attention gating unit achieve response modulation through the parameterized matrix. Furthermore, by using the dynamic weight update mechanism of the attention gating unit (parameter optimization based on gradient response), the activation intensity of each channel of the hidden layer representation is adjusted to enhance the response sensitivity to key features and weaken the influence of redundant features, forming a hidden layer representation with attention weight modulation, which is used as input to the action generation module. Through the above algorithm processing method, the structured state input vector of the previous step is transformed into a weighted hidden layer representation that can characterize the differences in working conditions and the importance of features, so as to achieve the expected technical effect of enhancing feature focusing ability and optimizing state encoding before action generation. For example, in an application scenario of a metal spraying production line, the structured state input vector contains six feature components: workpiece surface roughness value (0.85 μm), ambient temperature (26℃), ambient humidity (52%), spray gun current voltage (45 kV), air pressure (0.28 MPa), and the film thickness distribution matrix, after PCA compression, becomes a 5-dimensional vector [0.12, -0.08, 0.14, 0.03, -0.05]. This input is initialized with attention weights, where the initial weight for the film thickness distribution feature channel is set to 0.25, the roughness weight is set to 0.22, and the remaining features are set to 0.18, 0.12, 0.12, and 0.11 respectively. The weighted feature mapping calculation formula is:
[0015] in For the weight vector, The original input vector is used. The mapped result is then fed into the hidden layer of the MLP structure, with the hidden layer size set to 64 units. Activation. Based on the gradient signal returned by the Critic subnetwork, the attention gating unit increases the weight of the film thickness distribution feature channel to 0.31, the roughness channel to 0.27, and the remaining channels are correspondingly reduced, forming the final hidden layer modulation tensor. This tensor exhibits significant sensitivity to film thickness and roughness features in subsequent action generation, resulting in a substantial improvement in coating uniformity and a significant reduction in overspray. S3.2: Within the policy network, a gradient backpropagation analysis between input features and output actions is performed using a differentiable attention mechanism. The Jacobian matrix response intensity of each original input feature under the current decision path is calculated, thereby generating local gradient sensitivity maps corresponding to the three control dimensions of spray gun voltage, air pressure, and walking speed, as intermediate results for quantifying the influence of each factor. Based on the hidden layer representation of a multi-objective deep reinforcement learning policy network, a differentiable attention mechanism is used to analyze the gradient backpropagation path between input features and output actions, thereby quantifying the response of features to actions. The inverse automatic differentiation method (parameters: policy network weight matrix, activation function type, input feature vector) is used to calculate the partial derivative matrix of each action output node with respect to each original input feature, and to separate and process each action dimension to adapt to the three control targets of spray gun voltage, air pressure and walking speed. Furthermore, by constructing the Jacobian matrix (parameters: number of hidden layer nodes, number of output action groups), local Jacobian matrices of input features to each action dimension are generated, and sign and magnitude analysis is performed on the matrix elements to ensure that the physical meaning of the response value is consistent with the direction of the process parameters. Furthermore, by using a gradient magnitude normalization algorithm (parameters: minimum magnitude threshold, maximum magnitude normalization ratio), the magnitude of the local Jacobian matrix is normalized, mapping the gradient values of different features across action dimensions to a unified weight scale, thus providing a comparable data basis for generating sensitivity maps. The feature channel mapping method (parameters: sensor type label, physical spatial location code) is adopted to reorganize the normalized gradient response values into a channel matrix according to the source module of the input features, so as to preserve the sensor spatial positioning information when mapping gradient sensitivity. Furthermore, based on the structure of the sensitivity matrix, a two-dimensional interpolation rearrangement algorithm (parameters: target map resolution, interpolation kernel type) is applied to map the gradient response value of each action dimension to the corresponding local gradient sensitivity map, where the spray gun voltage corresponds to the electric field distribution map, the air pressure corresponds to the atomization feature map, and the walking speed corresponds to the motion trajectory map, thereby achieving spatial alignment between gradient information and physical control parts. Through the Jacobian matrix analysis and gradient sensitivity map generation process described above, the hidden attention features obtained in the previous step are transformed into quantifiable and visible factor influence data, thereby achieving accurate measurement and interpretive support of feature influence under multiple control dimensions. For example, in an electrostatic spraying process on a metal plate, the input structured state vector includes a workpiece surface roughness of 0.65 μm, an ambient temperature of 26℃, a humidity of 48%, a spray gun voltage of 52 kV, an air pressure of 0.28 MPa, a travel speed of 0.42 m / s, and a film thickness distribution matrix resolution of 64×64. The number of hidden layer nodes in the strategy network is set to 256, and the output action dimension is 3, corresponding to the spray gun voltage adjustment, air pressure adjustment, and travel speed adjustment. The inverse automatic differentiation method is used to calculate the local Jacobian matrix of the spray gun voltage adjustment relative to each input feature, obtaining the workpiece surface roughness feature response value. The principal component response value of the film thickness distribution Each response value was normalized to the 0-1 range within the action dimension and mapped to the corresponding sensitivity channel matrix according to the sensor spatial label. A 128×128 resolution spray gun voltage gradient sensitivity map was generated using a bilinear interpolation kernel. The map showed that the gradient amplitude of the principal component channel of film thickness was significantly higher in the edge region, indicating that it is the main driving factor for voltage adjustment. The same process was performed to obtain gradient sensitivity maps of air pressure and velocity. In the air pressure map, the gradient value of the atomization uniformity sensing channel was concentrated in the middle region of the spray pattern, while in the velocity map, the gradient value of the motion trajectory deviation sensing channel was concentrated in the edge turning section. The final output three-dimensional gradient sensitivity map was integrated into the interpretability module, which significantly improved the ability to transparently correlate features with actions. S3.3: Based on the local gradient sensitivity map, cross-feature importance score conversion is performed through the softmax normalization function to generate a standardized contribution weight vector, where each item represents the overall influence ratio of a specific sensor feature (such as edge region film thickness fluctuation) on the current parameter adjustment suggestion, forming a transparent decision basis that can be used for interpretive traceability, and the distribution of the standardized contribution weight vector is converted into an attention weight heatmap. S3.4: Input the weighted and modulated hidden layer representation into the action output layer of the policy network, combine the constraints of the multi-objective reward function (including coating uniformity gain, material utilization improvement and energy consumption penalty term), execute the Pareto front search algorithm, generate a set of non-dominated spraying parameter adjustment suggestion combinations, and select the action vector with the best comprehensive utility as the final output. The weighted and modulated hidden layer representation is input into the action output layer of the policy network, and a multi-objective reward function constraint algorithm (parameters: coating uniformity gain, material utilization improvement, energy consumption penalty weight) is used to achieve multi-objective optimization search of spraying parameters; Furthermore, by establishing a utility matrix for multi-objective optimization, the performance indicators of each candidate action vector under different objective dimensions are quantized and mapped, and a performance coordinate set for Pareto front search is obtained. Furthermore, the Pareto front search algorithm (parameters: non-dominated solution determination rule, crowding distance calculation method) is adopted to filter the performance coordinate set and generate a set of candidate combinations of spraying parameters that meet the non-dominated conditions; Furthermore, a utility aggregation algorithm (parameters: the target dimension weight vector is determined by process expert experience and historical optimization results) is used to achieve a comprehensive utility score for the set of non-dominated combinations and generate the most effective candidate actions. The action vector selection module selects the candidate vector with the highest score as the final output action vector, thereby achieving a balanced optimization of coating quality, efficiency and energy consumption. For example, in the implementation of an automated spraying production line, the weighted modulation hidden layer representation includes a coating uniformity feature component value of 0.92, a material utilization feature component value of 0.87, and an energy consumption feature component value of 0.65. After being input into the action output layer, a multi-objective reward function is constructed. :
[0016] in For coating uniformity gain, For the improvement value of material utilization, Energy consumption penalty value, weight =0.5, =0.3, =0.2. The non-dominant relationship of candidate vectors on the three targets is calculated using the Pareto criterion, and the crowding distance formula is used.
[0017] in Distance based on congestion level and These represent the maximum and minimum values of the objective function, respectively. The number of non-dominated solutions is given. After screening, the action vector with spray gun voltage -10%, air pressure +0.3 bar, and walking speed -0.05 m / s is obtained as the utility-optimal solution within the Pareto front, and the output is confirmed after comprehensive utility scoring. In actual execution, this action vector reduces the coating surface thickness difference and significantly reduces energy consumption, achieving adaptive optimization of parameter adjustment under multi-objective constraints. S3.5: Perform physical feasibility verification on the optimal action vector, limit the recommended parameters based on the dynamic response boundary and safe operation threshold of the spray gun equipment, generate a spray parameter adjustment suggestion vector that conforms to industrial execution specifications, and simultaneously output the contribution weight vector and attention weight heatmap to the next causal reasoning module to support subsequent interpretability enhancement operations.
[0018] like Figure 3 As shown, step S4 involves: based on the proposed vector and contribution weights for adjusting the spraying parameters, performing a Do-calculus operation using a lightweight causal inference module to evaluate the causal effect strength of each parameter adjustment under specific process deviation conditions, and generating a main cause feature identification result. Specifically, this includes: S4.1: Based on the structured state input vector output from the previous steps and the spraying parameter adjustment suggestion vector generated by the multi-objective deep reinforcement learning strategy network, extract the action space dimension associated with each adjustment action, including the spray gun voltage adjustment amount, air pressure change value and walking speed increment, and use the above action variables as the target output variables of causal analysis; S4.2: Post-process the attention weight heatmap obtained in S3 and use the normalized weighted mapping method to convert it into a feature-level influence score matrix, where each item represents the relative contribution intensity of input features such as workpiece surface roughness, ambient temperature and humidity, and real-time film thickness distribution to the current action suggestion, generating a quantifiable input-action association score table. S4.3: Based on the input-action association scoring table and combined with the node relationship constraints in the pre-constructed electrostatic spraying process knowledge graph, initialize the variable dependency structure of the lightweight causal reasoning module, wherein high contribution features are set as potential dependent variables and action adjustment amounts are set as result variables, and construct a local causal graph model for the topological basis of subsequent Do-calculus operations. Based on the input-action association scoring table, the high contribution features in the scoring matrix are indexed and mapped to the corresponding nodes in the pre-constructed electrostatic spraying process knowledge graph. A node filtering algorithm (parameter: contribution threshold = 0.7) is used to retain only the set of feature nodes that significantly affect the current action output. Furthermore, by leveraging the directed acyclic graph structure constraints of the knowledge graph, adjacency matrix parsing (parameters: including node relationship strength and causal direction) is performed to extract the causal path between feature nodes and action variables, and obtain local node relationship subgraph data. Furthermore, a causal structure initialization method (parameter: topology type = local causal subgraph mode) is adopted, setting high contribution feature nodes as potential dependent variables, and spray gun voltage adjustment, air pressure change value and walking speed increment as effect variables, constructing a variable dependency structure graph, and realizing parameterized configuration of the input port of the causal reasoning module; Furthermore, the directed edge weight regularization algorithm (parameter: weight range [0.1, 1.0]) is used to normalize the edge weights in the variable dependency structure to ensure that the influence ratio of each path is consistent in the subsequent Do-calculus intervention derivation, and to generate a causal topology matrix that can be directly used for probability calculation. Through the above initialization and parameterization processes, the input-action correlation scoring results are transformed into local causal graph data that can be executed by the lightweight causal reasoning module, thus realizing the topological basis for causal effect calculation. For example, in a metal plate electrostatic spraying scenario, the input-action association scoring table shows that the contribution of edge region film thickness fluctuation is 0.85, the contribution of environmental humidity fluctuation is 0.78, and other features are filtered out because they are below the 0.7 threshold. Knowledge graph retrieval reveals a direct causal edge between the edge region film thickness fluctuation node and the spray gun voltage adjustment, with an edge weight of 0.92; and an indirect causal path between the environmental humidity fluctuation node and the air pressure change value, transmitted through two levels of nodes, with a combined edge weight of 0.74. Adjacency matrix analysis yields a local node relationship subgraph: node set {X1: edge film thickness fluctuation, X2: environmental humidity fluctuation, Y1: spray gun voltage adjustment, Y2: air pressure change}, edge set {X1→Y1 weight 0.92, X2→Y2 weight 0.74}. The constructed local causal graph uses a directed acyclic structure to represent the causal dependency from input to output. The edge weights are adjusted using a regularization algorithm, resulting in a normalized topological matrix weight range of [0.1, 1.0]. Once this structure is input into the lightweight causal reasoning module, it can be used in subsequent S4.4 to set intervention conditions. and This enables precise quantification of the intensity of causal effects and significantly improves the interpretability and support capability of parameter adjustments. S4.4: Perform Do-calculus intervention on the local causal graph model. By setting intervention conditions such as do (workpiece surface roughness) and do (electric field strength in the edge region), calculate the KL divergence difference between P (spray gun voltage adjustment | do(Xi)) and P (spray gun voltage adjustment) to quantify the causal effect strength of each input variable on the final parameter adjustment decision and obtain the causal effect score vector. Based on the variable dependency structure of the local causal graph model, the intervention target is set as a set of input variables with high contribution, including workpiece surface roughness and edge region electric field intensity parameters. The Do-calculus operation method (parameters: local causal graph, intervention variable, action variable probability distribution) is used to simulate the exogenous intervention for each input variable. The upstream dependency edge of the variable is disconnected in the model and its value is set to a specific constant or target value, so that the distribution of the output action variable is controlled by the intervention variable. Furthermore, by using conditional probability calculation methods (parameters: action variable, voltage adjustment amount, intervention conditions), the following can be achieved: Numerical estimation was performed, and the distribution of the spray gun voltage adjustment under intervention conditions was obtained. Furthermore, by analyzing the baseline probability distribution under the uninterrupted condition... Perform statistical modeling to estimate the parameters of the baseline distribution and generate complete comparison distribution pairs; Furthermore, the Kullback-Leibler divergence calculation method (parameters: intervention distribution, baseline distribution) is used to quantify the strength of the causal effect. The calculation formula is as follows:
[0019] in For the distribution of actions after intervention, For the set of values that the action variable can take, For Do-calculus intervention, For the distribution of actions without intervention, the KL divergence value corresponding to each input variable is obtained. ; By mapping the KL divergence values to the set of intervention variables, a causal effect score vector is formed, thereby quantifying the strength of the role of each input variable in the current decision-making process. By generating causal effect score vectors, the intervention simulation results of the previous step are transformed into data indicators that can be directly used for the identification of main cause features, thereby achieving quantitative support for causal explanation. For example, in a metal spraying process, the intervention setting for the workpiece surface roughness is set to a target value. Micrometer, the electric field intensity interference in the edge region is set to The value is estimated to be the mean based on statistical data. volts, variance volts, while the baseline distribution The mean volts, variance The divergence value of the roughness variable is calculated using the KL divergence formula described above. The divergence value of the electric field intensity variable is The results show that the causal effect of roughness is stronger than that of electric field strength, and therefore it is preferentially selected as a key factor in the main cause feature identification. This process significantly improves the accuracy of causal attribution and the transparency of decision-making in the subsequent explanation report generation process; S4.5: Based on the causal effect score vector, input variables with causal effect strength exceeding a preset threshold are selected as dominant causal factors, and main cause feature identification results are generated, which include semantic labels such as 'concentration of edge electric field' and 'local film thickness accumulation trend'. These results are used as the core attribution basis for generating the triplet explanation report in the next stage.
[0020] Step S5: Combining the causal effect strength and attention weight heatmap, a visual explanation layer is generated using gradient-weighted activation mapping (GFRP). This visual explanation layer identifies the key regions and dominant variables leading to parameter adjustments. Specifically, it includes: S5.1: Based on the attention weight heatmap output from the previous steps, the contribution distribution of each sensor feature in the decision is spatially aligned to obtain a normalized feature attention intensity field, which serves as the initial input source for gradient backpropagation. S5.2: Obtain the causal effect intensity result obtained by the lightweight causal inference module performing the Do-calculus operation. The causal effect intensity represents the causal influence of the adjustment actions of spray gun voltage, air pressure, etc. under specific process deviation conditions on the improvement of defects such as edge sagging and uneven film thickness. The causal effect intensity is injected as a constraint weight into the high-level feature map of the gradient weighted class activation map (Grad-CAM) to modulate the inverse gradient magnitude of the key feature channels. For the output of the lightweight causal reasoning module, the input condition is the causal effect intensity vector obtained by the Do-calculus operation. This vector represents the causal influence of the adjustment actions such as spray gun voltage, air pressure and walking speed on the improvement of the circumferential effect and film thickness defects under specific process deviation conditions, and has a corresponding relationship with the normalized feature attention intensity field obtained in S5.1. A result mapping method (parameters: causal effect intensity vector, feature attention intensity field index table) is adopted to realize the index binding between causal nodes and high-level feature map channels, and to establish a mapping relationship between each main cause feature effect value and the corresponding feature channel to ensure the targeting of subsequent gradient modulation. Furthermore, by using a constrained weight injection method (parameters: mapping relationship matrix, causal effect strength threshold), causal modulation of the high-level feature map is achieved. Causal effect strength values are introduced as multiplicative weights in the backward gradient calculation path of the feature channel to enhance the gradient magnitude of the dominant factor channel and suppress the gradient magnitude of the non-dominant factor channel, thus obtaining the causally modulated high-level feature map matrix. Furthermore, by using the gradient-weighted class activation mapping preprocessing method (parameters: modulated high-level feature map, attention weight distribution), the weight balance of the feature channels is achieved, and the causal effect weights and attention weights are normalized and synthesized to ensure that the original attention distribution characteristics of the network are maintained, while strengthening the gradient response capability of causal significant regions, and generating a fusion weight matrix. Furthermore, a channel normalization processing method (parameters: fusion weight matrix, number of channels N) is adopted to normalize the weight vector of each feature channel to the [0,1] interval, ensuring the numerical stability of the gradient signals of different channels during the backpropagation calculation process, and generating a high-level feature map after the constraint weight injection. By using the above gradient weight injection and normalization methods, the causal effect strength results of the previous step are transformed into channel modulation weights that can directly participate in Grad-CAM backpropagation, thereby enhancing the significance of the dominant variable in the generation of visual interpretation. For example, under a certain spraying condition, the lightweight causal inference module performs a Do-calculus operation on the input state vector, obtaining a causal effect strength of 0.82 for spray gun voltage adjustment, 0.64 for air pressure adjustment, and 0.45 for walking speed adjustment. Through a mapping matrix, 0.82 is bound to channel C5 of the high-level feature map, 0.64 to channel C12, and 0.45 to channel C8. A causal effect strength threshold of 0.6 is set, ensuring that only channels C5 and C12 enter the gradient enhancement path. The inverse gradient magnitude of channel C5 is multiplied by... C12 channel multiplied by The multiplicative weights of the remaining channels are set to Used for suppression. The causally modulated gradient magnitude is weighted and averaged with the normalized weight vector from the attention mechanism to obtain the fused weight matrix, where the fused weight for channel C5 is... C12 channel is Other channels have lower weights than After normalization, all weight vectors are ensured to be in the range [0,1]. The gradient response of the causal significant channel is preserved in the high-level feature map. In the subsequent heat map generated by Grad-CAM, the edge electric field concentration area corresponding to the C5 channel is significantly enhanced, and the local film thickness fluctuation area corresponding to the C12 channel is effectively highlighted, thus achieving clear visualization of the main cause area and improving the physical interpretability in the interpretation layer. S5.3: Perform global average pooling on the high-level feature map after causal modulation, calculate the weight coefficients of each feature channel, and propagate the gradient signal back along the network based on the chain rule to generate a sensitivity gradient map for the input state space, where the high gradient value region corresponds to the workpiece surface region or environmental parameter segment that has the greatest influence on the adjustment of the current parameters. A global average pooling method (parameters: feature map size W×H, number of channels C) is used on the high-level feature map data matrix after causal modulation to achieve channel-wise response aggregation across spatial dimensions, so as to compress spatial resolution and retain the average activation intensity of each feature channel. Furthermore, the formula for calculating the mean of the feature channels is as follows:
[0021] in, Let c be the weight coefficient of the c-th high-level feature channel. is the feature activation value of the high-level feature map after causal modulation at position (i,j) in the Cth channel, where W and H are the spatial width and height index ranges, respectively, to realize the quantitative calculation of the contribution value of each channel. Furthermore, the gradient signal is propagated along the backward path in the policy network using the chain rule (parameter: output layer error signal). The loss function L) is used to evaluate the sensitivity of each input state feature to the output action and generate the gradient mapping matrix of the input space. Furthermore, the gradient sensitivity calculation formula is adopted:
[0022] in, The gradient sensitivity of the k-th input feature. Given the k-th dimension of the input feature vector, we can perform gradient-based quantitative analysis of influence. Furthermore, a comprehensive sensitivity gradient map is generated by multiplying the gradient sensitivity by the channel weight coefficients, using a pixel-wise mapping method (parameters: position index p, channel weights). gradient value c) Achieve weighted fusion of the influence of each region in the input state space to obtain a spatial heat map matrix; Through the above gradient propagation and weight fusion processing method, the high-level feature map result is transformed into a sensitivity gradient map, realizing the accurate positioning and influence quantification of key workpiece regions and environmental parameter segments in the input state space. For example, in a spraying process, the size of the high-layer feature map after causal modulation is 64×64×128. Global average pooling is used to calculate the mean of each channel, resulting in a 128-dimensional channel weight coefficient vector, ranging from 0.12 to 0.87. The output layer loss function is set as the weighted squared error of the coating uniformity target. During gradient backpropagation, the gradient sensitivity is calculated for the k-th dimension input feature (e.g., ambient humidity), and the value is obtained. A comprehensive sensitivity calculation is employed, multiplying and accumulating the gradient values within the coordinate range of the workpiece edge region with their corresponding weighting coefficients to generate a comprehensive sensitivity distribution thermodynamic value matrix for that region. The visualized sensitivity gradient map clearly highlights the high response values in the electric field concentration area at the workpiece edge, enabling operators to intuitively understand the reasons for parameter adjustments and verifying that this region has a significant impact on spray gun voltage adjustment, effectively supporting the subsequent generation of visual explanation layers. S5.4: The sensitivity gradient map and the original workpiece geometric contour image are fused and mapped at the pixel level. Cross-domain spatial alignment is achieved using a bilinear interpolation algorithm to generate a visual interpretation layer with spatial positioning capability. The visual interpretation layer marks the key areas that trigger parameter adjustment in the form of a heat map, such as the electric field concentration area, the high roughness transition zone, and other dominant variable domains. After receiving the causally modulated sensitivity gradient map and the original workpiece geometric contour image, pixel resampling and bilinear interpolation algorithms (parameters: source image resolution, target image resolution, interpolation kernel window size) are used to achieve cross-domain spatial data matching and alignment. During bilinear interpolation, the interpolated value of the target pixel is calculated based on the four neighboring pixel values and their relative distances to ensure the smoothness and continuity of the gradient intensity field when mapped to the workpiece geometric contour and the preservation of local features. By using the normalization mapping method (parameters: gradient value range [0,1], geometric image coordinate system range), the spatial binding of the gradient intensity field to the workpiece geometric contour coordinate system is realized, so that the high-sensitivity region in the gradient map can be located to the corresponding region on the real workpiece surface in the geometric image. Furthermore, using the spatial transformation matrix (parameter: translation amount) Rotation angle The sensitivity gradient map is subjected to affine transformation (scaling ratio s) to eliminate spatial offset caused by visual projection differences, ensuring accurate pixel-level fusion position on the workpiece geometry image; After spatial alignment is completed, a heatmap generation algorithm (parameters: color mapping scheme, transparency coefficient α) is used to map the gradient intensity value into a color gradient and overlay pixels on the geometric contour image to form a visual interpretation layer with spatial positioning capability. High intensity areas are displayed with enhanced color saturation, and low intensity areas are processed with color transparency. Through the above fusion process, a visual explanation layer containing the scope of the dominant variable is obtained. The highlighted area corresponds to the key influence area jointly identified by causal reasoning and attention weight, including the electric field concentration area, the high roughness transition zone, etc., realizing the spatial visual presentation of the reasons for the device parameter adjustment. For example, on an automated electrostatic spraying production line, the resolution of the sensitivity gradient map is 256×256 pixels, the original workpiece geometric contour image is 1024×1024 pixels, and the interpolation kernel window size is set to 2×2 pixels. When using the bilinear interpolation algorithm, the gradient value at pixel coordinates (128, 128) in the source image is used. The target pixel value is obtained by inserting its four neighboring values into the corresponding region of the target image and calculating the target pixel value. ,in Bilinear weights, This represents the neighborhood gradient value. The normalized mapping range is set to [0,1], corresponding to the workpiece contour coordinate system range [0,1024]. The translation amount of the spatial transformation matrix is set to... =15 pixels = 8 pixels, rotation angle set to The scaling factor is s=1.02. The heatmap color mapping scheme uses the "Jet" mode with a transparency factor α=0.6. After visualization, the interpretation layer shows a clear high-intensity heat zone within a 1.5cm width band at the edge of the workpiece, corresponding to the edge electric field concentration area. Operators can intuitively identify this area as the main factor affecting the spray gun voltage adjustment in the interface, enabling spatial understanding of the decision chain and confirmation of the adjustment basis. S5.5: Output the visualization explanation layer to the human-computer interaction interface and semantically bind it with the main cause feature identification result to provide spatial evidence support for the generation of subsequent triplet explanation reports, ensuring that the recommended adjustment direction has physical interpretability and process rationality.
[0023] Step S6: Based on the main cause feature identification results and the visual explanation layer, generate a triplet explanation report containing the main cause features, recommended adjustment direction, and expected effect prediction, and simultaneously output this report and the spraying parameter adjustment suggestion vector to the human-computer interaction interface. Specifically, this includes: S6.1: Based on the set of key variables output from the main cause feature identification results, combined with the dominant variables marked in the visual interpretation layer and their spatial distribution heatmap, the semantic mapping rule base is used to perform natural language labeling on each high-contribution input feature to generate a highly readable main cause feature description text; wherein, the semantic mapping rule base is constructed based on the experience of experts in the field of electrostatic spraying, and encodes features such as abnormal workpiece surface roughness, environmental humidity fluctuations, and edge electric field concentration into standardized process terms to form a structured causal attribution expression; S6.2: Based on the specific adjustment values in the spraying parameter adjustment suggestion vector, the adjustment directions of spray gun voltage, air pressure, and travel speed are subjected to symbol analysis and amplitude classification processing. The control command semantic conversion is performed using a preset action semantic encoding table to generate a natural language description of the recommended adjustment direction for operators. For example, a voltage reduction of 8%-12% is mapped to 'moderately reduce spray gun voltage' to ensure that the suggestion expression conforms to the operating habits of industrial sites. S6.3: Based on the predicted value of causal effect intensity output by the lightweight causal reasoning module, combined with the actual coating quality improvement data under similar working conditions in the historical compensation case database, the analogy reasoning algorithm is used to estimate the changing trends of coating uniformity, edge overspray risk and material utilization rate after this parameter adjustment, so as to generate a quantitative description of 'expected effect prediction'; the prediction content includes the narrowing ratio of the fluctuation range of key indicators or the estimated value of the decrease in defect incidence rate. S6.4: The generated main feature description text, recommended adjustment direction operation suggestions, and expected effect prediction quantification results are structured and organized into a triplet explanation report data structure; this data structure is encapsulated in JSON format and contains three fields: cause (attribution), action (suggestion), and effect (expectation), ensuring the integrity of the information logic and facilitating inter-system transmission and rendering; Based on the main feature description text, recommended adjustment direction operation suggestions, and expected effect prediction quantification results output by S6.1 to S6.3, a structured organization method (parameters: semantic tags, action instructions, effect indicators) is adopted to realize the field mapping and content binding of triple data; Furthermore, by using a key-value pair mapping method (parameters: cause field - attribution text, action field - suggestion text, effect field - prediction text), the precise correspondence between each semantic paragraph and the standard JSON field is achieved, and a preliminary triplet data object is obtained; Furthermore, a formatted validation algorithm (parameters: field integrity rules, data type constraints) is adopted to verify the integrity and type consistency of triple data objects and generate a memory data structure that conforms to the industrial interface transmission standard. Furthermore, using a hierarchical serialization method (parameters: UTF-8 encoding, field indentation rules), the in-memory data structure is converted into a JSON serialized string, where the cause field carries process attribution information, the action field carries control direction description, and the effect field carries effect prediction value; Through protocol encapsulation, the JSON serialized string from the previous step is transformed into an industrial data packet that is easy to transmit between systems, enabling standardized exchange of interpretation reports between modules; For example, in an electrostatic spraying eccentricity compensation task, the main cause description text is "concentrated edge electric field leads to excessively high local film thickness," the recommended adjustment direction is "reduce spray gun voltage and fine-tune walking speed," and the expected effect is predicted as "improved coating uniformity and significantly reduced overspray risk." A key-value pair mapping method is used to bind the attribution, recommendation, and prediction to three fields: cause, action, and effect, forming a triplet data object: {"cause":"concentrated edge electric field leads to excessively high local film thickness","action":"reduce spray gun voltage and fine-tune walking speed","effect":"improved coating uniformity and significantly reduced overspray risk"}. A formatted validation algorithm is used to verify field integrity and type consistency, ensuring the JSON object syntax is correct and the content meets transmission rules. Serialization is performed using UTF-8 encoding and hierarchical indentation rules to obtain a data packet that can be directly pushed to the human-computer interaction interface. In this embodiment, after on-site comparative testing, operators can simultaneously view optimization parameters and corresponding interpretability descriptions on the interface, significantly improving the transparency and collaborative efficiency of decision execution. S6.5: The triplet interpretation report and the corresponding spraying parameter adjustment suggestion vector are timestamped and channel bound, and then encapsulated through an industrial communication protocol and synchronously pushed to the visualization display unit of the human-machine interface, so that process personnel can view the intelligent decision results and their interpretability support information on the same interface at the same time, thereby realizing information transparency and interactive collaboration in the compensation decision process.
[0024] Step S7: Determine whether the operator has confirmed or corrected the triplet interpretation report through the human-computer interaction interface; if a correction instruction is received, the feedback information is used as a supervision signal to update the weight distribution parameters in the attention mechanism. Specifically, this includes: S7.1: Obtain operator feedback data from the human-computer interaction interface. The feedback data includes confirmation marks or correction instructions for the main causal features, recommended adjustment directions, and expected effect prediction items in the triplet explanation report. The feedback content is then structured and parsed to generate a standardized human intervention signal vector. Based on the real-time interactive event stream received from the human-machine interface, an industrial communication protocol parsing module (parameter: Modbus TCP / IP or OPC UA node mapping table) is used to realize the format recognition and field decomposition of signal packets, and decompose the raw feedback data containing process personnel operations into independent confirmation mark sets and correction instruction sets. Furthermore, through the feedback data mapping algorithm (parameters: semantic encoding table, field regular expression matching rules), the semantic decoding of three types of information—main factor features, recommendation adjustment direction, and expected effect prediction—is realized, and the corresponding category label sequence and numerical analysis results are obtained. Furthermore, a structured parsing method (parameters: JSON Schema constraints, field type mapping table) is adopted to achieve field-level validation of the feedback content, data type standardization and missing value completion, and generate parsed output with a unified data structure; Furthermore, through the artificial intervention signal generation algorithm (parameters: category label encoding matrix, numerical normalization coefficient matrix), the parsed output is mapped to a high-dimensional artificial intervention signal vector, where each dimension corresponds to the artificial weight adjustment suggestion for specific input features or control parameters; Furthermore, by using a feature ranking rearrangement method (parameters: priority weighting rule, feature channel index table), the order of each feature weight is adjusted within the artificial intervention signal vector to facilitate the subsequent weight distribution update processing of the attention mechanism; Through the above structured analysis and signal generation chain, the feedback results of the previous step are transformed into a standardized human intervention signal vector that can be directly used to supervise the weight distribution of the attention mechanism, thereby achieving efficient mapping of feedback data to model update instructions. For example, in a metal spraying production line, process engineers simultaneously mark the main causal feature in the ternary analysis report as confirmed and propose corrections to the recommended adjustment direction via an interactive interface. This includes changing the suggested reduction of the spray gun voltage from 10% to 6% and proposing an increase in the predicted decrease in film thickness fluctuation. The parsing module reads this interaction event via the OPC UA protocol, identifies the main causal feature label as a confirmed flag value of 1, the recommended adjustment direction label as a negative adjustment action with a magnitude of 6%, and the predicted expected effect label as the input change amount. A structured parsing method validates the type of each field and standardizes the voltage adjustment magnitude. The generated vector component is 0.06, corresponding to the human intervention signal vector in the control dimension, which is in the form of [1, -0.06, Δeffect], where Δeffect is the predicted improvement magnitude correction value. Feature sorting and rearrangement maps the confirmation mark to the attention channel weight dimension 1, the voltage amplitude to dimension 2, and the effect correction value to dimension 3. The output human intervention signal vector is directly input into the weight update mechanism, so that the policy network takes into account the prior input of the process personnel in the next round of decision-making, achieving high interpretability consistency. S7.2: Based on the difference measure between the artificial intervention signal vector and the original attention weight heatmap, calculate the interpretation consistency error index, use the error index as a supervision label, construct the backpropagation gradient path, and identify the key input feature channels that cause interpretation bias. S7.3: Input the key input feature channels and their corresponding gradient response intensities into the differentiable attention gating module, perform attention weight redistribution optimization, update the attention intensity distribution of each feature dimension through Softmax normalization, and generate a corrected attention weight parameter set; S7.4: Based on the updated attention weight parameter set, the sensitivity configuration of the state-action mapping function in the multi-objective deep reinforcement learning policy network is adjusted synchronously, so that the subsequent decision-making process can enhance the alignment with the prior knowledge of process personnel while maintaining the performance optimization goal. S7.5: Store the training samples generated in this feedback iteration (including the original state input, system suggestions, manually corrected values, and updated attention parameters) into the online experience replay buffer for use in subsequent cycles to explain the joint fine-tuning and continuous learning of the model and policy network.
[0025] Step S8: The confirmed or updated spraying parameter adjustment suggestion vector is sent to the execution control system to drive the dynamic adjustment of the spray gun voltage, air pressure, and travel speed, and continuously collects the compensated coating quality feedback data for subsequent joint optimization of the strategy network and interpretation model. Specifically, this includes: S8.1: Based on the spraying parameter adjustment suggestion vector confirmed or corrected by the human-machine interface, generate an execution instruction set containing the target spray gun voltage, target air pressure value and target walking speed. The execution instruction set is encapsulated in a standardized communication protocol format to facilitate data interaction with the industrial PLC control system. S8.2: The execution instruction set is transmitted to the PID adjustment module of the spraying actuator through the industrial fieldbus interface, triggering the update of the setpoints of the spray gun voltage power supply, atomizing air pressure valve control unit and robot guide rail motion controller, so as to achieve precise dynamic adjustment of key spraying parameters. S8.3: During the parameter adjustment process, the real-time monitoring mode of the multi-sensor fusion system is simultaneously activated to continuously acquire coating thickness distribution feedback from infrared thickness gauge, electric field strength sensor readings, and surface morphology images output by the vision inspection system, in order to construct a compensated process state observation sequence. S8.4: Perform spatiotemporal alignment and outlier filtering on the compensated process state observation sequence, extract coating uniformity index, edge overspray degree and unit area energy consumption change, and generate structured quality feedback data package as a representation of the actual effect of this compensation action. S8.5: Upload the quality feedback data packet to the cloud training platform, and together with the original state input vector, the action vector output by the reinforcement learning policy network, and the corresponding attention weight heatmap, form a training tuple for subsequent joint offline retraining and online fine-tuning of the multi-objective policy network and the causal explanation model.
[0026] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0027] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and rules of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion, characterized in that, Includes the following steps: S1: Acquire real-time process data from the multi-sensor fusion system, and perform time synchronization and normalization processing on the real-time process data to generate a structured state input vector. S2: Based on the structured state input vector and combined with the pre-constructed electrostatic spraying process knowledge graph, identify the key influencing factors of the current spraying condition; S3: Input the structured state input vector into a multi-objective deep reinforcement learning policy network with a differentiable attention mechanism, calculate the contribution weight of each input feature to the parameter adjustment action, and generate a spraying parameter adjustment suggestion vector and an attention weight heatmap. S4: Based on the proposed vector for adjusting the spraying parameters and the contribution weight, perform a Do-calculus operation using the causal reasoning module to evaluate the causal effect intensity of each parameter adjustment under specific process deviation conditions and generate the main cause feature identification result; S5: Combining the causal effect intensity with the attention weight heatmap, a visual explanation layer is generated using gradient weighted activation mapping technology; S6: Generate a triplet explanation report based on the main cause feature identification result and the visualization explanation layer, and output the triplet explanation report and the spraying parameter adjustment suggestion vector to the human-computer interaction interface simultaneously; S7: Determine whether the operator has confirmed or corrected the triplet interpretation report through the human-computer interaction interface. If a correction instruction is received, the feedback information is used as a supervision signal to update the weight distribution parameters in the attention mechanism.
2. The method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion according to claim 1, characterized in that, The process following step S7 also includes: S8: Send the confirmed or updated spraying parameter adjustment suggestion vector to the execution control system to drive the dynamic adjustment of spray gun voltage, air pressure and travel speed, and continuously collect the compensation coating quality feedback data for subsequent joint optimization of strategy network and interpretation model.
3. The method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion according to claim 1, characterized in that, The real-time process data includes workpiece surface roughness, ambient temperature and humidity, spray gun voltage, air pressure, travel speed, and real-time film thickness distribution.
4. The method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion according to claim 1, characterized in that, The electrostatic spraying process knowledge graph is constructed based on historical qualified coating samples and typical defect cases.
5. The method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion according to claim 1, characterized in that, Step S3 specifically includes: Based on the structured state input vector output in step S1, it is input into a pre-trained multi-objective deep reinforcement learning policy network to perform weighted mapping processing on multi-dimensional features and obtain hidden layer representations with attention weight modulation. Within the multi-objective deep reinforcement learning policy network, a gradient backpropagation analysis between input features and output actions is performed using a differentiable attention mechanism. The Jacobian matrix response intensity of each original input feature under the current decision path is calculated, and a local gradient sensitivity map is generated. Based on the local gradient sensitivity map, a cross-feature importance score transformation is performed using the softmax normalization function to generate a standardized contribution weight vector, and the distribution of the standardized contribution weight vector is converted into an attention weight heatmap. The hidden layer representation with attention weight modulation is input into the action output layer of the policy network. Combined with the constraints of the multi-objective reward function, the Pareto front search algorithm is executed to generate a combination of non-dominated spraying parameter adjustment suggestions. The action vector with the best overall utility is selected as the final output. The optimal action vector is physically feasible. Based on the dynamic response boundary and safe operation threshold of the spray gun equipment, the recommended parameters are limited to generate a suggested vector for spraying parameter adjustment.
6. The method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion according to claim 5, characterized in that, The constraints of the multi-objective reward function include coating uniformity gain, material utilization improvement, and energy consumption penalty.
7. The method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion according to claim 1, characterized in that, Step S4 specifically includes: Based on the structured state input vector output in step S1 and the spraying parameter adjustment suggestion vector generated in step S3, the action space dimension associated with each adjustment action is extracted. The attention weight heatmap obtained in step S3 is post-processed and converted into a feature-level influence score matrix using a normalized weighted mapping method to generate an input-action association score table. Based on the input and action association scoring table, and combined with the node relationship constraints in the pre-constructed electrostatic spraying process knowledge graph, the variable dependency structure of the causal reasoning module is initialized, and a local causal graph model is constructed. Perform a Do-calculus intervention on the local causal graph model to obtain the causal effect score vector; Based on the causal effect score vector, input variables with causal effect strength exceeding a preset threshold are selected as dominant causal factors, and main cause feature identification results are generated.
8. The method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion according to claim 1, characterized in that, The causal reasoning module employs Do-calculus intervention to establish a causal dependency structure between input features and parameter actions. It combines an input-action association rating table with KL divergence to calculate the causal effect strength of each variable. Input variables exceeding a preset threshold are used as principal features in the generation of the explanatory report.
9. The method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion according to claim 1, characterized in that, Step S5 specifically includes: Based on the attention weight heatmap obtained in step S3, spatial alignment processing is performed on the contribution distribution of each sensor feature in decision-making to obtain a normalized feature attention intensity field. The causal effect strength result obtained in step S4 is used as a constraint weight and injected into the high-level feature map of the gradient-weighted activation map. Global average pooling is performed on the high-level feature map after causal modulation to calculate the weight coefficients of each feature channel, and the gradient signal is backpropagated along the network based on the chain rule to generate a sensitivity gradient map for the input state space. The sensitivity gradient map is fused and mapped to the original workpiece geometric contour image at the pixel level, and cross-domain spatial alignment is performed using a bilinear interpolation algorithm to generate a visual interpretation layer.
10. The method for real-time sensing and compensation of electrostatic spraying shroud effect based on multi-sensor fusion according to claim 9, characterized in that, The high gradient value region in the sensitivity gradient graph corresponds to the workpiece surface region or environmental parameter segment that has the greatest influence on the adjustment of the current parameters.