PCB fault detection and repair method based on Bayesian inference

By combining methods such as Bayesian inference, multimodal data fusion, and neural ordinary differential equations, the problems of low accuracy and non-optimal repair strategies in PCB fault detection and repair are solved, and efficient and accurate fault detection and intelligent repair are achieved.

CN120632623AInactive Publication Date: 2025-09-12ZHONGKEXINSHU (SHENZHEN) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510721770.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing PCB fault detection methods rely on single-modal data, resulting in low detection accuracy and a lack of systematic repair strategies, making it impossible to provide optimization solutions in complex and changing fault scenarios. Traditional neural network models have insufficient generalization capabilities in processing high-dimensional multimodal data and lack the ability to handle uncertainty.

Method used

Combining Bayesian inference, multimodal data fusion, neural ordinary differential equations and adaptive Markov chain Monte Carlo method, through multidimensional data processing and time dynamic modeling, the posterior distribution and intelligent decision tree model are optimized to generate the optimal repair strategy.

Benefits of technology

It improves the accuracy of fault detection and inference efficiency, enhances the scientific nature and economic benefits of repair decisions, can accurately capture fault signals in complex environments, dynamically adjust the model to adapt to PCB operation changes, and provide the optimal repair solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632623A_ABST
    Figure CN120632623A_ABST
Patent Text Reader

Abstract

The invention discloses a PCB fault detection and repair method based on Bayesian inference. The method comprises the following steps: S1, generating a multi-modal data set; s2, carrying out preprocessing on the multi-modal data set; s3, calculating the posterior probability of the PCB fault by using a Bayesian inference method in combination with the initial prior probability, and generating a preliminary fault diagnosis result; s4, performing time sequence analysis through a Shenchang differential equation; s5, performing approximate inference on posterior distribution in the Bayesian model by adopting a method based on the combination of spread variation inference and normalized flow, and sampling in a high-dimensional space through an adaptive Markov chain Monte Carlo method to generate a final fault diagnosis result; s6, generating an optimal PCB repair scheme by using the intelligent decision tree model in combination with repair cost-benefit analysis; and S7, displaying a fault detection result and a repair suggestion through an interactive user interface. According to the method, the Bayesian inference and the Shenchang differential equation are combined, and efficient and accurate PCB fault detection and optimization repair are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault diagnosis and repair of electronic circuit systems, and in particular to a PCB fault detection and repair method based on Bayesian inference. Background Art

[0002] In modern electronic devices, printed circuit boards (PCBs) play a vital role as carriers of electronic components and bridges circuit connections. However, with the increasing sophistication and integration of electronic devices, PCB design and manufacturing have become increasingly complex, leading to an increasing number of potential PCB failures during operation. PCB failures not only affect the normal operation of the device but can also cause the entire system to shut down, or even trigger more serious chain reactions.

[0003] Existing PCB fault detection methods primarily rely on traditional testing and diagnostic technologies, such as electrical testing, functional testing, thermal imaging, and X-ray testing. These methods typically determine whether a PCB is faulty by acquiring and analyzing data from a single modality. However, these traditional detection methods have some significant limitations. First, data from a single modality is often insufficient to fully reflect the complex state of the PCB, which can easily lead to low detection accuracy. This is especially true when multiple potential faults are present, as the detection results from a single data source are prone to misjudgments or omissions. Second, traditional detection methods are mostly based on static data analysis and cannot effectively capture the dynamic changes of the PCB under different operating conditions, thereby limiting the accuracy and timeliness of fault detection.

[0004] Furthermore, existing PCB fault repair methods mostly rely on engineers' experience and pre-defined repair strategies. This manual decision-making approach is not only time-consuming and labor-intensive, but also, due to a lack of systematic decision-making support, can easily lead to suboptimal repair strategies and, in some cases, may not fully resolve the fault. Existing repair methods are particularly inadequate when faced with complex and diverse fault scenarios, failing to provide forward-looking, holistic optimization solutions.

[0005] To address the aforementioned shortcomings of existing technologies for PCB fault detection and repair, intelligent fault detection methods based on machine learning and artificial intelligence have gradually emerged in recent years, and have, to a certain extent, improved the shortcomings of traditional methods. For example, neural network-based fault detection methods can process multidimensional data and have certain learning capabilities. However, these methods still have some problems in practical applications. On the one hand, traditional neural network models are susceptible to data distribution bias and insufficient samples when processing high-dimensional, multimodal data, resulting in insufficient generalization ability of the model. On the other hand, existing machine learning methods generally lack the ability to handle uncertainty, which is crucial in fault detection and repair. If the uncertainty of fault detection results cannot be effectively quantified, it will greatly affect the accuracy and reliability of repair decisions.

[0006] Bayesian inference, as a statistical inference method, is gaining widespread attention due to its ability to effectively combine prior knowledge with observational data to handle uncertainty. Bayesian inference not only provides robust inference results when data is scarce, but also dynamically adjusts the model to accommodate new observations. Therefore, applying Bayesian inference to PCB fault detection and repair offers potential advantages. However, traditional Bayesian inference methods face high computational complexity and low inference efficiency when working with high-dimensional data and complex systems. Efficient Bayesian inference becomes a significant challenge, especially when the system undergoes frequent dynamic changes.

