A modular target detection and analysis device and method
Through the modular design and load balancing strategy, the detection and analysis services are separated, which solves the problems of low efficiency and resource waste caused by the coupling of detection and analysis functions in the existing system, achieves efficient resource utilization and flexible configuration, and improves the system operating performance. .
Patent Information
- Application Number
- CN202111277216.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-10-29
AI Technical Summary
Due to the coupling of detection and analysis functions in existing target detection and analysis systems, detection efficiency is low, resources are wasted, configuration is inflexible, and cross-platform transplantation is difficult.
Adopting a modular design to separate detection and analysis services, through the combination of the main server and multiple detection modules and analysis modules, using load balancing strategies and lightweight network services, the decoupling and independent development of detection and analysis are realized, and multiple instances are supported. Run and scale horizontally.
It improves system resource utilization and operating efficiency, enables flexible configuration and deployment, and supports efficient service performance and fast operating speed.
Smart Images

Figure CN114119941B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent video surveillance technology, and in particular to a modular target detection and analysis device and method. Background Art
[0002] In recent years, target detection and analysis has been a hot topic in the field of intelligent video surveillance. In a large-scale, highly complex environment, the workload of relying on human eyes to judge whether the moving people and objects in the area meet certain characteristic conditions and complete the alarm is huge, and it is easy to have deviations due to subjective factors. Existing target detection and analysis systems mainly use algorithms to complete detection and realize the perception and alarm of specified characteristic conditions through certain logical judgments.
[0003] The existing moving target detection system discloses a method for identifying moving targets and judging their behavior by collecting indoor information and real-time monitoring, using computer vision and image processing technology. The method includes video collection and processing, measurement comparison, and condition discrimination, and finally realizes event alarm.
[0004] The shortcomings of this method are: it is impossible to flexibly configure the expected alarm features for the program in real time; a single program can only process a small number of video streams at the same time; since detection and analysis are coupled together, the two functions must be deployed on the same machine at the same time, which consumes a lot of resources; and it is difficult to port the program across platforms. Summary of the invention
[0005] In view of the above analysis, the embodiments of the present invention aim to provide a modular target detection and analysis device and method to solve the problems of low detection efficiency and large resource consumption caused by deploying existing detection and analysis functions on the same single machine.
[0006] On the one hand, an embodiment of the present invention provides a modular target detection and analysis system including: a main server, multiple detection modules and multiple analysis modules, wherein each of the multiple detection modules receives a video stream from the main server, detects the video stream, and uploads the detection result to the main server, wherein the detection result includes image information and data text information; the main server is used to cache the image information and transmit the data text information to multiple analysis modules based on a load balancing strategy; and each of the multiple analysis modules queries the alarm conditions of the corresponding monitoring points, traverses each detection target in the data text information to obtain a detection data queue and a judgment result queue; then traverses the alarm conditions to determine whether each detection target meets the alarm conditions, and uploads the judgment results to the main server.
[0007] The beneficial effects of the above technical solution are as follows: This application can independently develop detection and analysis services by decoupling the detection and analysis business functions, and flexibly configure the analysis business through lightweight network services to solve the problem that the detection and alarm conditions cannot be flexibly changed during coupled development. After the detection and analysis services are separated, they can be deployed on different nodes of the cluster respectively, making the system resource utilization more efficient and improving the system operation efficiency.
[0008] Based on the further improvement of the above-mentioned device, each analysis module includes a query module, a queue acquisition module and an insertion module, wherein the query module is used to query the alarm condition information of the monitoring point to which the current detection result belongs from the main server; the queue acquisition module is used to obtain the detection data queue and the judgment result queue of each detection target from Redis; and the insertion module is used to insert the data information of each detection target into the detection data queue of the corresponding target.
[0009] Based on further improvements of the above-mentioned device, each analysis module also includes: a judgment module, a marking module and a transmission module, wherein the judgment module is used to traverse each detection target in the current detection result for each alarm condition to determine whether the detection target meets the alarm condition; the marking module is used to mark the detection target judged to be true under a certain alarm condition, mark the satisfied alarm condition, and insert the judgment result into the judgment result queue of the corresponding target; and the transmission module is used to upload the judgment result to the main server.
[0010] Based on further improvement of the above device, the judgment module is also used to comprehensively judge whether the current detection result meets the alarm condition according to the judgment result history queue when a certain alarm condition requires comparison with the historical data of the detection target.
[0011] Based on further improvement of the above device, the modular target detection and analysis system also includes a registration module for establishing a WebSocket connection between the multiple detection modules and the main server, and establishing a WebSocket connection between the multiple analysis modules and the main server.
[0012] Based on further improvement of the above device, the main server also includes a storage module, wherein the storage module is used to save the video stream of the current detection result as a field record, and permanently store the judgment result uploaded to the main server.
[0013] Based on further improvements of the above-mentioned device, each analysis module also includes a trimming module, which is used to query the detection data queue and the judgment result queue, and when the detection data queue and / or the judgment result queue exceeds the specified length, the part exceeding the length is trimmed from the head of the detection data queue and / or the judgment result queue.
[0014] Based on further improvements of the above-mentioned device, the data text information includes the ID, address, screen size and detection target of the camera being analyzed, wherein the detection target includes the classification, attributes, position, size and confidence of each detection target; the classification of the detection target includes people and vehicles, wherein the vehicles include forklifts, reach stackers and forklifts; the alarm condition includes: the ID, name, description and constraint of the condition.
[0015] On the other hand, an embodiment of the present invention provides a modular target detection and analysis method including: receiving a video stream from the main server, detecting the video stream, and uploading the detection result to the main server, wherein the detection result includes image information and data text information; caching the image information, and transmitting the data text information to multiple analysis modules based on a load balancing strategy; and querying the alarm conditions of the corresponding monitoring points, traversing each detection target in the data text information to obtain a detection data queue and a judgment result queue; and traversing the alarm conditions to determine whether each detection target meets the alarm conditions, and uploading the judgment results to the main server.
[0016] Based on the further improvement of the above method, querying the alarm conditions of the corresponding monitoring points, traversing each detection target in the data text information to obtain the detection data queue and the judgment result queue further includes: querying the alarm condition information of the monitoring point to which the current detection result belongs from the main server; obtaining the detection data queue and the judgment result queue of each detection target from Redis; and inserting the data information of each detection target into the detection data queue of the corresponding target; and traversing the alarm conditions to determine whether each detection target meets the alarm conditions, and uploading the judgment results to the main server further includes: for each alarm condition, traversing each detection target in the current detection result, and determining whether the detection target meets the alarm conditions; under a certain alarm condition, marking the detection target judged to be true, marking the satisfied alarm condition, and inserting the judgment result into the judgment result queue of the corresponding target; and uploading the judgment result to the main server.
[0017] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0018] 1. The present invention decouples the detection and analysis business functions and proposes an interactive detection and analysis method. The detection and analysis business can be developed independently, and the analysis business can be flexibly configured through lightweight network services to solve the problem that the detection and alarm conditions cannot be flexibly changed during coupled development. After the detection and analysis business are separated, they can be deployed separately, making the system resource utilization more efficient and improving the system operation efficiency.
[0019] 2. The present invention adopts a modular development method, which can run the detection program and the analysis program in multiple instances, realize the horizontal expansion of service performance, and run at a fast speed. It supports the resource occupation to be shared through the load balancing strategy, realizes the flexible configuration of server resources, maximizes the use of server performance, and improves the overall performance of the service.
[0020] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings are only for the purpose of illustrating specific embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0022] Figure 1 4 is a block diagram of a modular target detection and analysis system according to an embodiment of the present invention.
[0023] Figure 2 Schematic diagram of a modular target detection and analysis system according to an embodiment of the present invention.
[0024] Figure 3 This is a diagram showing the effects of recognition, detection and analysis in a complex scenario according to an embodiment of the present invention.
[0025] Figure 4 Flow chart of a modular target detection and analysis method according to an embodiment of the present invention.
[0026] Figure 5 It is a specific flow chart of the modular target detection and analysis system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0028] A specific embodiment of the present invention discloses a modular target detection and analysis system. Figure 1 The modular target detection and analysis system includes a main server 102, multiple detection modules and multiple analysis modules, wherein each of the multiple detection modules 110, 112, ..., 114 receives a video stream from the main server to detect the video stream, and uploads the detection result to the main server, wherein the detection result includes image information and data text information corresponding to the image information; the main server 102 is used to cache the image information and transmit the data text information to the multiple analysis modules based on the load balancing strategy; and each of the multiple analysis modules 120, 122, ..., 124 queries the alarm condition of the corresponding monitoring point, traverses each detection target in the data text information to obtain a detection data queue and a judgment result queue; then traverses the alarm condition to determine whether each detection target meets the alarm condition, and uploads the judgment result to the main server.
[0029] Compared with the prior art, in the modular target detection and analysis system provided by this embodiment, the detection and analysis services can be developed independently by decoupling the detection and analysis service functions. The analysis service can be flexibly configured through lightweight network services to solve the problem that the detection and alarm conditions cannot be flexibly changed during coupled development. After the detection and analysis services are separated, they can be deployed on different nodes of the cluster respectively, making the system resource utilization more efficient and improving the system operation efficiency.
[0030] In the following, reference will be made to Figures 1 to 3 , a modular target detection and analysis system is described in detail. Figure 1 The modular target detection and analysis system includes a registration module, a main server 102, multiple detection modules and multiple analysis modules. The multiple detection modules include a first detection module 110, a second detection module 112, ..., an Nth detection module 114, where N is an integer greater than or equal to 8. For example, N is 8 to 20. The multiple analysis modules include a first analysis module 120, a second analysis module 122, ..., an Mth analysis module 124, where M is an integer greater than or equal to 180. For example, M is 180 to 300. Specifically, the modular target detection and analysis system can be implemented by multiple cluster nodes that are communicatively connected to the main server. One node can be set with one or more detection modules, and one node can be set with one or more analysis modules.
[0031] refer to Figure 1 and Figure 2The registration module is used to establish WebSocket connections between multiple detection modules and the main server, and multiple analysis modules and the main server. The WebSocket protocol is a new network protocol based on TCP. The WebSocket protocol implements full-duplex communication between the browser and the main server, allowing the main server to actively send information to the client, that is, multiple nodes in the cluster.
[0032] refer to Figure 1 and Figure 2 , each of the multiple detection modules 110, 112, ..., 114 receives a video stream from a main server, detects the video stream, and uploads the detection result to the main server, wherein the detection result includes image information and data text information corresponding to the image information, and optionally, the detection result includes data text information. Specifically, each detection module receives camera point information from the main server, the camera point information includes the video stream address, camera id, name, and screen size, performs target detection on the video stream, and optionally uploads the detection result to the main server in the form of text information. The data text information includes the id, address, screen size, and detection target of the camera being analyzed. The data information of the detection target includes the classification, attributes, location, size, and confidence of each detection target. The classification of the detection target includes people and vehicles, wherein vehicles include stackers, reach loaders, and forklifts. Attributes include safety helmets and reflective clothing.
[0033] refer to Figure 1 and Figure 2 The main server 102 is used to cache image information and transmit data text information to multiple analysis modules based on a load balancing strategy. The main server also includes a storage module, wherein the storage module is used to save the video stream of the current detection result as a field record and permanently store the judgment result uploaded to the main server. The main server records the detection results that meet the alarm conditions and notifies the staff of the alarm.
[0034] refer to Figure 1 and Figure 2 Each of the multiple analysis modules 120, 122, ..., 124 queries the configuration parameters of the corresponding monitoring point from the main server 102, and obtains the alarm condition of the point, which includes: the condition ID (that is, a unique string corresponding to an alarm condition), name, description and constraint, etc., traverses each detection target in the data text information to obtain the detection data queue and the judgment result queue; then traverses the alarm conditions to determine whether each detection target meets the alarm conditions, and uploads the judgment results to the main server.
[0035] Each analysis module includes a query module, a queue acquisition module and an insertion module. Specifically, the query module is used to query the alarm condition information of the monitoring point to which the current detection result belongs from the main server through the camera ID described by the data text information. The queue acquisition module is used to obtain the detection data queue and judgment result queue of each detection target from Redis. The insertion module is used to insert the data information of each detection target into the detection data queue of the corresponding target.
[0036] Each analysis module also includes: a judgment module, a marking module and a transmission module. Specifically, the judgment module is used to traverse each detection target in the current detection result for each alarm condition to determine whether the detection target meets the alarm condition. In addition, the judgment module is also used to comprehensively judge whether the current detection result meets the alarm condition based on the judgment result history queue when a certain alarm condition requires comparison with the historical data of the detection target. The marking module is used to mark the detection target judged to be true under a certain alarm condition, mark the satisfied alarm condition, and insert the judgment result into the judgment result queue of the corresponding target. The transmission module is used to upload the judgment result to the main server, such as Figure 3 shown.
[0037] In addition, each analysis module also includes a trimming module for querying the detection data queue and the judgment result queue, and when the detection data queue and / or the judgment result queue exceeds the specified length, trimming the part exceeding the length from the head of the detection data queue and / or the judgment result queue.
[0038] A specific embodiment of the present invention discloses a modular target detection and analysis method. Figure 4 The modular target detection and analysis method includes: in step S102, receiving a video stream from a main server to detect the video stream, and uploading the detection result to the main server, wherein the detection result includes image information and data text information; in step S104, caching the image information, and transmitting the data text information to multiple analysis modules based on a load balancing strategy; and in step S106, querying the alarm conditions of the corresponding monitoring points, traversing each detection target in the data text information to obtain a detection data queue and a judgment result queue; and in step S108, traversing the alarm conditions to determine whether each detection target meets the alarm conditions, and uploading the judgment result to the main server.
[0039] Specifically, querying the alarm conditions of the corresponding monitoring points, traversing each detection target in the data text information to obtain the detection data queue and the judgment result queue further includes: querying the alarm condition information of the monitoring point to which the current detection result belongs from the main server; obtaining the detection data queue and the judgment result queue of each detection target from Redis; and inserting the data information of each detection target into the detection data queue of the corresponding target.
[0040] Specifically, traversing the alarm conditions to determine whether each detection target meets the alarm conditions, and uploading the judgment results to the main server further includes: for each alarm condition, traversing each detection target in the current detection result to determine whether the detection target meets the alarm conditions; under a certain alarm condition, marking the detection target judged to be true, marking the satisfied alarm condition, and inserting the judgment result into the judgment result queue of the corresponding target; and uploading the judgment result to the main server.
[0041] In the following, reference Figure 2 and Figure 5 The modular target detection analysis method is described in detail by means of specific examples.
[0042] The problem to be solved by the present invention is to invent a load-balanced high-performance modular target detection and analysis method, which solves the problems of inflexible configuration and low overall service performance of traditional detection systems by separating detection and analysis business functions and modular development and application.
[0043] refer to Figure 2 and Figure 5 , the following is a specific implementation method, and the specific steps are as follows:
[0044] The following is a specific implementation method, and the specific steps are as follows:
[0045] Step 1: The detection module and the analysis module establish a WebSocket connection with the main service. For example, 8 detection modules can be set, and 180 analysis modules can be set.
[0046] Step 2: The detection module sends the detection result data to the main service. The detection result data includes image information and text information. For example, the detection module sends the detection result of the video stream to the main service in the form of text information.
[0047] Step 3: The main service caches the media information transmitted by the detection module, and sends the detection data text information to an analysis module through HTTP request based on the load balancing strategy. The text information mainly includes the ID, address, screen size and detection target of the camera being analyzed, that is, the detected object, where the detection target includes the classification, attributes, location, size, confidence, etc. of each detection target. The load balancing strategy uses PM2 to manage the Node service. This load balancing strategy has the following advantages: dynamic monitoring of file changes, 0-second hot start; load balancing of the CPU; monitoring of CPU and memory usage; automatic restart of abnormal services.
[0048] Step 4: The analysis module queries the alarm condition information of the corresponding monitoring point from the main service according to the camera ID (the information includes the ID, name, description, and constraint of each condition), and traverses each target in the detection data to obtain its detection data queue and judgment result queue. The detection data queue and judgment result queue are both implemented using redis. The detection data queue is a redis ordered array. Every time the analysis module receives a detection result text message, it pushes the data into the array, and the timestamp is used as the sorting basis of the ordered array; the judgment result queue is a redis key-value pair. After the analysis module analyzes the detection result of this time, it generates a unique index as the key based on the camera ID and the alarm condition ID, and inserts the corresponding judgment result of this time into redis as the value.
[0049] Step 4-1: The analysis module queries the alarm condition information of the monitoring point to which the current monitoring data belongs. The alarm condition includes the condition id, name, and constraint. The analysis module can obtain the alarm condition information by querying the configuration information of the monitoring point, and judge the received detection results according to the alarm condition information. For example, the alarm conditions include: people: sitting, squatting, lying; whether wearing a safety helmet, whether wearing reflective clothing; setting the time to 1 minute or 2 minutes, setting a combination of sensitive areas, etc. According to the needs of the port work area, different alarm conditions are set for the monitoring points of different cameras, so multiple analysis modules can simultaneously determine whether the detection target can meet different alarm conditions. For example, the monitoring point of camera 1: no one can be there; the monitoring point of camera 2: no one can sit; the monitoring point of camera 3: must wear a safety helmet and reflective work clothes.
[0050] Step 4-2: Read the cached detection data queue and judgment result queue from Redis for each target. Redis is an open source log-type, Key-Value database written in ANSI C language, supporting the network, memory-based and persistent, and provides APIs in multiple languages. It can run on linux / win / mac operating systems. The present invention uses JS Redis extension and can be deployed on linux / win / mac operating systems.
[0051] Step 4-3: Insert the data information of each target of the detection data into the ordered queue of the object in Redis.
[0052] Step 5: The analysis module traverses all the alarm conditions of the point to which the current detection data belongs, comprehensively judges the detection data, and sends the judgment result.
[0053] Step 5-1: For each alarm condition, traverse each target in the detection data this time to determine whether the target meets the alarm condition this time.
[0054] Step 5-2: If a certain alarm condition requires comparison with the historical data of the object, it is also necessary to comprehensively judge whether the monitoring data meets the alarm condition based on the judgment result historical queue. Mark the object that is judged to be true under a certain alarm condition.
[0055] Step 5-3: Mark the objects that meet the alarm condition, save the media data cached by the main service as a live record, and insert the judgment result into the judgment result queue of the object under the condition in Redis. There are multiple judgment result queues. Each queue is composed of the camera id and the alarm condition id. Specifically, there is a field in the judgment result to indicate whether the alarm condition is met. If it is met, the main service will record the alarm. If it is not met, no processing will be done.
[0056] Step 5-4: Send the judgment result message to the main service. 1. There is a field in the judgment result to indicate whether the alarm condition is met. If it is met, the main service will record the alarm. If it is not met, no processing will be done.
[0057] Step 6: The analysis module queries the queue, and if it exceeds the specified length, the queue is cut. The present invention has parameters to configure the length of each queue. If it exceeds the length, the part exceeding the length is cut from the head of the queue.
[0058] Step 7: The main service persists the judgment result. Specific embodiments
[0060] Step 1: The detection module, analysis module and main service establish a WebSocket connection.
[0061] Step 2: The detection module reads the video stream and sends a set of detection data messages to the main service. A set of messages may contain one or more target information.
[0062] Step 3: The main service caches the image information transmitted by the detection module, and based on the load balancing strategy, requests the analysis module to analyze and process the detection data text information.
[0063] Step 4: At a certain time t, after the analysis module receives the request, it queries the alarm condition information of the corresponding monitoring point, and traverses each target x in the detection data P(t), whose data information is represented as M(x, t), and obtains the detection data queue and judgment result queue of target x.
[0064] Step 4-1: The analysis module queries the alarm condition information of the monitoring point to which the current detection data belongs.
[0065] Step 4-2: For each target x, read the cached detection data queue QM(x) and judgment result queue QR(x) from Redis respectively, where each detection data element in QM(x) is represented as M(x, t), and each judgment result element in QR(x) is represented as R(x, t).
[0066] Step 4-3: Insert the data information M(x, t) of each target of the detection data into the ordered queue QM(x) where the object is located in Redis.
[0067] Step 5: The analysis module traverses all the alarm conditions of the point to which the current detection data belongs, comprehensively judges the detection data, and sends the judgment result.
[0068] Step 5-1: For each alarm condition Fi, traverse each target in the detection data this time to determine whether the target meets the alarm condition this time, that is, R(x, t) = Fi(M(x, t)).
[0069] Step 5-2: If a certain alarm condition requires comparison with the historical data of the object, it is also necessary to comprehensively judge whether the current detection data meets the alarm condition based on the historical elements R(x, t0), R(x, t1), ... R(x, t) of the judgment result queue. Mark the object that is judged to be true under a certain alarm condition.
[0070] Step 5-3: Mark the objects that meet the alarm conditions, save them as media data in the main service cache as on-site records, and insert the judgment results into the judgment result queue of the object under the condition in Redis.
[0071] Step 5-4: Send a judgment result message to the main service.
[0072] Step 6: The analysis module queries the queue and trims the queue if it exceeds the specified length.
[0073] Step 7: The main service persists the judgment result.
[0074] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0075] 1. The present invention decouples the detection and analysis business functions and proposes an interactive detection and analysis method. The detection and analysis business can be developed independently, and the analysis business can be flexibly configured through lightweight network services to solve the problem that the detection and alarm conditions cannot be flexibly changed during coupled development. After the detection and analysis business are separated, they can be deployed separately, making the system resource utilization more efficient and improving the system operation efficiency.
[0076] 2. The present invention adopts a modular development method, which can run the detection program and the analysis program in multiple instances, realize the horizontal expansion of service performance, and run at a fast speed. It supports the resource occupation to be shared through the load balancing strategy, realizes the flexible configuration of server resources, maximizes the use of server performance, and improves the overall performance of the service.
[0077] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0078] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A modular target detection and analysis device, characterized in that: include: A main server, multiple detection modules and multiple analysis modules, wherein: The multiple detection modules, each detection module receives a video stream from the main server, detects the video stream, and uploads the detection result to the main server, wherein the detection result includes picture information and data text information; The main server is used to cache the image information and transmit the data text information to multiple analysis modules based on a load balancing strategy; and The multiple analysis modules, each analysis module queries the alarm conditions of the corresponding monitoring point, traverses each detection target in the data text information to obtain the detection data queue and the judgment result queue; then traverses the alarm conditions to determine whether each detection target meets the alarm conditions, and uploads the judgment results to the main server, wherein each analysis module includes a query module, and the query module is used to query the alarm condition information of the monitoring point to which the current detection result belongs from the main server.
2. The modular target detection and analysis device according to claim 1, characterized in that: Each analysis module includes a queue acquisition module and an insertion module, wherein: The queue acquisition module is used to obtain the detection data queue and the judgment result queue of each detection target from Redis; and The inserting module is used to insert the data information of each detection target into the detection data queue of the corresponding target.
3. The modular target detection and analysis device according to claim 2, characterized in that: Each analysis module further includes: a judgment module, a marking module and a transmission module, wherein: The judgment module is used to traverse each detection target in the current detection result for each alarm condition, and judge whether the detection target meets the alarm condition; The marking module is used to mark the detection target judged to be true under a certain alarm condition, mark the satisfied alarm condition, and insert the judgment result into the judgment result queue of the corresponding target; and The transmission module is used to upload the judgment result to the main server.
4. The modular target detection and analysis device according to claim 3, characterized in that: The judgment module is also used to comprehensively judge whether the current detection result meets the alarm condition based on the judgment result history queue when a certain alarm condition requires comparison with the historical data of the detection target.
5. The modular target detection and analysis device according to claim 1, characterized in that: It also includes a registration module, which is used to establish a WebSocket connection between the multiple detection modules and the main server, and to establish a WebSocket connection between the multiple analysis modules and the main server.
6. The modular target detection and analysis device according to claim 3, characterized in that: The main server also includes a storage module, wherein: The storage module is used to save the video stream of the current detection result as a field record, and to permanently store the judgment result uploaded to the main server.
7. The modular target detection and analysis device according to claim 3, characterized in that: Each analysis module also includes a trimming module for querying the detection data queue and the judgment result queue, and when the detection data queue and / or the judgment result queue exceeds a specified length, trimming the portion exceeding the length from the head of the detection data queue and / or the judgment result queue.
8. The modular target detection and analysis device according to any one of claims 1 to 7, characterized in that: The data text information includes the ID, address, screen size and detection target of the camera being analyzed, wherein the detection target includes the classification, attribute, location, size and confidence of each detection target; the classification of the detection target includes people and vehicles, wherein the vehicles include stackers, reach stackers, passenger cars and forklifts; The alarm condition includes: condition id, name, description and constraint.
9. A modular target detection and analysis method, characterized in that: include: Receiving a video stream from a main server through each of a plurality of detection modules, detecting the video stream, and uploading the detection result to the main server, wherein the detection result includes picture information and data text information; caching the image information through the main server, and transmitting the data text information to multiple analysis modules based on a load balancing strategy; and Through each of the multiple analysis modules, the alarm condition of the corresponding monitoring point is queried, and each detection target in the data text information is traversed to obtain the detection data queue and the judgment result queue; and the alarm conditions are traversed to determine whether each detection target meets the alarm conditions, and the judgment results are uploaded to the main server, wherein querying the alarm conditions of the corresponding monitoring point further includes querying the alarm condition information of the monitoring point to which the current detection result belongs from the main server.
10. The modular target detection and analysis method according to claim 9, characterized in that: Querying the alarm conditions of the corresponding monitoring points, traversing each detection target in the data text information to obtain the detection data queue and the judgment result queue further includes: Query the alarm condition information of the monitoring point to which the current detection result belongs from the main server; Obtaining the detection data queue and the judgment result queue of each detection target from Redis; and Inserting the data information of each detection target into the detection data queue of the corresponding target; and Traversing the alarm conditions to determine whether each detection target meets the alarm condition, and uploading the determination result to the main server further includes: For each alarm condition, traverse each detection target in the current detection result to determine whether the detection target meets the alarm condition; Under a certain alarm condition, mark the detection target judged to be true, mark the satisfied alarm condition, and insert the judgment result into the judgment result queue of the corresponding target; and The determination result is uploaded to the main server.
