Device anomaly detection method and device, computer device and storage medium

By acquiring video information from multiple historical time periods in monitoring equipment, extracting and fusing background images, and generating a reference image to detect equipment anomalies, the high cost and high false detection rate of existing technologies are solved, achieving low-cost and high-accuracy equipment status detection.

CN115641538BActive Publication Date: 2026-11-20HANGZHOU LIFEI SOFTWARE TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211347122.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2026-11-20
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

In existing technologies, anomaly detection of monitoring equipment requires real-time acquisition and decoding of video streams, resulting in high costs and a high false detection rate, making it difficult to effectively detect abnormal equipment status.

Method used

By acquiring video information from monitoring equipment in multiple historical time periods, background images are extracted and fused to generate a background reference image. The background image of the current time period is compared with the reference image to determine whether the equipment is abnormal.

Benefits of technology

It reduces the implementation cost of anomaly detection, minimizes the impact of environmental interference on detection, improves the accuracy and fault tolerance of detection, and avoids false detections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115641538B_ABST
    Figure CN115641538B_ABST
Patent Text Reader

Abstract

The application relates to the image recognition field and provides a device anomaly detection method, a device and a computer storage medium, the method comprising the following steps: acquiring video information photographed by a monitoring device in at least two historical periods, and acquiring video information photographed by the monitoring device in a current period; extracting backgrounds in the video information photographed in the at least two historical periods and a background in the video information photographed in the current period respectively, so as to obtain a background image corresponding to the video information photographed in the at least two historical periods and a background image corresponding to the video information photographed in the current period; performing image fusion processing on the background images corresponding to the video information photographed in the at least two historical periods, so as to obtain a background reference image; and determining whether the monitoring device is abnormal according to the background reference image and the background image corresponding to the video information photographed in the current period. The implementation cost of monitoring device anomaly detection is reduced, the influence of environmental interference on monitoring device anomaly detection is reduced, and false detection is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition, and more particularly to a method, apparatus, computer device, and storage medium for detecting device anomalies. Background Technology

[0002] With societal development and the construction of smart cities, the demand for acquiring surveillance video through the deployment of monitoring equipment has greatly increased. However, monitoring equipment may be subject to interference such as obstruction or misalignment, leading to abnormal equipment operation. Current technologies require real-time acquisition and decoding of video streams to detect abnormal conditions, resulting in high implementation costs and data processing volumes. Furthermore, these technologies are prone to false detections due to moving objects such as vehicles, changes in lighting, and disturbances from flying insects. Therefore, how to detect abnormal conditions in monitoring equipment has become a pressing issue that needs to be addressed. Summary of the Invention

[0003] The main objective of this application is to provide a method, apparatus, computer equipment, and computer storage medium for detecting equipment anomalies, aiming to reduce the implementation cost of monitoring equipment anomaly detection, reduce the impact of environmental interference on monitoring equipment anomaly detection, and avoid false detections.

[0004] In a first aspect, this application provides a method for detecting equipment malfunctions, the method comprising the following steps:

[0005] Acquire video information captured by the monitoring device in at least two historical time periods, and acquire video information captured by the monitoring device in the current time period;

[0006] The background is extracted from video information captured in at least two historical time periods and the background is extracted from video information captured in the current time period to obtain background images corresponding to video information captured in at least two historical time periods and background images corresponding to video information captured in the current time period.

[0007] Image fusion processing is performed on the background images corresponding to video information captured in at least two of the historical time periods to obtain a background reference image;

[0008] Based on the background reference image and the background image corresponding to the video information captured in the current time period, it is determined whether the monitoring equipment is abnormal.

[0009] Secondly, this application also provides a device for detecting equipment malfunctions, the device comprising:

[0010] The video information acquisition module is used to acquire video information captured by the monitoring device in at least two historical time periods, and to acquire video information captured by the monitoring device in the current time period;

[0011] The background image extraction module is used to extract the background from video information captured in at least two historical time periods and the background from video information captured in the current time period, respectively, to obtain background images corresponding to video information captured in at least two historical time periods and background images corresponding to video information captured in the current time period.

[0012] The background image fusion module is used to perform image fusion processing on the background images corresponding to video information captured in at least two historical time periods to obtain a background reference image.

[0013] The background image comparison module is used to determine whether the monitoring device has any abnormalities based on the background reference image and the background image corresponding to the video information captured in the current time period.

[0014] Thirdly, this application also provides a computer device, the computer device including a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the device anomaly detection method as described above.

[0015] Fourthly, this application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the device anomaly detection method described above.

[0016] This application provides a method, apparatus, computer device, and storage medium for detecting device anomalies. The method acquires video information captured by a monitoring device in at least two historical time periods, and video information captured by the monitoring device in the current time period. It extracts the background from the video information captured in the at least two historical time periods and the background from the video information captured in the current time period, obtaining background images corresponding to the video information captured in the at least two historical time periods and the background image corresponding to the video information captured in the current time period. It then performs image fusion processing on the background images corresponding to the video information captured in the at least two historical time periods to obtain a background reference image. Based on the background reference image and the background image corresponding to the video information captured in the current time period, it determines whether the monitoring device has an anomaly. By acquiring the first and second video information in different time periods for device anomaly detection, continuous acquisition and decoding of video streams is avoided, reducing the implementation cost of anomaly detection. Furthermore, by fusing the first background image to obtain the reference background image, false detections caused by random factors are reduced, improving the accuracy of anomaly detection. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic flowchart illustrating a device anomaly detection method provided in an embodiment of this application;