[0007] Therefore, how to provide a PCB fault detection and repair method based on Bayesian inference is an urgent problem that those skilled in the art need to solve. Summary of the Invention

[0008] One objective of the present invention is to propose a PCB fault detection and repair method based on Bayesian inference. By combining Bayesian inference, multimodal data fusion, neural ordinary differential equations, and adaptive Markov chain Monte Carlo methods, this invention proposes an efficient and accurate PCB fault detection and intelligent repair method. This method offers significant advantages in multidimensional data processing and temporal dynamic modeling. Through an optimized posterior distribution and intelligent decision tree model, it provides an optimal repair strategy. Compared with traditional methods, this invention significantly improves detection accuracy and inference efficiency, and significantly enhances the scientific nature and economic benefits of repair decisions.

[0009] A PCB fault detection and repair method based on Bayesian inference according to an embodiment of the present invention includes the following steps:

[0010] S1. Collect physical and electrical data during PCB operation through sensor equipment to generate a multimodal data set.

[0011] S2. Preprocess the multimodal data set and use data fusion algorithm to integrate the data of different modalities into a unified multidimensional feature space data;

[0012] S3. Based on the integrated multi-dimensional feature space data, the Bayesian inference method is combined with the initial prior probability to calculate the posterior probability of PCB fault and generate preliminary fault diagnosis results;

[0013] S4. Compare the preliminary fault diagnosis results with historical fault data, and perform time series analysis through neural ordinary differential equations to dynamically adjust the prior probability in the Bayesian model;

[0014] S5. Approximately infer the posterior distribution in the Bayesian model using a method based on amortized variational inference and normalized flow, and perform sampling in high-dimensional space using the adaptive Markov chain Monte Carlo method to optimize the computational efficiency of fault inference and generate the final fault diagnosis result.

[0015] S6. Based on the final fault diagnosis results, the intelligent decision tree model is combined with the repair cost-benefit analysis to generate the best PCB repair plan;

[0016] S7. Display fault detection results and repair suggestions through an interactive user interface, allowing users to adjust model parameters and input new data as needed, and view the results changes in real time.

[0017] Furthermore, the S2 specifically includes:

[0018] S21. Perform preliminary cleaning and outlier detection on the multimodal data collected by the sensor equipment, use the algorithm based on the local outlier factor to identify and process abnormal data points, and calculate the local outlier factor LOF(p) of each data point:

[0019]

[0020] Among them, N k (p) represents the k-nearest neighbor set of data point p, lrd(p) represents the local reachability density of data point p, and lrd(q) represents the local reachability density of data point q;

[0021] S22. Normalize the multimodal data using an adaptive normalization algorithm that automatically selects the normalization interval [a, b] based on the data distribution and dynamically adjusts the interval boundaries:

[0022]

[0023] Among them, a and b are determined by the data distribution characteristics, min(x) represents the minimum value in the current data set, max(x) represents the maximum value in the current data set, x represents the current data set, x′ Represents the normalized dataset;

[0024] S23, performing nonlinear feature extraction on the normalized data set, and performing nonlinear mapping on the multimodal data using a multi-core support vector machine-based method;

[0025] S24. Perform sparse coding on the extracted nonlinear features, and use a sparse representation method based on adaptive dictionary learning to perform sparse coding on the feature vector:

[0026]

[0027] Where z represents the feature representation after sparse coding, D represents the dictionary matrix, λ represents the regularization parameter, and y represents the input feature vector;

[0028] S25. Perform multimodal fusion on the sparsely coded features, and adopt a multimodal fusion method based on a deep residual network to obtain multidimensional feature space data F:

[0029] F = W·ResNet(z)+b;

[0030] Where W represents the weight matrix and b represents the bias vector;

[0031] S26. Standardize the fused multi-dimensional feature space data F using a standardization method based on dynamic range adjustment:

[0032]

[0033] Among them, μ represents the mean of the eigenvalue, σ represents the standard deviation of the eigenvalue, γ represents the adjustment parameter, θ represents the center point of the dynamic range adjustment, and F1 represents the standardized multidimensional feature space data.

[0034] Furthermore, the S3 specifically includes:

[0035] S31. Establish an initial prior probability model for PCB fault detection and use a dynamic Bayesian network to model the time dependency of PCB faults. Nodes represent fault states at different time points, and edges represent temporal dependencies. The dynamic evolution of the prior probability distribution is defined by the transition probability matrix:

[0036] P(θ t |θ t-1 )=A t ·P(θ t-1 );

[0037] Among them, θ t represents the fault state at time point t, θ t-1 Indicates the fault state at the previous time point t-1, A trepresents the transition probability matrix;

[0038] S32. Based on the prior model of the dynamic Bayesian network and the standardized multidimensional feature space data F1, the posterior probability distribution of PCB failure is calculated using the variational Bayesian inference method. The variational distribution q(θ) is defined to approximate the posterior distribution:

