Illumination equipment anomaly detection and diagnosis method based on artificial intelligence and machine learning
By employing artificial intelligence and machine learning-based methods, utilizing multi-sensor feature fusion and dynamic mutual information entropy weighting mechanisms, combined with multi-scale convolutional-self-attention feature fusion and time propagation graphs, this approach addresses the shortcomings of existing fault diagnosis methods in processing multi-source sensor data, achieving efficient detection and classification of sudden and gradual faults.
Patent Information
- Application Number
- CN202511730484.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-13
AI Technical Summary
Existing fault diagnosis methods are ineffective in handling sudden and gradual faults in multi-source sensor data, lack the ability to capture the temporal dynamics and diversity of fault modes, and are not robust or accurate enough in dealing with class imbalance problems.
We employ artificial intelligence and machine learning-based methods, enhance key fault features through multi-sensor feature fusion and dynamic mutual information entropy weighting mechanism, construct fault propagation paths by combining multi-scale convolutional-self-attention feature fusion modules and time propagation graphs, and design multi-task loss functions to improve fault detection and classification capabilities.
It significantly improves the sensitivity and fault identification capabilities of complex fault detection, can accurately handle sudden and gradual faults, enhances the accuracy of fault propagation pattern capture and classification, and mitigates the impact of class imbalance.
Smart Images