[0019] Figure 2 This is a usage scenario diagram of a device anomaly detection method provided in an embodiment of this application;

[0020] Figure 3 A schematic flowchart illustrating a device anomaly detection method provided in an embodiment of this application;

[0021] Figure 4 A schematic block diagram illustrating a device anomaly detection method provided in an embodiment of this application;

[0022] Figure 5 This is a schematic block diagram of the structure of a computer device according to an embodiment of this application. Detailed Implementation

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

[0024] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0025] This application provides a method, apparatus, computer device, and storage medium for detecting device malfunctions.

[0026] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0027] Please refer to Figure 1 , Figure 1This is a flowchart illustrating a device anomaly detection method provided in an embodiment of this application. This device anomaly detection method can be used in a terminal or server to detect anomalies in monitoring equipment. The terminal can be an electronic device such as a mobile phone, tablet, laptop, desktop computer, personal digital assistant, or wearable device, or it can be the monitoring equipment itself; the server can be a standalone server or a server cluster.

[0028] Please refer to Figure 2 , Figure 2 This is a usage scenario diagram of a device anomaly detection method provided in an embodiment of this application. For example... Figure 2 As shown, monitoring devices, such as surveillance cameras, can send video information captured at different times to a server. For example, they can send video information captured at historical and current times to the server so that the server can extract the background from the video information, detect the monitoring device, and obtain the detection result. If the server detects that the monitoring device is abnormal, the server can send a prompt message to the monitoring device or the terminal device. Of course, this is not limited to this; the device abnormality detection method can also be performed by the terminal device or by the processor built into the monitoring device, which is not limited here.

[0029] like Figure 1 As shown, the device anomaly detection method includes steps S101 to S104.

[0030] Step S101: Obtain video information captured by the monitoring device in at least two historical time periods, and obtain video information captured by the monitoring device in the current time period.

[0031] For example, video information captured in at least two historical time periods is used to extract background images for anomaly detection, so that the final reference background image obtained by fusing the background images can eliminate interference from sudden events in a certain time period, thereby improving the accuracy of anomaly detection by monitoring equipment.

[0032] For example, video information captured during historical time periods can be obtained according to a preset time cycle. Specifically, within the four weeks of a month, surveillance videos from specific time periods on specific days of each week are obtained as the first video information. For instance, surveillance videos captured during specific time periods in the morning, noon, and afternoon on four separate days each week can be obtained. These specific time periods could be 10:00 AM, 1:00 PM, and 3:00 PM, and the video length could be 1 minute. Thus, 12 segments of 1-minute video information are obtained each week as the video information captured during historical time periods. Of course, this is not limited to this; surveillance videos from other time periods can also be obtained as the video information captured during historical time periods, and the video length can also be other lengths, which are not limited here.

[0033] For example, acquiring video information captured during the current time period could be achieved by acquiring video information of a preset duration in real time when the device anomaly detection process is triggered. The device anomaly detection process could be triggered periodically based on the device's operating logic or by a device anomaly detection command sent by the user; this is not limited to these specific scenarios.

[0034] In some implementations, after acquiring video information captured by the monitoring device in at least two historical time periods and video information captured by the monitoring device in the current time period, the method further includes: acquiring video segments captured by the monitoring device in at least two historical time periods and video segments captured by the monitoring device in the current time period; and performing grayscale processing on the pixels contained in each video frame in the acquired video segments to obtain video information captured by the monitoring device in at least two historical time periods and video information captured by the monitoring device in the current time period.

[0035] For example, grayscale processing is performed on the pixels contained in each video frame of the video segment. This involves calculating the grayscale value of a single color channel by taking the color channel parameter values ​​of the R, G, and B color channels in the monitoring video. Subsequent calculations only require calculating the grayscale value of the pixel, reducing the computational load for background extraction and lowering the computational complexity. Specifically, when calculating the grayscale value, the final grayscale value of the pixel can be obtained by averaging or weighted averaging the color channel parameter values ​​of the R, G, and B color channels. Alternatively, the largest color channel parameter value among the R, G, and B color channels can be selected as the final grayscale value of the pixel. Of course, other methods for grayscale processing of images can also be used in this embodiment, and it is not limited to the methods described above.

[0036] Step S102: Extract the background from the video information captured in at least two historical time periods and the background from the video information captured in the current time period, respectively, to obtain the background image corresponding to the video information captured in at least two historical time periods and the background image corresponding to the video information captured in the current time period.

[0037] For example, the background is extracted from video information captured in at least two historical time periods, so that the background images corresponding to the video information captured in at least two historical time periods can be fused to obtain a reference background image for device anomaly detection, thereby eliminating the interference of sudden events in a certain period on anomaly detection and avoiding false detection.

[0038] In some implementations, step S102 includes: performing background image analysis on the pixels in the video information based on the background extraction model corresponding to the video information to obtain the background image corresponding to the video information. The background extraction model includes multiple Gaussian mixture models, which are used to perform background analysis on the pixels in the video information.

[0039] For example, a Gaussian mixture model is determined for each pixel in the video information to obtain a background image analysis model, so as to analyze the pixel value of each pixel in the video frame, determine the set of background pixels that make up the background image, and improve the accuracy of background extraction.