[0039]

[0040] Where P(θ|F1) represents the true posterior distribution of the fault parameter θ under F1, and q(θ) represents the variational distribution used to approximate the true posterior distribution;

[0041] S33. In the process of calculating variational Bayesian inference, an optimization method based on manifold learning is used to project the complex high-dimensional posterior distribution into the low-dimensional manifold space for optimization. The optimized variational distribution Expressed as:

[0042]

[0043] Where M(φ) represents the mean function, S(φ) represents the covariance function, and φ represents the coordinate in the manifold space;

[0044] S34. Use the iterative variational inference algorithm to alternately optimize the likelihood function P(F1|θ) and the variational distribution q(θ), maximizing the variational lower bound during the iteration process:

[0045] L(q)=E q(θ) [log2 P(F1|θ)]-KL(q(θ)||P(θ));

[0046] Among them, L(q) represents the variational lower bound, E q(θ) [log2 P(F1|θ)] represents the expected value of the likelihood function under the variational distribution;

[0047] S35, optimize the variational distribution Substitute it into the Bayesian inference model, recalculate the posterior probability distribution of PCB fault, and generate preliminary fault diagnosis results.

[0048] Furthermore, the S4 specifically includes:

[0049] S41. Compare the preliminary fault diagnosis results with the historical fault data and construct a neural ordinary differential equation model to capture the time dynamics of the fault state. The basic form of the model is:

[0050]

[0051] Where h(t) represents the hidden state vector at time point t, θ represents the model parameters, and f(·) represents the neural network function;

[0052] S42, initializing the neural ordinary differential equation model, using historical fault data D as input, and mapping the fault data to a latent state space through a multi-layer perceptron structure of a neural network function f(·);

[0053] S43, dynamically adjusting the prior probability in the Bayesian model based on the hidden state vector h(t) and the preliminary diagnosis results;

[0054] S44. Numerically solve the Neural ODE model solver, integrate the hidden state vector h(t) from the initial time t0 to the current time t, and update the hidden state:

[0055]

[0056] Among them, h(t0) represents the initial hidden state vector, τ represents the integral variable, and H(t) represents the hidden state vector after update at time t.

[0057] Furthermore, the S5 specifically includes:

[0058] S51. Use the amortized variational inference method to approximate the posterior distribution in the Bayesian model, define the variational distribution q(θ;φ), where θ represents the fault parameter to be inferred and φ represents the parameter of the variational distribution, and perform amortized learning on φ through a neural network to minimize the Kullback-Leibler divergence between the variational distribution and the true posterior distribution;

[0059] S52, enhance the expressive power of variational distribution through normalization flow, apply reversible transformation to the initial distribution q0(θ), and map the initial distribution q0(θ) into a complex target distribution q K (θ):

[0060]

[0061] in, represents the kth inverse transform, represents the absolute value of the Jacobian determinant, and K represents the number of transformations;

[0062] S53, using the adaptive Markov chain Monte Carlo method to sample the fault parameter θ in the high-dimensional space, and dynamically adjust the transition probability matrix T t (θ ′ |θ) to implement sampling, and dynamically optimize the transition probability based on the current posterior probability during the sampling process;

[0063] S54. Analyze and summarize the samples obtained by the adaptive Markov chain Monte Carlo method, update the posterior probability distribution in the Bayesian model, and calculate the final posterior probability distribution

[0064]

[0065] Among them, N represents the number of samples, M represents the number of latent variables, and θ (i) represents the i-th sampling point, z (i) represents the latent variable of the i-th sampling point, w j represents the weight matrix, P(F1|θ (i) ) represents the likelihood function;

[0066] S55, comparing the final posterior probability distribution with the preliminary diagnosis result, and revising the diagnosis result;

[0067] S56. Generate a final fault diagnosis result based on the optimized posterior probability distribution.

[0068] Furthermore, the S6 specifically includes:

[0069] S61. Based on the final posterior probability distribution result, use the intelligent decision tree model to classify the fault mode and generate the corresponding repair strategy;

[0070] S62. Combine the restoration cost-benefit analysis model to conduct an economic evaluation of different restoration strategies and calculate the cost-benefit ratio of each strategy:

[0071]

[0072] Among them, B(c|θ (i) ) represents the selection strategy c in the fault state θ (i) The expected benefit under (i) ) represents the selection strategy c in the fault state θ (i) The expected cost under Indicates the fault state θ (i) The final posterior probability distribution;

[0073] S63. Based on the calculated cost-benefit ratio, select the restoration strategy with the highest cost-benefit ratio as the recommended restoration solution, and calculate the total expected benefit:

[0074]

[0075] Among them, c * represents the selected optimal repair strategy;

[0076] S64, through an integrated intelligent decision support system, the selected repair strategy is delivered to the user, repair suggestions are provided, and the user is allowed to adjust the strategy based on the system recommendation. The system interface is implemented based on a graphical user interface;

[0077] S65. After the user confirms the final repair strategy, the repair strategy is applied to the PCB repair process, and the repair progress is monitored in real time. The system automatically records the repair results and feeds them back to the Bayesian model;

