LED lamp surface defect detection method based on multi-source data analysis

By synchronously acquiring and aligning multi-source data in time and space, extracting cross-domain features through hierarchical graph convolution, measuring physical constraints for anomalies, and optimizing adversarial decisions, the problems of single data acquisition, weak feature extraction, and insufficient model adaptation in LED lamp surface defect detection have been solved, achieving high-precision and stable defect detection.

CN121860982APending Publication Date: 2026-04-14WENLING CITY HAIBEN OPTO-ELECTRICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WENLING CITY HAIBEN OPTO-ELECTRICAL TECH CO LTD
Filing Date
2025-12-31
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing LED lamp surface defect detection technologies suffer from problems such as limited data acquisition dimensions, weak generalization ability of feature extraction methods, insufficient model adaptability, and lack of reliability in decision-making mechanisms. These issues lead to unstable detection accuracy and difficulty in adapting to complex scenarios and dynamic changes.

Method used

By employing methods such as synchronous acquisition of multi-source data and spatiotemporal alignment, cross-domain feature extraction via hierarchical graph convolution, physical constraint anomaly measurement, adversarial decision optimization, and adaptive threshold and confidence evaluation, combined with online active learning and model evolution, we can achieve multi-dimensional data fusion and dynamic model updates.

Benefits of technology

It improves the accuracy and stability of defect detection, reduces the false negative rate, adapts to dynamic changes in the production line, and enhances the efficiency and reliability of the detection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860982A_ABST
    Figure CN121860982A_ABST
Patent Text Reader

Abstract

The invention discloses an LED lamp surface defect detection method based on multi-source data analysis, and particularly relates to the field of computer vision data analysis, and the method comprises the steps: synchronously collecting multi-physical field data and process environment parameters through a composite electric excitation sequence, and constructing a pixel-level feature vector through sub-pixel registration; generating a global graph embedding vector based on hierarchical graph convolution; a physical constraint variational auto-encoder is used to acquire a multi-dimensional anomaly score; a discriminator is optimized through three-stage adversarial training, and a final abnormal score is generated in combination with a gating circulation unit; adopting Bayesian optimization to solve an optimal threshold value and calculating a detection confidence coefficient; incremental updating of the model is realized through an elastic weight merging algorithm; according to the method, multi-source information and an advanced algorithm are integrated, the defect detection precision and robustness are improved, a dynamic detection scene is adapted, and efficient and reliable technical support is provided for LED lamp quality control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision data analysis technology, and more specifically, to a method for detecting surface defects in LED lamps based on multi-source data analysis. Background Technology

[0002] With the rapid development of semiconductor lighting technology, LED lights have been widely used in general lighting, display backlighting, automotive electronics and other fields due to their advantages such as high efficiency and energy saving, long service life and environmental protection. The surface quality of LED lights directly affects their optical performance, reliability and service life. Therefore, surface defect detection has become a key link in the LED manufacturing process.

[0003] Currently, multi-source data analysis technology is increasingly being applied in the field of industrial quality inspection, providing new technical approaches for the detection of surface defects in LED lamps. The continuous maturation of multi-physics data acquisition technology enables the simultaneous acquisition of multi-dimensional information related to the light, electricity, and heat of LED lamp surfaces, providing rich data support for defect identification. Simultaneously, the rapid iteration of machine learning and deep learning algorithms is driving the development of LED lamp surface defect detection towards automation and intelligence. The adaptability of various data processing and feature extraction algorithms in inspection scenarios is continuously improving, helping to enhance the efficiency and intelligence of the inspection process, becoming an important development trend in this field.

[0004] However, it still has some drawbacks in practical use, such as:

[0005] 1. The data acquisition dimension is singular, relying heavily on single optical image data and failing to integrate information from multiple physical fields such as light, electricity, and heat. This results in incomplete characterization of defect features, making it easy to miss subtle defects due to missing information, and making it difficult to adapt to complex LED surface defect detection scenarios.

[0006] 2. The feature extraction method has weak generalization ability. Traditional manual feature extraction or simple deep learning feature extraction methods cannot effectively capture cross-domain correlation information of multi-dimensional data. They have poor adaptability to different types and sizes of LED defects and the detection accuracy is unstable.

[0007] 3. Insufficient model adaptability: Most detection models have a fixed architecture and do not take into account the dynamic changes of defect types during production. They lack an effective model update mechanism, and their detection performance is prone to deterioration after long-term use, making it difficult to adapt to the dynamic adjustment needs of the production line.