[0040] In some implementations, background image analysis is performed on the pixels in the video information based on the background extraction model corresponding to the video information to obtain the background image corresponding to the video information. This includes: selecting a target video frame in the video information and obtaining the pixel value corresponding to each target pixel in the target video frame; for each target pixel contained in the target video frame, performing background classification on the target pixel value based on the Gaussian mixture model corresponding to the target pixel and the pixel value corresponding to the target pixel to obtain the background classification result of the target pixel; and obtaining the background image corresponding to the video information based on the background classification result of each target pixel contained in the target video frame.

[0041] For example, a target video frame is selected from the video information. The target video frame can be randomly selected from the video information or selected from the video information based on certain rules; no limitation is made here. The target pixel is a pixel in the target video frame.

[0042] For example, the pixel value of the target pixel can be the gray value of the target pixel. Calculating using the gray value reduces the computational load of background image analysis and improves detection efficiency.

[0043] For example, a corresponding Gaussian mixture model is applied to each target pixel in the target video frame. That is, the target pixel is classified into background based on the Gaussian mixture model corresponding to each target pixel to determine whether the target pixel belongs to the background pixel, so as to obtain the background image based on the background pixel and improve the accuracy of the obtained background image.

[0044] In some implementations, multiple Gaussian mixture models each include at least one Gaussian distribution. Based on the Gaussian mixture model corresponding to the target pixel and the pixel value corresponding to the target pixel, background classification is performed on the target pixel value to obtain the background classification result of the target pixel. This includes: if there is a target Gaussian distribution in the Gaussian mixture model corresponding to the target pixel whose mean is less than or equal to the pixel value of the target pixel, then the background classification result of the target pixel is determined to be a background pixel; if there is no target Gaussian distribution in the Gaussian mixture model corresponding to the target pixel whose mean is less than or equal to the pixel value of the target pixel, then the background classification result of the target pixel is determined to be a foreground pixel.

[0045] For example, the Gaussian distribution, also known as the normal distribution, is used because its distribution curve exhibits characteristics of concentration, symmetry, and uniform variation. Since the pixel values ​​of background pixels in video information typically fluctuate within a certain range, the probability density of these pixel values ​​can be represented using a Gaussian distribution. Specifically, if the difference between a pixel value and the mean of the Gaussian distribution is less than or equal to a preset value, it indicates that the pixel value is concentrated around a specific value, and the pixel can be considered a background pixel. Conversely, if the difference between a pixel value and the mean of the Gaussian distribution is greater than a preset value, it indicates that the pixel value does not change regularly, and the pixel can be considered not a background pixel.

[0046] For example, since the scene in which the target pixel is located may involve repeated changes in pixel values, such as swaying leaves, rippling water, or electronic billboards, if only a single Gaussian distribution is used for matching each pixel, pixels that cause these changes may be excluded from the background pixels, resulting in errors in the determined background image. Therefore, a Gaussian mixture model that includes multiple Gaussian distributions is used to make the background image extracted by the background extraction model more accurate.

[0047] For example, target pixels can be classified based on the target Gaussian distribution according to the following formula. Specifically, if the relationship between the pixel value of a target pixel and the target Gaussian distribution conforms to the following formula, the target pixel is determined as a background pixel; otherwise, if there is no target Gaussian distribution whose relationship with the pixel value of the target pixel conforms to the following formula, the target pixel is determined as a foreground pixel.

[0048]

[0049] Among them, X t μ represents the pixel value of the target pixel. i Let represent the mean of the Gaussian distribution of the i-th target. This is a preset value. τ represents the variance of the Gaussian distribution of the i-th target. The value of τ can be set according to actual needs, for example, it can be set to 2.5, and there is no limit here.

[0050] In some implementations, the Gaussian distribution corresponding to the Gaussian mixture model in the background extraction model can be determined by the following steps S201-S204, wherein the video information is divided into a first historical video frame and a second historical video frame. Understandably, the target video frame does not belong to the first historical video frame or the second historical video frame.

[0051] Step S201: Determine multiple initial Gaussian distributions corresponding to the Gaussian mixture model based on the first pixel value of the first historical video frame.

[0052] For example, historical video frames are divided into first historical video frames and second historical video frames. The initial Gaussian distribution model of each Gaussian mixture model is determined through the first historical video frame, and then the initial Gaussian distribution model is adjusted through the second historical video frame to obtain the target Gaussian distribution model corresponding to each Gaussian mixture model, so as to obtain a Gaussian mixture model that can accurately reflect the distribution of pixel values.

[0053] For example, a Gaussian mixture model can be represented by the following formula:

[0054]

[0055]

[0056]

[0057] Where p(x) t η(x) represents the probability density of a Gaussian mixture model; k is an integer representing the number of initial Gaussian distributions in each Gaussian mixture model, typically 3 ≤ k ≤ 5; t ,μ i,t ,τ i,t Let x be the initial Gaussian distribution of the pixel at time t. t μ represents the pixel value at time t. i,t Let τ represent the mean of the initial Gaussian distribution. i,t This represents the covariance matrix of the initial Gaussian distribution; w represents the variance of the initial Gaussian distribution. i,t This represents the weights of the initial Gaussian distribution in the Gaussian mixture model, where I is the three-dimensional identity matrix.