[0078] S66. Based on the operation data after the repair, the system evaluates the repair effect and updates the prior probability in the Bayesian inference model and the classification rules of the decision tree model by comparing the performance indicators before and after the repair.

[0079] The beneficial effects of the present invention are:

[0080] First, the application of multimodal data fusion technology enables the effective integration of data from different sensors to comprehensively characterize the operating status of the PCB. This approach not only overcomes the limitations of single-modal data but also improves the comprehensiveness and accuracy of fault detection, allowing potential fault signals to be accurately captured even under complex operating conditions.

[0081] Secondly, by dynamically modeling time series data using neural ordinary differential equations, the present invention can better capture the temporal dynamics of PCB faults. This dynamic adjustment capability enables the Bayesian model to reflect the evolution of PCB faults in real time, maintaining efficient and accurate fault detection capabilities under varying operating conditions. Compared to static models, this dynamic modeling approach significantly improves detection sensitivity and response speed.

[0082] In terms of inference efficiency, this paper combines amortized variational inference with normalized flow, effectively overcoming the computational bottleneck of traditional Bayesian inference in high-dimensional data processing. This combination significantly improves the approximation of the posterior distribution while maintaining computational efficiency. This improvement not only increases the accuracy of fault inference but also enables the inference process to be completed within a reasonable timeframe, making it suitable for high-dimensional and complex system scenarios in practical applications.

[0083] Furthermore, the introduction of the adaptive Markov chain Monte Carlo method makes sampling in high-dimensional space more efficient and accurate. By dynamically adjusting the sampled transition probability matrix, the present invention enables effective exploration in high-dimensional space, further optimizing the results of Bayesian inference. This efficient sampling method not only reduces computing resource consumption but also improves the overall performance of fault detection.

[0084] Finally, the present invention combines an intelligent decision tree model with repair cost-benefit analysis to generate fault repair strategies. Through this intelligent decision support system, the present invention can provide users with optimal repair solutions, reducing the subjectivity of human decision-making while also improving the economic benefits and execution efficiency of repair strategies. Compared to traditional, experience-based repair methods, this data-driven repair strategy is more scientific and reliable, effectively extending the lifespan of PCBs and reducing maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0086] Figure 1 A flowchart of the PCB fault detection and repair method based on Bayesian inference proposed by the present invention;

[0087] Figure 2 Schematic diagram of the posterior distribution optimization process of the PCB fault detection and repair method based on Bayesian inference proposed in the present invention;

[0088] Figure 3 This is a flowchart of the intelligent decision tree model of the PCB fault detection and repair method based on Bayesian inference proposed by the present invention, combined with repair cost-benefit analysis to generate the optimal repair solution. DETAILED DESCRIPTION

[0089] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.

[0090] refer to Figure 1-3 ,PCB fault detection and repair method based on Bayesian inference, including the following steps:

[0091] S1. Collect physical and electrical data during PCB operation through sensor equipment to generate a multimodal data set.

[0092] S2. Preprocess the multimodal data set and use data fusion algorithm to integrate the data of different modalities into a unified multidimensional feature space data;

[0093] S3. Based on the integrated multi-dimensional feature space data, the Bayesian inference method is combined with the initial prior probability to calculate the posterior probability of PCB fault and generate preliminary fault diagnosis results;

[0094] S4. Compare the preliminary fault diagnosis results with historical fault data, and perform time series analysis through neural ordinary differential equations to dynamically adjust the prior probability in the Bayesian model;

[0095] S5. Approximately infer the posterior distribution in the Bayesian model using a method based on amortized variational inference and normalized flow, and perform sampling in high-dimensional space using the adaptive Markov chain Monte Carlo method to optimize the computational efficiency of fault inference and generate the final fault diagnosis result.

[0096] S6. Based on the final fault diagnosis results, the intelligent decision tree model is combined with the repair cost-benefit analysis to generate the best PCB repair plan;

[0097] S7. Display fault detection results and repair suggestions through an interactive user interface, allowing users to adjust model parameters and input new data as needed, and view the results changes in real time.

[0098] In this embodiment, S2 specifically includes:

[0099] S21. Perform preliminary cleaning and outlier detection on the multimodal data collected by the sensor equipment, use the algorithm based on the local outlier factor to identify and process abnormal data points, and calculate the local outlier factor LOF(p) of each data point:

[0100]

[0101] Among them, N k (p) represents the k-nearest neighbor set of data point p, lrd(p) represents the local reachability density of data point p, and lrd(q) represents the local reachability density of data point q;

[0102] S22. Normalize the multimodal data using an adaptive normalization algorithm that automatically selects the normalization interval [a, b] based on the data distribution and dynamically adjusts the interval boundaries:

[0103]

[0104] Among them, a and b are determined by the data distribution characteristics, min(x) represents the minimum value in the current data set, max(x) represents the maximum value in the current data set, x represents the current data set, x ′ Represents the normalized dataset;

[0105] S23, performing nonlinear feature extraction on the normalized data set, and performing nonlinear mapping on the multimodal data using a multi-core support vector machine-based method;