Figure CN121524809A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine learning and device detection, and particularly relates to a lighting device anomaly detection and diagnosis method based on artificial intelligence and machine learning. BACKGROUND
[0002] With the increasing degree of industrial automation, fault detection and diagnosis of various mechanical equipment and complex systems become increasingly important. Traditional fault diagnosis methods usually rely on experience or rule-based models, which often rely on manually set thresholds or feature extraction methods, making it difficult to cope with complex and variable fault patterns. With the advancement of sensor technology and data acquisition technology, modern industrial systems generate a large amount of multi-dimensional and multi-modal sensor data, which provides new possibilities for fault detection. However, these sensor data often exhibit complex dynamic characteristics in time series, and fault patterns may be sudden or gradual, which poses challenges to traditional detection methods.
[0003] Most existing fault diagnosis methods rely on specific feature extraction algorithms, such as Fourier transform, wavelet transform, or statistical analysis, etc. Although these methods can capture certain feature information, they often ignore the temporal dynamics of fault patterns and the correlation between data. In addition, some existing deep learning methods can automatically learn features from raw data, but when dealing with multi-source data, they lack sufficient mechanisms to effectively integrate features from different sensors, and their robustness and accuracy are limited when dealing with different types of faults.
[0004] The existing technology has the following deficiencies in actual application: traditional sensor data processing methods often ignore feature redundancy and discriminative differences, and the weights of all features are equalized, resulting in key fault features being masked by noise, reducing the sensitivity of fault detection, especially for gradual fault detection; existing convolutional neural networks usually use fixed convolution kernels, making it difficult to effectively handle both the transient pulse features of sudden faults and the low-frequency trends of gradual faults, and failing to fully consider the diversity and complexity of fault patterns; existing technologies have obvious deficiencies in modeling fault propagation patterns. Most methods cannot effectively capture the propagation path and strength of fault features in the time dimension, resulting in weak monitoring and diagnosis capabilities for fault propagation; existing classification methods, such as Softmax classifier, often handle class imbalance problems improperly, resulting in insufficient detection capability for rare fault types, and do not consider the consistency of fault propagation paths, affecting the reliability of diagnosis results.
[0005] Therefore, the present application proposes a lighting device anomaly detection and diagnosis method based on artificial intelligence and machine learning to solve the above problems. SUMMARY
[0006] The present application is directed to the deficiencies of the prior art, and develops a lighting equipment anomaly detection and diagnosis method based on artificial intelligence and machine learning, which can improve the complex fault detection sensitivity and fault recognition ability by fusing multi-sensor features and strengthening key fault features.
[0007] The technical scheme for solving the technical problems of the present application is a lighting equipment anomaly detection and diagnosis method based on artificial intelligence and machine learning, comprising the following steps: S1, deploying a multi-sensor array to collect multi-dimensional physical quantity data in the running process of the lighting equipment in real time, covering electrical, optical, thermal and mechanical dimensions, forming time series samples, and manually labeling the state label of each sample, including normal state and fault state; S2, through a dynamic mutual information entropy weighting mechanism, the mutual information entropy and local entropy rate are calculated based on the collected data features and fault categories, and then a time-varying weight matrix is generated, and the collected standardized data is weighted to enhance key fault features and suppress redundancy, and a weighted feature matrix is generated; S3, constructing a lighting equipment anomaly detection and fault diagnosis model based on machine learning, inputting the weighted feature matrix into the model, sequentially passing through a multi-scale convolution-self-attention feature fusion module, a key fault feature extraction module, a feature disentanglement and fault classification module, outputting a detection result, then calculating the loss function of the model, iteratively training the model, and outputting the trained model; S4, inputting the newly collected data into the trained model for anomaly detection, judging whether it is a normal state or a fault state, and if it is a fault state, outputting the specific fault type.
[0008] S1 is as follows: The data collection process is carried out in the laboratory and actual application scene, and the time series data is recorded by high-frequency sampling to form a continuous observation sequence; The data collection involves multiple lighting equipment models and operating conditions, including normal state and preset fault mode; The data labeling adopts a supervised learning method, and the expert manually labels the category label of each time series sample according to the actual state and fault type of the equipment; The labeled categories include normal state and fault type, and the fault type is divided into sudden fault and gradual fault, and the total number of categories is set according to the actual fault mode.
[0009] S2 is as follows: The mutual information entropy of each data collected is calculated, and the mutual information entropy of each feature to the category is quantified based on the joint empirical probability distribution of the feature value and the category and the edge probability distribution of the feature and the edge probability distribution of the category, so as to identify the features with strong discrimination; The standard deviation and the mean of each feature mutual information entropy sequence in the time sliding window are calculated, and the entropy change rate is obtained to measure the dynamic change degree of the feature discrimination ability, so as to capture the fluctuation of the feature importance; By combining the global mutual information entropy and the local entropy change rate, the dynamic weight of each feature in each window is generated using the natural exponential function and the normalization operation, and the time-varying weight matrix is obtained, so as to adjust the contribution of the feature in the fault detection; After the collected data is standardized, the weighted feature matrix is obtained by element-by-element multiplication operation with the dynamically generated time-varying weight matrix, so as to enhance the expression of key fault features and suppress redundant features.
[0010] S3 is specifically as follows: The weighted features in the weighted feature matrix are input into the model, and the multi-scale convolution-self-attention feature fusion module is used to extract the transient pulse features by using multi-branch hollow convolution, to model the long-range dependence by combining self-attention, and to adaptively integrate the burst and gradual fault modes by gate fusion. The weighted features are output as a fusion feature matrix after passing through the multi-scale convolution-self-attention feature fusion module; The feature elements in the fusion feature matrix are input into the key fault feature extraction module, which extracts the propagation path of the key fault feature in time by constructing a time propagation graph and calculating the propagation strength between time points based on the dynamic weight and the fusion feature using the graph attention mechanism, so as to enhance the capture of the fault propagation mode, and finally outputs a propagation enhanced feature vector; The propagation enhanced feature vector is input into the feature disentanglement and fault classification module, which generates a disentangled feature representation using a class prototype attention mechanism, and performs fault classification by combining time attention aggregation, so as to improve the discrimination ability of similar faults, and finally outputs the classification score and prediction probability of each fault category; The loss function of the model is calculated, and by designing a multi-task loss function, combining dynamic feature importance and propagation enhanced features, using weighted focal loss and propagation consistency loss, the detection ability of rare faults is enhanced and the modeling consistency of fault propagation paths is ensured; The gradient descent optimization algorithm is used to iteratively update the model parameters to obtain a trained model.
[0011] The operation in the multi-scale convolution-self-attention feature fusion module is specifically as follows: The transient features of different time scales are extracted by a multi-branch cavity convolution operation, the input feature information is reserved by combining a residual connection, the feature representation is enhanced by using a Gaussian error linear unit activation function, and thus the pulse characteristics of the burst fault are captured. The interaction of the query matrix, the key matrix and the value matrix is calculated by a multi-head self-attention mechanism, the attention score is adjusted by combining a bias matrix based on dynamic weights, the self-attention feature matrix is obtained by using an output projection matrix to integrate the multi-head output, and thus the global time dependence relationship is modeled and the key fault moment is focused. The multi-branch transient features and the self-attention features are spliced, a gating weight matrix is generated by linear transformation and activation function, the transient features and the self-attention features are weighted and summed by using the gating weight matrix to obtain a fusion feature matrix, and thus the adaptive features of the burst fault transient mode and the gradual fault long-range mode are integrated.
[0012] The operations in the key fault feature extraction module are as follows: Based on the fusion features and the dynamic weights, a propagation intensity matrix between time points is calculated, the propagation intensity matrix fuses the feature similarity, the time proximity and the feature importance, and thus the propagation path of the fault features is accurately modeled; The fusion features are reconstructed by using an attention mechanism based on the propagation intensity, and a propagation enhanced feature matrix is generated, and thus the representation of the key fault features in the propagation path is highlighted.
[0013] The operations in the feature disentanglement and fault classification module are as follows: The attention weight between the propagation enhanced features and the class prototypes is calculated, and the feature vector is reconstructed to reduce the inter-class entanglement, and thus the disentangled feature representation is obtained; Based on the disentangled feature matrix, the time attention mechanism is used to aggregate the time dimension information, and the score of each class is calculated; The classification score is converted into a probability distribution by using a Softmax function, and thus the prediction probability of each class is obtained, and the fault classification is realized by selecting the class with the maximum probability.
[0014] The loss function calculation is as follows: The weighted focal loss is calculated by combining the dynamic weights and the focal loss mechanism, the classification loss is weighted in the time dimension and the class dimension, and thus the key fault moment and the difficult classification samples are focused, the class imbalance problem is alleviated, and the loss contribution of the key fault moment is enhanced by using the time importance weight; The propagation consistency loss is obtained by calculating the difference between the propagation enhanced features and the disentangled features in the propagation path, and adjusting the loss weight dynamically by combining the propagation intensity, the consistency of the fault features in the time dimension is constrained, and thus the modeling of the fault diffusion mode is enhanced, and the propagation direction is optimized by using the feature importance similarity.
[0015] The model training is specifically as follows: At the beginning of training, all trainable parameters in the model are initialized, a training data batch is input each time, the forward propagation process is sequentially performed, the weighted focal loss and the propagation consistency loss are calculated, and the total loss is summed; Then, the back propagation is performed, the gradient of the total loss with respect to each parameter is calculated, and the parameters are updated using the optimizer to minimize the total loss; The early stopping mechanism is adopted to prevent overfitting, when the validation loss no longer significantly decreases for consecutive multiple periods or reaches the preset maximum number of iterations, the training is stopped, the model parameters are finally fixed, and a trained model is obtained.
[0016] S4 is specifically as follows: The newly collected data is input into the trained model, and the model outputs the classification score and prediction probability of each fault category; The abnormality detection is based on the prediction probability threshold or the maximum probability category, if the maximum probability exceeds the preset threshold, it is determined as a fault state, and the specific fault type is output; otherwise, it is determined as a normal state.
[0017] The effects provided in the summary are only the effects of the embodiments, not all the effects of the invention, and the above technical solutions have the following advantages or beneficial effects: The application dynamically adjusts the importance of each sensor feature in fault detection by a dynamic mutual information entropy weighting mechanism, combines global feature discriminability and local entropy rate, effectively enhances key fault features and suppresses redundant features; the application extracts transient pulse features by using multi-branch hollow convolution, simultaneously combines self-attention mechanism modeling long-range dependence, adaptively fuses burst and gradual fault modes through a gating mechanism, and simultaneously captures the pulse features of burst faults and the low-frequency trend of gradual faults; the application further constructs a time propagation graph, and extracts the propagation path and propagation strength of the fault feature by using a graph attention mechanism based on propagation strength, which significantly improves the capture ability of the fault propagation feature; the application combines weighted focal loss and propagation consistency loss, and proposes a multi-task loss function that can balance class imbalance and fault propagation timing characteristics, which is more accurate in processing gradual faults and burst faults. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings are used to provide a further understanding of the application, and constitute a part of the specification, together with the embodiments of the application, to explain the application, and do not constitute a limitation on the application.
[0019] Figure 1 The method flowchart of the application is shown.
[0020] Figure 2 The dynamic feature weight heat map is shown.
[0021] Figure 3 A heat map showing the intensity of fault characteristic propagation. Detailed Implementation
[0022] To clearly illustrate the technical features of this solution, the invention will be described in detail below through specific implementation methods and in conjunction with the accompanying drawings.
[0023] Example 1 like Figure 1 As shown, a method for detecting and diagnosing anomalies in lighting equipment based on artificial intelligence and machine learning includes the following steps: S1. Deploy a multi-sensor array to collect multi-dimensional physical quantity data during the operation of lighting equipment in real time, covering electrical, optical, thermal and mechanical dimensions, forming time series samples, and manually label each sample with a status label, including normal status and fault status; S2. Through a dynamic mutual information entropy weighting mechanism, mutual information entropy and local entropy change rate are calculated based on the collected data features and fault categories, and then a time-varying weight matrix is generated. The collected standardized data is then weighted to enhance key fault features and suppress redundancy, generating a weighted feature matrix. S3. Construct a machine learning-based model for anomaly detection and fault diagnosis of lighting equipment. Input the weighted feature matrix into the model, and then pass it through the multi-scale convolution-self-attention feature fusion module, the key fault feature extraction module, the feature de-entanglement and fault classification module in sequence. Output the detection results, then calculate the loss function of the model, iteratively train the model, and output the trained model. S4. Input the newly collected data into the trained model to perform anomaly detection, determine whether it is a normal state or a fault state, and output the specific fault type if it is a fault state.
[0024] In a specific implementation, S1 is as follows: By deploying a multi-sensor array to collect multi-dimensional physical quantity data during the operation of lighting equipment in real time, the sensor data includes at least 15 attributes, including current (A), voltage (V), temperature (°C), luminous flux (lm), power factor (unitless), active power (W), reactive power (var), frequency (Hz), harmonic distortion rate (%), luminance (cd / m²), color temperature (K), color rendering index (unitless), duty cycle (%), ambient illuminance (lux), and vibration amplitude (mm / s), covering electrical, optical, thermal, and mechanical dimensions to comprehensively capture the equipment status.
[0025] The data acquisition process takes place in the laboratory and in real-world application scenarios, recording time-series data through high-frequency sampling (e.g., multiple times per second) to form a continuous observation sequence.
[0026] The training data collection involved various lighting equipment models and operating conditions, including normal conditions and preset fault modes, to ensure the diversity and representativeness of the data.
[0027] The data annotation adopts a supervised learning approach, where experts manually label each time series sample with a category label based on the actual status of the equipment and the type of failure. The labeling categories include normal conditions and various fault types, such as sudden faults (e.g., current overload, voltage surge) and gradual faults (e.g., light decay, slow temperature rise). The total number of categories is set according to the actual fault mode.
[0028] In a specific implementation, S2 is as follows: Multi-sensor data from lighting equipment suffers from feature redundancy and discriminative inconsistencies. To avoid conventional standardization methods treating all features equally, which can lead to key fault features being overwhelmed by noise and insufficient sensitivity to gradual and sudden faults, this invention employs a dynamic mutual information entropy weighting mechanism. By combining global feature discriminability with local entropy change rate, a time-varying weight matrix is generated to enhance key fault features and suppress redundancy. The specific steps are as follows: 1) Calculation of feature-category mutual information entropy By calculating the mutual information entropy between each sensor feature and category, and estimating based on the joint empirical probability distribution of feature values and categories, as well as the feature marginal probability distribution and category marginal probability distribution, the quantified value of the discriminative ability of each feature to the category is obtained, thereby identifying features with strong discriminative power, expressed as: In the formula, Indicates the first The mutual information entropy between a feature and a category is used to quantify the discriminative ability of a feature to classify a category; the larger the value, the stronger the discriminative ability of the feature. This is the feature index, representing the number of the sensor feature. This corresponds to 15-dimensional sensor data; This is a category index, representing the number of the fault type. ; Total number of categories; For the first The values of each feature; For the first The set of all possible values for a feature; is the joint empirical probability distribution of the training samples, which represents the probability of the value of the th feature co-occurs with the th class of faults; is the marginal empirical probability distribution of the training samples, which represents the probability of the value of the th feature is the marginal empirical probability distribution of the th class of faults, which represents the probability of the th class of faults occurring in the training samples;
[0029] 2) Sliding window entropy rate calculation The ratio of the standard deviation and the mean of the mutual information entropy sequence of each feature is calculated in the time sliding window to obtain the entropy rate for measuring the dynamic change degree of the feature discrimination ability, thereby capturing the fluctuation of the feature importance, which is represented as: In the formula, represents the entropy rate of the th feature in the th window, which is used to measure the dynamic change degree of the feature discrimination ability, and the larger the value is, the more intense the fluctuation of the feature importance is; is the time index of the window center, representing the center position of the current window, ; is the total number of time steps; is the window radius, defining the time range of the sliding window, and the preferred value is 10; is the time index, representing the time step position in the window, ; is the standard deviation function, which is used to calculate the dispersion degree of the mutual information entropy sequence in the window; is the mean function, which is used to calculate the average level of the mutual information entropy sequence in the window; is the smoothing constant, which is preferably set to to prevent the denominator from being zero; is the mutual information entropy of the th feature and the class at the th time, representing the discrimination ability of the th feature at the th time.
[0030] It should be noted that, The global mutual information entropy is characterized, which is calculated based on the entire training set, while The local mutual information entropy is characterized, which is calculated based on the data in the sliding window centered at the moment and with a window size of The probability distribution is estimated only using the data in the window.
[0031] 3) Dynamic feature weight generation By combining the global mutual information entropy and the local entropy rate, the dynamic weight of each feature in each window is generated using the natural exponential function and normalization operation, so as to adjust the contribution of the feature in fault detection, which is represented as: In the formula, is the weight of the i-th feature in the j-th window, which is used to adjust the importance of the feature in feature weighting; is the global discriminative adjustment factor, which controls the influence of the global mutual information entropy in the weight, and is preferably set to ; is the local dynamic adjustment factor, which controls the influence of the local entropy rate in the weight, and is preferably set to ; is the natural exponential function; is the feature index distinguished from ; is the mutual information entropy of the i-th feature and the class. 4) Feature weighting output
[0032] By performing element-by-element multiplication operation on the standardized sensor data matrix and the dynamically generated time-varying weight matrix, the weighted feature matrix is obtained, so as to enhance the expression of key fault features and suppress redundant features, which is represented as: In the formula, is the weighted feature matrix, with a dimension of , which highlights the features with strong class discriminability through standardization and dynamic weighting; is the standardized sensor data matrix, which is obtained by performing Z-score standardization on the original sensor data matrix to eliminate feature scale differences, and the calculation method is represented as ; The feature mean vector of the original sensor data has a dimension of . It is estimated using the training set; The feature standard deviation vector of the original sensor data has a dimension of . It is estimated using the training set; The original sensor data matrix has dimensions of . ,Include One time step and 15 feature dimensions; The time-varying weight matrix dynamically adjusts the contribution of each feature at each time point based on the global mutual information entropy and the local entropy change rate, thereby enhancing key fault features in the time dimension. The element in the t-th row and j-th column is ; This represents the weight value at time t and the j-th feature, determined by the weight at the center of the corresponding window. In the specific calculation... Values ; The center index of the window at time t; For the first The feature in the first The weight of each window; This represents the Hadamard product, which is an element-wise multiplication operation.
[0033] S3 is as follows: In a specific implementation, the operations in the multi-scale convolution-self-attention feature fusion module are as follows: Since the weighted features contain mixed transient and steady-state fault modes, if the convolutional neural network only uses a fixed convolution kernel, it is difficult to simultaneously capture the pulse features of sudden faults and the low-frequency trends of gradual faults. Therefore, this invention uses multi-branch dilated convolution to extract transient pulse features, combines self-attention to model long-range dependencies, and adaptively integrates sudden and gradual fault modes through gating fusion. The specific steps are as follows: 1) Transient Feature Extraction Path Transient features at different time scales are extracted through multi-branch dilated convolution operations, and residual connections are combined to preserve input feature information. Gaussian error linear unit activation functions are used to enhance feature representation, thereby capturing the pulse features of sudden faults, as shown below: In the formula, Indicates the first output feature matrix of the branch, the transient features of different receptive fields are extracted by multi-scale dilated convolution, and the dimension is ; is the branch index, indicating the number of convolution branches, ; is the number of output channels, and the default setting is used to define the feature dimension; is the dilated rate, which controls the inflation degree of the convolution kernel to adjust the receptive field, ; represents a one-dimensional convolution operation with a dilated rate of , which is used to extract time series features; represents a one-dimensional convolution operation with a dilated rate of 1; is the convolution kernel parameter of the th branch, and the convolution kernel size is set to to balance local feature extraction and computational efficiency; is the projection convolution kernel parameter of the th branch, and the convolution kernel size is set to to adjust the dimension of the input feature to match the output of the main path; is a Gaussian error linear unit activation function.
[0034] 2) Long-range dependence modeling path The interaction of query matrix, key matrix and value matrix is calculated through multi-head self-attention mechanism, the attention score is adjusted by combining the bias matrix based on dynamic weight, and the self-attention feature matrix is obtained by using the output projection matrix to integrate the multi-head output, so as to model the global time dependence relationship and focus on the key fault moment, which is represented as: In the formula, represents the self-attention feature matrix, which represents the interaction features of global time dependence relationship and key fault moment, and the dimension is ; represents a feature concatenation operation; is the attention head index, indicating the number of attention heads, ; represents the output feature of the th attention head, and the calculation method is represented as ; output feature of the 1st attention head, output feature of the 2nd attention head, output feature of the Hth attention head; output projection matrix, dimension , used to linearly project the feature after concatenating all the attention heads in the multi-head self-attention mechanism to a unified feature space, is a trainable parameter; H is the total number of attention heads, default setting ; softmax normalization function; bias matrix based on dynamic weights, dimension , used to introduce time importance similarity in attention score, calculation method ; bias adjustment factor, preferably set , to control the influence of the bias term; time importance vector, dimension , , the tth element of the time importance vector represents the sum of all feature weights at the th moment; represents the sum of all feature weights at the th moment, reflecting the overall feature importance at the th moment, calculation method ; represents the sum of all feature weights at the 1st moment, represents the sum of all feature weights at the 2nd moment, represents the sum of all feature weights at the Tth moment; query matrix of the th attention head, calculated by linear projection, represented as ; key matrix of the th attention head, calculated by linear projection, represented as ; value matrix of the th attention head, calculated by linear projection, represented as ; the The projection matrix of the i-th attention head query, used to map the input feature to the query space, has a dimension of is a trainable parameter. denotes the projection matrix of the i-th attention head key, used to map the input feature to the key space, has a dimension of is a trainable parameter. denotes the projection matrix of the i-th attention head value, used to map the input feature to the value space, has a dimension of is a trainable parameter. is the dimension of the key vector, and the default setting is , which is used to define the dimensions of the key and query, is a scaling factor used to prevent the dot product from being too large. is the dimension of the value vector, and the default setting is , which is used to define the dimension of the value. 3) Gating feature fusion
[0035] By concatenating the multi-branch transient features and self-attention features, a gating weight matrix is generated through linear transformation and activation function, and the fusion feature matrix is obtained by weighting and summing the transient features and self-attention features using the gating weight matrix, which realizes the adaptive feature integration of the burst fault transient mode and the gradual fault long-range mode, represented as: In the formula, denotes the fusion feature matrix, which adaptively integrates multi-scale transient features and long-range dependent features through the gating mechanism, effectively balancing the mode representation of burst faults and gradual faults, and has a dimension of ; denotes the gating weight matrix, which is used to adaptively adjust the feature fusion ratio, and has a dimension of , and the calculation method is represented as ; denotes the output feature matrix of the 1st branch, corresponding to the transient feature with a hole rate of ; denotes the output feature matrix of the 2nd branch, corresponding to the transient feature with a hole rate of ; denotes the output feature matrix of the 3rd branch, corresponding to the transient feature with a hole rate of ; denotes the gating weight matrix A matrix of all ones with the same dimension; Use the Sigmoid activation function; This is the gate layer weight matrix, with dimension 1. , used for linear transformation, are trainable parameters; This indicates a feature splicing operation.
[0036] In a specific implementation, the operations in the key fault feature extraction module are as follows: Fault characteristics of lighting equipment exhibit a propagation effect over time. For example, sudden faults may spread rapidly and affect multiple sensors, while gradual faults may spread slowly. Conventional sequence modeling methods cannot effectively model the propagation intensity of fault characteristics, resulting in insensitivity to fault propagation patterns.
[0037] This invention constructs a temporal propagation graph and calculates the propagation intensity between time points based on dynamic weights and fused features. It then uses a graph attention mechanism to extract the temporal propagation path of key fault features, thereby enhancing the capture of fault propagation patterns. The specific steps are as follows: 1) Construction of time propagation graph Based on fused features and dynamic weights, the propagation intensity matrix between time points is calculated. This matrix integrates feature similarity, temporal proximity, and feature importance to accurately model the propagation path of fault features, and is expressed as: In the formula, Indicates the first Time to the The propagation intensity at time step is used to quantify the fault characteristics from the first step. The moment spreads to the first The probability of a given moment; a higher value indicates a stronger propagation intensity. To distinguish from Time index; For the fusion feature matrix In the Line number The element of the column represents the first element. The first moment One fusion feature value; For the fusion feature matrix In the Line number Column elements; For the first based on dynamic weights Time to the The time adjustment factor is calculated as , which is used to incorporate the feature importance similarity; is the scaling parameter of the th fused feature dimension, which is a trainable parameter learned from training data, and the default initial value is 1.0; is the time decay constant, which controls the decay rate of the propagation intensity with respect to the time distance, and is preferably set to ; is the weight of the th feature in the th window; is the window center time index, which is different from .
[0038] 2) Propagation intensity feature extraction The fusion features are reconstructed using a propagation intensity-based attention mechanism to generate a propagation enhanced feature matrix, thereby highlighting the representation of key fault features in the propagation path, which is represented as: In the formula, represents the propagation enhanced feature vector at the th moment, with a dimension of , which characterizes the fault features after propagation enhancement at the th moment, capturing the diffusion intensity and direction of the fault in the time series; is the hyperbolic tangent activation function; is the dimension of the propagation enhanced feature vector, and is set to by default, which is the feature dimension after reconstruction by the graph attention mechanism; represents the fusion feature vector at the th moment, i.e., the th row of the fusion feature matrix ; represents the fusion feature vector at the th moment, i.e., the th row of the fusion feature matrix ; represents the fusion feature vector at the th moment, i.e., the th row of the fusion feature matrix ; is the first linear transformation matrix, with a dimension of is a trainable parameter for projecting the fused feature vector to the propagation-enhanced feature space; is a second linear transformation matrix with dimension is a trainable parameter for projecting the neighbor time step feature vector to the propagation-enhanced feature space; is a third linear transformation matrix with dimension is a trainable parameter for mapping the current time step feature vector to the intermediate representation in attention computation; is a fourth linear transformation matrix with dimension is a trainable parameter for mapping the neighbor time step feature vector to the intermediate representation in attention computation; is an attention vector with dimension is a trainable parameter for dynamically adjusting the attention weight by calculating the similarity between the current feature and the neighbor feature, focusing on the time points with high correlation in the propagation path, and enhancing the perception of key nodes in fault diffusion; is the hidden dimension of the attention mechanism, and the default setting ; is the transpose of ; represents the propagation intensity from the th time point to the th time point; is the time index that is different from and .
[0039] In the specific implementation, the operations in the feature disentanglement and fault classification module are as follows: The fault features may be entangled in the representation space, that is, the feature regions of different categories overlap, causing classification confusion, and the Softmax and other conventional classifiers cannot disentangle the feature representation and have insufficient discrimination for similar fault patterns. Therefore, the invention generates a disentangled feature representation by using a class prototype attention mechanism, and combines time attention aggregation for fault classification, thereby improving the discrimination ability for similar faults. The specific steps are as follows: 1) Disentangled feature representation The attention weight between the propagation-enhanced feature and the class prototype is calculated, and the feature vector is reconstructed to reduce the inter-class entanglement, thereby obtaining the disentangled feature representation, which is represented as wherein, denotes the disentangled feature vector at time , with dimension , represents the pure fault feature after disentanglement, improving the discrimination ability for similar fault patterns; is the transpose of ; denotes the prototype vector of the th class, with dimension is a trainable parameter learned from training data, representing the central feature representation of the th class, guided by the attention mechanism to reconstruct the feature, making the feature vector far away from the prototypes of other classes, enhancing the inter-class discriminability; denotes the prototype vector of the th class; is the class index distinguishing from ; is the temperature parameter, controlling the smoothness of attention weight, preferably set to .
[0040] The disentangled feature matrix is composed of all , with dimension .
[0041] 2) Time attention classification score calculation Based on the disentangled feature matrix, use the time attention mechanism to aggregate the time dimension information, and calculate the score of each class, denoted as: wherein, denotes the classification score of the th class, reflecting the overall evidence strength of the entire observation sequence belonging to the th class; denotes the time attention query vector of the th class, with dimension , is a trainable parameter learned by training; is the transpose of ; denotes the disentangled feature vector at time ; is the transpose of ; Indicates the first The classification weight vectors for each category have dimensions of . , are trainable parameters that are learned through training.
[0042] 3) Fault Classification The classification scores are converted into a probability distribution using the Softmax function, thus obtaining the predicted probability for each category. Fault classification is achieved by selecting the category with the highest probability. This is represented as: In the formula, Indicates the first The predicted probability of each category; the larger the value, the higher the probability of belonging to that category. Indicates the first The classification score for each category.
[0043] In a specific implementation, the loss function is calculated as follows: This invention designs a multi-task loss function, combining dynamic feature importance and propagation enhancement features, and employs weighted focus loss and propagation consistency loss to enhance the detection capability of rare faults and ensure the consistency of fault propagation path modeling. The specific steps are as follows: 1) Calculation of weighted focus loss By combining dynamic weights and a focus loss mechanism to calculate a weighted focus loss, the classification loss is weighted by both time and class dimensions. This focuses on critical failure moments and hard-to-classify samples, mitigating class imbalance. Furthermore, the time importance weight is used to enhance the loss contribution at critical failure moments, as expressed below: In the formula, This represents the weighted focus loss, used to balance class imbalance and focus on hard-to-classify samples. For the first The temporal importance weight at a given moment, calculated based on dynamic weights, reflects the overall importance of the features at that moment. The calculation method is expressed as follows: ; For the first The class weights of each class are used to adjust the loss contribution of samples from different classes, and are calculated as follows: ; For the training set Number of samples in each category; For the first Time of the first The classification scores for each category are based on the unentangled feature matrix. The classification score of each class at each time step is calculated, and the calculation is represented as The prediction probability of the first time moment belonging to the first class is obtained by converting the classification score of the first time moment of the first class into a prediction probability distribution through a softmax function. is a focal parameter, which controls the weight of difficult samples, and is preferably set to .
[0044] 2) Propagation consistency loss calculation The propagation consistency loss is obtained by calculating the difference between the propagation enhanced feature and the disentangled feature on the propagation path, and dynamically adjusting the loss weight combined with the propagation intensity, which constrains the consistency of the fault feature in the time dimension, thereby enhancing the modeling of the fault diffusion mode, and uses the feature importance similarity to optimize the propagation direction, which is represented as: In the formula, represents the propagation consistency loss, which is used to ensure the consistency of the propagation enhanced feature and the disentangled feature on the propagation path; is a propagation direction adjustment factor, which is calculated based on a dynamic weight, and is used to integrate the feature importance similarity and the time proximity, and the calculation is represented as is the time importance weight at the first time moment; is an importance difference scaling parameter, which is a trainable parameter, and is learned through training data, and the default initial value is 1.0; represents the L2 norm, that is, the Euclidean norm.
[0045] In the specific implementation, the training process of the model is as follows: In the model training process, a gradient descent optimization algorithm is used to iteratively update the model parameters. At the beginning of training, all trainable parameters are initialized, and each iteration inputs a batch of training data, sequentially executes the forward propagation process, calculates the weighted focal loss and the propagation consistency loss, and sums them to obtain the total loss. Then, the back propagation is performed, the gradient of the total loss with respect to each parameter is calculated, and the optimizer is used to update the parameters to minimize the total loss.
[0046] The loss and accuracy on the validation set are monitored during the training process, and an early stopping mechanism is adopted to prevent overfitting. When the validation loss no longer significantly decreases for consecutive multiple periods or reaches a preset maximum number of iterations, the training is stopped.
[0047] The model parameters are finally fixed for subsequent anomaly detection and fault diagnosis tasks.
[0048] In the specific implementation, S4 is specifically as follows: After the model training is completed, it is applied to the actual lighting device for anomaly detection and fault diagnosis.
[0049] The real-time or historical sensor data is input, and first a weighted feature matrix is generated through a dynamic mutual information entropy weighting mechanism; The weighted features are input into a multi-scale convolution-self-attention feature fusion module to extract transient and long-range dependency features and fuse them into a unified representation; Then, the key fault feature extraction module constructs a time propagation graph, calculates the propagation strength, and generates propagation enhanced features. Then, the feature disentanglement and fault classification module performs disentanglement processing on the features, and calculates the classification score and prediction probability of each fault category through time attention aggregation.
[0050] Anomaly detection is based on a prediction probability threshold or a maximum probability category. If the maximum probability exceeds a preset threshold, it is determined to be abnormal, and the specific fault type is output. Otherwise, it is determined to be in a normal state. The diagnosis result can be used for device maintenance decisions, such as early warning or automatic repair, to improve the reliability and safety of the lighting device operation.
[0051] Embodiment 2 As shown in Figure 2 a dynamic feature weight heat map analysis is performed to verify the adaptive adjustment capability of the dynamic mutual information entropy weighting mechanism proposed in the present application in the fault diagnosis process. Figure 2 The vertical axis lists 15 sensor features (current, voltage, temperature, luminous flux, power factor, active power, reactive power, frequency, harmonic distortion rate, brightness, color temperature, color rendering index, duty cycle, ambient illuminance, and vibration amplitude), the horizontal axis represents the time point (unit: individual), and the color depth represents the feature weight value (red for high weight and blue for low weight). As shown in Figure 2 the experimental results show that the present application immediately increases the weight of electrical features (current, voltage) at the early stage of the fault (time point 40), and increases the weight of thermal / optical features (temperature, brightness) at the late stage of the fault (time point 50). Dynamic adjustment enables key fault features to be strengthened at the corresponding stage, while redundant features are suppressed, highlighting the sensitivity advantage of the present application for sudden and gradual faults.
[0052] Embodiment 3 like Figure 3 As shown, a heatmap analysis of the fault feature propagation intensity is performed to visualize the fault propagation modeling capability of this technology. The experiment selects a time period (20-30 time steps) containing the fault, and explicitly models the diffusion path of features in the time dimension through the propagation map. Figure 3 The experimental results show that the fault area marked by the red box (20-30 time steps) presents a high-intensity block (dark blue), proving that the fault characteristics spread strongly during this period. In addition, the diagonal line presents a bright band (propagation intensity ≈ 1), indicating the characteristic stability of the time point itself. The color becomes lighter the further away from the diagonal line, reflecting the law that the propagation intensity decreases with time distance. Figure 3 As can be seen, the propagation intensity of the fault area to adjacent time steps reaches 0.6 or higher. Both the horizontal and vertical axes represent time steps 0-49, and the legend clearly marks the color levels of propagation intensity from 0 to 1. The red boxes precisely mark the fault areas from 20 to 30.
[0053] Although the specific embodiments of the invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the invention. Based on the technical solutions of the invention, various modifications or variations that can be made by those skilled in the art without creative effort are still within the scope of protection of the invention.
Claims
1. An artificial intelligence and machine learning based lighting device anomaly detection and diagnosis method, characterized in that, The method comprises the following steps: S1, deploying a multi-sensor array to collect multi-dimensional physical quantity data in the operation process of the lighting device in real time, covering electrical, optical, thermal and mechanical dimensions, forming time series samples, and manually labeling the state label of each sample, including normal state and fault state; S2, by dynamic mutual information entropy weighting mechanism, based on the data characteristics and fault category, the mutual information entropy and the local entropy change rate are calculated, and then the time-varying weight matrix is generated, and the collected standardized data is weighted to enhance the key fault features and suppress the redundancy, and the weighted feature matrix is generated; S3, an abnormality detection and fault diagnosis model based on machine learning is constructed, the weighted feature matrix is input into the model, and the model is sequentially subjected to multi-scale convolution-self-attention feature fusion module, key fault feature extraction module, feature disentanglement and fault classification module, and the detection result is output, then the loss function of the model is calculated, the model is iteratively trained, and the trained model is output; S4, the newly collected data is input into the trained model for abnormality detection, and it is judged whether it is a normal state or a fault state, if it is a fault state, the specific fault type is output.
2. The artificial intelligence and machine learning based lighting device anomaly detection and diagnosis method of claim 1, wherein, S1 is as follows: The data collection process is carried out in the laboratory and actual application scene, and the time series data is recorded by high frequency sampling to form a continuous observation sequence; The data collection involves multiple lighting device models and operating conditions, including normal state and preset fault mode; The data labeling adopts a supervised learning method, and the class label of each time series sample is manually labeled by experts according to the actual state and fault type of the device; The labeled categories include normal state and fault type, the fault type is divided into sudden fault and gradual fault, and the total number of categories is set according to the actual fault mode. 3.The AI and ML based lighting device anomaly detection and diagnosis method of claim 1, wherein, S2 is as follows: The mutual information entropy of each data feature and fault category is calculated, the joint empirical probability distribution of the feature value and the category, and the feature edge probability distribution and the category edge probability distribution are estimated to obtain the quantitative value of the discrimination ability of each feature to the category, so as to identify the features with strong discrimination ability; The ratio of the standard deviation to the mean of each feature mutual information entropy sequence in the time sliding window is calculated to obtain the entropy change rate to measure the dynamic change degree of the feature discrimination ability, so as to capture the fluctuation of the feature importance; By combining the global mutual information entropy and the local entropy change rate, the natural exponential function and the normalization operation are used to generate the dynamic weight of each feature in each window to obtain the time-varying weight matrix, so as to adjust the contribution of the feature in fault detection; After the collected data is standardized, it is multiplied element by element with the dynamically generated time-varying weight matrix to obtain the weighted feature matrix, so as to enhance the expression of the key fault features and suppress the redundant features.
4. The artificial intelligence and machine learning based lighting device anomaly detection and diagnosis method as claimed in claim 1, wherein, S3 is as follows: The weighted features in the weighted feature matrix are input into the model, and the multi-scale convolution-self-attention feature fusion module is used, which adopts multi-branch hollow convolution to extract transient pulse features, combines self-attention modeling long-range dependence, and adaptively integrates sudden and gradual fault modes through gate fusion, and the weighted features are output after the multi-scale convolution-self-attention feature fusion module to output the fusion feature matrix; The feature elements in the fusion feature matrix are input into the key fault feature extraction module. The module extracts the propagation path of the key fault feature in time by constructing a time propagation graph and calculating the propagation strength between time points based on dynamic weights and fusion features using a graph attention mechanism, thereby enhancing the capture of fault propagation patterns, and finally outputting a propagation enhanced feature vector; Then the propagation enhanced feature vector is input into the feature disentanglement and fault classification module. The module generates a disentangled feature representation using a class prototype attention mechanism and performs fault classification by combining time attention aggregation, thereby improving the ability to distinguish similar faults, and finally outputting the classification score and prediction probability of each fault category; The loss function of the calculation model is calculated. By designing a multi-task loss function, combining dynamic feature importance and propagation enhanced features, using weighted focal loss and propagation consistency loss, the detection ability of rare faults is enhanced and the modeling consistency of fault propagation paths is ensured; The gradient descent optimization algorithm is used to iteratively update the model parameters to obtain a trained model. 5.The AI and ML based lighting device anomaly detection and diagnosis method according to claim 4, characterized in that, The operations in the multi-scale convolution-self-attention feature fusion module are as follows: Through multi-branch hollow convolution operation, transient features of different time scales are extracted, and residual connection is used to retain input feature information. A Gaussian error linear unit activation function is used to enhance feature representation, thereby capturing the pulse characteristics of burst faults; Through the multi-head self-attention mechanism, the interaction of the query matrix, key matrix and value matrix is calculated, the attention score is adjusted using a bias matrix based on dynamic weights, and the self-attention feature matrix is obtained by integrating the multi-head output using an output projection matrix, thereby modeling global temporal dependencies and focusing on key fault times; By concatenating multi-branch transient features and self-attention features, generating a gating weight matrix through linear transformation and activation function, and using the gating weight matrix to weight and sum the transient features and self-attention features to obtain a fusion feature matrix, the adaptive features of burst fault transient patterns and gradual fault long-range patterns are integrated. 6.The AI and ML based lighting device anomaly detection and diagnosis method according to claim 4, characterized in that, The operations in the key fault feature extraction module are as follows: Based on the fusion features and dynamic weights, the propagation strength matrix between time points is calculated. The propagation strength matrix integrates feature similarity, temporal proximity and feature importance, thereby accurately modeling the propagation path of fault features; Using a propagation strength-based attention mechanism, the fusion features are reconstructed to generate a propagation enhanced feature matrix, thereby highlighting the representation of key fault features in the propagation path.
7. The method for anomaly detection and diagnosis of lighting equipment based on artificial intelligence and machine learning according to claim 4, characterized in that the feature solution... The operations in the entanglement and fault classification module are as follows: By calculating the attention weight between the propagation enhanced feature and the class prototype, and reconstructing the feature vector to reduce inter-class entanglement, a disentangled feature representation is obtained; Based on the disentangled feature matrix, the time attention mechanism is used to aggregate the time dimension information, and the score of each class is calculated; The classification score is converted to a probability distribution by the Softmax function, thereby obtaining the prediction probability of each class, and the fault classification is realized by selecting the class with the maximum probability.
8. The artificial intelligence and machine learning based lighting device anomaly detection and diagnosis method as claimed in claim 4, characterized in that, The loss function calculation is as follows: The weighted focal loss is calculated by combining a dynamic weight and a focal loss mechanism, the classification loss is weighted in time dimension and class dimension, so as to focus on the key failure time and the difficult-to-classify samples, reduce the class imbalance problem, and utilize the time importance weight to enhance the loss contribution of the key failure time; The propagation consistency loss is obtained by calculating the difference between the propagation enhanced feature and the disentangled feature on the propagation path, and dynamically adjusting the loss weight combined with the propagation intensity, so as to constrain the consistency of the fault feature in the time dimension, thereby enhancing the modeling of the fault diffusion mode, and utilizing the feature importance similarity to optimize the propagation direction. 9.The AI and ML based lighting device anomaly detection and diagnosis method of claim 4, wherein, The model training is specifically as follows: At the beginning of training, all trainable parameters in the model are initialized, a batch of training data is input each time, the forward propagation process is executed in turn, the weighted focal loss and the propagation consistency loss are calculated, and the total loss is summed; Then, the back propagation is performed, the gradient of the total loss with respect to each parameter is calculated, and the optimizer is used to update the parameters to minimize the total loss; The early stopping mechanism is adopted to prevent overfitting, when the validation loss no longer significantly decreases for consecutive multiple periods or reaches the preset maximum number of iterations, the training is stopped, the model parameters are finally fixed, and the trained model is obtained.
10. The artificial intelligence and machine learning based lighting device anomaly detection and diagnosis method as claimed in claim 1, wherein, S4 is specifically as follows: The newly collected data is input into the trained model, and the model outputs the classification score and prediction probability of each fault category; The abnormality detection is based on the prediction probability threshold or the maximum probability category, if the maximum probability exceeds the preset threshold, it is determined as a fault state, and the specific fault type is output; otherwise, it is determined as a normal state.
Citation Information
Cited By
Storage goods location detection method and device based on meta-learning, equipment and medium
CN121937743A
Industrial robot joint abnormal vibration detection method and system based on deep learning
CN121997240A