[0058] For example, since the Gaussian distribution in the Gaussian mixture model is determined by the mean, variance, and weight, the multiple initial Gaussian distributions corresponding to the Gaussian mixture model can be determined based on the first pixel value of the first historical video frame. This can be done by determining the mean and variance of K initial Gaussian distributions based on the first pixel value of the first historical video frame and assigning preset weights to the K initial Gaussian distributions.

[0059] For example, the preset weight value can be 1 / K, so that the sum of each preset weight is 1, and then the weight is adjusted according to the pixel value of the second historical video frame. The value of K can be set according to actual needs, for example, 3 to 5 initial Gaussian distributions can be predetermined based on the first historical video frame, which is not limited here.

[0060] Step S202: If there is an initial Gaussian distribution in the Gaussian mixture model that matches the second pixel value of the second historical video frame, increase the weight of the initial Gaussian distribution that matches the second pixel value according to the preset learning rate, update the mean and variance of the initial Gaussian distribution according to the second pixel value, and decrease the weight of the initial Gaussian distribution that does not match the second pixel value according to the learning rate.

[0061] For example, the initial Gaussian distribution determined based on the first historical video frame is usually less accurate and needs to be adjusted based on the second historical video frame to obtain a Gaussian mixture model that can more accurately reflect the probability density distribution of the pixel values ​​of the corresponding pixels.

[0062] For example, the second pixel value of a pixel in the second historical video frame is obtained, and the second pixel value is matched with the initial Gaussian distribution of the corresponding pixel. For example, the second pixel value is compared with the mean of each initial Gaussian distribution. If the difference between the second pixel value and the mean of each initial Gaussian distribution is less than or equal to a preset value, then the second pixel value is considered to match the initial Gaussian distribution.

[0063] For example, if an initial Gaussian distribution matching the second pixel value exists in the Gaussian mixture model, the weight of the initial Gaussian distribution matching the second pixel value is increased according to a preset learning rate, and the mean and variance of the initial Gaussian distribution are updated according to the second pixel value. Specifically, the mean and variance of the initial Gaussian distribution can be updated based on the following formula:

[0064] ρ=α*η(X t |μ k , σ k )

[0065] μ t =(1-ρ)*μ t-1 +ρ*X t

[0066]

[0067] Where ρ represents the update rate, η(X) t |μ k , σ k Let X represent the probability density of the k-th Gaussian distribution at time t. t This represents the second pixel value that matches the initial Gaussian distribution, α represents the preset learning rate, and μ... t μ represents the mean of the updated Gaussian distribution. t-1 This represents the mean of the Gaussian distribution before the update; This represents the variance of the updated Gaussian distribution. The variance of the Gaussian distribution before the update is represented; the superscript T indicates matrix transpose.

[0068] For example, for an initial Gaussian distribution in the Gaussian mixture model that does not match the second pixel value, the weight of the initial Gaussian distribution that does not match the second pixel value is reduced according to a preset learning rate. Specifically, the weights of each initial Gaussian distribution are adjusted according to the following formula:

[0069] w k,t = (1-α)*w k,t-1 +α*M k,t

[0070] Among them, w k,t w represents the updated weights. k,t-1 M represents the weights before the update, α represents the learning rate; k,t M is used to indicate the matching status of the second pixel value with the initial Gaussian distribution. If the second pixel value matches the initial Gaussian distribution, then M... k,t =1, if the second pixel value does not match the initial Gaussian distribution, then M k,t =0.

[0071] For example, after updating the weights of each initial Gaussian distribution, the weights of each initial Gaussian distribution need to be normalized so that the sum of the adjusted weights of each initial Gaussian distribution is 1. This will not be elaborated here.

[0072] Step S203: If there is no initial Gaussian distribution in the Gaussian mixture model that matches the second pixel value, replace the initial Gaussian distribution with the smallest weight in the Gaussian mixture model according to the second pixel value.

[0073] For example, if there is no initial Gaussian distribution in the Gaussian mixture model that matches the second pixel value, it means that none of the current initial Gaussian distributions in the Gaussian mixture model can accurately reflect the second pixel value. Based on the second pixel value, the initial Gaussian distribution with the smallest weight in the Gaussian mixture model is replaced.

[0074] Specifically, the second pixel value is replaced with the mean of the initial Gaussian distribution with the smallest weight, and a larger variance is determined for the initial Gaussian distribution based on a preset value, so that the value of the variance can be gradually adjusted to make it closer to the accuracy.

[0075] Step S204: Determine the target Gaussian distribution corresponding to each Gaussian mixture model based on the weights and variances of each initial Gaussian distribution in the same Gaussian mixture model.

[0076] For example, since the smaller the variance of a Gaussian distribution, the more concentrated its distribution curve is, the embodiments of this application select an initial Gaussian distribution with a larger weight and a smaller variance as the target Gaussian distribution in order to determine a Gaussian distribution that matches the pixel points better and has a more concentrated probability distribution, thereby improving the accuracy of subsequent determination of background pixel points.

[0077] Specifically, according to w / σ 2 Sort the initial Gaussian distributions and select the top B initial Gaussian distributions as the target Gaussian distribution. The value of B can be determined by the following formula:

[0078]

[0079] The parameter T represents the proportion of the background. The value of T can be set according to actual needs. Usually, it is 0.7≤T≤0.8, but it is not limited to this.