[0106] S24. Perform sparse coding on the extracted nonlinear features, and use a sparse representation method based on adaptive dictionary learning to perform sparse coding on the feature vector:

[0107]

[0108] Where z represents the feature representation after sparse coding, D represents the dictionary matrix, λ represents the regularization parameter, and y represents the input feature vector;

[0109] S25. Perform multimodal fusion on the sparsely coded features, and adopt a multimodal fusion method based on a deep residual network to obtain multidimensional feature space data F:

[0110] F = W·ResNet(z)+b;

[0111] Where W represents the weight matrix and b represents the bias vector;

[0112] S26. Standardize the fused multi-dimensional feature space data F using a standardization method based on dynamic range adjustment:

[0113]

[0114] Among them, μ represents the mean of the eigenvalue, σ represents the standard deviation of the eigenvalue, γ represents the adjustment parameter, θ represents the center point of the dynamic range adjustment, and F1 represents the standardized multidimensional feature space data.

[0115] In this embodiment, S3 specifically includes:

[0116] S31. Establish an initial prior probability model for PCB fault detection and use a dynamic Bayesian network to model the time dependency of PCB faults. Nodes represent fault states at different time points, and edges represent temporal dependencies. The dynamic evolution of the prior probability distribution is defined by the transition probability matrix:

[0117] P(θ t |θ t-1 )=A t ·P(θ t-1 );

[0118] Among them, θ t represents the fault state at time point t, θ t-1 Indicates the fault state at the previous time point t-1, A t represents the transition probability matrix;

[0119] S32. Based on the prior model of the dynamic Bayesian network and the standardized multidimensional feature space data F1, the posterior probability distribution of PCB failure is calculated using the variational Bayesian inference method. The variational distribution q(θ) is defined to approximate the posterior distribution:

[0120]

[0121] Where P(θ|F1) represents the true posterior distribution of the fault parameter θ under F1, and q(θ) represents the variational distribution used to approximate the true posterior distribution;

[0122] S33. In the process of calculating variational Bayesian inference, an optimization method based on manifold learning is used to project the complex high-dimensional posterior distribution into the low-dimensional manifold space for optimization. The optimized variational distribution Expressed as:

[0123]

[0124] Where M(φ) represents the mean function, S(φ) represents the covariance function, and φ represents the coordinate in the manifold space;

[0125] S34. Use the iterative variational inference algorithm to alternately optimize the likelihood function P(F1|θ) and the variational distribution q(θ), maximizing the variational lower bound during the iteration process:

[0126] L(q)=E q(θ) [log2 P(F1|θ)]-KL(q(θ)||P(θ));

[0127] Among them, L(q) represents the variational lower bound, E q(θ) [log2 P(F1|θ)] represents the expected value of the likelihood function under the variational distribution;

[0128] S35, optimize the variational distribution Substitute it into the Bayesian inference model, recalculate the posterior probability distribution of PCB fault, and generate preliminary fault diagnosis results.

[0129] In this embodiment, the S4 specifically includes:

[0130] S41. Compare the preliminary fault diagnosis results with the historical fault data and construct a neural ordinary differential equation model to capture the time dynamics of the fault state. The basic form of the model is:

[0131]

[0132] Where h(t) represents the hidden state vector at time point t, θ represents the model parameters, and f(·) represents the neural network function;

[0133] S42, initializing the neural ordinary differential equation model, using historical fault data D as input, and mapping the fault data to a latent state space through a multi-layer perceptron structure of a neural network function f(·);

[0134] S43, dynamically adjusting the prior probability in the Bayesian model based on the hidden state vector h(t) and the preliminary diagnosis results;

[0135] S44. Numerically solve the Neural ODE model solver, integrate the hidden state vector h(t) from the initial time t0 to the current time t, and update the hidden state:

[0136]

[0137] Among them, h(t0) represents the initial hidden state vector, τ represents the integral variable, and H(t) represents the hidden state vector after update at time t.

[0138] In this embodiment, the S5 specifically includes:

[0139] S51. Use the amortized variational inference method to approximate the posterior distribution in the Bayesian model, define the variational distribution q(θ;φ), where θ represents the fault parameter to be inferred and φ represents the parameter of the variational distribution, and perform amortized learning on φ through a neural network to minimize the Kullback-Leibler divergence between the variational distribution and the true posterior distribution;

[0140] S52, enhance the expressive power of variational distribution through normalization flow, apply reversible transformation to the initial distribution q0(θ), and map the initial distribution q0(θ) into a complex target distribution q K (θ):

[0141]

[0142] in, represents the kth inverse transform, represents the absolute value of the Jacobian determinant, and K represents the number of transformations;

[0143] S53, using the adaptive Markov chain Monte Carlo method to sample the fault parameter θ in the high-dimensional space, and dynamically adjust the transition probability matrix T t (θ ′ |θ) to implement sampling, and dynamically optimize the transition probability based on the current posterior probability during the sampling process;

[0144] S54. Analyze and summarize the samples obtained by the adaptive Markov chain Monte Carlo method, update the posterior probability distribution in the Bayesian model, and calculate the final posterior probability distribution

