Camera fault intelligent prediction method and system
Through the intelligent collector, the camera operation data is collected and preprocessed, a long and short-term memory network fault prediction model is built, and fault diagnosis is carried out in combination with the knowledge graph. The problem of difficulty in detecting and handling camera failures in the existing technology is solved, and the camera failure is achieved Real-time online monitoring and early warning improves the accuracy and reliability of fault prediction.
Patent Information
- Application Number
- CN202510043403.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to realize real-time monitoring and fault prediction of the camera's operating status, resulting in difficult time discovery and handling of faults, and cannot meet the needs of efficient operation and maintenance.
Through the intelligent collector installed on the camera, the operation data is collected in real time, and the fault prediction model based on the long and short-term memory network is constructed after preprocessing, and fault diagnosis is carried out in combination with the knowledge graph to achieve intelligent prediction and intelligent early warning of camera failures.
Real-time online monitoring and early warning of camera failures is realized, the accuracy and reliability of fault prediction is improved, the failure rate is reduced, and the overall reliability of the system is improved.
Smart Images

Figure CN119443221A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic equipment fault prediction, and in particular to a camera fault intelligent prediction method and system. Background Art
[0002] As security monitoring, video conferencing, intelligent transportation and other fields rely more and more on cameras, the stable operation of cameras is crucial.
[0003] However, since cameras are exposed to various environments for a long time, their operating status is easily affected by various factors, leading to failures. Traditional camera maintenance methods usually use regular inspections and manual troubleshooting, which is not only time-consuming and labor-intensive, but also unable to monitor the operating status of the camera in real time, making it difficult to detect and handle failures in a timely manner. In addition, due to the lack of effective data analysis methods, there are certain difficulties in diagnosing and repairing camera failures.
[0004] At present, although there are some simple camera status monitoring methods, they lack accurate and intelligent fault prediction capabilities, making it difficult to predict potential fault hazards in advance and unable to meet the growing needs for efficient operation and maintenance. Summary of the invention
[0005] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a camera fault intelligent prediction method and system to solve the problems raised in the above background technology.
[0006] The purpose of the present invention can be achieved by the following technical solution: A camera fault intelligent prediction method comprises the following steps: S1, collect the camera's operating data in real time through the intelligent collector installed on the camera; S2, obtaining operation sequence data by preprocessing the operation data; S3, build a fault prediction model based on long short-term memory network; S4. Processing the collected real-time operation data to obtain a real-time feature vector, inputting the real-time feature vector into a fault prediction model, obtaining a corresponding prediction result, and realizing intelligent prediction and intelligent warning of camera faults; S5. Based on the prediction results, a knowledge graph is constructed to perform further fault diagnosis on the camera in a faulty state, and obtain the cause of the fault and the corresponding maintenance measures.
[0007] As a further solution of the present invention, with respect to step S1, the operating data includes temperature, humidity, current, voltage, and image quality data; wherein the image quality data includes: Image clarity: The sum of the grayscale gradients of the image in the horizontal and vertical directions is calculated using the grayscale gradient method. This is used as the image clarity to reflect the sharpness of the camera image. Color deviation value, which is calculated by comparing the image color deviation value with the standard color spectrum, and is used to reflect the color reproduction degree of the camera; The number of noise points is calculated by comparing the difference in pixel values before and after image filtering through a noise filtering algorithm. This method can be used to count the number of noise points and reflect the degree of interference to the camera's photosensitive element or the stability of the internal circuit.
[0008] As a further solution of the present invention, with respect to step S2, preprocessing is performed on the operation data, specifically including: Clean the collected operation data, check whether there are missing values in the operation data and fill them with interpolation, and use the 3 times standard deviation method to identify and remove outliers in the operation data; The Z-score method is used to standardize the operation data to eliminate the dimensional influence of different features, and the operation sequence data is obtained by setting the time step and performing time series processing.
[0009] As a further solution of the present invention, for step S3, the steps of constructing a fault prediction model are as follows: S301, collecting a large amount of historical operation sequence data and corresponding fault records, and dividing them into a training set and a validation set according to a preset ratio; S302, introducing LSTM units, stacking multiple LSTM units in sequence to form a multi-layer long short-term memory LSTM network; wherein the output of the previous layer of LSTM is used as the input of the next layer of LSTM, and each layer of LSTM is used to extract features of different levels from the input data; After the multi-layer LSTM network is used to capture time series information and transform features, the LSTM output of the last layer is passed to a fully connected layer, and the output of the fully connected layer is converted into a prediction probability through the sigmoid function; S303, using the training set as input data, training the LSTM network, and continuously adjusting the model parameters through the back propagation algorithm to minimize the loss function; S304, through repeated iterative training, until the accuracy of the model on the verification set reaches a preset standard value, a fault prediction model is obtained.
[0010] As a further solution of the present invention, step S303 further includes: Get the true label and predicted probability of each training set sample and calculate the binary cross entropy loss function; The calculation formula is as follows: Where L is the loss function value; is the predicted probability of the i-th sample; is the true label of the i-th sample, when It indicates a fault state. It indicates a normal state; i=1,2,...,N, where N is the number of samples in the training set.
[0011] As a further solution of the present invention, step S304 further includes: Obtain the true labels and predicted probabilities of the validation set samples and compare them to calculate the accuracy of the model on the validation set; The calculation formula is as follows: Where Q is the accuracy; YZ is the number of samples in the validation set whose true labels and predicted probabilities are consistent; R is the total number of validation samples; If the calculated accuracy is greater than or equal to the preset standard value, the performance of the LSTM model meets the standard and a fault prediction model is obtained; if the calculated accuracy is less than the preset standard value, the model update process is triggered.
[0012] As a further solution of the present invention, step S4 further includes: By processing the collected real-time operation data, real-time sequence data is obtained, the real-time sequence data is input into the fault prediction model, the real-time prediction probability output by the model is obtained, and the real-time prediction probability is numerically compared with the preset probability threshold; If the real-time prediction probability is greater than or equal to the probability threshold, the prediction result corresponding to the input data is a camera failure state, and an early warning prompt is issued; if the real-time prediction probability is less than the probability threshold, the prediction result corresponding to the input data is a normal state; The fault state or the normal state constitutes the predicted result.
[0013] As a further solution of the present invention, step S5 further includes: Collect historical camera fault data, including fault phenomena, fault causes and corresponding maintenance measures, and construct a knowledge graph; the knowledge graph is stored in the form of a graph, in which nodes represent fault phenomena, causes and maintenance measures, and edges represent the association relationship between them; When the prediction model outputs that the camera is in a faulty state, the corresponding operation sequence data is obtained; the operation sequence data is introduced into the knowledge graph as the initial fault phenomenon node, and the existing association relationships in the knowledge graph are used to start from the fault phenomenon and find the fault cause connected to it through the pre-set relationship type; for each fault cause found, it is further associated with the corresponding maintenance measures, and the camera in the faulty state is repaired.
[0014] In order to solve the above problems, the present invention also provides a camera fault intelligent prediction system, comprising: The data collection module collects the camera's operating data in real time through the intelligent collector installed on the camera; The data processing module obtains the operation sequence data by preprocessing the operation data; Fault prediction model building module, building a fault prediction model based on long short-term memory network; The detection and warning module processes the collected real-time operation data to obtain real-time feature vectors, inputs the real-time feature vectors into the fault prediction model, obtains the corresponding prediction results, and realizes intelligent prediction and intelligent warning of camera faults; The fault diagnosis module builds a knowledge graph based on the prediction results to perform further fault diagnosis on the camera in a faulty state and obtain the cause of the fault and the corresponding maintenance measures.
[0015] Compared with the existing solutions, the present invention achieves the following beneficial effects: The present invention greatly broadens the data basis for fault prediction by collecting multi-source data. Compared with the traditional single data monitoring method, it can discover more potential fault hazards in advance, effectively reduce the camera failure rate, and improve the overall reliability of the system. The present invention uses the long short-term memory network model to better mine the laws and features in the camera operation data, thereby improving the accuracy and reliability of fault prediction and realizing real-time online monitoring and early warning of camera faults; By constructing a knowledge graph, the present invention can further diagnose the camera in a faulty state, obtain the cause of the fault and the corresponding maintenance measures, realize camera fault diagnosis, and improve the operating stability and reliability of the camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The present invention will be further described below in conjunction with the accompanying drawings.
[0017] Figure 1 This is a flowchart of a camera fault intelligent prediction method proposed in the present invention.
[0018] Figure 2 This is a module structure diagram of a camera fault intelligent prediction system proposed by the present invention. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0020] Embodiment 1, as Figure 1As shown, the present invention is a camera fault intelligent prediction method, comprising the following steps: S1. Collect the camera's operating data in real time through the intelligent collector installed on the camera; the operating data includes temperature, humidity, current, voltage, and image quality data; With respect to step S1, the image quality data includes: Image clarity: The sum of the grayscale gradients of the image in the horizontal and vertical directions is calculated using the grayscale gradient method. This is used as the image clarity to reflect the sharpness of the camera image. Color deviation value, which is calculated by comparing the image color deviation value with the standard color spectrum, and is used to reflect the color reproduction degree of the camera; The number of noise points is calculated by comparing the difference in pixel values before and after image filtering through a noise filtering algorithm, and the number of noise points is counted, which reflects the degree of interference to the camera's photosensitive element or the stability of the internal circuit; S2, obtaining operation sequence data by preprocessing the operation data; For step S2, preprocessing is performed on the operation data, specifically including: Clean the collected operation data, check whether there are missing values in the operation data and fill them with interpolation, and use the 3 times standard deviation method to identify and remove outliers in the operation data; The Z-score method is used to standardize the operation data to eliminate the dimensional influence of different features, and the operation sequence data is obtained by setting the time step and performing time series processing; It should be noted that the time step is set according to the data characteristics and prediction objectives, and is used to capture the operating status of the camera within a certain period of time; setting the time step size through empirical methods or autocorrelation function methods is conducive to improving the model's analysis accuracy of the camera operation data, thereby improving the accuracy and reliability of fault prediction; S3, build a fault prediction model based on long short-term memory network; For step S3, the steps of building a fault prediction model are as follows: S301, collecting a large amount of historical operation sequence data and corresponding fault records, and dividing them into a training set and a validation set according to a preset ratio; wherein the preset ratio can be set to 8:2; S302, introducing LSTM units, stacking multiple LSTM units in sequence to form a multi-layer long short-term memory LSTM network; wherein the output of the previous layer of LSTM is used as the input of the next layer of LSTM, and each layer of LSTM is used to extract features of different levels from the input data; After the multi-layer LSTM network is used to capture time series information and transform features, the LSTM output of the last layer is passed to a fully connected layer, and the output of the fully connected layer is converted into a prediction probability through the sigmoid function; The calculation formula involved is: In the formula, is the prediction probability; W is the weight matrix of the output layer; b is the bias vector of the output layer; is the output of the fully connected layer, T is the time step; is the sigmoid function; With respect to step S302, the LSTM unit includes: a forget gate, an input gate, a cell state update and an output gate; the forget gate is used to determine which information in the memory unit at the previous moment needs to be retained or discarded; the input gate is used to control how much new information in the current input is to be stored in the memory unit; through the cell state update, the old information retained by the forget gate and the new information determined by the input gate are added to obtain the cell state at the current moment; the output gate determines the output value based on the current cell state and hidden state; S303, using the training set as input data, training the LSTM network, and continuously adjusting the model parameters through the back propagation algorithm to minimize the loss function; Get the true label and predicted probability of each training set sample and calculate the binary cross entropy loss function; The calculation formula is as follows: Where L is the loss function value; is the predicted probability of the i-th sample; is the true label of the i-th sample, when It indicates a fault state. It indicates a normal state; i=1,2,...,N, where N is the number of samples in the training set; S304, repeatedly iterating training until the accuracy of the model on the validation set reaches a preset standard value, thereby obtaining a fault prediction model; Obtain the true labels and predicted probabilities of the validation set samples and compare them to calculate the accuracy of the model on the validation set; The calculation formula is as follows: Where Q is the accuracy; YZ is the number of samples in the validation set whose true labels and predicted probabilities are consistent; R is the total number of validation samples; If the calculated accuracy is greater than or equal to the preset standard value, the performance of the LSTM model meets the standard and a fault prediction model is obtained; if the calculated accuracy is less than the preset standard value, the model update process is triggered; the preset standard value is determined according to the specific requirements of the model in actual applications; It should be noted that during the update process, an incremental learning method is used to mix the new data with the original training data in a certain proportion to retrain the model; at the same time, automatic hyperparameter adjustment techniques, such as random search or gradient-based optimization methods, are used to optimize the model parameters to adapt to changes in the camera's operating status and improve the model's generalization ability and prediction accuracy; S4. Processing the collected real-time operation data to obtain a real-time feature vector, inputting the real-time feature vector into a fault prediction model, obtaining a corresponding prediction result, and realizing intelligent prediction and intelligent warning of camera faults; For step S4, it also includes: By processing the collected real-time operation data, real-time sequence data is obtained, and the real-time sequence data is input into the fault prediction model to obtain the real-time prediction probability output by the model, and the real-time prediction probability is numerically compared with the preset probability threshold; wherein the probability threshold can be set to 0.5; If the real-time prediction probability is greater than or equal to the probability threshold, the prediction result corresponding to the input data is a camera failure state, and an early warning prompt is issued; if the real-time prediction probability is less than the probability threshold, the prediction result corresponding to the input data is a normal state; Fault state or normal state constitutes the predicted result; S5. Based on the prediction results, a knowledge graph is constructed to further diagnose the camera in a faulty state, and obtain the cause of the fault and the corresponding maintenance measures; For step S5, it also includes: Collect historical camera failure data, including failure phenomena, failure causes, and corresponding maintenance measures, and build a knowledge graph; failure phenomena include but are not limited to blurred images, no image output, and image flickering; failure causes include lens dirt, image sensor damage, motherboard failure, high temperature, and humidity; maintenance measures include but are not limited to cleaning the lens, replacing the sensor, repairing the motherboard circuit, updating the software, and reconfiguring the network; The knowledge graph is stored in the form of a graph, wherein nodes represent fault phenomena, causes and maintenance measures, and edges represent the associations between them; For example, there is an edge "may be caused by..." between "blurred image" and "dirt on the lens", that is, "blurred image may be caused by dirt on the lens"; There is an edge between "lens dirt" and "cleaning the lens" that says "the corresponding maintenance method is...", i.e. "the corresponding maintenance method for lens dirt is to clean the lens"; When the prediction model outputs that the camera is in a faulty state, the corresponding operation sequence data is obtained; the operation sequence data is introduced into the knowledge graph as the initial fault phenomenon node, and the existing association relationships in the knowledge graph are used to start from the fault phenomenon and find the fault cause connected to it through the pre-set relationship type; for each fault cause found, it is further associated with the corresponding maintenance measures, and the camera in the faulty state is repaired.
[0021] Embodiment 2, as Figure 2 As shown, a camera fault intelligent prediction system includes: a data acquisition module, a data processing module, a fault prediction model building module, a detection and early warning module, and a fault diagnosis module; The data collection module collects the camera's operating data in real time through the intelligent collector installed on the camera; The data processing module obtains the operation sequence data by preprocessing the operation data; Fault prediction model building module, building a fault prediction model based on long short-term memory network; The detection and warning module processes the collected real-time operation data to obtain real-time feature vectors, inputs the real-time feature vectors into the fault prediction model, obtains the corresponding prediction results, and realizes intelligent prediction and intelligent warning of camera faults; The fault diagnosis module builds a knowledge graph based on the prediction results to perform further fault diagnosis on the camera in a faulty state and obtain the cause of the fault and the corresponding maintenance measures.
[0022] In the several embodiments provided by the present invention, it should be understood that the disclosed system can be implemented in other ways. For example, the above-described embodiments of the invention are only illustrative, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation.
[0023] The modules described as separate accessories may or may not be physically separated, and the accessories shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0024] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0025] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0026] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A camera fault intelligent prediction method, characterized in that: include: S1, collect the camera's operating data in real time through the intelligent collector installed on the camera; S2, obtaining operation sequence data by preprocessing the operation data; S3, build a fault prediction model based on long short-term memory network; S4. Processing the collected real-time operation data to obtain a real-time feature vector, inputting the real-time feature vector into a fault prediction model, obtaining a corresponding prediction result, and realizing intelligent prediction and intelligent warning of camera faults; S5. Based on the prediction results, a knowledge graph is constructed to perform further fault diagnosis on the camera in a faulty state, and obtain the cause of the fault and the corresponding maintenance measures.
2. A camera fault intelligent prediction method according to claim 1, characterized in that: For step S1, the operating data includes temperature, humidity, current, voltage, and image quality data; wherein the image quality data includes: Image clarity: The sum of the grayscale gradients of the image in the horizontal and vertical directions is calculated using the grayscale gradient method. This is used as the image clarity to reflect the sharpness of the camera image. Color deviation value, which is calculated by comparing the image color deviation value with the standard color spectrum, and is used to reflect the color reproduction degree of the camera; The number of noise points is calculated by comparing the difference in pixel values before and after image filtering through a noise filtering algorithm. This method can be used to count the number of noise points and reflect the degree of interference to the camera's photosensitive element or the stability of the internal circuit.
3. The camera fault intelligent prediction method according to claim 2, characterized in that: For step S2, preprocessing is performed on the operation data, specifically including: Clean the collected operation data, check whether there are missing values in the operation data and fill them with interpolation, and use the 3 times standard deviation method to identify and remove outliers in the operation data; The Z-score method is used to standardize the operation data to eliminate the dimensional influence of different features, and the operation sequence data is obtained by setting the time step and performing time series processing.
4. The camera fault intelligent prediction method according to claim 3, characterized in that: For step S3, the steps of building a fault prediction model are as follows: S301, collecting a large amount of historical operation sequence data and corresponding fault records, and dividing them into a training set and a validation set according to a preset ratio; S302, introducing LSTM units, stacking multiple LSTM units in sequence to form a multi-layer long short-term memory LSTM network; wherein the output of the previous layer of LSTM is used as the input of the next layer of LSTM, and each layer of LSTM is used to extract features of different levels from the input data; After the multi-layer LSTM network is used to capture time series information and transform features, the LSTM output of the last layer is passed to a fully connected layer, and the output of the fully connected layer is converted into a prediction probability through the sigmoid function; S303, using the training set as input data, training the LSTM network, and continuously adjusting the model parameters through the back propagation algorithm to minimize the loss function; S304, through repeated iterative training, until the accuracy of the model on the verification set reaches a preset standard value, a fault prediction model is obtained.
5. A camera fault intelligent prediction method according to claim 4, characterized in that: For step S303, it also includes: obtaining the true label and predicted probability of each training set sample, and calculating the binary cross entropy loss function; The calculation formula is as follows: Where L is the loss function value; is the predicted probability of the i-th sample; is the true label of the i-th sample, when It indicates a fault state. It indicates a normal state; i=1,2,...,N, where N is the number of samples in the training set.
6. A camera fault intelligent prediction method according to claim 4, characterized in that: For step S304, it also includes: Obtain the true labels and predicted probabilities of the validation set samples and compare them to calculate the accuracy of the model on the validation set; The calculation formula is as follows: Where Q is the accuracy; YZ is the number of samples in the validation set whose true labels and predicted probabilities are consistent; R is the total number of validation samples; If the calculated accuracy is greater than or equal to the preset standard value, the performance of the LSTM model meets the standard and a fault prediction model is obtained; if the calculated accuracy is less than the preset standard value, the model update process is triggered.
7. A camera fault intelligent prediction method according to claim 6, characterized in that: For step S4, it also includes: By processing the collected real-time operation data, real-time sequence data is obtained, the real-time sequence data is input into the fault prediction model, the real-time prediction probability output by the model is obtained, and the real-time prediction probability is numerically compared with the preset probability threshold; If the real-time prediction probability is greater than or equal to the probability threshold, the prediction result corresponding to the input data is a camera failure state, and an early warning prompt is issued; if the real-time prediction probability is less than the probability threshold, the prediction result corresponding to the input data is a normal state; The fault state or the normal state constitutes the predicted result.
8. The camera fault intelligent prediction method according to claim 7, characterized in that: For step S5, it also includes: Collect historical camera fault data, including fault phenomena, fault causes and corresponding maintenance measures, and construct a knowledge graph; the knowledge graph is stored in the form of a graph, in which nodes represent fault phenomena, causes and maintenance measures, and edges represent the association relationship between them; When the prediction model outputs that the camera is in a faulty state, the corresponding operation sequence data is obtained; the operation sequence data is introduced into the knowledge graph as the initial fault phenomenon node, and the existing association relationships in the knowledge graph are used to start from the fault phenomenon and find the fault cause connected to it through the pre-set relationship type; for each fault cause found, it is further associated with the corresponding maintenance measures, and the camera in the faulty state is repaired.
9. A camera fault intelligent prediction system, used to execute a camera fault intelligent prediction method according to any one of claims 1 to 8, characterized in that: include: The data collection module collects the camera's operating data in real time through the intelligent collector installed on the camera; The data processing module obtains the operation sequence data by preprocessing the operation data; Fault prediction model building module, building a fault prediction model based on long short-term memory network; The detection and warning module processes the collected real-time operation data to obtain real-time feature vectors, inputs the real-time feature vectors into the fault prediction model, obtains the corresponding prediction results, and realizes intelligent prediction and intelligent warning of camera faults; The fault diagnosis module builds a knowledge graph based on the prediction results to perform further fault diagnosis on the camera in a faulty state and obtain the cause of the fault and the corresponding maintenance measures.
Citation Information
Patent Citations
Monitoring system early warning method and device and computer readable storage medium
CN114237087A
Fault prediction diagnosis method and device, electronic equipment and storage medium
CN115756922A
Camera module detection system and detection method
CN116320387A
Cited By
Subway rail transit equipment fault intelligent diagnosis method and system
CN120851847A