[0080] For example, by using the method provided in the above embodiments to determine the multiple target Gaussian distributions in the Gaussian mixture model corresponding to each pixel, errors in background image extraction can be prevented due to the presence of repeatedly changing elements such as swaying leaves, water ripples, and electronic billboards in the target area captured by the monitoring device to be detected, thereby improving the accuracy of background extraction.

[0081] Step S103: Perform image fusion processing on the background images corresponding to the video information captured in at least two historical time periods to obtain a background reference image.

[0082] For example, since video information captured in multiple historical time periods is obtained and background images corresponding to the video information captured in multiple historical time periods are extracted, the background images are fused to eliminate random interference in the background images and improve the fault tolerance and anti-interference ability of subsequent anomaly detection.

[0083] In some implementations, step S103 includes: acquiring background images corresponding to video information captured in at least two historical time periods; performing an AND operation on the pixel values ​​of pixels located at the same position in the acquired at least two background images to obtain a fused background image; and performing image erosion processing on the fused background image to obtain a background reference image.

[0084] For example, the background image can be a binary image with pixel values ​​of 0 or 255. A pixel value of 255 represents a background pixel, and a pixel value of 0 represents a foreground pixel. A bitwise AND operation is performed on the pixel values ​​of corresponding pixels in at least two background images. If the pixel is a background pixel in both background images, then the pixel is determined to be a background pixel in the fused background image; otherwise, the pixel is determined to be a foreground pixel.

[0085] In some implementations, the fused background image is subjected to image erosion processing using a preset kernel function to obtain a reference background image. The kernel function can be, for example, the matrix shown below, but it is not limited to this. The kernel function can be set according to actual needs.

[0086]

[0087] For example, since the reference background image is obtained by fusing background images taken in multiple historical periods, the fused background image may contain a lot of noise. Image erosion processing is used to filter the noise in the fused background image, reduce the impact of image noise, and improve the accuracy of the reference background image.

[0088] Step S104: Determine whether there is any abnormality in the monitoring equipment based on the background reference image and the background image corresponding to the video information captured in the current time period.

[0089] For example, the background image corresponding to the video information captured in the current time period is compared with the background image obtained by fusing the background images corresponding to the video information captured in at least two historical time periods. Based on the number of similar pixels in the two images, it is determined whether there is an anomaly in the monitoring device.

[0090] In some implementations, step S104 includes: determining the first number of background pixels in the background reference image; comparing each pixel in the background image and the background image corresponding to the video information captured in the current time period at the same position to determine the second number of pixels with the same pixel value; and determining whether the monitoring device is abnormal based on the ratio between the second number of pixels and the first number of pixels and a preset pixel ratio threshold.

[0091] For example, by comparing the pixel values ​​of the same position in the baseline background image and the background image corresponding to the video information captured in the current time period, the similarity between the baseline background image and the background image corresponding to the video information captured in the current time period is obtained, so as to determine whether there is an anomaly in the monitoring device based on the similarity.

[0092] For example, both the baseline background image and the background image corresponding to the video information captured in the current time period are binary images, where the pixel value of the background pixels is 255 and the pixel value of the foreground pixels is 0. By setting the image to binary, the computational load of anomaly detection is reduced, and the detection efficiency is improved.

[0093] For example, the pixel values ​​of the pixels at the system location in the reference background image and the background image corresponding to the video information captured in the current time period are compared to determine the number of second pixels of pixels with the same pixel value.

[0094] For example, both the reference background image and the second background image are binarized images. If the pixel values ​​of corresponding pixels are both 225 or both are 0, then the pixels are the same.

[0095] For example, an anomaly in the monitoring device is determined based on whether the ratio of the number of second pixels to the number of first pixels is less than a preset pixel ratio threshold. The second background image is not required to be exactly the same as the reference background image, and a certain degree of error is allowed, which improves the fault tolerance rate of the monitoring device in detecting anomalies and avoids false detections.

[0096] This application embodiment acquires video information captured by the monitoring device in at least two historical time periods, and also acquires video information captured by the monitoring device in the current time period. It extracts the background from the video information captured in the at least two historical time periods and the background from the video information captured in the current time period, respectively, to obtain background images corresponding to the video information captured in the at least two historical time periods and the background image corresponding to the video information captured in the current time period. It then performs image fusion processing on the background images corresponding to the video information captured in the at least two historical time periods to obtain a background reference image. Based on the background reference image and the background image corresponding to the video information captured in the current time period, it determines whether the monitoring device has any abnormalities. This reduces the implementation cost of anomaly detection for monitoring devices, minimizes the impact of environmental interference on anomaly detection, and avoids false detections.

[0097] Please see Figure 3 , Figure 3 This is a schematic flowchart illustrating a device anomaly detection method provided in an embodiment of this application.

[0098] like Figure 3 As shown, the monitoring device acquires video information captured in at least two historical time periods and the current time period, and extracts the background images corresponding to the video information. The background images corresponding to the video information captured in at least two historical time periods are fused to obtain a reference background image. The reference background image is compared with the background image corresponding to the video information captured in the current time period to obtain the detection result of the monitoring device, so as to determine whether the monitoring device is obstructed or has other abnormalities.