[0145]

[0146] Among them, N represents the number of samples, M represents the number of latent variables, and θ(i) represents the i-th sampling point, z (i) represents the latent variable of the i-th sampling point, w j represents the weight matrix, P(F1|θ (i) ) represents the likelihood function;

[0147] S55, comparing the final posterior probability distribution with the preliminary diagnosis result, and revising the diagnosis result;

[0148] S56. Generate a final fault diagnosis result based on the optimized posterior probability distribution.

[0149] In this embodiment, S6 specifically includes:

[0150] S61. Based on the final posterior probability distribution result, use the intelligent decision tree model to classify the fault mode and generate the corresponding repair strategy;

[0151] S62. Combine the restoration cost-benefit analysis model to conduct an economic evaluation of different restoration strategies and calculate the cost-benefit ratio of each strategy:

[0152]

[0153] Among them, B(c|θ (i) ) represents the selection strategy c in the fault state θ (i) The expected benefit under (i) ) represents the selection strategy c in the fault state θ (i) The expected cost under Indicates the fault state θ (i) The final posterior probability distribution;

[0154] S63. Based on the calculated cost-benefit ratio, select the restoration strategy with the highest cost-benefit ratio as the recommended restoration solution, and calculate the total expected benefit:

[0155]

[0156] Among them, c * represents the selected optimal repair strategy;

[0157] S64, through an integrated intelligent decision support system, the selected repair strategy is delivered to the user, repair suggestions are provided, and the user is allowed to adjust the strategy based on the system recommendation. The system interface is implemented based on a graphical user interface;

[0158] S65. After the user confirms the final repair strategy, the repair strategy is applied to the PCB repair process, and the repair progress is monitored in real time. The system automatically records the repair results and feeds them back to the Bayesian model;

[0159] S66. Based on the operation data after the repair, the system evaluates the repair effect and updates the prior probability in the Bayesian inference model and the classification rules of the decision tree model by comparing the performance indicators before and after the repair.

[0160] Example 1:

[0161] To verify the feasibility of the present invention, it was applied to the production line of a large electronics manufacturer. Due to the complex manufacturing process of PCBs and the potential for them to be affected by temperature fluctuations, electromagnetic interference, mechanical vibration, and other factors during long-term use, PCB failures are common. These failures can lead to decreased device performance, functional failures, and even complete system downtime, resulting in significant economic losses for the company. Traditional PCB fault detection methods often rely on a single data source or empirical judgment. This approach not only has limited detection accuracy, but also struggles to provide accurate and timely detection results when faced with complex and changing fault environments.

[0162] First, various sensors deployed on the production line, including temperature sensors, current and voltage sensors, vibration sensors, and infrared thermal imagers, collect physical and electrical data from the PCB in real time. This data covers key parameters of PCB operation, including temperature, current, voltage, and vibration frequency. During the production process, the system preprocesses this multimodal data, integrating it into a unified multidimensional feature space using an adaptive normalization algorithm and a feature extraction method based on a multi-core support vector machine. This data processing approach ensures that the system can comprehensively and accurately capture the PCB's operating status even in complex and changing production environments.

[0163] Next, the system uses Bayesian inference methods, combined with an initial prior probability model, to analyze the integrated multidimensional feature space data and generate preliminary fault diagnosis results. A neural ordinary differential equation model is then used to perform time series analysis on these diagnostic results, dynamically adjusting the prior probabilities in the Bayesian model to better capture the evolving trends of PCB faults. For example, during operation, if the temperature rise rate of certain PCBs exceeds a preset threshold, the neural ordinary differential equation model can enable the system to adjust the fault probability distribution in real time and promptly identify potential failure risks.

[0164] To ensure accurate fault diagnosis and efficient inference, the system uses a combination of amortized variational inference and normalized flow to approximate the posterior distribution in the Bayesian model. This approach effectively approximates the posterior distribution in high-dimensional space and efficiently samples fault parameters using an adaptive Markov chain Monte Carlo method. This allows the system to quickly generate final fault diagnosis results and provide reliable data support for subsequent repair strategies.

[0165] Table 1 Comparison of PCB fault detection and repair methods

[0166]

[0167] The performance of the traditional method and the method of the present invention on multiple key indicators was compared in detail, and the advantages of the present invention were highlighted through the description of the improvement effect. In terms of fault detection time, the traditional method usually takes more than 30 minutes to complete the detection, while the method of the present invention only takes 10 minutes, which significantly shortens the detection time and improves the detection efficiency. In terms of the accuracy of the diagnostic results, the traditional method performs moderately and is prone to misjudgment or omission. The method of the present invention achieves high-precision diagnostic results through multimodal data fusion and Bayesian inference, significantly improving the reliability of detection.

[0168] Traditional methods generally lack effective downtime risk prediction capabilities and are unable to identify potential risks in advance. However, the method proposed in this paper can predict downtime risks up to two hours before a failure occurs, significantly improving the accuracy and timeliness of predictions. This advantage is particularly important in actual production line operations, helping to take proactive measures to avoid production interruptions.

