Steel structure engineering welding quality defect analysis method based on voiceprint monitoring
By constructing a causal knowledge graph based on voiceprint monitoring, the interpretability problem of deep learning welding defect classification models was solved, the visualization and online optimization of causal logic were realized, and the credibility and adaptability of welding quality inspection were improved.
Patent Information
- Application Number
- CN202511715798.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-06
AI Technical Summary
Existing deep learning welding defect classification models lack interpretability, cannot provide transparent reasoning paths and key feature contribution evidence, and are difficult to meet the industrial field's need for traceable and correctable models.
By acquiring multi-channel voiceprint signals, decomposing wavelet packets, and extracting Mel frequency cepstral coefficients, a hierarchical semantic concept space is constructed. A sparse causal graph is generated using a dynamic causal relationship generator network. Combined with counterfactual perturbation verification and path aggregation mechanisms, the visualization and online optimization of the causal knowledge graph are achieved.
It significantly improves the understandability and credibility of welding quality defect classification, supports the interpretability of causal logic and human-machine collaborative optimization, and enhances the model's adaptability and robustness in complex environments.
Smart Images

Figure CN121476424A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial intelligent detection and pattern recognition, and in particular to a steel structure engineering welding quality defect analysis method based on voiceprint monitoring for constructing a causal knowledge graph. BACKGROUND
[0002] The current welding quality detection technology in the field of steel structure engineering is gradually developing towards intelligentization and data-driven.
[0003] However, the current mainstream deep learning defect classification model generally adopts a "black box" structure, mostly using implicit probability output such as Softmax as the main output, and can only give the final determination result, lacking the traceable presentation of model decision path and intermediate semantic variables. This "black box" feature makes the internal reasoning basis of the model difficult for engineers to understand, making it difficult to gain sufficient trust in the model results in an automated detection scenario, especially in critical industrial situations (such as quality audit, defect diagnosis, responsibility determination, etc.), which is difficult to meet the actual needs of explainability and traceability.
[0004] For defect recognition in the welding process of steel structures, the following problems still exist in the related art: The deep learning welding defect classification model lacks explainability and cannot provide transparent reasoning paths or key feature contribution basis, limiting the trust and adoption of the classification results by engineers.
[0005] The current model mainly outputs the final result, lacks structured association of acoustic signal features and physical semantic variables, and is difficult to form a reliable causal reasoning process for complex defects.
[0006] The model decision process does not support dynamic visualization or expert feedback closed-loop optimization, making it difficult to meet the engineering practice needs of model traceability and correction in industrial sites. SUMMARY
[0007] The present application provides a steel structure engineering welding quality defect analysis method based on voiceprint monitoring, which aims to solve the problems or one of the problems mentioned in the background art.
[0008] The steel structure engineering welding quality defect analysis method based on voiceprint monitoring provided by the present application specifically includes: S1: Multi-channel synchronous acquisition of voiceprint signals generated in the welding process of steel structures to obtain an original audio data set containing features of insufficient penetration, gas pore aggregation degree and arc pressure fluctuation spectrum.
[0009] S2: Perform wavelet packet decomposition and Mel frequency cepstral coefficient extraction on the collected voiceprint signals to generate a high-dimensional embedded vector sequence containing time-frequency domain composite features.
[0010] S3: Construct a hierarchical semantic concept space based on a welding physical knowledge base, which contains a set of predefined explainability intermediate variables, including a lack of penetration index, a porosity density parameter, and an arc pressure fluctuation intensity indicator.
[0011] S4: Input the high-dimensional embedding vector into a dynamic causal relationship generator network, which is an encoder-decoder architecture designed for causal discovery: the encoder part is composed of a gated recurrent unit, which is used to capture complex temporal dependencies between semantic concepts; the decoder is a fully connected layer, which is used to map the learned dependencies to a causal adjacency matrix. Through the encoding of the embedding sequence by the gated recurrent unit, the conditional dependency relationships between the semantic concept nodes are dynamically inferred. Subsequently, the network imposes a sparsity constraint on the generated initial causal graph to conform to the assumption that causal relationships in the real world are usually local, generating a sparse causal graph structure, where the edge weights represent the causal contribution strength of the feature pattern to a specific defect type.
[0012] S5: Perform counterfactual perturbation verification on the causal graph, calculate the output change when the key semantic nodes are set to zero or enhanced, and quantify the role weight of each semantic concept in the final classification decision.
[0013] S6: Perform a path aggregation mechanism based on multiple potential causal chains of the causal graph, which generates a final defect category probability distribution by attention weighted fusion and synchronously saves the complete reasoning trajectory.
[0014] S7: Jointly visualize the defect category probability distribution and the corresponding causal traceability graph to generate an interactive diagnostic report containing the basis for classification decision and the contribution degree of key acoustic features.
[0015] S8: Based on the expert feedback data of the diagnostic report, update the parameters of the dynamic causal relationship generator network to realize online iterative optimization of the causal graph structure.
[0016] The welding quality defect analysis method based on voiceprint monitoring provided in the application has the following beneficial effects: (1) To solve the problem of low trust in engineering application caused by the lack of causal logic and the non-transparent decision-making process of existing deep learning models in steel structure welding quality defect classification, the scheme builds a hierarchical semantic concept space driven by welding physical knowledge, and introduces a causal relationship generator network to dynamically model the conditional dependence structure between feature patterns and interpretable intermediate states (such as "insufficient penetration" and "porosity aggregation degree"). The causal knowledge graph realizes the explicit causal reasoning path expression from the original voiceprint signal to the defect category. Compared with the traditional Softmax output layer that only relies on implicit high-dimensional mapping for classification and discrimination, this architecture decouples the model decision basis into semantic variables with clear engineering meaning and their interaction relationships, significantly improving the understandability and process consistency of the classification results. At the same time, by sparsifying the causal graph structure to filter and weight the key influencing factors, it effectively suppresses the interference of redundant features, improves the robustness of classification, and enhances the identification sensitivity of the model to abnormal working conditions.
[0017] (2) To further enhance the reliability and human-machine collaboration ability of the reasoning process, the scheme innovatively integrates counterfactual reasoning modules and path aggregation mechanisms, supports perturbation verification and contribution assessment for each potential causal chain, and realizes quantitative analysis of the action strength of key semantic nodes. Based on multi-path weighted fusion, it generates the final classification probability distribution, taking into account the reasoning accuracy and logical completeness. This design not only identifies the decisive acoustic features that dominate defect formation (such as abnormal energy concentration in the arc pressure wave spectrum), but also visually displays the complete reasoning chain of "why this defect is determined" through the visualized causal traceability graph, meeting the actual needs of industrial sites for audit tracking and fault attribution. More importantly, the generated causal structure has logical traceability and semantic intervenability, allowing domain experts to modify or constrain abnormal reasoning paths based on actual process experience, forming a closed-loop human-machine collaborative optimization mechanism, significantly improving the adaptability and credibility of the system in complex and variable construction environments.
[0018] (3) While maintaining high interpretability, the scheme is still compatible with end-to-end gradient propagation and joint optimization, avoiding the problem of decreased explanation fidelity caused by the mainstream post-hoc explanation methods (such as LIME, SHAP) due to their deviation from the original model training process, and realizing endogenous rather than external explainability enhancement. The entire framework deeply integrates the powerful representation ability of deep neural networks and prior physical knowledge in the welding field without sacrificing classification accuracy, ensuring the consistency of the explanation results with the true process mechanism; in addition, the modular design structure facilitates extension to other types of structural health monitoring tasks, with good generality and engineering deployment feasibility. This pattern recognition module is particularly suitable for voiceprint monitoring scenarios that require high-trust decision support, and can effectively serve online evaluation and early warning of welding quality in construction sites, providing performance advantages and transparent logic for quality control of critical infrastructure. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 is a main flowchart of a steel structure engineering welding quality defect analysis method based on voiceprint monitoring.
[0020] Figure 2 is a sub-flowchart of a steel structure engineering welding quality defect analysis method based on voiceprint monitoring.
[0021] Figure 3 is another sub-flowchart of a steel structure engineering welding quality defect analysis method based on voiceprint monitoring. DETAILED DESCRIPTION
[0022] The embodiments of the present application will be described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as a limitation of the present application.
[0023] The following disclosure provides many different embodiments or examples for implementing the various structures of the present application. In order to simplify the disclosure of the present application, the components and arrangements of specific examples are described below. Of course, they are only examples and the purpose is not to limit the present application. In addition, the present application can repeatedly refer to numerals and / or letters in different examples, and such repetition is for the purpose of simplification and clarity, which itself does not indicate the relationship between the various embodiments and / or arrangements discussed.
[0024] As Figure 1 shown, the present application provides a steel structure engineering welding quality defect analysis method based on voiceprint monitoring, specifically comprising: S1: Multi-channel synchronous acquisition of acoustic signals generated during steel structure welding process to obtain raw audio dataset containing characteristics of insufficient penetration, porosity, and arc pressure fluctuation spectrum.
[0025] S2: Perform wavelet packet decomposition and Mel frequency cepstral coefficient extraction on the collected voiceprint signal to generate a high-dimensional embedding vector sequence containing time-frequency domain composite features.
[0026] S3: Construct a hierarchical semantic concept space based on the welding physics knowledge base. The concept space contains a predefined set of interpretable intermediate variables, including the insufficient penetration index, porosity parameter, and arc pressure fluctuation intensity index.
[0027] S4: The high-dimensional embedding vector is input into a dynamic causal relationship generator network, which is an encoder-decoder architecture designed specifically for causal discovery. Its encoder consists of gated recurrent units to capture complex temporal dependencies between semantic concepts; the decoder is a fully connected layer that maps the learned dependencies to a causal adjacency matrix. The embedded sequence is encoded through the gated recurrent units to dynamically infer the conditional dependencies between semantic concept nodes. Subsequently, the network imposes sparsity constraints on the generated initial causal graph to conform to the assumption that causal relationships in the real world are usually local, generating a sparse causal graph structure where edge weights represent the causal contribution strength of feature patterns to specific defect types.
[0028] S5: Perform counterfactual perturbation verification on the causal graph, calculate the output change after the key semantic nodes are set to zero or enhanced, and quantify the role weight of each semantic concept in the final classification decision.
[0029] S6: Execute a path aggregation mechanism based on multiple potential causal chains of the causal graph. The path aggregation mechanism generates the final defect category probability distribution through attention-weighted fusion and simultaneously saves the complete inference trajectory.
[0030] S7: The probability distribution of the defect categories and the corresponding causal origination diagram are jointly visualized to generate an interactive diagnostic report that includes the basis for classification decisions and the contribution of key acoustic features.
[0031] S8: Based on the expert feedback data in the diagnostic report, update the parameters of the dynamic causal relationship generator network to achieve online iterative optimization of the causal graph structure.
[0032] Step S1: Multi-channel synchronous acquisition of acoustic signals generated during steel structure welding is performed to obtain a raw audio dataset containing characteristics of insufficient weld penetration, porosity, and arc pressure fluctuations. Specifically, this includes: S1.1: Deploy a multi-channel acoustic signature acquisition device at the welding site. The device includes a directional microphone array and a high-precision acoustic sensor. Configure the spatial arrangement and sampling frequency of the acquisition channels based on the welding process parameters to achieve synchronous capture of acoustic radiation signals during the welding process.
[0033] Within the steel structure construction area of the welding site, a multi-channel acoustic signature acquisition device (components: directional microphone array, high-precision acoustic sensor) is used to synchronously acquire acoustic radiation signals during the welding process. The acquisition targets are the non-contact acoustic radiation signals formed at the weld joint, including high-frequency signals generated by the welding arc and low-frequency fluctuation components formed by the vaporization of the weld pool.
[0034] An array layout optimization algorithm (parameters: sound source localization coordinates, microphone spacing, array shape) is employed to achieve spatial positioning of the acquisition channels on both sides and below the weld seam, maximizing coverage of the sound source radiation direction and reducing structural obstruction effects. Furthermore, an adaptive sampling frequency setting algorithm based on welding process parameters (welding current, welding speed, torch angle) is used to adjust the sampling rate of each acquisition channel, ensuring that the high-frequency channel matches the upper limit of the arc voltage fluctuation spectrum, and the low-frequency channel matches the frequency range related to porosity, thus obtaining raw audio signal streams suitable for different defect characteristics.
[0035] An inter-channel clock synchronization mechanism (parameter: total station clock signal distribution delay compensation coefficient) is employed to achieve precise alignment of timestamps for data frames in each channel and generate multi-channel time synchronization metadata files. Furthermore, a channel gain equalization algorithm based on spatial coherence is used to adjust the channel gain of the directional microphone array output, generating a pre-equalized audio signal set that meets the requirements of subsequent analog-to-digital conversion.
[0036] By using a multi-channel acoustic signature acquisition and control protocol, the acquired analog audio signals are encapsulated into continuous signal packets with channel identifiers and timestamps within the same acquisition time slot, thereby achieving complete synchronous capture of acoustic radiation signals during the welding process.
[0037] By optimizing the array layout and adaptively setting the sampling frequency, the spatial arrangement result of the previous step is transformed into a set of original acoustic signature signals with spatiotemporal consistency and spectral coverage, thereby achieving data quality assurance that meets the requirements for detecting welding defect features.
[0038] For example, at a welding site in a steel structure factory, a 6-channel directional microphone array is deployed along a 1.5-meter-long weld seam. The array is linearly distributed, and the channel spacing is set to 0.25 meters. A high-precision acoustic sensor is installed below the weld seam at a distance of 0.35 meters from the workpiece surface. The sampling frequency is set according to the process parameters of a welding current of 280A and a welding speed of 0.4 meters per minute. The sampling rate of the high-frequency channel is set to 48kHz, and the sampling rate of the low-frequency channel is set to 12kHz. The channels are synchronized using a full-station clock, and the delay compensation coefficient is [missing information]. seconds; array gain equalization coefficient range is to Decibels. This configuration successfully captured high-frequency acoustic signals containing arc pressure fluctuation characteristics and low-frequency acoustic signals reflecting changes in porosity during the acquisition process. The generated raw acoustic signature signal set showed a significant improvement in signal-to-noise ratio and enhanced separability of defect features in subsequent analog-to-digital conversion and feature extraction.
[0039] S1.2: Perform analog-to-digital conversion processing on the original analog acoustic signal output by the multi-channel voiceprint acquisition device, and pre-condition the signal based on the anti-aliasing filter bank and programmable amplifier to eliminate environmental noise interference and improve the signal-to-noise ratio, thereby obtaining a digitized original voiceprint signal sequence.
[0040] S1.3: Based on the physical correlation model between welding defect type and acoustic features, perform time-domain feature annotation on the digitized acoustic signal, and use a sliding window function to extract short-time energy, zero-crossing rate and waveform factor to obtain an acoustic feature label sequence related to insufficient weld depth and porosity.
[0041] For the pre-conditioned digital acoustic signal, a physical association model based on welding defect type and acoustic feature (parameters: defect type set, acoustic feature mapping table) is used to construct the physical semantic correspondence between the signal and the potential defect state.
[0042] Furthermore, the digitized voiceprint signal is segmented using a sliding window function method (parameters: window length 20ms, frame shift 10ms) to focus on the local temporal features of the signal and obtain a set of segmented signals.
[0043] Furthermore, the energy of each frame of signal is quantified and measured using a short-time energy calculation formula, thereby enabling the identification of energy attenuation characteristics under insufficient melting depth conditions.
[0044]
[0045] in, Let the short-time energy of the nth frame be . This represents the number of sampling points for that frame. Let be the amplitude of the i-th sampling point.
[0046] Furthermore, the zero-crossing rate detection method is used to count the number of symbol changes in each frame of signal, thereby characterizing the high-frequency disturbance features corresponding to the porosity.
[0047]
[0048] in, The zero-crossing rate value of the nth frame. Let be the amplitude of the i-th sampling point. For symbolic functions, This represents the number of sampling points for this frame.
[0049] Furthermore, the waveform shape of each frame is normalized and measured using the waveform factor calculation formula, thereby achieving modeling of the sharpening or smoothing of the waveform caused by unstable arc voltage in the welding state.
[0050]
[0051] in, This is the result of the root mean square operation. For waveform factor, Let be the amplitude of the i-th sampling point. The number of sampling points for this frame is given, and the denominator is the average absolute amplitude.
[0052] The aforementioned feature extraction algorithm transforms the framed signal set into an acoustic feature label sequence containing short-time energy, zero-crossing rate, and waveform factors, thereby enabling explicit labeling of time-domain features corresponding to insufficient melting depth and porosity.
[0053] For example, in a single acoustic signature acquisition for steel structure welding, the pre-conditioned signal sampling rate was 44100Hz, the sliding window function window length was set to 20ms, corresponding to 882 sample points, and the frame shift was 10ms. The short-time energy value for a given frame of signal was calculated. The zero-crossing rate Waveform factor is The short-time energy is significantly lower than that under normal welding conditions. The baseline value indicates a possible insufficient penetration defect, with a zero-crossing rate higher than normal. This indicates a high density of pores and a waveform factor that is lower than the baseline value. The increase indicates significant fluctuations in welding arc voltage. These three features are marked as high-risk inputs in the acoustic feature labeling sequence and will be used as key variables in frequency domain analysis and causal attribution models to improve the accuracy and interpretability of defect type classification.
[0054] S1.4: Perform spectral analysis on the acoustic feature marker sequence, use the fast Fourier transform algorithm to extract frequency domain features, identify the energy distribution changes in specific frequency bands caused by arc voltage fluctuations, and obtain a frequency domain representation matrix containing spectral features related to welding defects.
[0055] S1.5: Perform multi-dimensional fusion processing on the time domain and frequency domain features to construct a welding acoustic feature vector space. Generate a balanced dataset containing normal welding and typical defect states based on data augmentation strategies, which will serve as input samples for subsequent feature extraction modules.
[0056] An eigenvector concatenation algorithm (parameter: vector length adaptive normalization factor α=0.85) is used to combine the time-domain feature label sequence and the frequency-domain representation matrix to achieve multi-dimensional coupling and fusion of cross-domain information.
[0057] Furthermore, by using the mutual information feature selection method (parameters: maximum correlation threshold τ=0.75, minimum redundancy rate δ=0.25), the feature subset is optimized and filtered to obtain a feature combination vector with high discriminative power.
[0058] Furthermore, a principal component analysis algorithm (parameters: retain the first k=15 principal components, and control the cumulative variance contribution rate to above 95%) is used to achieve dimensionality reduction transformation of the high-dimensional feature vector space and generate a low-dimensional feature basis matrix for data augmentation.
[0059] Furthermore, an adaptive data augmentation generator (parameters: noise injection intensity σ=0.02, time shift window w=25ms, spectral distortion factor β=1.05) is used to generate an augmented sample set containing normal welding conditions and typical defect conditions, while maintaining a balanced distribution of sample categories.
[0060] By using feature fusion and data augmentation, the results of the previous step are transformed into a balanced welding acoustic feature vector space, thereby improving the diversity and robustness of the input samples for the subsequent feature extraction module.
[0061] For example, in a steel structure welding acoustic signature acquisition task, the time-domain features include 12 dimensions such as short-time energy (dB), zero-crossing rate (Hz), and waveform factors; the frequency-domain features include 18 dimensions such as spectral centroid, band energy ratio, and spectral peak value. First, the two types of features are concatenated using a normalization factor α=0.85 to obtain a 30-dimensional cross-domain fusion vector. Second, the mutual information value of the fusion vector is calculated, and a maximum correlation threshold τ=0.75 and a minimum redundancy rate δ=0.25 are set to select a subset of features with high correlation and low redundancy, totaling 22 dimensions. Then, PCA dimensionality reduction is performed on this 22-dimensional feature matrix, retaining the first 15 principal components while meeting the criterion of a cumulative variance contribution rate of 95%. Subsequently, the low-dimensional feature basis matrix was input into the data augmentation generator, with noise injection intensity σ=0.02, time shift window w=25ms, and spectral distortion factor β=1.05 set to generate an augmented dataset containing 1400 samples. The number of samples in the normal welding category was balanced with the three typical defect categories, with 350 samples in each category. The final output balanced welding acoustic signature feature vector space showed a significant improvement in discriminative performance during the model validation phase.
[0062] Step S2: Perform wavelet packet decomposition and Mel-frequency cepstral coefficient extraction on the acquired voiceprint signal to generate a high-dimensional embedding vector sequence containing time-frequency domain composite features. Specifically, this includes: S2.1: Perform pre-emphasis processing on the original voiceprint signals acquired synchronously from multiple channels to improve the signal-to-noise ratio in the high-frequency band and obtain the pre-emphasized audio signal sequence.
[0063] S2.2: Based on the pre-emphasized audio signal sequence, the Hamming window function is used to perform frame shifting and splitting operations to reduce signal boundary effects and generate a time-domain framed signal matrix.
[0064] S2.3: Perform wavelet packet decomposition on each frame of the time-domain framed signal matrix, use the db4 wavelet basis function to perform 3-level decomposition, extract the wavelet packet coefficients of each sub-band, and obtain the multi-scale time-frequency feature matrix.
[0065] S2.4: Based on the wavelet packet coefficient statistics, calculate the energy distribution entropy of each sub-band and the wavelet packet reconstructed spectrum to characterize the local frequency domain features of the voiceprint signal and generate a set of frequency domain feature vectors.
[0066] S2.5: Perform Mel filter bank weighting processing on the framed audio signal, map the linear spectrum to the Mel frequency scale based on the human auditory perception model, extract the Mel frequency cepstral coefficients of each frame, and obtain the MFCC feature vector sequence.
[0067] S2.6: The wavelet packet frequency domain feature vector and the Mel frequency cepstral coefficient feature vector are concatenated and fused to form a high-dimensional feature embedding vector sequence containing time-frequency domain composite information, which serves as the input representation of the dynamic causal relationship generator network.
[0068] The set of frequency domain feature vectors obtained by wavelet packet decomposition and the sequence of MFCC feature vectors obtained by Mel filter bank processing are combined using a feature-level splicing and fusion method (parameter: direct concatenation according to feature dimension) to integrate features from different frequency domains and auditory perception domains into a unified high-dimensional feature representation space.
[0069] Furthermore, the L2 normalization method (parameter: the sum of squares of each feature vector component is 1) is used to standardize the scale of the concatenated fusion vector and obtain the comparative ability data of each feature at the same scale.
[0070] Furthermore, by using a weighted coefficient combination method (parameter: the weight coefficient is determined based on the contribution of the feature domain to the validation set in the welding defect discrimination task), the inter-domain importance ratio of the fused feature vector is adjusted, and a high-dimensional feature vector matrix after weighted fusion is generated.
[0071] Furthermore, a feature rearrangement algorithm (parameters: sorting rules based on feature correlation and mutual information) is used to order the feature positions of the weighted fusion vector and generate a structured time-frequency domain composite high-dimensional embedding representation.
[0072] By inputting the structured embedding vectors into the dynamic causal relationship generator network, the results of the previous step are transformed into input tensors that can be parsed by the causal reasoning module, thereby achieving the expected technical effect of high-precision subsequent causal relationship inference with multi-domain feature support.
[0073] For example, in the welding acoustic signature analysis scenario, wavelet packet decomposition is used to extract the energy entropy and reconstructed spectrum of 8 sub-bands, forming a 16-dimensional frequency domain feature vector for each frame; MFCC features are extracted using 24 Mel filters, yielding 12-dimensional MFCC features and their first and second differences for each frame, totaling 36-dimensional auditory domain feature vectors. The frequency domain and auditory domain features are directly concatenated according to their dimensions to obtain a 52-dimensional fused feature vector for each frame; L2 normalization is then performed on this vector to ensure...
[0074] =1, where For each feature component, consistent scaling is ensured. Based on the contribution of each domain to the improvement in defect classification accuracy on the validation set, the weight of the frequency domain feature is set to 0.6, and the weight of the auditory domain feature is set to 0.4. The inter-domain ratio is adjusted by multiplying by the corresponding weights. A mutual information ranking feature reordering algorithm is used to place highly relevant features at the beginning to improve the effectiveness of network input. The finally generated sequential high-dimensional embedding vector is input into the dynamic causal relationship generator network, which significantly improves the accuracy of defect category discrimination. Moreover, the embedding vector contains composite information of physical frequency domain features and human auditory perception features, providing a robust data foundation for the subsequent causal relationship inference stage.
[0075] like Figure 2 As shown, step S3 involves constructing a hierarchical semantic concept space based on a welding physics knowledge base. This concept space includes a predefined set of interpretable intermediate variables, including a penetration insufficiency index, porosity parameters, and arc pressure fluctuation intensity indicators. Specifically, this includes: S3.1: Construct a semantic variable definition framework based on the welding physics knowledge base. The semantic variable definition framework includes the physical definitions, dimensional system and value range of the insufficient penetration index, porosity parameter and arc pressure fluctuation intensity index, so as to form a structured set of interpretable intermediate variables.
[0076] The Welding Physics Knowledge Base is a systematic and structured professional knowledge system that integrates authoritative information sources from basic theories to industry standards. It aims to comprehensively explain the various physical phenomena, essential principles, and quantitative laws involved in the welding process. The core components of this knowledge base first include classic academic works such as *Welding Metallurgy* and *Welding Thermal Processes and Molten Pool Physics*. These documents deeply analyze the physical nature of the welding arc, energy transfer mechanisms, the dynamic formation and solidification behavior of the molten pool, and core physical processes such as solid-state phase transformation in weld joints, providing a theoretical foundation for understanding the formation and evolution of weld microstructure. Secondly, the knowledge base strictly incorporates a series of national and international technical specifications, such as the national standard *GB / T3375 - Welding Terminology* and relevant standards from the International Institute of Welding (IIW). These specifications unify the definition and measurement methods of welding physical parameters, ensuring the accuracy and consistency of knowledge application. Simultaneously, the knowledge base deeply integrates comprehensive reference books such as the *Welding Handbook* and technical reports published by the American Welding Society (AWS). These provide key practical knowledge on welding heat source models (such as Gaussian heat sources and double ellipsoidal heat sources), prediction and control of welding stress and deformation, and the physical mechanisms of welding defects (such as porosity and cracks). Furthermore, the modern knowledge base integrates cutting-edge research findings from authoritative journals and conferences, continuously updating our understanding of extreme physical conditions in special welding methods such as laser welding and electron beam welding. Ultimately, this multi-dimensional knowledge base, by coupling fundamental theories, standards and specifications with engineering practice data, constitutes an indispensable decision support foundation for welding process optimization, defect diagnosis, and quality control.
[0077] For the welding process features corresponding to the high-dimensional embedding vector sequence output by the feature extraction module S2, a welding physics knowledge base retrieval method (parameters: defect type keyword set, physical quantity screening rules) is used to obtain all engineering physical quantity definition entries related to insufficient penetration, porosity, and arc pressure fluctuation from the knowledge base.
[0078] Furthermore, through a dimensional analysis algorithm (parameters: SI standard and a mapping table of non-standard units specific to the welding industry), the dimensional system of the retrieved physical quantity items is uniformly converted, and a set of dimensionally standardized physical quantities is obtained.
[0079] Furthermore, a value range calibration method (parameters: distribution range of historical welding quality inspection data, extreme value constraints of physical quantities) is adopted to calibrate the upper and lower limits of the numerical values of the set of dimensionally standardized physical quantities and generate a matrix of valid numerical intervals.
[0080] Furthermore, a structured definition framework generation algorithm (parameters: variable identifier encoding rules, node attribute templates) is adopted to encapsulate physical definitions, dimensional systems, and value ranges in a unified data structure, forming a set of structured semantic variables that includes melting depth insufficiency index, porosity parameters, and arc pressure fluctuation intensity indicators.
[0081] Through the above structured definition framework, the physical quantity definitions and standardized parameters of the previous step are transformed into data nodes that can directly participate in subsequent semantic mapping and concept space construction, thus realizing a unified representation of interpretable intermediate variables.
[0082] S3.2: Perform semantic mapping preprocessing on the high-dimensional embedding vector sequence output by the feature extraction module. Use a combination of linear transformation and nonlinear activation function to perform dimensional alignment and semantic decoupling on the embedding vector to obtain a standardized feature representation that fits the semantic variable definition framework.
[0083] S3.3: Based on the mapping relationship between the semantic variable definition framework and the standardized feature representation, a semantic projection network is constructed using a multi-head attention mechanism. The semantic projection network performs multi-granular semantic matching on the standardized feature representation to generate semantic variable activation vectors.
[0084] S3.4: Perform hierarchical semantic aggregation operation on the activation vectors of semantic variables, and use graph neural networks to model the hierarchical dependencies between semantic variables to generate a hierarchical semantic concept graph structure. The hierarchical semantic concept graph structure includes nodes and edges, where nodes represent semantic variables and edges represent hierarchical semantic associations between variables.
[0085] S3.5: Based on the semantic consistency measurement between the hierarchical semantic concept graph structure and the welding defect classification target, the cross-entropy loss function is used to jointly optimize the semantic variable activation vector and the hierarchical semantic concept graph structure to improve the interpretability and discriminative ability of the semantic concept space for the classification task.
[0086] For the association data between the hierarchical semantic concept graph structure generated by S3.4 and the welding defect classification target, a semantic consistency measurement algorithm (parameters: node semantic mapping matrix, target category label) is used to achieve a consistency matching score between the semantic variable activation vector and the concept graph structure. Furthermore, a cross-entropy loss function input tensor (parameters: predicted category probability vector, target label one-hot encoding vector) is constructed based on the consistency score results to quantify the difference between the predicted output and the true label, and obtain the loss value for the classification task.
[0087] Furthermore, by utilizing the gradient backpropagation algorithm (parameters: loss value, model parameter matrix), the joint partial derivatives of the loss value with respect to the semantic variable activation vector and the concept graph structure are calculated, and a set of parameter gradients is generated.
[0088] Furthermore, by using stochastic gradient descent or the Adam optimization algorithm (parameters: learning rate η, momentum factor β), the weight matrix of the semantic projection network and the edge weights of the graph neural network are updated synchronously, thereby optimizing the discriminative power and interpretability of the semantic space representation.
[0089] Furthermore, based on the updated network parameters, the consistency metric between the semantic variable activation vector and the concept graph structure is recalculated to achieve dynamic calibration of the semantic space and generate an optimized semantic consistency index.
[0090] By using a joint optimization algorithm, the semantic variable activation vectors and hierarchical semantic concept graph structure from the previous step are transformed into an optimized representation with enhanced interpretability and discriminative ability, thereby enabling the semantic concept space to provide knowledge support for subsequent defect classification tasks.
[0091] For example, in the scenario of classifying defects due to insufficient weld penetration in steel structures, the input semantic variable activation vector has a dimension of 3, corresponding to the insufficient weld penetration index a1, porosity parameter a2, and arc pressure fluctuation intensity a3, respectively. The predicted output probability vector is p=[0.6,0.3,0.1], and the target category label is [1,0,0]. The cross-entropy loss formula is used:
[0092] Where p is the predicted probability, the label is a one-hot encoded label, and ln is the natural logarithm. The calculated loss is L≈0.5108. Based on this loss value, the Adam optimization algorithm is used with a learning rate η=0.001, momentum factors β1=0.9, β2=0.999, and the weight matrix W in the semantic projection network is adjusted. s The edge weight matrix W in a graph neural network e Gradient updates are performed, and after each iteration, the activation intensity of the node corresponding to the insufficient melt depth index increases by about 0.05, while the correlation between the pore density parameter and the arc pressure fluctuation intensity index weakens by about 0.02, thereby significantly improving the model's discrimination ability and interpretability for this defect category.
[0093] like Figure 3As shown, step S4 involves inputting the high-dimensional embedding vector into a dynamic causal relationship generator network. This network is an encoder-decoder architecture specifically designed for causal discovery: its encoder consists of gated recurrent units to capture complex temporal dependencies between semantic concepts; the decoder is a fully connected layer that maps the learned dependencies to a causal adjacency matrix. The embedded sequence is encoded through the gated recurrent units, dynamically inferring the conditional dependencies between semantic concept nodes. Subsequently, the network imposes sparsity constraints on the generated initial causal graph to conform to the assumption that causal relationships in the real world are usually local, generating a sparse causal graph structure where edge weights represent the causal contribution strength of feature patterns to specific defect types. Ultimately, this network achieves an end-to-end mapping from high-dimensional features to interpretable causal structures, providing mechanistic insights beyond correlation for defect diagnosis. Specifically, this includes: S4.1: Based on the predefined hierarchical semantic concept set in the welding physics knowledge base, construct the semantic concept node initialization vector. The semantic concepts include the insufficient penetration index, porosity parameter and arc pressure fluctuation intensity index, so as to form the initial node representation of the interpretable semantic space.
[0094] Based on the predefined hierarchical semantic concept set in the welding physics knowledge base, a structured concept initialization method (parameters: physical definition, dimensional system, value range) is adopted to realize the node initialization function of the interpretable semantic space.
[0095] Furthermore, through a vectorized encoding method (parameters: standardized dimension, normalized range), the numerical representation of the insufficient melting depth index, porosity parameter, and arc pressure fluctuation intensity index is transformed, and the initial encoding vector set of the three types of semantic nodes is obtained.
[0096] Furthermore, a feature normalization algorithm (parameters: minimum-maximum scaling, zero-mean unit variance processing) is adopted to achieve scale alignment of physical indicators of different dimensions in the vector space and generate a normalized node representation matrix.
[0097] Furthermore, by using a semantic location information embedding algorithm (parameters: node hierarchy depth, associated category label), the relative position encoding of node vectors in the hierarchical semantic space is realized, and a node representation tensor with location information is generated.
[0098] By using the node initialization process described above, the semantic concept set constructed in the previous step is transformed into an initial node representation that can be directly input into the dynamic causal relationship generator network, thus realizing the semantic vector foundation required for the construction of the causal graph structure.
[0099] S4.2: Input the high-dimensional embedding vector sequence generated in S2 into the gated recurrent unit network, and perform a state update operation on the feature vector at each time step to extract dynamic feature representations related to the evolution process of welding defects in the time series.
[0100] The high-dimensional embedding vector sequence generated in step S2 is used as the input object and loaded into the sequence input port of the gated recurrent unit (GRU) network to realize the time series dynamic processing of welding acoustic features.
[0101] By adopting a time step length setting method (parameter: the duration of a single welding operation covered by the time step), a feature vector stream is constructed within the GRU unit and transmitted sequentially according to the time step, thereby realizing the function of receiving the state of the welding defect evolution process step by step.
[0102] Furthermore, a new hidden state vector is calculated at the current time step using a state update function. This state update function includes two types of gating parameters: an update gate and a reset gate. The calculation formula is as follows: ,in To update the gate vector, Input the embedding vector for the current time step. This is the hidden state from the previous time step. For the Sigmoid function, and These are the weight matrix and the bias vector. This represents "new evidence brought about by the current input". It represents "old evidence in historical memory". This represents the model's "inherent decision preferences".
[0103] Furthermore, the candidate hidden state is calculated using the following formula: ,in Candidate state To reset the gate vector, The symbol for Hadamard product is used. The weight matrix used to transform the current input x. The weight matrix used to transform (after the reset gate filtering) the historical state. This is the bias vector used to calculate the candidate states.
[0104] Update formula using hidden state The old state controlled by the update gate is weighted and fused with the new candidate state to generate the final hidden state vector at the current time step.
[0105] A state sequence caching mechanism is adopted to store the hidden state vectors of each time step in chronological order to form a dynamic feature matrix, and bind the corresponding welding defect evolution timestamp to achieve synchronous association between features and defect processes.
[0106] Through the sequential dynamic update of the GRU network described above, the input voiceprint embedding features are mapped into hidden state data containing the temporal information of welding defects, thereby realizing the dynamic feature representation required for subsequent causal relationship inference.
[0107] For example, in a steel structure welding defect monitoring site, a GRU network with 2 layers, 128 hidden units per layer, and a time step length of 50 frames is configured to cover the acoustic signature acquisition cycle of a single weld formation process. The input high-dimensional embedding vector sequence has a dimension of 256, and the GRU weight matrix... Generated from an initial random uniform distribution, the updated gate threshold converged to an average of 0.62 after training, indicating that it retains a high correlation with historical states for most time steps. During a welding process, the dynamic feature matrix shows that the gate was reset between time steps 20 and 30. The value is significantly improved, reflecting the state reconstruction stage caused by welding arc voltage fluctuations. After this processing, the output hidden state data successfully forms multiple time-related feature links in the subsequent causal graph generation stage, significantly improving the stability and interpretability of causal relationship identification.
[0108] S4.3: Based on the hidden state vector output by the gated recurrent unit, the correlation weight matrix between the current feature representation and each semantic concept node is calculated through a multi-head attention mechanism to identify potential causal association candidate sets.
[0109] S4.4: Based on the relevance weight matrix and the semantic concept node initialization vector, construct the input tensor of the dynamic causal relationship generator network, and perform inference of the conditional dependencies between nodes through the graph neural network module to generate a preliminary causal graph structure.
[0110] The relevance weight matrix output by the multi-head attention mechanism and the initialization vector of semantic concept nodes are fused using a matrix fusion process. A tensor concatenation algorithm (parameter: concatenation along the feature dimension) is employed to achieve unified encoding of association strength information and node initial values. A matrix normalization method (parameter: maximum and minimum normalization intervals are set to [0,1]) is used to achieve scale alignment of data with different dimensions, resulting in a normalized fusion matrix.
[0111] An input tensor construction operator (parameter: tensor dimension = number of nodes × number of nodes × feature dimension) is used to map the above normalized fusion matrix into an input tensor structure that can be directly received by the dynamic graph neural network module. Furthermore, through an adjacency matrix initialization method (parameter: diagonal lines are assigned a value of 1, and the remaining positions are obtained by mapping from the correlation weight matrix), the node connection information and feature encoding are loaded synchronously, resulting in preliminary graph representation data.
[0112] A message-passing algorithm based on a graph neural network (parameters: iteration count K=3, activation function ReLU, normalization method Symmetric normalization) is used to realize the hierarchical propagation and update of conditional dependencies between nodes, and generate a set of node state vectors. Furthermore, through fully connected layer mapping (parameters: hidden layer nodes = 128, output layer nodes = number of nodes), the updated set of node state vectors is transformed into estimated edge weights of the causal graph, and a preliminary edge weight matrix of the causal graph structure is generated.
[0113] By using a graph structure decoder (parameter: decoding method = edge weight thresholding, threshold is 0.05), the above edge weight matrix is transformed into a preliminary causal graph structure containing a set of nodes and a set of edges, thus realizing an explicit representation of the conditional dependency of feature patterns on specific defect types.
[0114] For example, in the scenario of acoustic signature monitoring for steel structure welding, the input conditions are: a 50×50 dimension relevance weight matrix calculated by a multi-head attention mechanism, a 50×16 dimension semantic concept node initialization vector, and a 50×50×32 input tensor obtained by concatenating along the feature dimensions during tensor fusion. The diagonal elements in the adjacency matrix initialization are set to... Off-diagonal elements are directly mapped according to their values in the weight matrix. The graph neural network uses a three-layer GCN structure, with each layer containing [number of hidden nodes]. The activation function used is ReLU, and the adjacency matrix is symmetrically normalized. Form, in which For degree matrix, This is an adjacency matrix. After three rounds of message passing and state updates, the node state vector set has a dimension of 50×128, which is then mapped by the fully connected layer to generate an edge weight matrix with a dimension of 50×50. The decoder sets the edge weights to be less than... The connection is deleted, and the output preliminary causal graph structure contains 50 nodes and about 240 edges. The causal chain matching accuracy on the training set is significantly improved, and structured basic data is provided for subsequent sparsification and weight optimization.
[0115] S4.5: Perform sparsification on the preliminary causal graph structure, and use L1 regularization constraints to prune the edge weights to remove weakly correlated connections and generate a sparsified causal graph structure, wherein the edge weights represent the causal contribution strength of a certain feature pattern to a specific defect type.
[0116] The initial causal graph structure generated by S4.4 is subjected to sparsification processing. The input object is a weighted adjacency matrix of conditional dependencies between nodes, and each element of the matrix represents the causal contribution strength of the feature pattern to the welding defect type.
[0117] The L1 regularization constraint method (parameter: regularization coefficient λ is set according to the principle of trade-off between sparsity and performance of the validation set) is adopted to achieve sparse compression of edge weights and obtain the updated weighted adjacency matrix.
[0118] Furthermore, by using a threshold pruning algorithm (parameter: the pruning threshold τ is determined jointly based on the statistical mean and standard deviation of the edge weight distribution), weakly correlated connections are eliminated, and graph connection relationship data with a more concise structure is obtained.
[0119] Furthermore, the usability of the pruned causal graph is verified by using a connectivity preservation verification algorithm (parameter: connectivity coefficient is set to ensure that each defective node has at least one valid inference path), and a usability flag vector is generated.
[0120] Furthermore, by using an edge weight normalization algorithm (parameter: the normalization method is maximum value normalization), the scale of the effective edge weights in the sparsified causal graph is unified, and a normalized weighted adjacency matrix is generated.
[0121] The L1 regularization loss value is calculated using the following formula:
[0122] in, This is the regularization loss value. The regularization coefficient is . Let be the edge weights from node i to node j in the causal graph.
[0123] The following formula is used to determine pruning conditions:
[0124] in, This is the pruning threshold; pruning is performed when the edge weight is less than τ.
[0125] By using the above sparsification and normalization methods, the preliminary causal graph structure output from the previous step is transformed into sparse causal graph data, achieving the expected technical effects of improving the significance of causal relationships and enhancing the interpretability of the model.
[0126] For example, in the acoustic signature analysis of a steel structure weld, the initial causal graph has a weighted adjacency matrix of 30×30 dimensions with edge weights ranging from 0.01 to 0.85. For sparsification, a regularization coefficient λ of 0.005 is selected, and a pruning threshold τ of 0.15 is used. After iterative optimization, 40% of the total connections are removed. In the connectivity preservation verification, the connectivity coefficient is set to 0.8 to ensure that each defect node retains at least one high-weight inference path. After normalization, the effective edge weights are uniformly between 0 and 1. In this scenario, the unnecessary connections in the sparse causal graph are significantly reduced, the graph structure complexity decreases, and the retained edges all correspond to high-contribution acoustic feature patterns. Finally, on the validation set, the model's interpretability evaluation index is significantly improved while maintaining the original defect classification performance.
[0127] S4.6: The sparse causal graph structure is mapped and verified to the physical meaning of the semantic concept nodes. Abnormal causal paths are marked based on the welding process expert knowledge base, and a causal graph structure quality evaluation index is generated to provide feedback for subsequent online optimization.
[0128] A mapping verification process is performed on the sparse causal graph structure and the pre-constructed set of semantic concept node physical definitions. The input objects are the set of causal graph nodes and the edge weight matrix between nodes.
[0129] A node semantic matching algorithm (parameters: physical definition vector set, tolerance threshold ε) is used to determine the correspondence between node embedding representation and physical attribute vector, and to generate a node matching degree matrix.
[0130] Furthermore, the path consistency test algorithm (parameters: edge weight matrix, process dependency rule table) is used to match the causal path sequence with the predefined reasonable path template in the welding process expert knowledge base, and the path consistency score vector is obtained.
[0131] Furthermore, through an anomaly detection algorithm (parameters: consistency score vector, score threshold τ), causal paths with consistency below a preset threshold are marked as anomalies, and an anomaly path identifier list is formed.
[0132] Furthermore, the interpretability index of the overall structure is calculated using the cause-effect graph quality assessment formula. ,in The consistency score for the i-th valid path is given. The total number of valid paths is used to quantify the consistency between the overall causal graph and expert knowledge.
[0133] By using an index normalization processing algorithm (parameters: interpretability score, abnormal node ratio), the results of the previous step are transformed into a structural quality assessment report, thus providing feedback for the subsequent online optimization module.
[0134] For example, in a steel structure welding defect analysis system, the sparse cause-effect graph structure contains 52 semantic nodes and 128 edges. The node physical definition vector dimension is 6, and the tolerance threshold ε is set to 0.05. The node semantic matching algorithm calculates that the diagonal elements in the average matching degree matrix are significantly improved to over 0.92. The path consistency check algorithm uses a process dependency rule table for matching, with a scoring threshold τ set to 0.8, resulting in a consistency score vector with a mean of 0.88 and a variance of 0.04. The anomaly detection algorithm identifies 5 abnormal paths with consistency scores below the threshold, accounting for 0.039% of the total paths. The cause-effect graph quality assessment formula calculates the interpretability index as follows: ≈ The normalization process, combined with the proportion of abnormal nodes, outputs a structural quality assessment report. The report shows that the matching degree between the cause-effect graph structure and expert knowledge has been significantly improved, and it can provide an effective basis for correction in online optimization.
[0135] Step S5: Perform counterfactual perturbation verification on the causal graph, calculate the output change after key semantic nodes are set to zero or enhanced, and quantify the weight of each semantic concept in the final classification decision. Specifically, this includes: S5.1: Based on the set of semantic concept nodes in the sparse causal graph structure, the key semantic nodes with an influence on the final classification output that are higher than a preset threshold are identified using the node importance evaluation function, so as to determine the set of target nodes that need to be perturbed and verified.
[0136] S5.2: Perform a node zeroing operation on the key semantic node, that is, force its corresponding semantic feature value to be zero, and calculate the probability distribution of the defect category after the perturbation through the forward propagation mechanism to obtain the change in output probability ΔP1 before and after the perturbation, so as to evaluate the degree of impact of the missing node on the classification result.
[0137] S5.3: Perform node enhancement operation on the key semantic node, that is, weight amplify its corresponding semantic feature value, and calculate the probability distribution of defect category after perturbation through the forward propagation mechanism to obtain the change in output probability before and after perturbation ΔP2, so as to evaluate the guiding role of the node enhancement on the classification result.
[0138] S5.4: Based on the perturbation changes ΔP1 and ΔP2, calculate the causal role weight coefficient of each key semantic node. The weight coefficient is the normalized ratio of the perturbation change to the original output probability, which is used to quantify the contribution of the semantic node in the final classification decision.
[0139] For the perturbation effect vectors of the key semantic nodes corresponding to ΔP1 and ΔP2 respectively, a weighted normalization calculation method (parameters: perturbation change ΔP, original probability P0, normalization factor λ) is used to achieve the preliminary calculation of the causal effect coefficient of each node.
[0140] Furthermore, by using the differential ratio calculation method (parameters: ΔP1, ΔP2, P0), a comprehensive measurement of the node weakening and strengthening effects is achieved, and a local contribution vector is obtained.
[0141] Furthermore, a normalization formula is used to map the local contribution to the [0,1] interval, generating a causal action weight sequence with uniform dimensions.
[0142] Furthermore, the weight values of each node are normalized using the following formula. Perform the calculation:
[0143] in, This represents the change in output probability before and after the perturbation. This represents the original output probability value before the perturbation. This is the normalization scaling factor.
[0144] Furthermore, through vector normalization operation (parameter: Euclidean norm), the weight sequence is globally normalized, and a node contribution weight matrix adapted to the path aggregation mechanism is generated.
[0145] By using the above calculation method, the disturbance difference in the previous step is transformed into node weight data for the importance analysis of the adaptive path, thus achieving the expected technical effect of quantifying causal effects.
[0146] For example, in a welding acoustic defect analysis system, let the set of key nodes be {insufficient penetration index, porosity parameter, and arc pressure fluctuation intensity index}, where the disturbance change ΔP1 of the insufficient penetration node is 0.12, ΔP2 is 0.18, and the original output probability P0 is 0.65. Using a normalized scaling factor λ=1.0 and substituting it into the above formula, the causal weight of the insufficient penetration node is obtained:
[0147] The calculated result is approximately 0.1846, which, after Euclidean norm normalization, is used to fill the weight matrix. The pore density parameter node and the arc pressure fluctuation intensity node are assigned weight values of 0.1520 and 0.2673, respectively. This matrix can significantly improve the accuracy of causal chain importance allocation in the subsequent path aggregation mechanism. The system demonstrates enhanced readability and robustness of decision trajectories when determining defect categories.
[0148] S5.5: Jointly normalize the causal role weight coefficients of all key semantic nodes with the corresponding causal graph edge weights to generate a node-edge comprehensive contribution matrix, which is used to support attention weighted calculation in the subsequent path aggregation mechanism.
[0149] A matrix combination operation is performed on the causal effect weight coefficients of key semantic nodes and the edge weight vectors of the sparse causal graph. The input objects are the set of node causal effect weight coefficients calculated from S5.4 and the set of edge weights generated from S4.5.
[0150] A weight vector normalization algorithm (parameters: norm type is L2, normalization objective is to constrain all weight vector magnitudes to be in the range [0,1]) is adopted to normalize the magnitudes of node weight coefficient vectors and edge weight vectors separately, and obtain normalized node weight vectors and normalized edge weight vectors.
[0151] Furthermore, the two types of weight vectors are jointly fused through element-level weighted fusion operations (parameter: fusion coefficient α = 0.5), as shown in the following formula:
[0152] in, The fused vector, This is the normalized node weight vector. This is the normalized edge weight vector. This is the integrated weight vector after fusion.
[0153] Furthermore, through matrix concatenation operations (parameter: concatenation axis is the node index dimension), the fused comprehensive weight vector is mapped to a node-edge two-dimensional matrix structure, and a node-edge comprehensive contribution matrix is generated.
[0154] Furthermore, by using a matrix normalization algorithm (parameter: row normalization, normalization objective is to make the sum of weights in each row equal to 1), the comparability of the matrix during attention weighting calculation is achieved, and the final node-edge comprehensive contribution matrix that can be directly called by the path aggregation mechanism is obtained.
[0155] By generating a node-edge integrated contribution matrix, the weight data is transformed from independent representations of nodes and edges into a unified two-dimensional contribution representation, thereby achieving input compatibility for subsequent multi-path attention weighting.
[0156] For example, in the acoustic signature classification model for welding defects in steel structures, the set of node causal interaction weight coefficients is 20-dimensional, and the set of edge weights is 30-dimensional. The L2 normalization algorithm is used to normalize the node weight vectors, scaling each element value to the range of 0-1; similarly, the edge weight vectors are normalized. Assuming the fusion coefficient α is 0.5, the combined weight of each node and its corresponding edge is calculated using the formula... Calculation. For example, the normalized node weight of the 5th node is... The corresponding edge weight is The overall weight is The combined weight vectors of all nodes are mapped to a node-edge 2D matrix, and then concatenated to generate a 20×30 dimensional combined contribution matrix. Row direction normalization is used to ensure that the sum of the edge contribution values of each node is 1. Calling this matrix during the attention-weighted path aggregation stage can significantly improve the discrimination accuracy and interpretability of multi-path fusion.
[0157] Step S6: Based on the multiple potential causal chains in the causal graph, a path aggregation mechanism is executed. This mechanism generates the final defect category probability distribution through attention-weighted fusion and simultaneously saves the complete inference trajectory. Specifically, it includes: S6.1: Enumerate all possible causal chain paths in the causal graph, and extract the semantic feature combination sequence corresponding to each path based on the node connection relationship and edge weight in the graph structure to generate a structured path feature matrix.
[0158] S6.2: Based on the path feature matrix, the importance of each causal chain is dynamically evaluated using a multi-head self-attention mechanism, and the attention weight of each path under the current input features is calculated to obtain the path attention distribution vector.
[0159] S6.3: The path attention distribution vector and the corresponding causal chain output probability are weighted and summed to generate a comprehensive defect category probability distribution vector that integrates the results of multi-path reasoning.
[0160] S6.4: The comprehensive defect category probability distribution vector is normalized using Softmax to generate a standardized defect category probability output, which serves as the final classification result.
[0161] The probability distribution vector of the comprehensive defect category is used as input data, and the Softmax normalization algorithm (parameter: the numerical range of vector elements is the real number domain) is used to standardize the probability distribution.
[0162] S6.5: Serialize and record the path feature matrix, path attention distribution vector, comprehensive defect category probability distribution vector, and the original output probabilities of each causal chain to generate a structured inference trajectory log file, and store it in the inference trajectory database to support subsequent model interpretability analysis and online optimization.
[0163] The path feature matrix, path attention distribution vector, comprehensive defect category probability distribution vector, and original output probabilities of each causal chain are uniformly serialized. A data structured encoding method (parameters: JSON Schema definition, field type constraints) is adopted to achieve unified storage format conversion of data of different formats.
[0164] Furthermore, by using timestamp marking and index generation algorithms (parameters: millisecond-level precision, double-index linked list structure), the binding relationship between each data element and the reasoning order is realized, and an index table that can be searched in two dimensions: reasoning time and path sequence is obtained.
[0165] Furthermore, a compression coding algorithm (parameters: Zstandard compression level 3, dictionary training data size 10^4 records) is adopted to achieve efficient compression and storage of inference trajectory data, and to generate compression ratio and decoding time performance indicators.
[0166] Furthermore, an integrity check code for each inference trajectory log is generated using a signature hash algorithm (parameter: SHA-256, output length 256 bits) to support subsequent data consistency verification.
[0167] Furthermore, the batch write interface (parameters: transaction commit mode, batch size 500 records) is used to write the serialized, compressed, and signed log files into the inference trajectory database, forming persistent storage records that support online querying and historical backtracking.
[0168] Through unified encoding, index association, compression, and integrity assurance processing, the inference path results from the previous step are transformed into auditable and searchable structured trajectory data, providing the data foundation for model interpretability analysis and online optimization.
[0169] Step S7: Jointly visualize the probability distribution of the defect categories with the corresponding causal origination diagram to generate an interactive diagnostic report that includes the classification decision basis and the contribution of key acoustic features. Specifically, this includes: S7.1: The structured data of the defect category probability distribution and the causal origination diagram are fused to construct a unified visual data model.
[0170] S7.2: Based on the visualization data model, the D3.js graphics rendering engine is used to draw the topological layout of the nodes and edges of the causal origin graph to realize the graphical display of the causal reasoning path.
[0171] For the causal origin graph structure in the unified visualization data model, the D3.js force-directed layout algorithm (parameters: node repulsion coefficient, edge elasticity coefficient, iteration steps, layout size) is used to simulate the interaction forces between nodes and obtain an initial coordinate distribution that fits the overall graphics space.
[0172] Furthermore, by using geometric constraint optimization methods (parameters: minimum node spacing, maximum edge length, topology level depth), the node positions are locally adjusted, and an optimized layout result that reduces edge intersections while maintaining the integrity of the causal chain is obtained.
[0173] Furthermore, by using a hierarchical sorting algorithm (parameters: root node set, edge type weight), the vertical or horizontal hierarchical display of causal paths is achieved, and a layout coordinate matrix with clear inference direction guidance is generated.
[0174] Furthermore, by using the node style mapping function (parameters: node type, semantic category index), the parameterized configuration of node shape, fill color, and border style is achieved, resulting in a set of node graphic elements that can distinguish different semantic concept categories.
[0175] By using the edge style mapping function (parameters: edge weight, causal contribution coefficient), a correspondence is established between the edge line width, color transparency and causal contribution, thus realizing an intuitive and visual encoding of the strength of causal relationship.
[0176] Through the D3.js layout drawing and style mapping described above, the unified visualization data model of the previous step is transformed into a cause-effect tracing graph graphic data with a clear topological structure and clear style coding, realizing a structured display effect of welding defect reasoning path.
[0177] For example, in a causal origination graph containing 15 semantic concept nodes and 22 causal relationship edges, the force-directed layout algorithm sets the node repulsion coefficient to 120, the edge elasticity coefficient to 0.6, the number of iterations to 150, and the layout size to 800×600 pixels. Geometric constraint optimization sets the minimum node spacing to 40 pixels, the maximum edge length to 200 pixels, and the topological hierarchy depth to 5. The hierarchical sorting algorithm selects the root node set as "insufficient melting depth index" and "porosity parameter," and divides the edge type weights into two levels, 0.8 and 0.5, based on the importance of physical association, generating a vertical hierarchical coordinate matrix so that the upstream cause is located at the top of the graph. The node style mapping function draws "process parameter" nodes as rectangles with a light blue fill color and a 2-pixel border thickness; and "defect index" nodes as circles with a light red fill color and a 1-pixel border thickness. The edge style mapping function plots relationships with edge weights greater than 0.7 as dark lines with a line width of 4 pixels and an opacity of 0.9, and relationships with weights between 0.3 and 0.7 as medium-colored lines with a line width of 2 pixels and an opacity of 0.6. Under this configuration, the plotted causal origin graph shows a significant reduction in edge intersections, clearly visible inference paths, and a visually distinct strength of different types of semantic nodes and causal relationships, providing a foundation for subsequent heatmap contribution encoding and interactive exploration visualization.
[0178] S7.3: Use the heat mapping algorithm to color-encode the acoustic feature contribution, and map the feature contribution intensity to the corresponding nodes and edges in the causal graph to generate a visual feature contribution heatmap.
[0179] The input object is the topological layout structure data of the causal origin graph rendered by D3.js in S7.2, which includes the node coordinate matrix, edge connection relationship and the set of semantic feature contribution values corresponding to the node and edge.
[0180] A normalization method (parameters: maximum value normalization and interval mapping) is adopted to perform linear standardization of the contribution data of nodes and edges in the [0,1] interval, so as to obtain a normalized contribution intensity matrix.
[0181] Furthermore, an algorithm is constructed using a color mapping function (parameter: continuous gradient color spectrum ranging from cool to warm colors) to convert normalized contribution values into corresponding color code values and obtain a color code mapping table.
[0182] Furthermore, a heat mapping algorithm (parameter: the two-dimensional mapping model is a bidirectional conversion between color space Lab* and RGB space) is used to embed color-coded values into the node and edge attribute fields of the causal origin graph rendering engine, and generate graph node and graph edge data objects with color labels.
[0183] Furthermore, by utilizing a transparency adjustment mechanism (parameter: the value of transparency α ranges from 0.3 to 1.0, and is dynamically adjusted according to the nonlinear function of contribution), the difference in contribution can be enhanced simultaneously through the dimensions of brightness and transparency, resulting in a thermal visual enhancement dataset that can highlight high-contribution features on the rendering plane.
[0184] By using the above-mentioned thermal mapping and transparency enhancement processing methods, the contribution value matrix of the previous step is transformed into a visual feature contribution heatmap data, thereby achieving the expected effect of highlighting the strength of the role of key acoustic features in the causal chain.
[0185] For example, in a steel structure welding defect detection, the maximum value of the node contribution is normalized. Assuming the initial contribution matrix has a maximum value of 86.4 and a minimum value of 12.5, the normalization formula is used... After processing, the contribution of all nodes is mapped to the [0,1] interval. Nodes with a normalization result above 0.85 are assigned to RGB(255,0,0) warm colors using a color mapping function and displayed as high-contribution nodes; nodes with a normalization result between 0.6 and 0.85 are mapped to RGB(255,165,0) orange; and nodes with a normalization result below 0.3 are mapped to RGB(0,0,255) cool colors. Transparency α is determined according to... Calculation, where This represents the normalized contribution value. The processed heatmap is displayed in an interactive interface, with high-contribution nodes in red and opaque, and low-contribution nodes in blue and highly transparent. Engineering experts can quickly identify the locations of decisive acoustic features on the interface, significantly improving the efficiency of decision interpretation and intervention.
[0186] S7.4: Based on probability distribution data, the defect categories are sorted and a bar chart is generated. The classification confidence is horizontally correlated with the causal reasoning path to form a synchronous display interface of classification results and reasoning basis.
[0187] S7.5: Integrates an interactive control module that triggers detailed information pop-ups of causal graph nodes based on user clicks, hovering, or dragging operations, to support layer-by-layer exploration and semantic interpretation of classification decision paths.
[0188] S7.6: Generates a structured diagnostic report document, integrating classification results, cause-effect graph visualization images, feature contribution heatmaps, and user interaction path records to output an exportable and auditable welding defect analysis report.
[0189] In the process of generating a structured diagnostic report, the user operation data collected by the interactive control module in step S7.5 and the inference trajectory log file saved in step S6.5 are used as input conditions.
[0190] A data fusion algorithm (parameters: visualization feature set, classification probability vector, causal chain path sequence) is used to achieve structured aggregation of classification results and causal origination graph related information.
[0191] Furthermore, by using image encoding and compression algorithms (parameters: causal graph topology drawing results, acoustic feature heatmap matrix), the image data of each visualization element is formatted and processed to obtain a high-resolution image dataset that can be embedded in a document.
[0192] Furthermore, an interaction record parsing method (parameters: user click node ID sequence, hover action timestamp set) is adopted to realize the semantic translation of the user exploration path and generate an auditable interaction behavior description vector.
[0193] Furthermore, through a document generation engine (parameters: text template library, image dataset, interactive description vector), the content arrangement and format rendering of the report document are realized, generating a report structure that conforms to industry standards, including chapters such as title page, classification result summary, cause-effect graph visualization, feature contribution heatmap, and user interaction analysis.
[0194] Furthermore, by utilizing a verification algorithm (parameters: report chapter integrity rules, image embedding verification rules), a consistency check of the report document is performed to ensure that all visualization elements and corresponding classification data can be accurately associated with the report and are available for export.
[0195] By generating and verifying structured documents, the visualization and interactive data from the previous step are transformed into archiveable and auditable welding defect analysis reports, enabling transparent presentation of the decision-making process and traceability of subsequent expert review.
[0196] For example, in a welding quality monitoring system at a steel structure construction site, the process of generating this sub-step for a typical weld inspection task is as follows: the input conditions are a defect category probability distribution vector of length 5, a total of 30 nodes in the causal graph, and user interaction operation records including 105 click events, 62 hover events, and 15 drag events. When using a data fusion algorithm, the 5-dimensional probability vector is concatenated with a structured causal chain path matrix (12 paths, each with a length between 5 and 8 nodes) to generate a fused feature vector of length 137. When using an image encoding and compression algorithm, the causal graph topology drawing result is PNG encoded at a resolution of 1920×1080, with a compression rate set to 0.85, and the heatmap matrix (node contribution range 0.12~0.87) is color-mapped and normalized. The interaction record parsing method maps the click node ID sequence to a semantic tag set (including node type and defect association information), generating an interaction description vector of length 182. The document generation engine uses industrial report formats from the template library to assemble the above data into a diagnostic report PDF file containing six chapters, with a file size of 2.4MB. A consistency check algorithm compares the tags in the report with the data source content; no inconsistencies are found, verifying that the report meets export and audit requirements. The final output report is loaded into the expert review system, allowing experts to directly locate the causal reasoning chain of a specific defect category and make process adjustment suggestions based on the contribution of each node. This process significantly improves the responsiveness and credibility of on-site decision-making.
[0197] Step S8: Based on the expert feedback data in the diagnostic report, update the parameters of the dynamic causal relationship generator network to achieve online iterative optimization of the causal graph structure. Specifically, this includes: S8.1: The feedback data annotated by experts in the interactive diagnostic report is extracted in a structured manner. The feedback data includes the experts' correction opinions on key semantic nodes in the causal origination diagram and the confirmation information on the classification results, so as to generate a structured expert feedback sample set.
[0198] S8.2: Based on the causal path correction labels in the expert feedback sample set, perform local gradient calculation on the gated recurrent unit in the dynamic causal relationship generator network to obtain the error gradient distribution between the current causal graph structure and the expert's expected path.
[0199] S8.3: The parameter matrix of the dynamic causal relationship generator network is incrementally updated using the error gradient distribution, and the weight parameters of the gating unit are adjusted using the Adam optimization algorithm to reduce the difference between the model output causal path and the expert feedback path.
[0200] S8.4: Based on the updated gated loop unit parameters, the conditional dependencies between semantic concept nodes are re-inferred, and an optimized sparse causal graph structure is generated, where the edge weights represent the causal contribution strength of the feature patterns corrected by expert feedback to specific defect types.
[0201] S8.5: Compare and analyze the optimized cause-effect graph structure with historical versions, extract the evolution trend of key paths, and perform model stability assessment and quantitative calculation of interpretability index based on the trend to verify the dual improvement effect of online iterative optimization on classification performance and interpretability.
[0202] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
[0203] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.
[0204] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for analyzing welding quality defects in steel structure engineering based on acoustic signature monitoring, specifically including: S1: Multi-channel synchronous acquisition of acoustic signals generated during steel structure welding process to obtain raw audio dataset containing characteristics of insufficient penetration, porosity, and arc pressure fluctuation spectrum. S2: Perform wavelet packet decomposition and Mel frequency cepstral coefficient extraction on the collected voiceprint signal to generate a high-dimensional embedding vector sequence containing time-frequency domain composite features; S3: Construct a hierarchical semantic concept space, which contains a predefined set of interpretable intermediate variables, including the insufficient melting depth index, porosity parameter and arc pressure fluctuation intensity index; S4: Input the high-dimensional embedding vector into the dynamic causal relationship generator network, and dynamically infer the conditional dependencies between semantic concept nodes through the gated recurrent unit to generate a sparse causal graph structure, wherein the edge weights represent the causal contribution intensity of the feature pattern to a specific defect type. S5: Perform counterfactual perturbation verification on the causal graph, calculate the output change after the key semantic nodes are set to zero or enhanced, and quantify the role weight of each semantic concept in the final classification decision. S6: Execute a path aggregation mechanism based on each potential causal chain of the causal graph. The path aggregation mechanism generates the final defect category probability distribution through attention-weighted fusion and simultaneously saves the complete inference trajectory. S7: The probability distribution of the defect categories and the corresponding causal origination diagram are jointly visualized to generate an interactive diagnostic report that includes the basis for classification decisions and the contribution of key acoustic features.
2. The method for analyzing welding quality defects in steel structure engineering based on acoustic signature monitoring according to claim 1, characterized in that, Step S7 is followed by: S8: Based on the expert feedback data in the diagnostic report, update the parameters of the dynamic causal relationship generator network to achieve online iterative optimization of the causal graph structure.
3. The method for analyzing welding quality defects in steel structure engineering based on acoustic signature monitoring according to claim 1, characterized in that, In step S1, a directional microphone array and a high-precision acoustic sensor are deployed at the welding site to obtain the raw audio dataset.
4. The method for analyzing welding quality defects in steel structure engineering based on acoustic signature monitoring according to claim 1, characterized in that, Step S2 specifically includes: Pre-emphasis processing is performed on the original voiceprint signals acquired synchronously from multiple channels to obtain a pre-emphasized audio signal sequence; based on the pre-emphasized audio signal sequence, a frame shifting and splitting operation is performed using the Hamming window function to generate a time-domain framed signal matrix; Wavelet packet decomposition is performed on each frame of the time-domain framed signal matrix. The db4 wavelet basis function is used to perform a three-level decomposition to extract the wavelet packet coefficients of each sub-band and obtain a multi-scale time-frequency feature matrix. Based on wavelet packet coefficient statistics, the energy distribution entropy of each sub-band and the wavelet packet reconstructed spectrum are calculated to characterize the local frequency domain features of the voiceprint signal and generate a set of frequency domain feature vectors. The framed audio signal is subjected to Mel filter bank weighting processing to extract the Mel frequency cepstral coefficients of each frame and obtain the MFCC feature vector sequence. The wavelet packet frequency domain feature vector and the Mel frequency cepstral coefficient feature vector are concatenated and fused to form a high-dimensional feature embedding vector sequence containing composite information in the time and frequency domains.
5. The method for analyzing welding quality defects in steel structure engineering based on acoustic signature monitoring according to claim 1, characterized in that, Step S3 specifically includes: A semantic variable definition framework is constructed, which includes the physical definitions, dimensional system and value range of the insufficient melting depth index, porosity parameter and arc pressure fluctuation intensity index, so as to form a structured set of interpretable intermediate variables. The high-dimensional embedding vector sequence output by the feature extraction module is preprocessed with semantic mapping, and the embedding vector is dimensionally aligned and semantically decoupled to obtain a standardized feature representation that fits the semantic variable definition framework. Based on the mapping relationship between the semantic variable definition framework and the standardized feature representation, a semantic projection network is constructed using a multi-head attention mechanism. The semantic projection network performs multi-granular semantic matching on the standardized feature representation to generate semantic variable activation vectors. Hierarchical semantic aggregation operations are performed on the activation vectors of semantic variables, and graph neural networks are used to model the hierarchical dependencies between semantic variables to generate a hierarchical semantic concept graph structure. Based on the semantic consistency measure between the hierarchical semantic concept graph structure and the welding defect classification target, the cross-entropy loss function is used to jointly optimize the semantic variable activation vector and the hierarchical semantic concept graph structure to improve the interpretability and discriminative ability of the semantic concept space for the classification task.
6. The method for analyzing welding quality defects in steel structure engineering based on acoustic signature monitoring according to claim 5, characterized in that, The hierarchical semantic concept graph structure includes nodes and edges, where nodes represent semantic variables and edges represent hierarchical semantic relationships between variables.
7. The method for analyzing welding quality defects in steel structure engineering based on acoustic signature monitoring according to claim 1, characterized in that, The dynamic causal relationship generator network in step S4 is an encoder-decoder architecture.
8. The method for analyzing welding quality defects in steel structure engineering based on acoustic signature monitoring according to claim 5, characterized in that, The encoder section consists of gated loop units, used to capture complex temporal dependencies between semantic concepts; The decoder is a fully connected layer used to map the learned dependencies into a causal adjacency matrix.
Citation Information
Cited By
AC bus welding parameter self-adaptive regulation and control method based on arc voltage feedback
CN121755821A
Distributed graph database association analysis method and system based on TinkerPop API
CN121834007A
A Distributed Graph Database Association Analysis Method and System Based on TinkerPop API
CN121834007B
Audit method, device and apparatus for vulnerability mechanism
CN122333490A
Disclosed are a disc buckle type support frame multi-source time sequence stress characteristic early warning method and system
CN122388450A