[0099] Please see Figure 4 , Figure 4 This is a schematic diagram of a device for detecting device malfunctions according to an embodiment of this application. The device for detecting device malfunctions can be configured in a server or terminal to execute the aforementioned device malfunction detection method.

[0100] like Figure 4 As shown, the device anomaly detection device includes: a video information acquisition module 110, a background image extraction module 120, a background image fusion module 130, and a background image comparison module 140.

[0101] The video information acquisition module 110 is used to acquire video information captured by the monitoring device in at least two historical time periods, and to acquire video information captured by the monitoring device in the current time period;

[0102] Background image extraction module 120 is used to extract the background from video information captured in at least two historical time periods and the background from video information captured in the current time period, respectively, to obtain background images corresponding to video information captured in at least two historical time periods and background images corresponding to video information captured in the current time period.

[0103] Background image fusion module 130 is used to perform image fusion processing on background images corresponding to video information captured in at least two historical time periods to obtain a background reference image;

[0104] Background image comparison module 140 is used to determine whether the monitoring device has any abnormalities based on the background reference image and the background image corresponding to the video information captured in the current time period.

[0105] For example, the background image extraction module 120 includes a background image analysis module.

[0106] The background image analysis module is used to perform background image analysis on the pixels in the video information based on the background extraction model corresponding to the video information, so as to obtain the background image corresponding to the video information. The background extraction model includes multiple Gaussian mixture models, which are used to perform background analysis on the pixels in the video information.

[0107] For example, the background image analysis module includes: a pixel value acquisition module, a pixel classification module, and a classification result determination module.

[0108] The pixel value acquisition module is used to select a target video frame in the video information and acquire the pixel value corresponding to each target pixel in the target video frame.

[0109] The pixel classification module is used to classify the background of each target pixel in the target video frame based on the Gaussian mixture model corresponding to the target pixel and the pixel value corresponding to the target pixel, so as to obtain the background classification result of the target pixel.

[0110] The classification result determination module is used to obtain the background image corresponding to the video information based on the background classification result of each target pixel contained in the target video frame.

[0111] For example, the pixel classification module includes: a background pixel determination module and a foreground pixel determination module.

[0112] The background pixel determination module is used to determine the background classification result of the target pixel as a background pixel if there is a target Gaussian distribution in the Gaussian mixture model corresponding to the target pixel whose mean is less than or equal to the pixel value of the target pixel.

[0113] The foreground pixel determination module is used to determine the background classification result of the target pixel as a foreground pixel if there is no target Gaussian distribution in the Gaussian mixture model corresponding to the target pixel whose difference between the mean of the Gaussian distribution and the pixel value of the target pixel is less than or equal to a preset value.

[0114] For example, the classification result determination module includes a pixel binarization module.

[0115] The pixel binarization module is used to binarize the target video frame according to the background classification result of each target pixel contained in the target video frame, so as to obtain the background image corresponding to the video information.

[0116] For example, the background image fusion module includes a background image acquisition module, an image fusion processing module, and a background image erosion module.

[0117] The background image acquisition module is used to acquire background images corresponding to video information captured in at least two of the historical time periods.

[0118] The image fusion processing module is used to perform a bitwise AND operation on the pixel values ​​of pixels located at the same position in at least two acquired background images to obtain a fused background image;

[0119] The background image erosion module is used to perform image erosion processing on the fused background image to obtain the background reference image.

[0120] For example, the background image comparison module includes a first pixel count determination module, a second pixel count determination module, and a pixel percentage determination module.

[0121] The first pixel quantity determination module is used to determine the first pixel quantity of the background pixel points in the background reference image;

[0122] The second pixel count determination module is used to compare each pixel in the same position in the background reference image and the background image corresponding to the video information captured in the current time period, and determine the second pixel count of the pixels with the same pixel value.

[0123] The pixel ratio determination module is used to determine whether the monitoring device has any abnormalities based on the ratio between the number of the second pixels and the number of the first pixels and a preset pixel ratio threshold.

[0124] The methods of this application can be used in a wide variety of general-purpose or special-purpose computing system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0125] For example, the above method can be implemented as a computer program, which can be used in, for example... Figure 5 It runs on the computer device shown.

[0126] Please see Figure 5 , Figure 5 This is a schematic block diagram illustrating the structure of a computer device provided in an embodiment of this application. The computer device may be a server or a terminal.

[0127] like Figure 5 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a storage medium and internal memory.

[0128] The storage medium may store an operating system and a computer program. This computer program includes program instructions that, when executed, cause the processor to perform any device anomaly detection method.

[0129] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0130] Internal memory provides an environment for the execution of computer programs stored in the storage medium. When these computer programs are executed by the processor, the processor can perform any device anomaly detection method.

[0131] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0132] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0133] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps:

[0134] Acquire video information captured by the monitoring device in at least two historical time periods, and acquire video information captured by the monitoring device in the current time period;

[0135] The background is extracted from video information captured in at least two historical time periods and the background is extracted from video information captured in the current time period to obtain background images corresponding to video information captured in at least two historical time periods and background images corresponding to video information captured in the current time period.

[0136] Image fusion processing is performed on the background images corresponding to video information captured in at least two of the historical time periods to obtain a background reference image;

[0137] Based on the background reference image and the background image corresponding to the video information captured in the current time period, it is determined whether the monitoring equipment is abnormal.