[0169] In terms of repair suggestion time, traditional methods often take more than 30 minutes to formulate a repair strategy. However, the method of the present invention uses an intelligent decision tree model and cost-benefit analysis to generate the optimal repair plan in just 10 minutes, further shortening the response time for fault repair.

[0170] In terms of equipment recovery rates after repair, traditional methods typically only partially restore normal operation of the equipment. However, the method of the present invention achieves full equipment recovery within 24 hours after repair, significantly improving the stability of the production line. Furthermore, the method of the present invention excels in improving production line efficiency, reducing failure rates, and reducing maintenance costs. Compared with traditional methods, the present invention has increased production line efficiency by 5%, reduced failure rates by 30%, and reduced maintenance costs by 15%. This not only brings significant economic benefits, but also extends the service life of equipment and enhances the company's competitiveness.

[0171] In summary, the data analysis in the table fully demonstrates the advantages of this invention in the field of PCB fault detection and repair. Through shorter detection times, highly accurate diagnostic results, effective risk prediction, and intelligent repair strategies, it significantly improves production line operating efficiency and economic benefits. Compared with traditional methods, this invention not only possesses greater technical innovation and practicality, but also demonstrates excellent results in practical applications.

[0172] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. A PCB fault detection and repair method based on Bayesian inference, characterized in that: The steps include: S1. Collect physical and electrical data during PCB operation through sensor equipment to generate a multimodal data set. S2. Preprocess the multimodal data set and use data fusion algorithm to integrate the data of different modalities into a unified multidimensional feature space data; S3. Based on the integrated multi-dimensional feature space data, the Bayesian inference method is combined with the initial prior probability to calculate the posterior probability of PCB fault and generate preliminary fault diagnosis results; S4. Compare the preliminary fault diagnosis results with historical fault data, and perform time series analysis through neural ordinary differential equations to dynamically adjust the prior probability in the Bayesian model; S5. Approximately infer the posterior distribution in the Bayesian model using a method based on amortized variational inference and normalized flow, and perform sampling in high-dimensional space using the adaptive Markov chain Monte Carlo method to optimize the computational efficiency of fault inference and generate the final fault diagnosis result. S6. Based on the final fault diagnosis results, the intelligent decision tree model is combined with the repair cost-benefit analysis to generate the best PCB repair plan; S7. Display fault detection results and repair suggestions through an interactive user interface, allowing users to adjust model parameters and input new data as needed, and view the results changes in real time.

2. The PCB fault detection and repair method based on Bayesian inference according to claim 1 is characterized in that: The S2 specifically includes: S21. Perform preliminary cleaning and outlier detection on the multimodal data collected by the sensor equipment, use the algorithm based on the local outlier factor to identify and process abnormal data points, and calculate the local outlier factor LOF(p) of each data point: Among them, N k (p) represents the k-nearest neighbor set of data point p, lrd(p) represents the local reachability density of data point p, and lrd(q) represents the local reachability density of data point q; S22. Normalize the multimodal data using an adaptive normalization algorithm that automatically selects the normalization interval [a, b] based on the data distribution and dynamically adjusts the interval boundaries: Where a and b are adaptively determined by the data distribution characteristics, min(x) represents the minimum value in the current data set, max(x) represents the maximum value in the current data set, x represents the current data set, and x′ represents the normalized data set; S23, performing nonlinear feature extraction on the normalized data set, and performing nonlinear mapping on the multimodal data using a multi-core support vector machine-based method; S24. Perform sparse coding on the extracted nonlinear features, and use a sparse representation method based on adaptive dictionary learning to perform sparse coding on the feature vector: Where z represents the feature representation after sparse coding, D represents the dictionary matrix, λ represents the regularization parameter, and y represents the input feature vector; S25. Perform multimodal fusion on the sparsely coded features, and adopt a multimodal fusion method based on a deep residual network to obtain multidimensional feature space data F: F = W·ResNet(z)+b; Where W represents the weight matrix and b represents the bias vector; S26. Standardize the fused multi-dimensional feature space data F using a standardization method based on dynamic range adjustment: Among them, μ represents the mean of the eigenvalue, σ represents the standard deviation of the eigenvalue, γ represents the adjustment parameter, θ represents the center point of the dynamic range adjustment, and F1 represents the standardized multidimensional feature space data.

