Lighting equipment fault prediction method, terminal equipment and storage medium
Through the improved lighting equipment status parameter prediction model with LSTM and attention mechanism, the problem of strong passivity in traditional street light equipment maintenance methods is solved, more accurate fault prediction and real-time maintenance are achieved, and maintenance costs are reduced.
Patent Information
- Application Number
- CN202510468260.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-04-15
AI Technical Summary
Traditional street light equipment maintenance methods are mostly passive maintenance, which leads to untimely troubleshooting and high maintenance costs. The existing Internet of Things applications lack efficient prediction mechanisms and cannot accurately predict potential equipment failures.
The lighting equipment state parameter prediction model with improved LSTM and attention mechanism is adopted. By collecting electric parameters, physical state parameters and environmental state parameters, the training set is constructed, and the memory gate and attention mechanism are introduced, short-term and long-term memory processing is dynamically adjusted to perform health scores and fault prediction.
It improves the real-time and accuracy of lighting equipment failure prediction, reduces the probability of failure, and achieves a more reasonable maintenance plan.
Smart Images

Figure CN120561575A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of equipment failure prediction, and in particular to a lighting equipment failure prediction method, terminal equipment, and storage medium. Background Art
[0002] As a vital component of urban infrastructure, the stable operation of urban lighting systems is directly linked to urban safety and energy efficiency. However, traditional streetlight maintenance is largely reactive, requiring repairs only after a failure occurs. This results in delayed troubleshooting and high maintenance costs. Furthermore, while existing IoT applications enable basic device status monitoring, they lack efficient predictive mechanisms to accurately predict potential equipment failures, hindering proactive maintenance. Summary of the Invention
[0003] In order to solve the above problems, the present invention proposes a lighting equipment fault prediction method, a terminal device and a storage medium.
[0004] The specific plan is as follows:
[0005] A lighting equipment fault prediction method comprises the following steps:
[0006] S1: Collect the state parameters of the lighting equipment over a period of time and build a training set based on the collected state parameters;
[0007] S2: Build a lighting equipment state parameter prediction model based on the improved LSTM and attention mechanism, and train the model using the training set;
[0008] Improved LSTM makes the following improvements based on traditional LSTM:
[0009] (1) The forget gate, input gate, and output gate use different weight matrices instead of the same weight matrix for the previous hidden state and the current input;
[0010] (2) The memory gate is introduced to enable the model to selectively retain or discard short-term memory and long-term memory; the memory gate is expressed as:
[0011] g t =σ(W g ·x t +U g ·h t-1 +b g )
[0012] Among them, g t Represents the memory gate output at the current moment; x t Indicates the current input; W g The weight matrix representing the impact of the current input on the memory gate; ht-1 Indicates the hidden state at the previous moment; U g The weight matrix representing the influence of the previous hidden state on the memory gate; b g is the bias term in the memory gate;
[0013] (3) Adjust the updating method of the unit state through the following formula:
[0014]
[0015] Among them, C t and C t-1 Represent the unit state at the current moment and the previous moment respectively; f t Represents the forget gate output at the current moment; i t Represents the input gate output at the current moment; represents the candidate memory unit state at the current moment; ⊙ represents the Hadamard product; tanh represents the hyperbolic tangent function; W c The weight matrix representing the influence of the current input on the candidate memory; U c The weight matrix representing the influence of the previous hidden state on the candidate memory; b c is the bias term in the candidate memory unit state update;
[0016] S3: Predict the state parameters of the lighting equipment through the trained model;
[0017] S4: Health scoring of lighting equipment based on predicted status parameters;
[0018] S5: Predict lighting equipment failures based on health score results.
[0019] Furthermore, the state parameters include electrical parameters, physical state parameters and environmental state parameters; electrical parameters include voltage, current, power and three-phase voltage; physical state parameters include lamp body temperature and equipment life statistics; environmental state parameters include ambient humidity.
[0020] Furthermore, the formula for health scoring of lighting equipment is:
[0021]
[0022] Among them, H i represents the health score of the i-th lighting device; P jmax represents the maximum allowable value of the jth state parameter; w j represents the weight of the jth state parameter; y j represents the predicted value of the jth state parameter; j represents the sequence number of the state parameter; n represents the total number of state parameters; P jmax Indicates the maximum allowed value of the j-th state parameter.
[0023] Furthermore, a method for predicting lighting equipment failure based on the health score result is as follows: determining whether the health score is less than a score threshold; if so, performing a failure prediction, and calculating the probability of failure occurrence using the following formula:
[0024]
[0025] Where ΔX t It represents the difference between the predicted value of the state parameter and the reference value; α, β, and γ are all model parameters, which are obtained by training historical data; Δt represents the time difference between the predicted time and the current time.
[0026] Furthermore, the method further includes executing fault maintenance when the calculated probability of the fault occurring is greater than a probability threshold.
[0027] A lighting equipment fault prediction terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method described above are implemented in the embodiment of the present invention.
[0028] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method described above in an embodiment of the present invention.
[0029] The present invention adopts the above technical solution to improve the real-time performance and accuracy of lighting equipment fault prediction and reduce the probability of fault occurrence. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 Shown is a flow chart of a method according to a first embodiment of the present invention. DETAILED DESCRIPTION
[0031] To further illustrate various embodiments, the present invention provides accompanying drawings. These drawings form part of the present disclosure and are primarily used to illustrate the embodiments and, in conjunction with the relevant description in the specification, to explain the operating principles of the embodiments. By referring to these drawings, those skilled in the art will be able to understand other possible implementations and the advantages of the present invention.
[0032] The present invention will now be further described with reference to the accompanying drawings and specific embodiments.
[0033] Example 1:
[0034] The embodiment of the present invention provides a lighting equipment fault prediction method, such as Figure 1 As shown, the method includes the following steps:
[0035] S1: Collect state parameters of lighting equipment (such as street lamps) over a period of time and build a training set based on the collected state parameters.
[0036] Because comprehensive data sources can enhance the model's input feature dimensions and thus improve prediction accuracy, in this embodiment, electrical parameters, physical state parameters, and environmental state parameters are all used as state parameters for subsequent model training to improve the accuracy of health scores and generate more reasonable maintenance plans.
[0037] Real-time collection of lighting equipment status parameters through IoT terminal devices, including:
[0038] Electrical parameters: voltage, current, power, three-phase voltage;
[0039] Physical state parameters: lamp body temperature, equipment life statistics;
[0040] Environmental status parameters: ambient humidity.
[0041] All data are stored in time series format and preprocessed to convert into standard format data for LSTM model training.
[0042] S2: Build a lighting equipment state parameter prediction model based on the improved LSTM and attention mechanism, and train the model using the training set.
[0043] Traditional LSTM models may confuse information when processing long-term and short-term memories. In LSTM models, traditional memory management strategies typically control the flow of information through forget gates, input gates, and output gates. However, these gating mechanisms are typically fixed and cannot dynamically adjust their ability to handle short-term and long-term memories. Especially when faced with complex time series data, the model may not be able to effectively distinguish which information should be remembered long-term and which should be remembered short-term, resulting in confusion in the "memory" of certain important information in the time series. The goal of the adaptive memory management strategy is to enable the model to dynamically adjust its handling of short-term and long-term memories based on the characteristics of the input data, the context, and feedback during the learning process, allowing the LSTM to more accurately capture short-term changes and long-term trends in the time series.
[0044] This example designs a separation mechanism and introduces a dynamic gating mechanism (memory gate) to distinguish between short-term and long-term memory updates, allowing the model to adopt different strategies when processing short-term and long-term memory. This improves the model's ability to capture both transient changes and long-term trends in time series.
[0045] LSTM is used to capture the long-term dependencies of device states and predict future trends of input state parameters. The hidden state h at each time step is tRepresents the state characteristics of the lighting device at that moment. LSTM uses a gate mechanism to capture long-term dependencies in time series. The input gate controls the importance of each state parameter (such as temperature and voltage) in the prediction; the forget gate discards irrelevant historical states.
[0046] 1. Forget Gate
[0047] Determines how much state information of the previous time step needs to be forgotten.
[0048] f t =σ(W f ·x t +U f ·h t-1 +b f )
[0049] Among them, f t Represents the forget gate output at the current moment, which controls how much of the past memory the model needs to forget when updating. σ represents the Sigmoid activation function, which is used to limit the output between 0 and 1, indicating the degree of forgetting (0 means complete forgetting, 1 means complete retention). W f ·x t Indicates the current input x t (i.e. the state parameters at the current moment) and the weight matrix W f The product of U represents the influence of the current input on the forget gate. f ·h t-1 Indicates the hidden state h at the previous moment t-1 With the weight matrix U f The product of represents the influence of the previous moment’s memory on the forget gate. f It is a bias term that helps the model output meaningful values when there is no input or hidden state, thereby enhancing the flexibility of the model.
[0050] 2. Input Gate
[0051] Determines the impact of the current input information on the unit state.
[0052] i t =σ(W i ·x t +U i ·h t-1 +b i )
[0053] Among them, i t The input gate output at the current moment controls the current input x t The degree of update of the memory unit state. σ is the Sigmoid activation function, which ensures that the output is between 0 and 1, indicating the degree to which the input information should be retained. i ·x tRepresents the current input x t With the weight matrix W i The product of represents the influence of the current input on the input gate. i ·h t-1 Represents the hidden state h at the previous moment t-1 With the weight matrix U i The product of represents the influence of the previous moment memory on the current input gate. i It is a bias term that increases the flexibility of the input gate and helps the model better adjust based on historical data.
[0054] 3. Output Gate
[0055] Determines the hidden state output at the current time step.
[0056] o t =σ(W o ·x t +U o ·h t-1 +b o )
[0057] Among them, t Represents the output of the output gate at the current moment, which controls the final output of the model and determines the update of the hidden state. σ is the Sigmoid activation function, which ensures that the output is between 0 and 1, indicating how much memory to output. o ·x t Indicates the impact of the current input on the output gate. U o ·h t-1 Indicates the influence of the previous hidden state on the current output gate. b o is a bias term that adjusts the flexibility of the output gate.
[0058] In traditional LSTM, all update steps (such as forget, input, output) are determined by the current input x t and the hidden state h at the previous moment t-1 By introducing the weight matrix U(U f 、U i 、U o ), the current state update can be affected not only by the current input, but also by the past state h t-1 , so that the model can have stronger historical dependence when updating.
[0059] For example, we want to predict the temperature change of street lamp equipment over time. The input at the current moment may be the current temperature, ambient humidity, power and other information (which will be determined by x t The device status and temperature change trend at the previous moment may have an impact on the temperature prediction at the current moment (this is represented by h t-1express).
[0060] Weight matrix W: responsible for weighting the current temperature, humidity, power and other input information and sending it to the model to affect the current state update.
[0061] The weight matrix U(U f 、U i 、U o ): Responsible for weighting the device status information of the previous moment (such as the temperature and power of the previous moment) and feeding it into the model, so that the model can better capture the time dependence of the device status.
[0062] 4. Memory Gate (additional gating mechanism)
[0063] The influence of the input features on the short-term memory is controlled by an additional parameter weight Wg. It determines the contribution of the short-term memory to the final state at the current time step.
[0064] g t =σ(W g ·x t +U g ·h t-1 +b g )
[0065] Among them, g t Represents the memory gate output at the current moment, controlling the introduction of short-term memory; W g The weight matrix representing the impact of the current input on the memory gate; U g The weight matrix representing the influence of the previous hidden state on the memory gate; b g is a bias term that further enhances the adjustment capability of the memory gate.
[0066] 5. Candidate memory unit update
[0067]
[0068] in, is the candidate memory cell state at the current moment, representing the new memory generated by the current input and the hidden state at the previous moment. Tanh is the hyperbolic tangent activation function, which makes the memory state output between -1 and 1, which helps to normalize the data. c The weight matrix that represents the influence of the current input on the candidate memory. c The weight matrix that represents the influence of the previous hidden state on the candidate memory. c is a bias term that helps adjust the output of the candidate memory.
[0069] 6. Unit status update
[0070]
[0071] Among them, C t Indicates the unit state at the current moment; C t-1 Represents the unit state at the previous moment and stores long-term memory information; ⊙ is the Hadamard product (element-by-element multiplication), which ensures that the fusion of each part makes a reasonable contribution to the final state; f t ⊙C t-1 Indicates that the forget gate controls the degree of memory retention at the previous moment; The input gate, candidate memory, and memory gate work together to determine how the current input affects the current unit state.
[0072] 7. Hide Status Updates
[0073] Compute the hidden state at the current time step based on the cell state and the output gate.
[0074] h t =o t tanh(C t )
[0075] Among them, h t Represents the hidden state at the current moment, and finally outputs the state of the model for prediction and calculation of the next time step; o t Indicates that the output gate controls the output degree of the hidden state at the current moment; tanh(C t ) represents the unit state at the current moment, which is normalized by the hyperbolic tangent function to ensure that the output is within a reasonable range.
[0076] The attention mechanism introduced in this example is used to make the model pay more attention to important time steps, as follows:
[0077] 1. Calculate the importance score for each time step t:
[0078] e t =v T tanh(W s ·h t )
[0079] Among them, W s Represents the training parameter matrix of the model, which is used for feature transformation; v represents the vector in the model, which is used for score aggregation.
[0080] Importance score e t Indicates the potential contribution of data to future predictions at time step t. During the scoring process, the hidden state h at each time step t This formula is quantified as a fraction e t , and is further used to calculate the attention weight α of this time step t .
[0081] 2. Score e according to importance t , calculate the attention weight α for each time step t :
[0082]
[0083] Attention weight α t Determines the influence of each time step on the prediction results.
[0084] Note: In some cases, the weight α is used directly t It is not enough to fully reflect the importance of the data. Therefore, the system can use the importance score e t Come:
[0085] (1) Screening key time steps:
[0086] When e at some time step t Above a set threshold, the data at those time steps can be marked as high priority for further analysis.
[0087] (2) Dynamically adjust the input sequence:
[0088] In cases where the amount of data is large (such as equipment status data generated once a minute), the system can eliminate low-priority time steps and retain the most critical parts for the prediction results, thereby reducing the computational burden and improving efficiency.
[0089] 3. Weight-based prediction results
[0090] The final prediction value is a weighted sum of all time steps, which ensures that the system focuses on the time step data that is most valuable for prediction.
[0091]
[0092] Assume that we predict the device state parameters for several time steps in the future, and the original prediction results are:
[0093]
[0094] The prediction results after adding attention weights are:
[0095]
[0096] S3: Predict the state parameters of the lighting equipment through the trained model.
[0097] S4: Calculate health scores for lighting equipment based on the predicted status parameters.
[0098] In this embodiment, the health score is set using the following formula:
[0099]
[0100] Among them, H i represents the health score of the i-th device; y j represents the predicted value of the jth state parameter; j represents the sequence number of the state parameter; n represents the total number of state parameters; P jmax w represents the maximum allowable value of the jth state parameter (i.e., the upper limit of the state parameter under normal circumstances, such as the maximum allowable value of voltage is 240V, exceeding this value may indicate an abnormality); j represents the weight of the j-th state parameter, which can be set by those skilled in the art according to their needs.
[0101] S5: Predict lighting equipment failures based on health score results.
[0102] The method for predicting lighting equipment failure based on health score results is as follows: determine whether the health score is less than the score threshold (such as 50 points). If so, perform failure prediction and calculate the probability of failure P using the following formula: Failure :
[0103]
[0104] Where ΔX t It represents the difference between the predicted value of the state parameter and the reference value (determined by the average value collected when no fault occurs); α, β, and γ are all model parameters, which are obtained by training historical data; Δt represents the time difference between the predicted time (i.e., the predicted time corresponding to the predicted value of the state parameter) and the current time.
[0105] Furthermore, this embodiment also includes performing fault maintenance when the predicted probability of a fault occurring is greater than a set probability threshold. This embodiment adopts the following strategy:
[0106] (1) Maintenance type: preventive inspection, component replacement, etc.
[0107] (2) Priority: Automatic sorting based on failure probability;
[0108] (3) Resource allocation: Scheduling available maintenance personnel and equipment accessories.
[0109] For example, if the risk of voltage anomalies and temperature rise is high, the system recommends scheduling equipment inspections within a week and preparing new cooling modules in advance. In practice, those skilled in the art can develop corresponding fault maintenance strategies based on specific applications, and this is not a limitation here.
[0110] Example 2:
[0111] The present invention also provides a lighting equipment fault prediction terminal device, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the computer program, the steps in the above-mentioned method embodiment of embodiment 1 of the present invention are implemented.
[0112] Furthermore, as an executable solution, the lighting device fault prediction terminal device can be a computing device such as a desktop computer, laptop, PDA, or cloud server. The lighting device fault prediction terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will appreciate that the above-described components of the lighting device fault prediction terminal device are merely examples and do not limit the lighting device fault prediction terminal device. The lighting device fault prediction terminal device may include more or fewer components than those described above, or a combination of certain components, or different components. For example, the lighting device fault prediction terminal device may also include input / output devices, network access devices, buses, etc., but this is not limited in the present embodiment.
[0113] Furthermore, as an executable solution, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices. The general-purpose processor may be a microprocessor or any conventional processor. The processor serves as the control center of the lighting device fault prediction terminal device, connecting various parts of the entire lighting device fault prediction terminal device using various interfaces and lines.
[0114] The memory can be used to store the computer programs and / or modules. The processor implements the various functions of the lighting device fault prediction terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created based on the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0115] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.
[0116] If the module / unit integrated into the lighting equipment fault prediction terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution medium.
[0117] Although the present invention has been particularly shown and described in conjunction with preferred embodiments, it will be understood by those skilled in the art that various changes in form and details may be made to the present invention without departing from the spirit and scope of the invention as defined in the appended claims, and all such changes are within the scope of protection of the present invention.
Claims
1. A lighting equipment fault prediction method, characterized in that: The following steps are involved: S1: Collect the state parameters of the lighting equipment over a period of time and build a training set based on the collected state parameters; S2: Build a lighting equipment state parameter prediction model based on the improved LSTM and attention mechanism, and train the model using the training set; Improved LSTM makes the following improvements based on traditional LSTM: (1) The forget gate, input gate, and output gate use different weight matrices instead of the same weight matrix for the previous hidden state and the current input; (2) The memory gate is introduced to enable the model to selectively retain or discard short-term memory and long-term memory; the memory gate is expressed as: g t =σ(W g ·x t +U g ·h t-1 +b g ) Among them, g t Represents the memory gate output at the current moment; x t Indicates the current input; W g The weight matrix representing the impact of the current input on the memory gate; h t-1 Indicates the hidden state at the previous moment; U g The weight matrix representing the influence of the previous hidden state on the memory gate; b g is the bias term in the memory gate; (3) Adjust the updating method of the unit state through the following formula: Among them, C t and C t-1 Represent the unit state at the current moment and the previous moment respectively; f t Represents the forget gate output at the current moment; i t Represents the input gate output at the current moment; represents the candidate memory unit state at the current moment; ⊙ represents the Hadamard product; tanh represents the hyperbolic tangent function; W c The weight matrix representing the influence of the current input on the candidate memory; U c The weight matrix representing the influence of the previous hidden state on the candidate memory; b c is the bias term in the candidate memory unit state update; S3: Predict the state parameters of the lighting equipment through the trained model; S4: Health scoring of lighting equipment based on predicted status parameters; S5: Predict lighting equipment failures based on health score results.
2. The lighting equipment fault prediction method according to claim 1, characterized in that: The status parameters include electrical parameters, physical status parameters and environmental status parameters; electrical parameters include voltage, current, power and three-phase voltage; physical status parameters include lamp body temperature and equipment life statistics; environmental status parameters include ambient humidity.
3. The lighting equipment fault prediction method according to claim 1, characterized in that: The formula for health scoring of lighting equipment is: Among them, H i represents the health score of the i-th lighting device; P jmax represents the maximum allowable value of the jth state parameter; w j represents the weight of the jth state parameter; y j represents the predicted value of the jth state parameter; j represents the sequence number of the state parameter; n represents the total number of state parameters; P jmax Indicates the maximum allowed value of the j-th state parameter.
4. The lighting equipment fault prediction method according to claim 1, wherein: The method for predicting lighting equipment failure based on health score results is as follows: determine whether the health score is less than the score threshold. If so, perform failure prediction and calculate the probability of failure using the following formula: Where ΔX t It represents the difference between the predicted value of the state parameter and the reference value; α, β, and γ are all model parameters, which are obtained by training historical data; Δt represents the time difference between the predicted time and the current time.
5. The lighting equipment fault prediction method according to claim 4, characterized in that: The method further includes performing fault maintenance when the calculated probability of the fault occurring is greater than a probability threshold.
6. A lighting equipment fault prediction terminal device, characterized by: The method comprises a processor, a memory, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Health state recognition method and system based on convolutional long-short term memory network
CN116861214A
Transformer fault self-identification method and system based on bidirectional long and short time memory
CN117409890A
Deep fusion network production line fault prediction method based on deep learning
CN119357769A
Multi-task learning based RUL predication method under sensor fault condition
US20230350402A1