[0138] In one embodiment, the processor, when extracting the background image of the video information based on the following method, is used to implement:

[0139] In one embodiment, the processor, when implemented, is used to:

[0140] Based on the background extraction model corresponding to the video information, background image analysis is performed on the pixels in the video information to obtain the background image corresponding to the video information. The background extraction model includes multiple Gaussian mixture models, which are used to perform background analysis on the pixels in the video information.

[0141] In one embodiment, when the processor implements the background extraction model based on the video information to perform background image analysis on the pixels in the video information and obtain the background image corresponding to the video information, it is configured to:

[0142] Select a target video frame from the video information and obtain the pixel value corresponding to each target pixel in the target video frame;

[0143] For each target pixel contained in the target video frame, based on the Gaussian mixture model corresponding to the target pixel and the pixel value corresponding to the target pixel, the background classification of the target pixel is performed to obtain the background classification result of the target pixel;

[0144] Based on the background classification results of each target pixel contained in the target video frame, the background image corresponding to the video information is obtained.

[0145] In one embodiment, when the processor implements the plurality of Gaussian mixture models, each including at least one Gaussian distribution, and performs background classification on the target pixel value based on the Gaussian mixture model corresponding to the target pixel and the pixel value corresponding to the target pixel to obtain the background classification result of the target pixel, it is used to implement:

[0146] If, in the Gaussian mixture model corresponding to the target pixel, there exists a target Gaussian distribution whose mean is less than or equal to the pixel value of the target pixel, then the background classification result of the target pixel is determined to be a background pixel.

[0147] If there is no target Gaussian distribution in the Gaussian mixture model corresponding to the target pixel whose difference between the mean of the Gaussian distribution and the pixel value of the target pixel is less than or equal to a preset value, then the background classification result of the target pixel is determined to be a foreground pixel.

[0148] In one embodiment, when the processor obtains the background image corresponding to the video information based on the background classification result of each target pixel contained in the target video frame, it is configured to:

[0149] Based on the background classification result of each target pixel in the target video frame, the target video frame is binarized to obtain the background image corresponding to the video information.

[0150] In one embodiment, when the processor performs image fusion processing on the background images corresponding to video information captured in at least two historical time periods to obtain a background reference image, it is configured to:

[0151] Obtain background images corresponding to video information captured in at least two of the historical time periods;

[0152] Perform a bitwise AND operation on the pixel values ​​of pixels located at the same position in the at least two acquired background images to obtain a fused background image;

[0153] The fused background image is subjected to image erosion processing to obtain the background reference image.

[0154] In one embodiment, when the processor determines whether the monitoring device is abnormal based on the background reference image and the background image corresponding to the video information captured in the current time period, it is configured to:

[0155] Determine the first number of background pixels in the background reference image;

[0156] Compare each pixel at the same position in the background reference image and the background image corresponding to the video information captured in the current time period to determine the number of second pixels with the same pixel value;

[0157] Based on the ratio between the number of the second pixels and the number of the first pixels, and a preset pixel ratio threshold, it is determined whether the monitoring device is abnormal.

[0158] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the above-described equipment anomaly detection can be referred to the corresponding process in the aforementioned equipment anomaly detection method embodiments, and will not be repeated here.

[0159] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, and the method implemented when the program instructions are executed can refer to various embodiments of the device anomaly detection method of this application.

[0160] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.

[0161] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0162] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. It should be noted that, herein, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0163] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above descriptions are merely specific implementations of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for detecting equipment malfunctions, characterized in that, The method includes: Acquire video information captured by the monitoring device in at least two historical time periods, and acquire video information captured by the monitoring device in the current time period; The background is extracted from video information captured in at least two historical time periods and the background is extracted from video information captured in the current time period to obtain background images corresponding to video information captured in at least two historical time periods and background images corresponding to video information captured in the current time period. Image fusion processing is performed on the background images corresponding to video information captured in at least two of the historical time periods to obtain a background reference image; Based on the background reference image and the background image corresponding to the video information captured in the current time period, determine whether the monitoring equipment is abnormal; The background image of the video information is extracted using the following method: Based on the background extraction model corresponding to the video information, background image analysis is performed on the pixels in the video information to obtain the background image corresponding to the video information. The background extraction model includes multiple Gaussian mixture models, which are used to perform background analysis on the pixels in the video information, and the Gaussian mixture model is determined for each pixel in the video information. The step of using a background extraction model based on the video information to perform background image analysis on the pixels in the video information to obtain the background image corresponding to the video information includes: Select a target video frame from the video information and obtain the pixel value corresponding to each target pixel in the target video frame; For each target pixel contained in the target video frame, the background classification of the target pixel value is performed based on the Gaussian mixture model corresponding to the target pixel and the pixel value corresponding to the target pixel, so as to obtain the background classification result of the target pixel. Based on the background classification result of each target pixel contained in the target video frame, the background image corresponding to the video information is obtained; The step of determining whether the monitoring device is abnormal based on the background reference image and the background image corresponding to the video information captured in the current time period includes: Determine the first number of background pixels in the background reference image; Compare each pixel at the same position in the background reference image and the background image corresponding to the video information captured in the current time period to determine the number of second pixels with the same pixel value; Based on the ratio between the number of the second pixels and the number of the first pixels, and a preset pixel ratio threshold, it is determined whether the monitoring device is abnormal; The video information includes a first historical video frame and a second historical video frame, and the Gaussian distribution corresponding to the Gaussian mixture model in the background extraction model includes: Based on the first pixel value of the first historical video frame, determine multiple initial Gaussian distributions corresponding to the Gaussian mixture model; If there exists an initial Gaussian distribution in the Gaussian mixture model that matches the second pixel value of the second historical video frame, the weight of the initial Gaussian distribution that matches the second pixel value is increased according to a preset learning rate, and the mean and variance of the initial Gaussian distribution are updated according to the second pixel value, and the weight of the initial Gaussian distribution that does not match the second pixel value is decreased according to the learning rate. If there is no initial Gaussian distribution in the Gaussian mixture model that matches the second pixel value, the initial Gaussian distribution with the smallest weight in the Gaussian mixture model is replaced according to the second pixel value; Based on the weights and variances of each initial Gaussian distribution in the same Gaussian mixture model, the target Gaussian distribution corresponding to each Gaussian mixture model is determined.