3. The PCB fault detection and repair method based on Bayesian inference according to claim 1 is characterized in that: The S3 specifically includes: S31. Establish an initial prior probability model for PCB fault detection and use a dynamic Bayesian network to model the time dependency of PCB faults. Nodes represent fault states at different time points, and edges represent temporal dependencies. The dynamic evolution of the prior probability distribution is defined by the transition probability matrix: P(θ t |θ t-1 )=A t ·P(θ t-1 ); Among them, θ t represents the fault state at time point t, θ t-1 Indicates the fault state at the previous time point t-1, A t represents the transition probability matrix; S32. Based on the prior model of the dynamic Bayesian network and the standardized multidimensional feature space data F1, the posterior probability distribution of PCB failure is calculated using the variational Bayesian inference method. The variational distribution q(θ) is defined to approximate the posterior distribution: Where P(θ|F1) represents the true posterior distribution of the fault parameter θ under F1, and q(θ) represents the variational distribution used to approximate the true posterior distribution; S33. In the process of calculating variational Bayesian inference, an optimization method based on manifold learning is used to project the complex high-dimensional posterior distribution into the low-dimensional manifold space for optimization. The optimized variational distribution Expressed as: Where M(φ) represents the mean function, S(φ) represents the covariance function, and φ represents the coordinate in the manifold space; S34. Use the iterative variational inference algorithm to alternately optimize the likelihood function P(F1|θ) and the variational distribution q(θ), maximizing the variational lower bound during the iteration process: L(q)=E q(θ) [log2 P(F1|θ)]-KL(q(θ)||P(θ)); Among them, L(q) represents the variational lower bound, E q(θ) [log2 P(F1|θ)] represents the expected value of the likelihood function under the variational distribution; S35, optimize the variational distribution Substitute it into the Bayesian inference model, recalculate the posterior probability distribution of PCB fault, and generate preliminary fault diagnosis results.

4. The PCB fault detection and repair method based on Bayesian inference according to claim 1 is characterized in that: The S4 specifically includes: S41. Compare the preliminary fault diagnosis results with the historical fault data and construct a neural ordinary differential equation model to capture the time dynamics of the fault state. The basic form of the model is: Where h(t) represents the hidden state vector at time point t, θ represents the model parameters, and f(·) represents the neural network function; S42, initializing the neural ordinary differential equation model, using historical fault data D as input, and mapping the fault data to a latent state space through a multi-layer perceptron structure of a neural network function f(·); S43, dynamically adjusting the prior probability in the Bayesian model based on the hidden state vector h(t) and the preliminary diagnosis results; S44. Numerically solve the Neural ODE model solver, integrate the hidden state vector h(t) from the initial time t0 to the current time t, and update the hidden state: Among them, h(t0) represents the initial hidden state vector, τ represents the integral variable, and H(t) represents the hidden state vector after update at time t.

5. The PCB fault detection and repair method based on Bayesian inference according to claim 1 is characterized in that: The S5 specifically includes: S51. Use the amortized variational inference method to approximate the posterior distribution in the Bayesian model, define the variational distribution q(θ;φ), where θ represents the fault parameter to be inferred and φ represents the parameter of the variational distribution, and perform amortized learning on φ through a neural network to minimize the Kullback-Leibler divergence between the variational distribution and the true posterior distribution; S52, enhance the expressive power of variational distribution through normalization flow, apply reversible transformation to the initial distribution q0(θ), and map the initial distribution q0(θ) into a complex target distribution q K (θ): in, represents the kth inverse transform, represents the absolute value of the Jacobian determinant, and K represents the number of transformations; S53, using the adaptive Markov chain Monte Carlo method to sample the fault parameter θ in the high-dimensional space, and dynamically adjust the transition probability matrix T t (θ′|θ) realizes sampling, and the transition probability is dynamically optimized in the sampling process based on the current posterior probability; S54. Analyze and summarize the samples obtained by the adaptive Markov chain Monte Carlo method, update the posterior probability distribution in the Bayesian model, and calculate the final posterior probability distribution Among them, N represents the number of samples, M represents the number of latent variables, and θ (i) represents the i-th sampling point, z (i) represents the latent variable of the i-th sampling point, w j represents the weight matrix, P(F1|θ (i) ) represents the likelihood function; S55, comparing the final posterior probability distribution with the preliminary diagnosis result, and revising the diagnosis result; S56. Generate a final fault diagnosis result based on the optimized posterior probability distribution.

6. The PCB fault detection and repair method based on Bayesian inference according to claim 1 is characterized in that: The S6 specifically includes: S61. Based on the final posterior probability distribution result, use the intelligent decision tree model to classify the fault mode and generate the corresponding repair strategy; S62. Combine the restoration cost-benefit analysis model to conduct an economic evaluation of different restoration strategies and calculate the cost-benefit ratio of each strategy: Among them, B(c|θ (i) ) represents the selection strategy c in the fault state θ (i) The expected benefit under (i) ) represents the selection strategy c in the fault state θ (i) The expected cost under Indicates the fault state θ (i) The final posterior probability distribution; S63. Based on the calculated cost-benefit ratio, select the restoration strategy with the highest cost-benefit ratio as the recommended restoration solution, and calculate the total expected benefit: Among them, c * represents the selected optimal repair strategy; S64, through an integrated intelligent decision support system, the selected repair strategy is delivered to the user, repair suggestions are provided, and the user is allowed to adjust the strategy based on the system recommendation. The system interface is implemented based on a graphical user interface; S65. After the user confirms the final repair strategy, the repair strategy is applied to the PCB repair process, and the repair progress is monitored in real time. The system automatically records the repair results and feeds them back to the Bayesian model; S66. Based on the operation data after the repair, the system evaluates the repair effect and updates the prior probability in the Bayesian inference model and the classification rules of the decision tree model by comparing the performance indicators before and after the repair.