A distributed monitoring video stream exception processing method and system based on RAID
Through the distributed monitoring video stream exception handling method based on RAID, combined with microservice architecture and OpenCV, the security risks and data availability problems of the monitoring video stream storage system are solved, and more efficient video stream exception handling and notification capabilities are achieved, improving the Trusted and available levels of overall security services.
Patent Information
- Application Number
- CN202411077160.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-07
AI Technical Summary
The existing surveillance video streaming storage systems have security risks, insufficient data availability, and lack of effective exception handling and notification capabilities, resulting in lost or abnormal video recordings, affecting work efficiency and security.
Adopt a distributed monitoring video stream exception handling method based on RAID, and realizes data redundancy and failure recovery through RAID5 array and microservice architecture, and combines OpenCV to monitor and handle video stream exceptions to provide full-link guarantee and custom exception judgment. Supports distributed high availability deployment and multiple notification mechanisms.
It improves the security and availability of monitoring video streams, ensures that data is not lost, enhances the effect of video stream exception handling and system stability, supports flexible deployment and custom exception handling, and realizes more efficient video stream monitoring services.
Smart Images

Figure CN118612418B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a disk storage RAID array storage data processing technology, and in particular to a distributed monitoring video stream exception processing method based on RAID. Background Art
[0002] With the increasing demand for security from individuals and enterprises, the popularity of surveillance has brought people a sense of security, but at the same time, there are some overlooked issues regarding the security and stability of the surveillance itself. For example, after something happens, the relevant inspectors check the surveillance video for evidence and find that the surveillance video is missing or the recording is abnormal, which makes it difficult to solve the case that can obtain favorable evidence for judgment because there is no video evidence. This situation greatly affects work efficiency and also brings great security risks.
[0003] In order to solve the abnormal processing, judgment and problem solving of surveillance video streams, there are already some basic methods and functions. For example, many camera manufacturers support cloud disk storage and NAS storage. They mainly solve the security problems of video storage and ensure the availability of video. However, there are also some disadvantages, mainly in the following aspects:
[0004] First, cloud storage is equivalent to storing the monitoring content on the cloud. For some sensitive areas, such as highly confidential areas, some confidential information may be seen in the monitoring. There is a risk of information leakage when storing it on the cloud. Because the data is transmitted through the network, the confidential department is generally not connected to the external network within the intranet, so there are limitations. Secondly, after being stored on the network, the security of the data will be the responsibility of the relevant cloud storage company, and the security of highly confidential areas will not be guaranteed.
[0005] Secondly, NAS storage generally only supports a single data disk to store surveillance videos. If there is a problem with the NAS, the retained video data will also be burned.
[0006] Third, there is currently no complete set of video stream exception processing monitoring system to inspect abnormal monitoring video streams, resulting in some monitoring videos being unusable after being recorded, which wastes both time and space without any practical value.
[0007] Fourth, when the surveillance video stream is abnormal, the existing systems have no effective notification capabilities and no self-repair capabilities, resulting in a long gap between the surveillance video anomaly and the personnel discovering the anomaly, which may lead to the loss of key information.
[0008] Therefore, the current technical methods and systems cannot completely solve the security and availability issues of surveillance video streams, and further improvements and innovations are needed to solve the problems of surveillance video stream anomalies. Summary of the invention
[0009] One of the invention purposes of the present invention is to provide a distributed monitoring video stream exception handling method and system based on RAID. The method and system utilize data distributed storage through RAID technology, so that the originally unstable video monitoring system with certain security risks is transformed into a service with higher security and stronger data availability. For the stable storage of such critical underlying data, the service architecture is specially optimized and upgraded, which is equivalent to complete protection of the entire link. Thus, after having a more stable data storage base, compared with the traditional single storage video monitoring service, the present invention can greatly improve the credibility and availability level of the overall security service. It is used for security monitoring issues in daily key areas to ensure that monitoring is available and data is not lost.
[0010] Another inventive object of the present invention is to provide a distributed monitoring video stream exception processing method and system based on RAID, the method and system respectively identify and process different exception types, and process monitoring equipment exceptions including the video stream itself, video verification exceptions, video content exceptions and custom verification exceptions based on actual needs. Therefore, the video exception monitoring of the present invention has global exception monitoring, which improves the effect of video stream exception monitoring.
[0011] Another invention purpose of the present invention is that the service is composed of a microservice architecture, supports distributed high-availability deployment, and also supports the deployment of some components. Different monitoring requirements can be reorganized in the form of building blocks, which is closer to the actual usage scenarios of customers. At the same time, there are also multiple backup services to deal with various abnormal emergencies. Compared with the architecture upgrade and optimization of traditional video surveillance services, the overall monitoring of abnormal video streams is more stable and efficient.
[0012] Another invention purpose of the present invention is to use OpenCV to acquire video streams for monitoring, and then use the system of the present invention to monitor abnormalities of the video stream, monitor video quality, interruption, etc. The image processing algorithm, motion detection algorithm and calculation of the difference between image frames are used to judge the abnormality of the frame content, making abnormal monitoring more accurate.
[0013] In order to achieve at least one of the above-mentioned invention objects, the present invention provides a distributed monitoring video stream exception processing method based on RAID, the method comprising:
[0014] Construct a RAID5 multi-disk array storage and video stream monitoring system to store monitoring video data and monitor abnormal status of video streams;
[0015] In the RAID5 multi-disk array storage, data redundancy and fault recovery services for distributed video streams are provided through the RAID5 multi-disk array;
[0016] In the video stream monitoring system, a distributed docker container is constructed in a RAID5 array, and a microservice is constructed in the distributed docker container constructed based on the RAID5 array. After acquiring the corresponding video stream, the microservice is used to construct a distributed monitoring service of the video stream by calling the exception handling method stored in the RAID5 array;
[0017] The video stream monitoring service based on the microservice performs abnormal monitoring of the corresponding video stream, and distributes and stores the abnormal video stream, and constructs an alarm service for the abnormal video stream through the microservice of the corresponding docker container.
[0018] According to one of the preferred embodiments of the present invention, the RAID5 array is constructed based on mdadm on a Linux system, all disks are mounted on a corresponding server, mdadm create is used to create RAID5 devices for multiple disks, and they are mounted on a data directory, a mapping list of the data directory and the RAID5 device of each disk is constructed as the storage root directory of the subsequent system, and automatic mounting is configured, the logic of the above-mentioned RAID5 device creation is completed in the initialization logic of the exception handling method, and multiple different types of exception handling methods are stored in the RAID5 array.
[0019] According to one of the preferred embodiments of the present invention, the method for building a microservice for monitoring the video stream abnormality in the docker container includes: using the yum package manager to create a docker in the RAID5 array, and creating a dockerfile, using the dockerfile to register the environment and resources required for the microservice, and creating a calling method for the microservice based on different video abnormality types.
[0020] According to one of the preferred embodiments of the present invention, after building a video stream monitoring system, the video stream data monitored by all monitoring devices connected to the system are obtained, and distributedly stored in the constructed RAID5 array based on the video stream type relationship, and all distributedly stored video stream data are inspected to obtain each inspected abnormal video stream data, and the abnormal video stream data is distributedly stored in the designated data directory in the corresponding RAID5 array.
[0021] According to one of the preferred embodiments of the present invention, the OpenCV library is used to acquire the video stream, the monitoring data video stream is written into the corresponding RAID5 array in real time for distributed storage, and the acquired video stream is subjected to abnormal monitoring inspection. The abnormal monitoring inspection includes: determining whether the state of the monitoring device itself is abnormal, determining whether the verification of the video stream attributes is abnormal, determining whether the video content is abnormal, and calling the corresponding microservice.
[0022] According to one of the preferred embodiments of the present invention, the abnormal inspection method includes: constructing a custom abnormal judgment logic, storing the custom abnormal judgment logic in the corresponding RAID5 array, and distributively calling the constructed custom abnormal judgment logic through the microservice to perform a custom abnormal inspection of the corresponding video stream, and distributively storing the abnormal video stream that meets the custom abnormal judgment logic.
[0023] According to one of the preferred embodiments of the present invention, the video exception processing includes:
[0024] S01, a data verification module for video stream input, verifies the size, time, and source information of the incoming video stream data, and outputs all verification abnormality type data;
[0025] S02, monitoring the online status of the traffic monitoring device itself, inserting agents into all traffic monitoring devices, and detecting the survival status of the traffic monitoring devices according to the heartbeat of each device;
[0026] S03, judging the abnormality of the video stream content, performing image processing algorithm, motion detection algorithm and calculating the difference between image frames on the acquired video stream to judge the abnormality of the frame content, and outputting the video stream data and content abnormality type of the abnormal content in the video stream;
[0027] S04, for customizing abnormal situation determination, constructing a custom abnormal rule template, and sending the custom abnormal rule template to the user, the user selects at least one video stream abnormal rule or combination according to the custom abnormal rule template, and performs abnormal determination processing according to the user's own specific requirements.
[0028] According to one of the preferred embodiments of the present invention, the notification system uses a distributed microservice to build multiple notification subsystems. When an abnormal situation is obtained, the notification system is broadcast in batches. After any notification system obtains the broadcast message, it sends a notification of the message, promptly informs the management personnel to handle it, and attaches specific abnormal content in the message for the management personnel to conduct abnormality investigation.
[0029] In order to achieve at least one of the above-mentioned invention purposes, a distributed monitoring video stream exception processing system based on RAID is provided, characterized in that the system executes the distributed monitoring video stream exception processing method based on RAID.
[0030] In order to achieve at least one of the above-mentioned invention purposes, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the above-mentioned RAID-based distributed monitoring video stream exception processing method.
[0031] In order to ensure the availability of surveillance video data, this system adopts RAID (Redundant Array of Independent Disks) technology. Surveillance video data is stored in multiple independent disks. Through data redundancy and fault tolerance mechanisms, the integrity and recoverability of video data can be guaranteed even if a disk fails. A distributed high-availability video stream monitoring system is constructed in the form of microservices, including monitoring services, alarm services, and data storage services, to improve the performance and scalability of the system, ensure that video stream data can be processed stably even under high load conditions, and relevant personnel can take timely measures to quickly respond to and handle abnormal situations. At the same time, due to the use of microservice architecture, this system has high availability characteristics. When a service node fails or is unavailable, the system can automatically switch to other available nodes to ensure the continuous operation and stability of the monitoring system. This fault-tolerant mechanism ensures the availability of the monitoring system itself, while ensuring the effective processing of monitoring data and the ability to handle exceptions.
[0032] According to one of the preferred embodiments of the present invention, a 64-disk RAID5 array storage is adopted. By using a RAID5 array of 9 + 9 + 9 + 9 + 9 + 9 + 5 + 3 + 1 + 1, the monitoring video data is distributed on multiple disks. Each disk is responsible for storing the corresponding data block, and according to the redundancy algorithm of RAID5, the redundancy and fault tolerance of the data are realized. Therefore, even if up to 3 disks fail, the system can still guarantee the availability and integrity of the monitoring video data. On the Linux operating system, this system uses the mdadm tool to build and manage the RAID5 array. Through the configuration file of mdadm, the parameters, disk allocation and redundancy of the RAID array can be set. In addition, the system also supports automatic hot-swap function, allowing disks to be dynamically added or replaced at runtime to achieve expansion or fault recovery of the RAID array.
[0033] According to another preferred embodiment of the present invention, a distributed high-availability video stream monitoring system is constructed using a microservice architecture. The architecture includes the following core components:
[0034] 1. Data storage service: The data storage service is responsible for storing surveillance video data and abnormal information. In order to provide high availability and scalability, the system uses distributed storage technology to store video data on multiple nodes. Each node has storage capacity and read and write capabilities to improve the overall performance of the system. In addition, the data storage service also provides data backup and recovery mechanisms to ensure data security and reliability. Through data redundancy and failover, data availability and integrity can be guaranteed even in the event of a single node failure.
[0035] 2. Monitoring service: Through a distributed deployment strategy, the monitoring service is deployed on multiple nodes. Each node is responsible for receiving video stream data from the monitoring device and performing real-time processing and analysis. In order to achieve load balancing and parallel processing, the system uses a load balancer to dynamically allocate monitoring tasks. This can improve the performance and scalability of the system and ensure stable processing of video stream data even under high load conditions.
[0036] 3. Alarm service: The alarm service regularly inspects the monitoring to detect whether there are any abnormalities. The system has built-in multiple image processing algorithms, motion detection algorithms, frame difference calculation and other technologies to determine the abnormality of the frame content. Once an abnormality is found, the alarm service will trigger the corresponding message reminder and send an alarm to relevant personnel through various communication methods (such as email, mobile phone text messages, DingTalk messages, etc.). In this way, relevant personnel can take timely measures to quickly respond to and handle abnormal situations.
[0037] 4. Device management and heartbeat detection: The system manages and controls monitoring devices through the device management module. Each monitoring device is assigned an independent Agent to establish a connection and exchange data with the system. The Agent will periodically send a heartbeat signal to verify the survival status of the device. If the system does not receive the heartbeat signal of the device for a long time, it will determine that the device is in an abnormal state and trigger the corresponding abnormal handling measures.
[0038] According to another preferred embodiment of the present invention, when the system detects an abnormal situation, the following abnormality handling process will be triggered:
[0039] 1. Alarm triggering: The alarm service triggers an alarm after detecting an abnormal situation through image processing algorithms, motion detection algorithms, frame difference calculation and other technologies. The alarm service will generate a corresponding abnormality report, including the abnormality type, timestamp, related device information, etc.
[0040] 2. Message reminder: The alarm service sends alarms to relevant personnel through various communication methods (such as email, mobile phone text messages, DingTalk messages, etc.). In this way, relevant personnel can receive abnormal notifications in time and take necessary measures.
[0041] 3. Exception handling: After receiving the exception notification, the relevant personnel will take corresponding measures for the abnormal situation. For example, they can remotely restart the equipment, adjust the monitoring parameters, dispatch maintenance personnel, etc. At the same time, the system will record the detailed information of the abnormal event for subsequent analysis and improvement. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 Shown is a flow chart of a distributed monitoring video stream exception processing method based on RAID of the present invention. DETAILED DESCRIPTION
[0043] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.
[0044] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.
[0045] Please refer to Figure 1 The present invention discloses a distributed monitoring video stream exception processing method and system based on RAID. The system aims to realize distributed high-availability video stream monitoring and provide an effective exception handling mechanism by adopting RAID technology and microservice architecture. The distributed monitoring video stream exception handling system based on RAID can provide data redundancy and fault tolerance mechanism to ensure the availability and integrity of monitoring video data. At the same time, the distributed high-availability video stream monitoring system is realized by adopting microservice architecture, which can realize the distributed construction of monitoring services, alarm services and data storage services. Through device management and heartbeat detection, the system can timely monitor the survival status of the device to ensure the stability of the monitoring system and the reliability of the equipment. The exception handling process can timely discover and handle abnormal situations to ensure the normal operation of the monitoring system and data security.
[0046] Specifically, first of all, in the present invention, we choose to use RAID disk array as our underlying data storage method. RAID5 is a disk array level that achieves data redundancy and fault tolerance through data striping and distributed storage of parity information. In this system, we use 64-disk RAID5 array storage. First, before the array is built, we need to prepare 64 adapted hard disk drives. These hard disk drives can be physical disks or virtual disks, depending on the system requirements and hardware configuration. Use the mdadm tool to build and manage the RAID5 array. mdadm is a powerful command line tool for managing software RAID on Linux. Use the following command to create a RAID5 array: mdadm--create / dev / md0 --level=5 --raid-devices=64 / dev / sd[ap] Once the RAID5 array is successfully created, mdadm will automatically calculate the striping and parity information of the disk, and store the data blocks on different disks. In this way, even if up to 3 disks fail, the system can still ensure the availability and integrity of the surveillance video data. If there is a disk failure or the storage capacity needs to be expanded, use the mdadm tool to perform hot-swap operations. Use the following command to add a new disk to the RAID5 array: mdadm --manage / dev / md0 --add / dev / sd[q] In this way, the storage capacity of the array can be dynamically expanded or a failed disk can be replaced at runtime to achieve expansion or fault recovery of the RAID5 array. In summary, by using the mdadm tool to build and manage RAID5 arrays, the system can provide data redundancy and fault tolerance features to ensure the availability and integrity of surveillance video data. By dynamically adding and replacing disks, the system can achieve the scalability and fault recovery capabilities of the array.
[0047] It should be noted that the present invention needs to build a microservice in docker, and use the microservice to perform abnormal monitoring of the corresponding video stream. The specific method includes the following steps: first, it is necessary to use the yum package manager to create a docker in the RAID5 array, wherein the yum package manager can obtain the files required for dockerfile creation, and the yum package manager can implement operations including data packet construction, acquisition, update and deletion, and further use the yum package manager to build a dockerfile file, and build a mirror docker based on the dockerfile, and the yum package manager can create and deploy docker in the RAID5 array in a distributed manner based on the dockerfile file. The dockerfile is used to register the environment and resources required for the microservice, and a calling method for the microservice is created based on different video abnormality types.
[0048] The present invention further acquires and processes monitoring video streams. In a distributed monitoring system, the acquisition of monitoring video streams is one of the key steps. The system acquires real-time video streams through different monitoring devices (such as cameras, network cameras, etc.) and transmits them to the monitoring service node for processing. For each monitoring device, the system will install the corresponding driver and device management software. These software are responsible for establishing a connection with the device and acquiring video stream data. Depending on the characteristics and protocols of the device, different interfaces (such as RTSP, ONVIF, etc.) can be used to acquire video streams. Once a connection is established with the monitoring device, the system will periodically read video frame data from the device and transmit it to the monitoring service node. In order to achieve efficient data transmission, a network transmission protocol (such as TCP or UDP) is used to transmit video stream data. In addition, in order to improve the reliability of the system, a redundant transmission mechanism is used to send multiple data streams. On the monitoring service node, the system uses the OpenCV library to process video stream data. First, the system reads the video stream data through OpenCV and converts it into image frames. Then, an image processing algorithm is used to enhance image quality and remove noise. Next, a motion detection algorithm is used to detect moving objects in the image. Motion detection algorithms are usually based on principles such as pixel differences or optical flow, which can identify motion occurring in the video. When motion is detected, the system can record relevant information, such as the position, size, and movement trajectory of the moving object. In addition, anomalies are detected by calculating the differences between frames. By comparing the differences in pixel values or other image features between consecutive frames, changes in image content can be identified. For example, if the difference between adjacent frames exceeds a preset threshold, it may indicate image quality degradation, object loss, or abnormal motion. The following is part of the implementation logic:
[0049] import cv2
[0050] import numpy as np
[0051] net = cv2.dnn.readNetFromCaffe('path / to / model.prototxt', 'path / to / model.caffemodel')
[0052] def process_video_stream(video_stream):
[0053] # Read video stream
[0054] cap = cv2.VideoCapture(video_stream)
[0055] while cap.isOpened():
[0056] ret, frame = cap.read()
[0057] if ret:
[0058] # Perform video processing operations
[0059] # ...
[0060] # Detecting anomalies
[0061] if is_abnormal(frame):
[0062] trigger_alarm()
[0063] else:
[0064] break
[0065] cap.release()
[0066] def is_abnormal(frame):
[0067] # Use deep learning models for object detection
[0068] blob = cv2.dnn.blobFromImage(frame, 0.007843, (300, 300), 127.5)
[0069] net.setInput(blob)
[0070] detections = net.forward()
[0071] # Determine abnormal conditions
[0072] for i in range(detections.shape[2]):
[0073] confidence = detections[0, 0, i, 2]
[0074] if confidence > 0.5:
[0075] # Abnormal objects detected
[0076] return True
[0077] return False
[0078] def trigger_alarm():
[0079] # Trigger alarms, send notifications, etc.
[0080] print("Video stream abnormal!")
[0081] The present invention further includes the alarm service and heartbeat detection. The alarm service regularly inspects the monitoring system to detect whether there are abnormal conditions. The main steps include: configuring alarm rules, defining alarm rules, including abnormal behaviors and thresholds, for triggering alarms. Obtaining real-time or historical monitoring data from the monitoring system. Using algorithms or models to analyze monitoring data, detect whether there are abnormal conditions, and if the abnormal conditions meet the alarm rules, trigger the corresponding alarm and send a notification to relevant personnel. The device management module is responsible for managing and controlling the monitoring equipment. Heartbeat detection is used in the system to verify whether the device is working properly. By regularly checking the heartbeat signal of the device, it is verified whether the device is in normal working condition. The device will send a heartbeat signal regularly to indicate that it is still active. Through heartbeat detection, device failures can be discovered in time. If the device does not send a heartbeat signal, or the heartbeat signal is not received for more than a predetermined time, it can be judged that the device is faulty or unavailable. This allows the system administrator to take timely measures, issue alarm notifications through the alarm module, and record logs or execute fault handling procedures to avoid equipment failures from causing more serious impacts on the normal operation of the system. The following is part of the implementation logic:
[0082] class DeviceManager:
[0083] def __init__(self):
[0084] self.devices = [] # Storage device list
[0085] def add_device(self, device):
[0086] # Add device to device list
[0087] self.devices.append(device)
[0088] def remove_device(self, device):
[0089] # Remove a device from the device list
[0090] self.devices.remove(device)
[0091] def start_heartbeat(self):
[0092] # Start heartbeat detection
[0093] while True:
[0094] for device in self.devices:
[0095] if not self.is_heartbeat_received(device):
[0096] self.handle_device_failure(device)
[0097] time.sleep(1) # Perform a heartbeat check once per second
[0098] def is_heartbeat_received(self, device):
[0099] # Determine whether the device has sent a heartbeat signal
[0100] # Here we use sample data, in fact, we may need to communicate with the device through the network
[0101] return device.check_heartbeat()
[0102] def handle_device_failure(self, device):
[0103] # Handling device failures
[0104] print(f"Device {device.name} failed!")
[0105] # Send notifications, record logs, perform troubleshooting, etc.
[0106] The embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. The embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by the central processing unit (CPU), the above-mentioned functions defined in the method of the present application are executed. It should be noted that the above-mentioned computer-readable medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of an electrical, magnetic, optical, electromagnetic, infrared segment, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wire segments, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, electrical wire, optical cable, RF, etc., or any suitable combination of the foregoing.
[0107] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0108] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments. Without departing from the principles, the implementation methods of the present invention may be deformed or modified in any way.
Claims
1. A distributed monitoring video stream exception processing method based on RAID, characterized in that: The method comprises: Construct a RAID5 multi-disk array storage and video stream monitoring system to store monitoring video data and monitor abnormal status of video streams; In the RAID5 multi-disk array storage, data redundancy and fault recovery services for distributed video streams are provided through the RAID5 multi-disk array; In the video stream monitoring system, a distributed docker container is constructed in a RAID5 array, and a microservice is constructed in the distributed docker container constructed based on the RAID5 array. After acquiring the corresponding video stream, the microservice is used to construct a distributed monitoring service of the video stream by calling the exception handling method stored in the RAID5 array; The video stream monitoring service based on the microservice performs abnormal monitoring of the corresponding video stream, and performs distributed processing and storage of the abnormal video stream, and constructs an alarm service for the abnormal video stream through the microservice of the corresponding docker container; The method for constructing a microservice for monitoring the video stream abnormality in the docker container includes: creating a docker in the RAID5 array using a yum package manager, creating a dockerfile, registering an environment and resources required for the microservice using the dockerfile, and creating a calling method for the microservice based on different video abnormality types; Build the RAID5 array based on mdadm on the Linux system, mount all disks on the corresponding server, use mdadm create to create a RAID5 device of multiple disks, and mount it on the data directory. Construct a mapping list of the data directory and the RAID5 device of each disk as the storage root directory of the subsequent system, and configure automatic mounting. The logic of creating the above RAID5 device is completed in the initialization logic of the exception handling method, and multiple exception handling methods of different types are stored in the RAID5 array; Use the OpenCV library to acquire the video stream, write the monitoring data video stream into the corresponding RAID5 array in real time for distributed storage, and perform abnormal monitoring inspection on the acquired video stream. The abnormal monitoring inspection includes: judging whether the state of the monitoring device itself is abnormal, judging whether the verification of the video stream attribute is abnormal, judging whether the video content is abnormal, and calling the corresponding microservice; The abnormal monitoring inspection method comprises: constructing a custom abnormal judgment logic, storing the custom abnormal judgment logic in a corresponding RAID5 array, and performing a custom abnormal inspection of a corresponding video stream by distributively calling the constructed custom abnormal judgment logic through the microservice, and distributively storing the abnormal video stream that satisfies the custom abnormal judgment logic; The video exception processing includes: S01, a data verification module for video stream input, verifies the size, time, and source information of the incoming video stream data, and outputs all verification abnormality type data; S02. Monitor the online status of the traffic monitoring device itself, insert agents into all traffic monitoring devices, and detect the survival status of the traffic monitoring device based on the heartbeat of each device; S03, determining the abnormality of the video stream content, performing image processing algorithm, motion detection algorithm and calculating the difference between image frames on the acquired video stream content to determine the abnormality of the frame content, and outputting the video stream data and content abnormality type of the abnormal video stream content; S04, for customizing abnormal situation determination, constructing a custom abnormal rule template, and sending the custom abnormal rule template to the user, the user selects at least one video stream abnormal rule or combination according to the custom abnormal rule template, and performs abnormal determination processing according to the user's own specific requirements.
2. The method for handling abnormalities of distributed surveillance video streams based on RAID according to claim 1, characterized in that: After building the video stream monitoring system, obtain the monitoring video stream data of all monitoring devices connected to the system, and store them in a distributed manner in the constructed RAID5 array based on the video stream type relationship. In addition, inspect all distributed stored video stream data, obtain each inspected abnormal video stream data, and distribute and store the abnormal video stream data in the specified data directory in the corresponding RAID5 array.
3. The method for handling abnormalities of distributed surveillance video streams based on RAID according to claim 2, characterized in that: The notification system uses distributed microservices to build multiple notification subsystems. When an abnormal situation is detected, batch broadcasts are performed on the notification system. After any notification system receives the broadcast message, it sends a message notification, promptly notifies the management personnel to handle it, and attaches specific abnormal content in the message for the management personnel to conduct abnormality investigation.
4. A distributed monitoring video stream exception processing system based on RAID, characterized in that: The system executes a RAID-based distributed surveillance video stream exception processing method according to any one of claims 1 to 3.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement a RAID-based distributed monitoring video stream exception processing method as described in any one of claims 1-3.
Citation Information
Patent Citations
Abnormal event intelligent detection system and method based on security micro-service architecture, and medium
CN113065026A
Distributed service system and method, computer equipment and storage medium
CN116455985A
Data monitoring alarm method, device and equipment and storage medium
CN116781568A
Video monitoring equipment trouble detection device
CN205160712U
Fault tolerance using shared memory architecture
IN201641021095A