2. The equipment anomaly detection method according to claim 1, characterized in that, Each of the multiple Gaussian mixture models includes at least one Gaussian distribution. The background classification of the target pixel value based on the Gaussian mixture model corresponding to the target pixel and the pixel value corresponding to the target pixel, to obtain the background classification result of the target pixel, includes: If, in the Gaussian mixture model corresponding to the target pixel, there exists a target Gaussian distribution whose mean is less than or equal to the pixel value of the target pixel, then the background classification result of the target pixel is determined to be a background pixel. If there is no target Gaussian distribution in the Gaussian mixture model corresponding to the target pixel whose difference between the mean of the Gaussian distribution and the pixel value of the target pixel is less than or equal to a preset value, then the background classification result of the target pixel is determined to be a foreground pixel.

3. The equipment anomaly detection method according to claim 1, characterized in that, The process of obtaining the background image corresponding to the video information based on the background classification result of each target pixel contained in the target video frame includes: Based on the background classification result of each target pixel in the target video frame, the target video frame is binarized to obtain the background image corresponding to the video information.

4. The equipment anomaly detection method according to claim 1, characterized in that, The step of performing image fusion processing on the background images corresponding to video information captured in at least two historical time periods to obtain a background reference image includes: Obtain background images corresponding to video information captured in at least two of the historical time periods; Perform a bitwise AND operation on the pixel values ​​of pixels located at the same position in the at least two acquired background images to obtain a fused background image; The fused background image is subjected to image erosion processing to obtain the background reference image.

5. A device for detecting equipment malfunctions, characterized in that, The equipment anomaly detection device includes: The video information acquisition module is used to acquire video information captured by the monitoring device in at least two historical time periods, and to acquire video information captured by the monitoring device in the current time period; The background image extraction module is used to extract the background from video information captured in at least two historical time periods and the background from video information captured in the current time period, respectively, to obtain background images corresponding to video information captured in at least two historical time periods and background images corresponding to video information captured in the current time period. The background image fusion module is used to perform image fusion processing on the background images corresponding to video information captured in at least two historical time periods to obtain a background reference image. The background image comparison module is used to determine whether the monitoring device is abnormal based on the background reference image and the background image corresponding to the video information captured in the current time period. The background image of the video information is extracted using the following method: Based on the background extraction model corresponding to the video information, background image analysis is performed on the pixels in the video information to obtain the background image corresponding to the video information. The background extraction model includes multiple Gaussian mixture models, which are used to perform background analysis on the pixels in the video information, and the Gaussian mixture model is determined for each pixel in the video information. The step of determining whether the monitoring device is abnormal based on the background reference image and the background image corresponding to the video information captured in the current time period includes: Determine the first number of background pixels in the background reference image; Compare each pixel at the same position in the background reference image and the background image corresponding to the video information captured in the current time period to determine the number of second pixels with the same pixel value; Based on the ratio between the number of the second pixels and the number of the first pixels, and a preset pixel ratio threshold, it is determined whether the monitoring device is abnormal; The video information includes a first historical video frame and a second historical video frame, and the Gaussian distribution corresponding to the Gaussian mixture model in the background extraction model includes: Based on the first pixel value of the first historical video frame, determine multiple initial Gaussian distributions corresponding to the Gaussian mixture model; If there exists an initial Gaussian distribution in the Gaussian mixture model that matches the second pixel value of the second historical video frame, the weight of the initial Gaussian distribution that matches the second pixel value is increased according to a preset learning rate, and the mean and variance of the initial Gaussian distribution are updated according to the second pixel value, and the weight of the initial Gaussian distribution that does not match the second pixel value is decreased according to the learning rate. If there is no initial Gaussian distribution in the Gaussian mixture model that matches the second pixel value, the initial Gaussian distribution with the smallest weight in the Gaussian mixture model is replaced according to the second pixel value; Based on the weights and variances of each initial Gaussian distribution in the same Gaussian mixture model, the target Gaussian distribution corresponding to each Gaussian mixture model is determined.

6. A computer device, characterized in that, The computer device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the steps of the device anomaly detection method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the device anomaly detection method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Intelligent mass surveillance video analysis system

    CN103279493A

  • Method and device for detecting faults of monitoring equipment

    CN110769246A

  • Method and system for reconstructing and identifying double-yellow traffic markings based on video analysis

    CN111368742A