[0008] 4. The decision-making mechanism lacks reliability. Fixed thresholds are often used for defect judgment, and a confidence assessment mechanism has not been introduced. It is impossible to distinguish the reliability of the test results, which can easily lead to misjudgment of ambiguous samples, increase the cost of manual review, and affect the overall efficiency of the testing process. Summary of the Invention

[0009] To overcome the aforementioned deficiencies of the prior art, the present invention provides a method for detecting surface defects in LED lamps based on multi-source data analysis, which solves the problems mentioned in the background art through the following scheme.

[0010] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting surface defects in LED lamps based on multi-source data analysis, comprising:

[0011] S1: Multi-source data synchronous acquisition and spatiotemporal alignment: Multi-sensor acquisition of transient optical field, polarization-spectrum, and phase-locked thermal imaging data is synchronously triggered by a composite electrical excitation sequence. Process and environmental parameters are acquired synchronously, and pixel-level multi-physics feature vectors are constructed after unifying coordinates.

[0012] S2: Layered graph convolution cross-domain feature extraction: Based on pixel-level multi-physics feature vectors, construct pixel-level and superpixel-level layered graph structures, learn features through layered graph convolution, and generate global graph embedding vectors through graph attention pooling;

[0013] S3: Physically Constrained Anomaly Measurement: Based on a physically constrained variational autoencoder, global graph embedding vectors are processed, and multi-dimensional anomaly scores are obtained through reconstruction error, latent space deviation, and physical parameter outlier.

[0014] S4: Adversarial decision optimization: Construct a generative adversarial network, optimize the discriminator through three-stage adversarial training, and use gated recurrent units to dynamically fuse multi-dimensional anomaly scores to generate the final anomaly score;

[0015] S5: Adaptive Threshold and Confidence Assessment: The optimal decision threshold is solved by Bayesian optimization, and the detection confidence is calculated by combining the discriminator output and the hidden state of the gated recurrent unit. Low-confidence samples are marked for manual re-examination.

[0016] S6: Online Active Learning and Model Evolution: From samples awaiting manual review and samples whose final anomaly scores are close to the optimal decision threshold, high-information samples are selected for standardized labeling, and new and old training data are mixed. The model is incrementally updated through an elastic weight merging algorithm.

[0017] The technical effects and advantages of this invention are as follows:

[0018] 1. Multi-source data fusion improves feature integrity. By synchronously collecting multi-physical field data and process environment parameters through composite electric excitation sequence, and constructing a comprehensive pixel-level feature vector after precise registration, it can completely characterize the multi-dimensional features of LED surface defects and significantly reduce the false detection rate.

[0019] 2. Hierarchical graph convolution enhances feature extraction efficiency. By constructing a hierarchical graph structure and combining it with hierarchical graph convolution to learn cross-domain related features, and using graph attention pooling to achieve effective feature aggregation, the ability to identify different types of defects is significantly improved, and the detection accuracy is more stable.

[0020] 3. The dynamic update mechanism adapts to scene changes. Combined with three-stage adversarial training to optimize the model decision boundary, and with the incremental update algorithm of elastic weight merging, it can quickly adapt to the dynamic changes of defect types without retraining the entire model, thus reducing maintenance costs.

[0021] 4. Intelligent decision-making improves detection reliability. By introducing Bayesian optimization to solve for the optimal threshold and combining it with a gated loop unit to calculate the detection confidence, the reliability of the results can be accurately distinguished. Only samples with low confidence are manually reviewed, which improves process efficiency while ensuring detection accuracy. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the overall structure of the present invention.

[0023] Figure 2 This is a schematic diagram of the S1 process of the present invention.

[0024] Figure 3 This is a schematic diagram of the S1-S4 process of the present invention.

[0025] Figure 4 This is a schematic diagram of the S5-S6 process of the present invention. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] refer to Figures 1-4 The LED lamp surface defect detection method based on multi-source data analysis shown includes:

[0028] S1: Multi-source data synchronous acquisition and spatiotemporal alignment: By designing a composite electrical excitation sequence to trigger the synchronous operation of multiple sensors, four types of physical field data—transient optical field, polarization-spectrum, phase-locked thermal imaging, and process and environmental data—are acquired in parallel. Then, a sub-pixel registration algorithm is used to achieve spatiotemporal unification of multi-modal data. Finally, a standardized multi-physics feature vector is constructed for each pixel. The specific steps are as follows:

[0029] S101: Design a composite electrical excitation sequence including a step pulse, a current ramp, and an AC modulation component. Using a specific edge phase of the excitation signal as the hardware trigger signal, it enables synchronous acquisition by a gated ICCD camera, a polarization-spectral imaging system, and an infrared thermal imager, ensuring that the temporal alignment accuracy of multi-sensor data is ≤10ns. Details are as follows:

[0030] Design and apply a composite electrical excitation sequence of step, ramp, and modulation: including a fast step pulse, amplitude, etc. ,width Used for transient response excitation and quasi-static current ramp, initial value Termination value slope Used for steady-state response acquisition, and AC component of frequency modulation, fundamental frequency. Amplitude , used for triggering phase-locked thermal imaging;

[0031] All optical and thermal sensors use a specific edge or phase of the excitation signal as the hardware synchronization trigger signal: the rising edge of the step pulse triggers the gated ICCD camera, the middle section of the current ramp triggers the polarization-spectral imaging system, and the rising edge of the AC component synchronizes the infrared thermal imager sampling, ensuring that the time domain alignment accuracy of the data is ≤10ns.

[0032] S102: Parallel Acquisition of Multi-Dimensional Physical Field Data: Based on the synchronous triggering mechanism of S101, transient light field, polarization-spectrum, phase-locked thermal imaging, and process and environmental data are acquired through a gated ICCD camera, polarization-spectrum imaging system, infrared thermal imager, and industrial bus, respectively, forming a structured multi-physics dataset, as detailed below:

[0033] Transient light field imaging: using a gated ICCD camera (minimum gate width 5ns, pixel resolution 1280x1024), imaging is performed according to a preset time sequence after a step pulse. Five frames of luminescence images were acquired, forming the luminescence decay spatiotemporal tensor L(x, y, t), where , For pixel coordinates, For the time dimension

[0034] Polarization-spectral imaging: using liquid crystal tunable filters (bandwidth) ) and a polarization camera (1280x1024 pixel resolution) were used to acquire 8 narrow bands during the steady-state slope. The emission images at 0° and 90° polarization states constitute a polarization spectral data cube. ,in ∈{0°, 90°} is the polarization angle.

[0035] Phase-locked thermal imaging: Infrared thermal imager (pixel resolution 640x512, temperature measurement range -20℃~300℃) with sampling frequency locked at 4 times the AC modulation frequency. The thermal wave amplitude distribution map is obtained through digital demodulation. Phase delay diagram of thermal waves Demodulation accuracy It is 0.1°.

[0036] Process and environmental parameter flow: Real-time acquisition of N=50-dimensional parameter vectors of preceding process steps via Profinet industrial bus. and the current environment state vector ,in, For ambient temperature, For ambient humidity, This refers to the power supply voltage.

[0037] S103: Spatiotemporal Registration of Multimodal Data: Based on the pixel coordinate system of polarization-spectral imaging, the spatial coordinates of transient light fields and phase-locked thermal imaging are unified through the SIFT feature point sub-pixel registration algorithm. Then, multi-physics data are integrated for each pixel to generate a 23-dimensional pixel-level multi-physics feature vector, realizing spatial alignment and feature aggregation of multi-source data; the details are as follows:

[0038] Using a sub-pixel registration algorithm based on SIFT feature points, and taking the pixel coordinate system of polarization-spectral imaging as a reference, transient light field images and phase-locked thermal imaging images are unified to the same coordinate system, with a registration error ≤ 0.5 pixels; a multiphysics feature vector is constructed for each spatial pixel (x, y). The vector dimension is 5 + 8 × 2 + 2 = 23.

[0039] S2: Hierarchical Graph Convolutional Cross-Domain Feature Extraction: Multimodal data is modeled as a two-level graph structure at the pixel and superpixel levels. Graph Convolutional Networks (GCNs) are used to mine spatial relationships and cross-physical field feature dependencies between pixels and regions. Then, graph attention pooling is used to generate fixed-dimensional global graph embedding vectors, achieving the transformation from raw data to high-dimensional relational features. The specific steps are as follows:

[0040] S201: First, construct a pixel-level graph with pixels as nodes and feature similarity and spatial proximity as edges. Then, the superpixel region is segmented using the SLIC algorithm, and a region-level graph is constructed with regions as nodes and adjacency relationships as edges. Furthermore, differentiated feature representations are assigned to the nodes of the two-level graph to form a hierarchical graph structure, as detailed below:

[0041] Pixel-level graph construction: Each pixel is a node, and the node features are... Based on spatial proximity (8-neighborhood rule) and feature similarity (Euclidean distance threshold) =0.1) Construct edges, with edge weights defined as: ,in As a smoothing coefficient, a multi-attribute graph is formed. , For a set of pixel nodes, For edge set, This is the node feature matrix.

[0042] Superpixel-level graph construction: The image is segmented into K=200 superpixel regions using the SLIC algorithm, with a superpixel size S=32*32 and a compactness parameter m=10; each superpixel region serves as a new node, and its features are statistical aggregations of all pixel features within the region. ,in The mean, For variance, For the maximum gradient, The average gradient has a feature dimension of 23*4=92; edges are constructed based on region adjacency relationships to form a region relationship graph. .

[0043] S202: Layered Graph Convolutional Feature Learning: First, learn features from pixel-level graphs... The above uses a 3-layer GCN to extract fine-grained features, and then aggregates the pixel-level features into a region-level map. The system learns coarse-grained association features through a two-layer GCN and finally generates global graph embedding vectors through graph attention pooling. The extraction and compression of cross-domain association features are completed as follows:

[0044] Pixel-level image convolution: In The above applies a 3-layer graph convolutional network (GCN), with 64, 128, and 256 kernels per layer, and LeakyReLU activation function. The feature update formula for the l-th layer graph convolution is: ,in Let A be the normalized adjacency matrix, I be the identity matrix, and D be the degree matrix. Let l be the weight matrix of the l-th layer. For bias vectors, Output the updated node feature matrix. , .

[0045] Region-level graph convolution and pooling: Aggregated according to superpixel division On the node (using average pooling), we get ;exist Two graph convolutional layers are applied, with 128 and 64 kernels respectively, and the feature update formula is the same as above; finally, graph attention pooling (GAP) is used to generate a fixed-dimensional feature. Global graph embedding vector The pooling attention weights are normalized using the Softmax function.

[0046] S3: Physical constraint anomaly measurement:

[0047] A variational autoencoder (VAE) integrating physical parameter constraints is constructed. The encoder maps the global graph embedding vector to the latent space, and the decoder reconstructs the features and outputs interpretable physical parameters. By combining the three dimensions of reconstruction error, latent space deviation, and physical parameter outlier, a multi-dimensional anomaly quantitative assessment of LED surface defects is achieved. The specific steps are as follows:

[0048] S301: Physically Constrained Variational Autoencoder (VAE) Structure Design: Design a VAE architecture for an encoder and a physically constrained decoder. The encoder will... Mapped to latent variable distribution parameters, the decoder not only reconstructs It also outputs interpretable physical parameters. Furthermore, the model is trained by fusing reconstruction loss, KL divergence, and physical parameter constraint loss into a total loss function to ensure that the features learned by the VAE conform to the physical mechanism of LEDs; specifically as follows:

[0049] Encoder network: For input, a 3-layer fully connected network is used (FC1: 128→64, FC2: 64→32, FC3: 32→64), and the output is a hidden variable. mean Sum of logarithmic variance Latent variables are generated using reparameterization techniques: ,in, It is a random noise vector that follows a standard normal distribution. ;

[0050] Physical constraint decoder:

[0051] The decoder network employs a 3-layer fully connected network (FC1: 32→64, FC2: 64→128, FC3: 128→128) to map z back to the reconstructed global graph embedding vector. .

[0052] Physical consistency constraint module: Decoded into an interpretable set of physical parameters using a two-layer fully connected network. ,in, For average carrier lifetime, The spatial variance of the thermal diffusivity. For luminous efficiency; simultaneously, the true values ​​of these physical parameters are independently calculated from the original multiphysics data. By adding physical parameter constraints to the loss function, the total loss function becomes: ,in: For reconstruction loss; Let KL divergence be a metric. Loss due to physical parameter constraints; hyperparameters , ;

[0053] S302: Multi-dimensional Anomaly Score Calculation: Based on the trained physical constraint VAE, the Wasserstein reconstruction error of the global graph embedding vector, the negative log-likelihood of the latent variables, and the Mahalanobis distance of the physical parameters are calculated to form three independent anomaly indicators, comprehensively characterizing the degree of deviation of the sample from the normal LED. Specifically, these include:

[0054] Reconstruction error: Calculation of the original With Restructuring The Wasserstein distance between them is used as the first anomaly indicator: ,in for and The set of joint probability distributions;

[0055] Latent space deviation: During the training phase, a 32-dimensional Gaussian mixture model with a latent space distribution is learned from normal samples. k=5 mixed components For mixed weights, The mean of the components. The component covariance matrix is ​​given; the negative log-likelihood of the latent variable z of the test sample in this distribution is calculated as the second anomaly indicator: ;

[0056] Outlier of physical parameters: Calculation of generated physical parameters The Mahalanobis distance between the actual physical parameter Q and the actual physical parameter Q serves as a third anomaly indicator: ,in This is the covariance matrix of the physical parameters of the normal samples.

[0057] S4: Adversarial Decision Optimization: Sharpening and Robustness Enhancement of Decision Boundaries Based on Adversarial Sample Generation: A Generative Adversarial Network (GAN) framework is constructed. A generator produces process-aware pseudo-samples, which are then combined with three-stage adversarial training to optimize the discriminator. Finally, a GRU network dynamically fuses multi-dimensional anomaly indicators to generate the final anomaly score, thereby sharpening the decision boundary and improving model robustness. Specific steps are as follows:

[0058] S401: Design a generator-discriminator dual-network structure. The generator takes random noise and process parameters as input to generate pseudo-global graph embedding vectors. The discriminator adopts a feature extraction and dual-task output architecture, which can distinguish between real and fake samples and output defect probabilities, providing a basic model architecture for adversarial training. The specific details are as follows:

[0059] Generator G: Input random noise vector (dimension) The noise and process parameter P are concatenated together (dimension 64+50=114), and then passed through a 4-layer fully connected network (FC1: 114→128, FC2: 128→256, FC3: 256→128, FC4: 128→128) to generate a pseudo-global graph embedding vector. The activation function used is GELU.

[0060] Discriminator and Detector D: Based on the encoder and anomaly measurement module in S3, it extends the architecture by employing feature extraction and a dual-task output structure.

[0061] Feature extraction layer: 3 fully connected network layers (FC1: 128→64, FC2: 64→32, FC3: 32→16), activation function is LeakyReLU ( );

[0062] Task 1 Output: 3-class probability distribution (Representing real normal samples, real defective samples, and pseudo samples respectively), output through the Softmax function;

[0063] Task 2 Output: Defect Probability (Valid for real samples), output via the Sigmoid function.

[0064] S402: Adversarial Training and Decision Optimization: The discriminator is optimized through three stages of adversarial training: basic training, generator training, and decision boundary sharpening. Then, the GRU network is used to dynamically fuse three metrics: defect probability, Wasserstein distance, and negative log-likelihood in the latent space, to generate the final anomaly score. This improves the accuracy and stability of defect identification; specifically as follows:

[0065] Three-stage combat training:

[0066] Phase One (Basic Training): Using =10000 normal samples and =2000 known defect samples are used to train the discriminator D, and the loss function is cross-entropy loss: Training iterations T1=50, learning rate =1e-4.

[0067] Phase Two (Generator Training): Fix the discriminator D, train the generator G, and make the generated... The sample was misclassified as a normal sample by D, and the loss function is: Training iterations T2=30, learning rate =5e-5.

[0068] Phase 3 (Decision Boundary Sharpening): Fix the generator G, and use the generated... =5000 hard samples (D pairs) Samples with predicted probabilities between [0.4, 0.6] are mixed with real samples, and training continues for D, with the loss function being: ,in =0.3 is the penalty coefficient, the number of training iterations T3=40, and the learning rate is... =5e-5.

[0069] Final anomaly score synthesis: After training, the anomaly scores of the samples to be tested are... Input the optimized D, and obtain , and The three metrics are dynamically fused using a gated recurrent unit (GRU) network, with the GRU input sequence being... (Standardized to [0, 1]), output the final anomaly score: ,in Given the GRU network parameters (hidden layer dimension 32, iteration steps 3), the fusion process considers the temporal dependencies between the three metrics.

[0070] S5: Adaptive Thresholding and Confidence Evaluation: Adaptive thresholding and confidence evaluation based on Bayesian active learning: Dynamically solving for the optimal decision threshold using a Bayesian optimization algorithm. By combining the discriminator output with the GRU hidden state to calculate the detection confidence, an automatic judgment and manual re-inspection mechanism is established to balance detection accuracy and labor costs. The specific steps are as follows:

[0071] S501: Bayesian Optimization Decision Threshold: Defining the Objective Function for Fusing Recall and False Alarm Rate Using a Gaussian process as the surrogate model, Bayesian optimization is used to search on the validation set to make... Maximize the optimal decision threshold This achieves adaptive optimization of the threshold; specifically as follows:

[0072] Define decision threshold Objective function (balancing recall and false positive rate): ,in: Recall rate (TP for true positives, FN for false negatives); False alarm rate (FP for false positive, TN for true negative); hyperparameters =0.8, =0.2 (adjusted according to industrial scenario requirements). A Gaussian process is used as the surrogate model on the historical validation set ( Using a Bayesian optimization algorithm on 3000 samples, find the optimal solution. Maximize the optimal threshold Search scope Number of iterations =20.

[0073] S502: Output detection results and confidence scores: based on the optimal threshold. A binary determination of LED defects is achieved, and the confidence level C of the test results is calculated simultaneously. Samples with low confidence are marked for manual re-inspection to ensure the reliability of the test results; the details are as follows:

[0074] Defect judgment rules: If If it is not, it is judged as unqualified, as it has surface defects; if If it is, it is deemed qualified and has no surface defects.

[0075] Confidence calculation: confidence score It is obtained by weighting two parts: ,in: The variance of the three-class classification probability of the discriminator reflects the uncertainty of the type judgment; The L2 norm of the hidden states in the GRU network reflects the stability of the fusion process; weights =0.6, =0.4.

[0076] Manual re-inspection mechanism: If C < , If the reliability threshold is 0.8, it is marked as requiring manual review, and its data will enter the subsequent active learning loop.

[0077] S6: Online Active Learning and Model Evolution

[0078] High-information samples are selected through uncertainty sampling and standardized labeling. The model is then incrementally updated using the Elastic Weighted Pooling (EWC) algorithm, establishing a closed-loop mechanism for detection, feedback, and optimization, enabling the model to adapt to process iterations and environmental changes. The specific steps are as follows:

[0079] S601: Uncertainty Sampling and Standardized Labeling: Periodically select high-information samples from low-confidence samples and samples near the threshold using a strategy combining minimum confidence sampling and edge sampling, and perform standardized labeling to provide high-quality labeled data for model updates; specifically as follows:

[0080] Regularly (every) =1000 test samples) from samples requiring manual re-examination and samples with confidence levels close to the threshold ( , In the range of 0.05, an uncertainty sampling strategy (equal allocation of minimum confidence sampling and marginal sampling) is adopted to select... The 200 most informative samples are standardized and labeled, with the labeling result either acceptable or unacceptable. The standardization labeling rules are as follows:

[0081] Defect size rule: Point defect diameter d > 50 The defect is deemed unacceptable because the line defect width w > 30. Or length l>500 The surface defect area S is deemed unqualified and is therefore deemed non-compliant. It is deemed unqualified;

[0082] Gray-scale difference rule: the gray-scale difference between the defective area and the normal area of ​​the sample. A value >20 (grayscale range 0-255) is considered unacceptable.

[0083] Physical performance correlation rules: Combining synchronously acquired electrical parameters, forward voltage drop deviation >0.1V or luminous flux deviation A surface defect value greater than 5lm is considered unacceptable.

[0084] If any one of the non-compliance rules is met, the item is marked as non-compliant; if none of the rules are met, the item is marked as compliant.

[0085] S602: Incremental Model Update: Newly labeled samples are mixed with the original training data, and the EWC algorithm is used to fine-tune the physical constraint VAE and the discriminator. This process retains historical knowledge while absorbing new data information, achieving incremental evolution of the model; details are as follows:

[0086] Newly labeled The new data is mixed proportionally with the original training data (normal samples and defective samples), with the new data accounting for r=0.1. The physically constrained variational autoencoder in S3 and the discriminator in S4 are fine-tuned. The Elastic Weighted Pooling (EWC) algorithm is used to prevent catastrophic forgetting. The EWC loss function is: ,in: The original loss function for the model: VAE Discriminator ; =100 is the regularization coefficient; The parameter importance weights are calculated using the Fisher information matrix; For the original model parameters, For incremental updates, the model currently has the i-th parameter to be optimized. The number of fine-tuning iterations. =20, learning rate =1e-5, ensuring that the model absorbs new data information while retaining historical knowledge.

[0087] Secondly: The accompanying drawings of the embodiments disclosed in this invention only involve the structures involved in the embodiments disclosed in this invention. Other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of this invention can be combined with each other.

[0088] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for detecting surface defects in LED lamps based on multi-source data analysis, characterized in that, include: S1: Multi-source data synchronous acquisition and spatiotemporal alignment: Multi-sensor acquisition of transient optical field, polarization-spectrum, and phase-locked thermal imaging data is synchronously triggered by a composite electrical excitation sequence. Process and environmental parameters are acquired synchronously, and pixel-level multi-physics feature vectors are constructed after unifying coordinates. S2: Layered graph convolution cross-domain feature extraction: Based on pixel-level multi-physics feature vectors, construct pixel-level and superpixel-level layered graph structures, learn features through layered graph convolution, and generate global graph embedding vectors through graph attention pooling; S3: Physically Constrained Anomaly Measurement: Based on a physically constrained variational autoencoder, global graph embedding vectors are processed, and multi-dimensional anomaly scores are obtained through reconstruction error, latent space deviation, and physical parameter outlier. S4: Adversarial decision optimization: Construct a generative adversarial network, optimize the discriminator through three-stage adversarial training, and use gated recurrent units to dynamically fuse multi-dimensional anomaly scores to generate the final anomaly score; S5: Adaptive Threshold and Confidence Assessment: The optimal decision threshold is solved by Bayesian optimization, and the detection confidence is calculated by combining the discriminator output and the hidden state of the gated recurrent unit. Low-confidence samples are marked for manual re-examination. S6: Online Active Learning and Model Evolution: From samples awaiting manual review and samples whose final anomaly scores are close to the optimal decision threshold, high-information samples are selected for standardized labeling, and new and old training data are mixed. The model is incrementally updated through an elastic weight merging algorithm.

2. The LED lamp surface defect detection method based on multi-source data analysis according to claim 1, characterized in that: The construction of pixel-level multiphysics feature vectors includes: A composite electrical excitation sequence containing step pulses, current ramps, and AC modulation components is used to simultaneously trigger multiple sensors to acquire transient optical field, polarization-spectral, and phase-locked thermal imaging data. Using the pixel coordinate system of polarization-spectral imaging as a reference, a sub-pixel registration algorithm is employed to calibrate the spatial coordinates of the acquired transient optical field and phase-locked thermal imaging data, ensuring that their spatial coordinates are aligned with the reference coordinate system. Subsequently, the transient optical field features, polarization-spectral features, and phase-locked thermal imaging features corresponding to each pixel are extracted and integrated to form a pixel-level multiphysics feature vector containing multiphysics dimension information.

3. The method for detecting surface defects in LED lamps based on multi-source data analysis according to claim 1, characterized in that: The generation of global graph embedding vectors includes: Based on pixel-level multiphysics feature vectors, pixel-level graph structures with pixels as nodes and spatial proximity and feature similarity between pixels as edges, and superpixel-level graph structures with superpixel regions as nodes and region adjacency relationships as edges are constructed respectively. A hierarchical graph convolutional network is used to perform three layers of graph convolutional learning on the pixel-level graph structures, with each layer using 64, 128, and 256 convolutional kernels respectively. LeakyReLU is used as the activation function to extract fine-grained features. The pixel-level features are then aggregated into the superpixel-level graph structures and subjected to two more layers of graph convolutional learning to extract coarse-grained cross-domain correlation features. Graph attention pooling is used to process the learned features of the superpixel-level graph structures. The attention weights of each region node are calculated using the Softmax function. Based on these weights, the region features are weighted, aggregated, and compressed to generate a fixed-dimensional global graph embedding vector.

4. The method for detecting surface defects in LED lamps based on multi-source data analysis according to claim 1, characterized in that: The physical constraint variational autoencoder includes: The system comprises an encoder, a decoder, and a physical constraint module. The encoder encodes the input global graph embedding vector, maps it to the latent space, and outputs latent variables. The decoder decodes and reconstructs the latent variables, outputting a reconstructed feature vector with the same dimension as the global graph embedding vector. The physical constraint module introduces preset physical parameter constraints related to LED lights to verify the rationality of the latent variables and the reconstructed feature vector. Based on the difference between the reconstructed feature vector and the global graph embedding vector, the reconstruction error is calculated. Combined with the distribution deviation of the latent variables in the latent space, the latent space deviation is calculated. Based on the verification results of the physical constraint module, the physical parameter outlier is calculated, and finally, a multi-dimensional anomaly score is output.

5. The method for detecting surface defects in LED lamps based on multi-source data analysis according to claim 1, characterized in that: The three-stage adversarial training includes: The first stage is the initial training of the discriminator, which uses labeled normal and abnormal LED light multi-dimensional abnormality score samples to supervise the training of the discriminator, enabling the discriminator to initially distinguish between normal and abnormal features. The second stage is adversarial training between the generator and the discriminator. The generator generates simulated abnormal features based on normal samples, mixes them with real abnormal features and inputs them into the discriminator. The discriminator outputs the classification result and feeds it back to the generator. The two alternately iterate and optimize until convergence. The third stage is the decision boundary fine-tuning training, which introduces unlabeled samples to expand the training set. With the classification accuracy of the final abnormal score as the target, the decision boundary parameters of the discriminator are fine-tuned to complete the three-stage adversarial training.

6. The method for detecting surface defects of LED lamps based on multi-source data analysis according to claim 1, characterized in that: The generation of the final anomaly score includes: The multi-dimensional anomaly scores, composed of reconstruction error, latent space deviation, and physical parameter outlier, are arranged in a preset time sequence as the input sequence and fed into a gated recurrent unit. The gated recurrent unit performs feature filtering on the input sequence through an input gate, a forget gate, and an output gate. The forget gate filters out invalid information in historical fusion features, the input gate selects key information from the current multi-dimensional anomaly scores, and the output gate integrates valid historical information with current key information to generate candidate fusion features. The candidate fusion features are then subjected to linear transformation and activation processing to assign dynamic weights to the anomaly scores of each dimension. Based on the dynamic weights, the multi-dimensional anomaly scores are weighted and summed to finally output the normalized final anomaly score.

7. The method for detecting surface defects in LED lamps based on multi-source data analysis according to claim 1, characterized in that: The process of solving for the optimal decision threshold using Bayesian optimization includes: First, the objective function is set to maximize the harmonic mean of detection recall and precision. The search space of the decision threshold is then defined as the range of values ​​for the final anomaly score. A Gaussian process model is constructed as a surrogate model to fit the mapping relationship between the objective function and the decision threshold. Expected improvement is selected as the acquisition function to balance the optimal value of exploring unsampled regions and utilizing sampled regions. Within the search space, sampling, surrogate model updating, and acquisition function maximization operations are iteratively performed: each time, a candidate decision threshold is selected based on the acquisition function, the corresponding objective function value is calculated, and the surrogate model is updated using new sample points until the preset number of iterations is reached or the objective function converges. The candidate decision threshold corresponding to the maximum objective function value during the iteration process is determined as the optimal decision threshold.

8. The method for detecting surface defects in LED lamps based on multi-source data analysis according to claim 1, characterized in that: The calculation of the detection confidence includes: The classification probability distribution corresponding to the final anomaly score output by the discriminator is extracted, and the candidate fusion features output by the gated recurrent unit are obtained as confidence-related features. The classification probability distribution and the confidence-related features are concatenated, and the concatenated features are subjected to dimensionality mapping and nonlinear transformation through a fully connected layer to obtain a preliminary confidence value. The preliminary confidence value is normalized to the 0-1 interval using the Sigmoid function to obtain the final detection confidence. A confidence threshold is set, and when the detection confidence is lower than the threshold, the corresponding sample is marked as a low-confidence sample and awaits manual re-examination.

9. The method for detecting surface defects in LED lamps based on multi-source data analysis according to claim 1, characterized in that: The elastic weight merging algorithm includes: First, initialize the weight parameters of the model to be updated, extracting the new model weights corresponding to the newly labeled samples and the old model weights corresponding to the original training data. Construct an elastic weight constraint term, which is set based on the L2 norm difference between the new and old model weights to balance the fusion ratio of the new and old weights. With the goal of minimizing the detection loss of the model on the mixed training set, construct a total loss function including the elastic weight constraint term. Iteratively optimize the total loss function using gradient descent, dynamically adjusting the fusion coefficient of the new and old weights during the iteration process, so that the fused weights retain the effective feature learning ability of the old model while adapting to the distribution characteristics of the new samples. When the total loss function value converges to a preset threshold or reaches the maximum number of iterations, stop the optimization, output the final fused weights, and complete the incremental update of the model.