Monitoring equipment management and control method and system based on gateway micro-service

By adopting a gateway microservice-based method in the monitoring device management and control system, the addition and preview requests of monitoring devices are analyzed and processed, and the scalable deployment and high availability of the device are achieved, which solves the problems of poor deployment flexibility and low fault tolerance in the prior art, and improves the streaming media data processing efficiency and the overall performance of monitoring devices.

CN119743518APending Publication Date: 2025-04-01HUIZHIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411956946.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-29
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The prior art has poor flexibility, insufficient scalability, low fault tolerance and lack of high availability mechanisms in the deployment of monitoring equipment and streaming data processing, making it difficult to effectively couple multiple monitoring equipment and resources.

Method used

The monitoring device management and control method and system based on gateway microservices are adopted to analyze the addition request and preview request of the monitoring device through the gateway microservice framework, determine the gateway node that performs the addition operation, and add the monitoring device to the corresponding device management cluster. At the same time, the preview data is obtained by pulling the stream, the work change instructions are issued, and the operation log is analyzed to judge device abnormal events and pass an alarm notification message.

Benefits of technology

It realizes scalable deployment of monitoring devices, simplifies the pull and forwarding operation of streaming media data, reduces the pressure of streaming media data processing, improves the high availability and fault tolerance of monitoring devices, and realizes effective coupling and resource allocation of multiple monitoring devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743518A_ABST
    Figure CN119743518A_ABST
Patent Text Reader

Abstract

The invention provides a monitoring equipment management and control method and system based on gateway micro-service, and the method comprises the steps: analyzing an adding request initiated by monitoring equipment through employing a gateway micro-service framework, thereby determining a gateway node which carries out the adding operation, adding the monitoring equipment to a corresponding equipment management cluster, and achieving the extensible deployment of the monitoring equipment; the preview data feature information is analyzed from the preview request, so that the target monitoring equipment capable of providing the preview data is checked and determined, and the preview data is obtained from the target monitoring equipment through stream pulling, so that the pulling and forwarding operation of the streaming media data is simplified, and the processing pressure of the streaming media data is reduced; the method comprises the following steps: sending a work change instruction to a target monitoring device, and judging whether the target monitoring device has an abnormal event or not according to a running log of which the working state is changed, thereby transmitting an alarm notification message to a gateway micro-service framework, improving the high availability and fault tolerance of the monitoring devices, and effectively coupling and allocating resources of a plurality of monitoring devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network services, and in particular to a monitoring device management and control method and system based on gateway microservices. Background Art

[0002] At present, the access of monitoring equipment such as cameras usually adopts a single access service, which receives monitoring equipment that supports different protocols and performs operations such as device login and streaming through a unified management method. At the same time, the access service is also responsible for the forwarding of streaming media data of all monitoring equipment. In order to achieve global monitoring, monitoring equipment will be deployed in a distributed manner, but distributed deployment is relatively rigid and requires a large proportion of service allocation. It also has poor scalability and flexibility, is difficult to expand horizontally, has low fault tolerance, and if a single access service fails, it will affect the operation of the entire system. There is a lack of high availability mechanism and it is impossible to select the most appropriate technology according to the characteristics of the access service. It can be seen that the use of a single access service cannot improve the deployment flexibility of monitoring equipment and reduce the processing pressure of streaming media data from monitoring equipment, and cannot effectively couple and allocate resources for multiple monitoring devices. Summary of the invention

[0003] The purpose of the present invention is to provide a monitoring device management and control method and system based on gateway microservices, which utilizes the gateway microservice framework to parse the add request initiated by the monitoring device, thereby determining the gateway node that performs the add operation, and adding the monitoring device to the corresponding device management cluster to achieve scalable deployment of the monitoring device; obtaining preview data feature information from the preview request, thereby checking and determining the target monitoring device that can provide preview data, and pulling the stream from the target monitoring device to obtain the preview data, thereby simplifying the pull and forwarding operations of streaming media data and reducing the processing pressure of streaming media data; issuing a work change instruction to the target monitoring device, and judging whether an abnormal event occurs in the target monitoring device according to the operation log after the working state is changed, thereby transmitting an alarm notification message to the gateway microservice framework, improving the high availability and fault tolerance of the monitoring device, and effectively coupling and allocating resources for multiple monitoring devices.

[0004] The present invention is achieved through the following technical solutions:

[0005] The monitoring device control method based on gateway microservices includes:

[0006] The gateway microservice framework parses and processes the add request initiated by the monitoring device to determine the gateway node for adding the monitoring device; based on the operational attributes of the monitoring device, the monitoring device is added to the device management cluster corresponding to the gateway node;

[0007] The preview request is parsed and processed by the gateway microservice framework to obtain preview data feature information; based on the preview data feature information, a target monitoring device that can provide preview data is checked and determined; based on the working status of the target monitoring device, a stream is pulled from the target monitoring device to obtain preview data;

[0008] A work change instruction is issued to the target monitoring device, and an operation log of the target monitoring device after the working state is changed is obtained; the operation log is analyzed to determine whether an abnormal event occurs after the working state of the target monitoring device is changed, thereby transmitting an alarm notification message to the gateway microservice framework.

[0009] Optionally, the adding request initiated by the monitoring device is parsed and processed by the gateway microservice framework to determine the gateway node for adding the monitoring device; based on the operation attributes of the monitoring device, the monitoring device is added to the device management cluster corresponding to the gateway node, including:

[0010] The gateway microservice framework parses and processes the add request initiated by the monitoring device to obtain the monitoring data generation characteristic information of the monitoring device; wherein the monitoring data generation characteristic information includes the monitoring data type and the monitoring data generation rate of the monitoring device; the monitoring data generation characteristic information is matched with all the gateway nodes under the gateway microservice framework to determine the gateway node for adding the monitoring device;

[0011] The operational computing power resource requirement attribute of the monitoring device is obtained, and the operational computing power resource requirement attribute is compared with the available computing power resources of all device management clusters under the gateway node, so as to add the monitoring device to the corresponding device management cluster under the gateway node.

[0012] Optionally, the preview request is parsed and processed by the gateway microservice framework to obtain preview data feature information; based on the preview data feature information, a target monitoring device that can provide preview data is checked and determined; based on the working status of the target monitoring device, a stream is pulled from the target monitoring device to obtain the preview data, including:

[0013] The preview request is parsed and processed by the gateway microservice framework to obtain the generation location and time information of the preview data; based on the generation location and time information of the preview data, the monitoring data generation logs of all monitoring devices under the device management cluster are checked and identified to determine the target monitoring device that can provide the preview data;

[0014] Based on the memory working status of the target monitoring device, determine whether the target monitoring device is in a memory readable state; when the target monitoring device is in a memory readable state, generate a corresponding RTSP URL to pull the stream from the target monitoring device to obtain preview data; when the target monitoring device is not in a memory readable state, do not pull the stream from the target monitoring device to obtain preview data.

[0015] Optionally, issuing a work change instruction to the target monitoring device, and obtaining a running log of the target monitoring device after the working state is changed; analyzing the running log to determine whether an abnormal event occurs after the working state of the target monitoring device is changed, thereby transmitting an alarm notification message to the gateway microservice framework, including:

[0016] Based on the streaming progress of the preview data, a work change instruction is issued to the target monitoring device, and a monitoring task execution log after the target monitoring device changes its working state is obtained;

[0017] The monitoring task execution log is analyzed to obtain the monitoring task execution waiting time after the target monitoring device changes its working state; the monitoring task execution waiting time is compared with a preset time threshold; if the monitoring task execution waiting time exceeds the preset time threshold, it is determined that an abnormal event occurs after the target monitoring device changes its working state; otherwise, it is determined that no abnormal event occurs after the target monitoring device changes its working state; when an abnormal event occurs after the target monitoring device changes its working state, an alarm notification message is transmitted to the gateway microservice framework.

[0018] When it is determined that no abnormal event occurs after the target monitoring device changes its working state, the risk of abnormal events occurring in the target monitoring device is determined, including:

[0019] Extracting the time difference between the task execution waiting time corresponding to when the target monitoring device changes its working state without an abnormal event and the preset time threshold;

[0020] Comparing the time difference with a preset difference threshold;

[0021] Extracting the task execution waiting time corresponding to the time difference being lower than a preset difference threshold as the first task execution waiting time data;

[0022] Obtaining a first determination coefficient using the first task execution waiting time data;

[0023] The first determination coefficient is obtained by the following formula:

[0024]

[0025] Among them, A01 represents the first determination coefficient; n represents the number of data of the first task execution waiting time data; T c01i represents the time difference between the task execution waiting time corresponding to the i-th first task execution waiting time data and the preset time threshold; T 01i represents the task execution waiting time length corresponding to the i-th first task execution waiting time data; T 01b represents the standard deviation of the task execution waiting time length corresponding to the n first task execution waiting time data; T c01max represents the maximum value of the time difference between the task execution waiting time corresponding to the n first task execution waiting time data and the preset time threshold; T 01mb Indicates the standard deviation of the task execution waiting time length corresponding to the moment of maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold;

[0026] Extracting the task execution waiting time corresponding to the time difference being not less than the preset difference threshold as the second task execution waiting time data;

[0027] Obtaining a second determination coefficient using the second task execution waiting time data;

[0028] The second determination coefficient is obtained by the following formula:

[0029]

[0030] Among them, A 02 represents the second determination coefficient; m represents the number of data of the second task execution waiting time data; T c01p represents the average value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 01p represents the average value of the task execution waiting time length corresponding to the n first task execution waiting time data; T c02i represents the time difference between the task execution waiting time corresponding to the i-th second task execution waiting time data and the preset time threshold; T 02i represents the task execution waiting time length corresponding to the i-th second task execution waiting time data; T 01mb represents the standard deviation of the task execution waiting time length corresponding to the maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 02mb Indicates the standard deviation of the task execution waiting time length corresponding to the time when the minimum time difference between the task execution waiting time corresponding to the second task execution waiting time data and the preset time threshold is reached;

[0031] Obtaining a comprehensive determination coefficient using the first determination coefficient and the second determination coefficient;

[0032] The comprehensive determination coefficient is obtained by the following formula:

[0033]

[0034] Among them, S represents the comprehensive determination coefficient; S 0 Indicates the preset determination coefficient reference value; A 02 represents the second determination coefficient; A 01 represents the first determination coefficient;

[0035] Comparing the comprehensive determination coefficient with a preset determination coefficient threshold;

[0036] When the comprehensive determination coefficient exceeds a preset determination coefficient threshold, it is determined that the target monitoring device is at risk of an abnormal event, and a risk warning is issued.

[0037] The monitoring equipment control system based on gateway microservices includes:

[0038] The device adding operation module is used to parse and process the adding request initiated by the monitoring device through the gateway microservice framework, and determine the gateway node for adding the monitoring device;

[0039] A device management cluster connection module, used to add the monitoring device to the device management cluster corresponding to the gateway node based on the operational attributes of the monitoring device;

[0040] The device checking module is used to parse and process the preview request through the gateway microservice framework to obtain preview data feature information; based on the preview data feature information, check and determine the target monitoring device that can provide preview data;

[0041] A preview data streaming module, used for streaming preview data from the target monitoring device based on the working status of the target monitoring device;

[0042] A work change operation module, used to issue a work change instruction to the target monitoring device and obtain an operation log after the target monitoring device changes its working state;

[0043] The alarm notification module is used to analyze the operation log and determine whether an abnormal event occurs after the target monitoring device changes its working state, thereby transmitting an alarm notification message to the gateway microservice framework.

[0044] Optionally, the device adding operation module is used to parse and process the adding request initiated by the monitoring device through the gateway microservice framework, and determine the gateway node for adding the monitoring device, including: parsing and processing the adding request initiated by the monitoring device through the gateway microservice framework to obtain the monitoring data generation characteristic information of the monitoring device; wherein the monitoring data generation characteristic information includes the monitoring data type and the monitoring data generation rate of the monitoring device; matching the monitoring data generation characteristic information with all the gateway nodes under the gateway microservice framework to determine the gateway node for adding the monitoring device;

[0045] The device management cluster connection module is used to add the monitoring device to the device management cluster corresponding to the gateway node based on the operation attribute of the monitoring device, including:

[0046] The operational computing power resource requirement attribute of the monitoring device is obtained, and the operational computing power resource requirement attribute is compared with the available computing power resources of all device management clusters under the gateway node, so as to add the monitoring device to the corresponding device management cluster under the gateway node.

[0047] Optionally, the device screening module is used to parse and process the preview request through the gateway microservice framework to obtain preview data feature information; based on the preview data feature information, screening and determining a target monitoring device that can provide preview data includes:

[0048] The preview request is parsed and processed by the gateway microservice framework to obtain the generation location and time information of the preview data; based on the generation location and time information of the preview data, the monitoring data generation logs of all monitoring devices under the device management cluster are checked and identified to determine the target monitoring device that can provide the preview data;

[0049] The preview data stream pulling module is used to pull the stream from the target monitoring device to obtain preview data based on the working status of the target monitoring device, including:

[0050] Based on the memory working status of the target monitoring device, determine whether the target monitoring device is in a memory readable state; when the target monitoring device is in a memory readable state, generate a corresponding RTSP URL to pull the stream from the target monitoring device to obtain preview data; when the target monitoring device is not in a memory readable state, do not pull the stream from the target monitoring device to obtain preview data.

[0051] Optionally, the work change operation module is used to issue a work change instruction to the target monitoring device and obtain an operation log after the target monitoring device changes its working state, including:

[0052] Based on the streaming progress of the preview data, a work change instruction is issued to the target monitoring device, and a monitoring task execution log after the target monitoring device changes its working state is obtained;

[0053] The alarm notification module is used to analyze the operation log to determine whether an abnormal event occurs after the target monitoring device changes its working state, thereby transmitting an alarm notification message to the gateway microservice framework, including:

[0054] The monitoring task execution log is analyzed to obtain the monitoring task execution waiting time after the target monitoring device changes its working state; the monitoring task execution waiting time is compared with a preset time threshold; if the monitoring task execution waiting time exceeds the preset time threshold, it is determined that an abnormal event occurs after the target monitoring device changes its working state; otherwise, it is determined that no abnormal event occurs after the target monitoring device changes its working state; when an abnormal event occurs after the target monitoring device changes its working state, an alarm notification message is transmitted to the gateway microservice framework.

[0055] When it is determined that no abnormal event occurs after the target monitoring device changes its working state, the risk of abnormal events occurring in the target monitoring device is determined, including:

[0056] Extracting the time difference between the task execution waiting time corresponding to when the target monitoring device changes its working state without an abnormal event and the preset time threshold;

[0057] Comparing the time difference with a preset difference threshold;

[0058] Extracting the task execution waiting time corresponding to the time difference being lower than a preset difference threshold as the first task execution waiting time data;

[0059] Obtaining a first determination coefficient using the first task execution waiting time data;

[0060] The first determination coefficient is obtained by the following formula:

[0061]

[0062] Among them, A 01 represents the first determination coefficient; n represents the number of data of the first task execution waiting time data; T c01i represents the time difference between the task execution waiting time corresponding to the i-th first task execution waiting time data and the preset time threshold; T 01i represents the task execution waiting time length corresponding to the i-th first task execution waiting time data; T 01brepresents the standard deviation of the task execution waiting time length corresponding to the n first task execution waiting time data; T c01max represents the maximum value of the time difference between the task execution waiting time corresponding to the n first task execution waiting time data and the preset time threshold; T 01mb Indicates the standard deviation of the task execution waiting time length corresponding to the moment of maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold;

[0063] Extracting the task execution waiting time corresponding to the time difference being not less than the preset difference threshold as the second task execution waiting time data;

[0064] Obtaining a second determination coefficient using the second task execution waiting time data;

[0065] The second determination coefficient is obtained by the following formula:

[0066]

[0067] Among them, A 02 represents the second determination coefficient; m represents the number of data of the second task execution waiting time data; T c01p represents the average value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 01p represents the average value of the task execution waiting time length corresponding to the n first task execution waiting time data; T c02i represents the time difference between the task execution waiting time corresponding to the i-th second task execution waiting time data and the preset time threshold; T 02i represents the task execution waiting time length corresponding to the i-th second task execution waiting time data; T 01mb represents the standard deviation of the task execution waiting time length corresponding to the maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 02mb Indicates the standard deviation of the task execution waiting time length corresponding to the time when the minimum time difference between the task execution waiting time corresponding to the second task execution waiting time data and the preset time threshold is reached;

[0068] Obtaining a comprehensive determination coefficient using the first determination coefficient and the second determination coefficient;

[0069] The comprehensive determination coefficient is obtained by the following formula:

[0070]

[0071] Among them, S represents the comprehensive determination coefficient; S 0Indicates the preset determination coefficient reference value; A 02 represents the second determination coefficient; A 01 represents the first determination coefficient;

[0072] Comparing the comprehensive determination coefficient with a preset determination coefficient threshold;

[0073] When the comprehensive determination coefficient exceeds a preset determination coefficient threshold, it is determined that the target monitoring device is at risk of an abnormal event, and a risk warning is issued.

[0074] Compared with the prior art, the present invention has the following beneficial effects:

[0075] The monitoring device control method and system based on gateway microservices provided in the present application utilize the gateway microservice framework to parse the add request initiated by the monitoring device, thereby determining the gateway node that performs the add operation, and adding the monitoring device to the corresponding device management cluster, thereby realizing scalable deployment of the monitoring device; obtaining preview data feature information from the preview request, thereby troubleshooting and determining the target monitoring device that can provide preview data, and pulling the stream from the target monitoring device to obtain the preview data, thereby simplifying the pulling and forwarding operations of streaming media data and reducing the processing pressure of streaming media data; issuing a work change instruction to the target monitoring device, and judging whether an abnormal event occurs in the target monitoring device based on the operation log after the working status is changed, thereby transmitting an alarm notification message to the gateway microservice framework, improving the high availability and fault tolerance of the monitoring device, and effectively coupling and allocating resources for multiple monitoring devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0077] Figure 1 A flow chart of a monitoring device control method based on gateway microservices provided by the present invention.

[0078] Figure 2 A schematic diagram of the structure of the monitoring equipment management and control system based on gateway microservices provided by the present invention. DETAILED DESCRIPTION

[0079] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some structures related to the present application are shown in the accompanying drawings, rather than all structures. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0080] The terms "including" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0081] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0082] See also Figure 1 As shown, a monitoring device control method based on a gateway microservice is provided in an embodiment of the present application. The monitoring device control method based on a gateway microservice includes:

[0083] The gateway microservice framework parses and processes the add request initiated by the monitoring device, and determines the gateway node for adding the monitoring device; based on the operating attributes of the monitoring device, the monitoring device is added to the device management cluster corresponding to the gateway node;

[0084] The preview request is parsed and processed by the gateway microservice framework to obtain preview data feature information; based on the preview data feature information, a target monitoring device that can provide preview data is checked and determined; based on the working status of the target monitoring device, a stream is pulled from the target monitoring device to obtain preview data;

[0085] A work change instruction is issued to the target monitoring device, and the operation log of the target monitoring device after the working state is changed is obtained; the operation log is analyzed to determine whether an abnormal event occurs after the working state of the target monitoring device is changed, so as to transmit an alarm notification message to the gateway microservice framework.

[0086] The beneficial effects of the above embodiments are as follows: the monitoring device management and control method based on gateway microservices utilizes the gateway microservice framework to parse the add request initiated by the monitoring device, thereby determining the gateway node that performs the add operation, and adding the monitoring device to the corresponding device management cluster, thereby realizing scalable deployment of the monitoring device; obtaining preview data feature information from the preview request, thereby checking and determining the target monitoring device that can provide preview data, and pulling the stream from the target monitoring device to obtain the preview data, thereby simplifying the pulling and forwarding operations of streaming media data and reducing the processing pressure of streaming media data; issuing a work change instruction to the target monitoring device, and judging whether an abnormal event occurs in the target monitoring device based on the operation log after the working status is changed, thereby transmitting an alarm notification message to the gateway microservice framework, improving the high availability and fault tolerance of the monitoring device, and effectively coupling and allocating resources for multiple monitoring devices.

[0087] In another embodiment, the gateway microservice framework parses and processes the add request initiated by the monitoring device to determine the gateway node for adding the monitoring device; based on the operation attributes of the monitoring device, the monitoring device is added to the device management cluster corresponding to the gateway node, including:

[0088] The gateway microservice framework parses and processes the add request initiated by the monitoring device to obtain the monitoring data generation characteristic information of the monitoring device; wherein the monitoring data generation characteristic information includes the monitoring data type and the monitoring data generation rate of the monitoring device; the monitoring data generation characteristic information is matched with all the gateway nodes under the gateway microservice framework to determine the gateway node for adding the monitoring device;

[0089] The operation computing power resource demand attribute of the monitoring device is obtained, and the operation computing power resource demand attribute is compared with the available computing power resources of all device management clusters under the gateway node, so as to add the monitoring device to the corresponding device management cluster under the gateway node.

[0090] The beneficial effects of the above embodiments are that the gateway microservice framework is a software operation service (Software as a Service, SaaS), which is a common microservice for the gateway. It uses Asio, ISDataCenter and other underlying libraries to implement core underlying operations, accesses Redis in the middle layer to implement shared memory, accesses Nacos for service management and discovery, sqlite is used for storage configuration, and Ceph is used for storage recording. The gateway microservice framework itself is divided into five divisions of labor: device, datacenter, alarm, media, and api, among which device is responsible for direct communication of devices, datacenter is responsible for dispatching data in shared memory, alarm is responsible for special alarm processing, media is responsible for streaming media data pulling and forwarding, and api is responsible for unified processing of external interface data. When a monitoring device such as a camera requests to be added to the Internet of Things, an add request will be initiated. At this time, the gateway microservice framework will parse and process the add request to obtain the monitoring data generation feature information of the monitoring device, thereby accurately identifying the monitoring data format type and monitoring data generation rate (i.e., the amount of monitoring data generated per unit time) generated by the monitoring device during the monitoring shooting process, and providing a reliable basis for the subsequent selection of a gateway node that can match the monitoring device. The gateway microservice framework includes multiple gateway nodes, and each gateway node supports different data formats and data transmission bandwidths. In order to enable the monitoring device to add a connection to a gateway node that matches its own monitoring data generation situation, the monitoring data generation feature information is matched with all gateway nodes under the gateway microservice framework, and the gateway node to add the monitoring device is screened and determined. When the monitoring device is added and connected to the matching gateway node, it can ensure that the monitoring data generated by the monitoring device is transmitted in real time and efficiently by the matching gateway node. In addition, the operation computing resource requirement attribute of the monitoring device (i.e., the amount of computing resources required during the operation of the monitoring device) is obtained, and the operation computing resource requirement attribute is compared with the computing resource available amount of all device management clusters under the gateway node, so as to add the monitoring device to the device management cluster under the gateway node with the computing resource available amount exceeding the computing resource required during the operation of the monitoring device, so as to ensure that the monitoring device always obtains reliable and sufficient computing resource support during operation.

[0091] In another embodiment, the preview request is parsed and processed by the gateway microservice framework to obtain preview data feature information; based on the preview data feature information, a target monitoring device that can provide preview data is checked and determined; based on the working status of the target monitoring device, the preview data is obtained by pulling a stream from the target monitoring device, including:

[0092] The preview request is parsed and processed through the gateway microservice framework to obtain the generation location and time information of the preview data; based on the generation location and time information of the preview data, the monitoring data generation logs of all monitoring devices under the device management cluster are checked and identified to determine the target monitoring device that can provide preview data;

[0093] Based on the memory working status of the target monitoring device, determine whether the target monitoring device is in a memory readable state; when the target monitoring device is in a memory readable state, generate a corresponding RTSP URL to pull the stream from the target monitoring device to obtain preview data; when the target monitoring device is not in a memory readable state, do not pull the stream from the target monitoring device to obtain preview data.

[0094] The beneficial effect of the above embodiment is that the monitoring device will generate monitoring data such as monitoring images after monitoring and shooting. In the actual monitoring scene, the user will need to retrieve the monitoring data generated in the corresponding time interval for preview. In order to accurately retrieve the required monitoring data from the monitoring device for preview, the preview request is parsed through the gateway microservice framework to obtain the generation location and time information of the preview data (that is, the location and time interval information of the shooting location corresponding to the monitoring data to be previewed); then based on the generation location and time information of the preview data, all monitoring devices under the device management cluster are checked and identified for monitoring data generation logs, and the monitoring device that can generate monitoring data at the corresponding shooting location and time interval is determined as the target monitoring device that can provide preview data, so that the preview data can be pulled from the target monitoring device in the future. There is also the memory working status of the target monitoring device (that is, the busy and idle status of the memory data reading of the target monitoring device) to determine whether the target monitoring device is in a memory readable state; when the target monitoring device is in a memory readable state, the corresponding RTSP URL is generated, so that the preview data is accurately pulled from the target monitoring device to improve the efficiency and accuracy of the preview data.

[0095] In another embodiment, a work change instruction is issued to the target monitoring device, and an operation log of the target monitoring device after the working state is changed is obtained; the operation log is analyzed to determine whether an abnormal event occurs after the working state of the target monitoring device is changed, thereby transmitting an alarm notification message to the gateway microservice framework, including:

[0096] Based on the streaming progress of the preview data, a work change instruction is issued to the target monitoring device, and a monitoring task execution log after the target monitoring device changes its working state is obtained;

[0097] The monitoring task execution log is analyzed to obtain the monitoring task execution waiting time after the target monitoring device changes its working state; the monitoring task execution waiting time is compared with the preset time threshold. If the monitoring task execution waiting time exceeds the preset time threshold, it is determined that an abnormal event occurs after the target monitoring device changes its working state; otherwise, it is determined that no abnormal event occurs after the target monitoring device changes its working state; when an abnormal event occurs after the target monitoring device changes its working state, an alarm notification message is transmitted to the gateway microservice framework.

[0098] The beneficial effect of the above embodiment is that the preview data streaming progress of the target monitoring device directly affects the monitoring working state of the target monitoring device itself. For example, when the target monitoring device is in the process of preview data streaming, the target monitoring device will not be able to use its own memory, so that the target monitoring device cannot continue to monitor and shoot. For this reason, based on the preview data streaming progress, it is judged whether the target monitoring device has completed the preview data streaming operation. If so, a work change instruction is issued to the target monitoring device, and the monitoring task execution log after the target monitoring device changes its working state is obtained, so as to comprehensively characterize the working changes of the target monitoring device. In addition, the monitoring task execution log is analyzed to obtain the monitoring task execution waiting time after the target monitoring device changes its working state, and the monitoring task execution waiting time is compared with a threshold value to judge whether an abnormal event occurs after the target monitoring device changes its working state. When an abnormal event occurs after the target monitoring device changes its working state, an alarm notification message is transmitted to the gateway microservice framework, thereby improving the high availability and fault tolerance of the monitoring device, and effectively coupling and allocating resources for multiple monitoring devices.

[0099] In another embodiment, when it is determined that no abnormal event occurs after the target monitoring device changes its working state, determining the risk of an abnormal event occurring in the target monitoring device includes:

[0100] Extracting the time difference between the task execution waiting time corresponding to when the target monitoring device changes its working state without an abnormal event and the preset time threshold;

[0101] Comparing the time difference with a preset difference threshold;

[0102] Extracting the task execution waiting time corresponding to the time difference being lower than a preset difference threshold as the first task execution waiting time data;

[0103] Obtaining a first determination coefficient using the first task execution waiting time data;

[0104] The first determination coefficient is obtained by the following formula:

[0105]

[0106] Among them, A 01 represents the first determination coefficient; n represents the number of data of the first task execution waiting time data; T c01i represents the time difference between the task execution waiting time corresponding to the i-th first task execution waiting time data and the preset time threshold; T 01i represents the task execution waiting time length corresponding to the i-th first task execution waiting time data; T 01b represents the standard deviation of the task execution waiting time length corresponding to the n first task execution waiting time data; T c01max represents the maximum value of the time difference between the task execution waiting time corresponding to the n first task execution waiting time data and the preset time threshold; T 01mb Indicates the standard deviation of the task execution waiting time length corresponding to the moment of maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold;

[0107] Extracting the task execution waiting time corresponding to the time difference being not less than the preset difference threshold as the second task execution waiting time data;

[0108] Obtaining a second determination coefficient using the second task execution waiting time data;

[0109] The second determination coefficient is obtained by the following formula:

[0110]

[0111] Among them, A 02 represents the second determination coefficient; m represents the number of data of the second task execution waiting time data; T c01p represents the average value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 01p represents the average value of the task execution waiting time length corresponding to the n first task execution waiting time data; T c02i represents the time difference between the task execution waiting time corresponding to the i-th second task execution waiting time data and the preset time threshold; T 02i represents the task execution waiting time length corresponding to the i-th second task execution waiting time data; T 01mb represents the standard deviation of the task execution waiting time length corresponding to the maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 02mbIndicates the standard deviation of the task execution waiting time length corresponding to the time when the minimum time difference between the task execution waiting time corresponding to the second task execution waiting time data and the preset time threshold is reached;

[0112] Obtaining a comprehensive determination coefficient using the first determination coefficient and the second determination coefficient;

[0113] The comprehensive determination coefficient is obtained by the following formula:

[0114]

[0115] Among them, S represents the comprehensive determination coefficient; S 0 Indicates the preset determination coefficient reference value; A 02 represents the second determination coefficient; A 01 represents the first determination coefficient;

[0116] Comparing the comprehensive determination coefficient with a preset determination coefficient threshold;

[0117] When the comprehensive determination coefficient exceeds a preset determination coefficient threshold, it is determined that the target monitoring device is at risk of an abnormal event, and a risk warning is issued.

[0118] The beneficial effects of the above embodiments are that by comparing the time difference between the task execution waiting time and the preset time threshold, and judging the situations below and not below the difference threshold respectively, the scheme can carefully analyze the working state of the target monitoring device, so as to more accurately judge whether it has the risk of abnormal events. The introduction of the first determination coefficient and the second determination coefficient comprehensively considers multiple dimensions of the task execution waiting time (such as time difference, time length and its standard deviation, etc.), making the risk judgment more comprehensive and accurate. The scheme can dynamically calculate the determination coefficient according to the actual task execution waiting time data, so as to realize the real-time assessment of the risk of abnormal events of the target monitoring device. This dynamic assessment method helps to discover potential problems in time and take corresponding preventive measures. By setting the comprehensive determination coefficient and comparing it with the preset determination coefficient threshold, the scheme can efficiently detect whether the target monitoring device has the risk of abnormal events. Once the comprehensive determination coefficient exceeds the threshold, the risk warning can be triggered and the relevant personnel can be notified in time to handle it. The scheme avoids unnecessary waste of resources (such as frequent manual inspections or equipment maintenance) through accurate risk judgment and efficient abnormality detection. The early warning mechanism will only be triggered when there is a real risk, thereby improving the efficiency of resource utilization. The determination coefficient calculation formula and threshold in this solution can be adjusted and optimized according to actual conditions to meet the needs of different monitoring devices and scenarios. This scalability and flexibility enable the solution to be widely used in various monitoring systems, improving its versatility and practicality.

[0119] In summary, the above technical solutions show technical effects such as accurate risk determination, dynamic risk assessment, efficient anomaly detection, optimized resource utilization, scalability and flexibility in terms of performance indicators. These effects jointly improve the accuracy and efficiency of risk determination of abnormal events of target monitoring equipment, and help ensure the stable operation and security of the monitoring system.

[0120] See also Figure 2 As shown, a monitoring device control system based on a gateway microservice is provided in one embodiment of the present application. The monitoring device control system based on a gateway microservice includes:

[0121] The device adding operation module is used to parse and process the adding request initiated by the monitoring device through the gateway microservice framework, and determine the gateway node for adding the monitoring device;

[0122] A device management cluster connection module, used to add the monitoring device to the device management cluster corresponding to the gateway node based on the operational attributes of the monitoring device;

[0123] The device checking module is used to parse and process the preview request through the gateway microservice framework to obtain preview data feature information; based on the preview data feature information, check and determine the target monitoring device that can provide preview data;

[0124] A preview data streaming module is used to stream preview data from the target monitoring device based on the working status of the target monitoring device;

[0125] A work change operation module is used to issue a work change instruction to the target monitoring device and obtain the operation log after the work status of the target monitoring device is changed;

[0126] The alarm notification module is used to analyze the operation log and determine whether an abnormal event occurs after the target monitoring device changes its working state, thereby transmitting an alarm notification message to the gateway microservice framework.

[0127] The beneficial effects of the above embodiments are as follows: the monitoring device management and control system based on the gateway microservice utilizes the gateway microservice framework to parse the add request initiated by the monitoring device, thereby determining the gateway node that performs the add operation, and adding the monitoring device to the corresponding device management cluster, thereby realizing scalable deployment of the monitoring device; obtaining preview data feature information from the preview request, thereby checking and determining the target monitoring device that can provide preview data, and pulling the stream from the target monitoring device to obtain the preview data, thereby simplifying the pulling and forwarding operations of the streaming media data and reducing the processing pressure of the streaming media data; issuing a work change instruction to the target monitoring device, and judging whether an abnormal event occurs in the target monitoring device according to the operation log after the working status is changed, thereby transmitting an alarm notification message to the gateway microservice framework, improving the high availability and fault tolerance of the monitoring device, and effectively coupling and allocating resources for multiple monitoring devices.

[0128] In another embodiment, the device adding operation module is used to parse and process the adding request initiated by the monitoring device through the gateway microservice framework, and determine the gateway node for adding the monitoring device, including:

[0129] The gateway microservice framework parses and processes the add request initiated by the monitoring device to obtain the monitoring data generation characteristic information of the monitoring device; wherein the monitoring data generation characteristic information includes the monitoring data type and the monitoring data generation rate of the monitoring device; the monitoring data generation characteristic information is matched with all the gateway nodes under the gateway microservice framework to determine the gateway node for adding the monitoring device;

[0130] The device management cluster connection module is used to add the monitoring device to the device management cluster corresponding to the gateway node based on the operation attributes of the monitoring device, including:

[0131] The operation computing power resource demand attribute of the monitoring device is obtained, and the operation computing power resource demand attribute is compared with the available computing power resources of all device management clusters under the gateway node, so as to add the monitoring device to the corresponding device management cluster under the gateway node.

[0132] The beneficial effects of the above embodiments are that the gateway microservice framework is a software operation service (Software as a Service, SaaS), which is a common microservice for the gateway. It uses Asio, ISDataCenter and other underlying libraries to implement core underlying operations, accesses Redis in the middle layer to implement shared memory, accesses Nacos for service management and discovery, sqlite is used for storage configuration, and Ceph is used for storage recording. The gateway microservice framework itself is divided into five divisions of labor: device, datacenter, alarm, media, and api, among which device is responsible for direct communication of devices, datacenter is responsible for dispatching data in shared memory, alarm is responsible for special alarm processing, media is responsible for streaming media data pulling and forwarding, and api is responsible for unified processing of external interface data. When a monitoring device such as a camera requests to be added to the Internet of Things, an add request will be initiated. At this time, the gateway microservice framework will parse and process the add request to obtain the monitoring data generation feature information of the monitoring device, thereby accurately identifying the monitoring data format type and monitoring data generation rate (i.e., the amount of monitoring data generated per unit time) generated by the monitoring device during the monitoring shooting process, and providing a reliable basis for the subsequent selection of a gateway node that can match the monitoring device. The gateway microservice framework includes multiple gateway nodes, and each gateway node supports different data formats and data transmission bandwidths. In order to enable the monitoring device to add a connection to a gateway node that matches its own monitoring data generation situation, the monitoring data generation feature information is matched with all gateway nodes under the gateway microservice framework, and the gateway node to add the monitoring device is screened and determined. When the monitoring device is added and connected to the matching gateway node, it can ensure that the monitoring data generated by the monitoring device is transmitted in real time and efficiently by the matching gateway node. In addition, the operation computing resource requirement attribute of the monitoring device (i.e., the amount of computing resources required during the operation of the monitoring device) is obtained, and the operation computing resource requirement attribute is compared with the computing resource available amount of all device management clusters under the gateway node, so as to add the monitoring device to the device management cluster under the gateway node with the computing resource available amount exceeding the computing resource required during the operation of the monitoring device, so as to ensure that the monitoring device always obtains reliable and sufficient computing resource support during operation.

[0133] In another embodiment, the device screening module is used to parse and process the preview request through the gateway microservice framework to obtain preview data feature information; based on the preview data feature information, screening and determining the target monitoring device that can provide preview data includes:

[0134] The preview request is parsed and processed through the gateway microservice framework to obtain the generation location and time information of the preview data; based on the generation location and time information of the preview data, the monitoring data generation logs of all monitoring devices under the device management cluster are checked and identified to determine the target monitoring device that can provide preview data;

[0135] The preview data stream pulling module is used to pull the stream from the target monitoring device to obtain preview data based on the working status of the target monitoring device, including:

[0136] Based on the memory working status of the target monitoring device, determine whether the target monitoring device is in a memory readable state; when the target monitoring device is in a memory readable state, generate a corresponding RTSP URL to pull the stream from the target monitoring device to obtain preview data; when the target monitoring device is not in a memory readable state, do not pull the stream from the target monitoring device to obtain preview data.

[0137] The beneficial effect of the above embodiment is that the monitoring device will generate monitoring data such as monitoring images after monitoring and shooting. In the actual monitoring scene, the user will need to retrieve the monitoring data generated in the corresponding time interval for preview. In order to accurately retrieve the required monitoring data from the monitoring device for preview, the preview request is parsed through the gateway microservice framework to obtain the generation location and time information of the preview data (that is, the location and time interval information of the shooting location corresponding to the monitoring data to be previewed); then based on the generation location and time information of the preview data, all monitoring devices under the device management cluster are checked and identified for monitoring data generation logs, and the monitoring device that can generate monitoring data at the corresponding shooting location and time interval is determined as the target monitoring device that can provide preview data, so that the preview data can be pulled from the target monitoring device in the future. There is also the memory working status of the target monitoring device (that is, the busy and idle status of the memory data reading of the target monitoring device) to determine whether the target monitoring device is in a memory readable state; when the target monitoring device is in a memory readable state, the corresponding RTSP URL is generated, so that the preview data is accurately pulled from the target monitoring device to improve the efficiency and accuracy of the preview data.

[0138] In another embodiment, the work change operation module is used to issue a work change instruction to the target monitoring device and obtain an operation log after the target monitoring device changes its working state, including:

[0139] Based on the streaming progress of the preview data, a work change instruction is issued to the target monitoring device, and a monitoring task execution log after the target monitoring device changes its working state is obtained;

[0140] The alarm notification module is used to analyze the operation log to determine whether an abnormal event occurs after the target monitoring device changes its working state, thereby transmitting an alarm notification message to the gateway microservice framework, including:

[0141] The monitoring task execution log is analyzed to obtain the monitoring task execution waiting time after the target monitoring device changes its working state; the monitoring task execution waiting time is compared with the preset time threshold. If the monitoring task execution waiting time exceeds the preset time threshold, it is determined that an abnormal event occurs after the target monitoring device changes its working state; otherwise, it is determined that no abnormal event occurs after the target monitoring device changes its working state; when an abnormal event occurs after the target monitoring device changes its working state, an alarm notification message is transmitted to the gateway microservice framework.

[0142] The beneficial effect of the above embodiment is that the preview data streaming progress of the target monitoring device directly affects the monitoring working state of the target monitoring device itself. For example, when the target monitoring device is in the process of preview data streaming, the target monitoring device will not be able to use its own memory, so that the target monitoring device cannot continue to monitor and shoot. For this reason, based on the preview data streaming progress, it is judged whether the target monitoring device has completed the preview data streaming operation. If so, a work change instruction is issued to the target monitoring device, and the monitoring task execution log after the target monitoring device changes its working state is obtained, so as to comprehensively characterize the working changes of the target monitoring device. In addition, the monitoring task execution log is analyzed to obtain the monitoring task execution waiting time after the target monitoring device changes its working state, and the monitoring task execution waiting time is compared with a threshold value to judge whether an abnormal event occurs after the target monitoring device changes its working state. When an abnormal event occurs after the target monitoring device changes its working state, an alarm notification message is transmitted to the gateway microservice framework, thereby improving the high availability and fault tolerance of the monitoring device, and effectively coupling and allocating resources for multiple monitoring devices.

[0143] In another embodiment, when it is determined that no abnormal event occurs after the target monitoring device changes its working state, determining the risk of an abnormal event occurring in the target monitoring device includes:

[0144] Extracting the time difference between the task execution waiting time corresponding to when the target monitoring device changes its working state without an abnormal event and the preset time threshold;

[0145] Comparing the time difference with a preset difference threshold;

[0146] Extracting the task execution waiting time corresponding to the time difference being lower than a preset difference threshold as the first task execution waiting time data;

[0147] Obtaining a first determination coefficient using the first task execution waiting time data;

[0148] The first determination coefficient is obtained by the following formula:

[0149]

[0150] Among them, A 01 represents the first determination coefficient; n represents the number of data of the first task execution waiting time data; T c01i represents the time difference between the task execution waiting time corresponding to the i-th first task execution waiting time data and the preset time threshold; T 01i represents the task execution waiting time length corresponding to the i-th first task execution waiting time data; T 01b represents the standard deviation of the task execution waiting time length corresponding to the n first task execution waiting time data; T c01max represents the maximum value of the time difference between the task execution waiting time corresponding to the n first task execution waiting time data and the preset time threshold; T 01mb Indicates the standard deviation of the task execution waiting time length corresponding to the moment of maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold;

[0151] Extracting the task execution waiting time corresponding to the time difference being not less than the preset difference threshold as the second task execution waiting time data;

[0152] Obtaining a second determination coefficient using the second task execution waiting time data;

[0153] The second determination coefficient is obtained by the following formula:

[0154]

[0155] Among them, A 02 represents the second determination coefficient; m represents the number of data of the second task execution waiting time data; T c01p represents the average value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 01p represents the average value of the task execution waiting time length corresponding to the n first task execution waiting time data; T c02i represents the time difference between the task execution waiting time corresponding to the i-th second task execution waiting time data and the preset time threshold; T 02i represents the task execution waiting time length corresponding to the i-th second task execution waiting time data; T 01mbrepresents the standard deviation of the task execution waiting time length corresponding to the maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 02mb Indicates the standard deviation of the task execution waiting time length corresponding to the time when the minimum time difference between the task execution waiting time corresponding to the second task execution waiting time data and the preset time threshold is reached;

[0156] Obtaining a comprehensive determination coefficient using the first determination coefficient and the second determination coefficient;

[0157] The comprehensive determination coefficient is obtained by the following formula:

[0158]

[0159] Among them, S represents the comprehensive determination coefficient; S 0 Indicates the preset determination coefficient reference value; A 02 represents the second determination coefficient; A 01 represents the first determination coefficient;

[0160] Comparing the comprehensive determination coefficient with a preset determination coefficient threshold;

[0161] When the comprehensive determination coefficient exceeds a preset determination coefficient threshold, it is determined that the target monitoring device is at risk of an abnormal event, and a risk warning is issued.

[0162] The beneficial effects of the above embodiments are that by comparing the time difference between the task execution waiting time and the preset time threshold, and judging the situations below and not below the difference threshold respectively, the scheme can carefully analyze the working state of the target monitoring device, so as to more accurately judge whether it has the risk of abnormal events. The introduction of the first determination coefficient and the second determination coefficient comprehensively considers multiple dimensions of the task execution waiting time (such as time difference, time length and its standard deviation, etc.), making the risk judgment more comprehensive and accurate. The scheme can dynamically calculate the determination coefficient according to the actual task execution waiting time data, so as to realize the real-time assessment of the risk of abnormal events of the target monitoring device. This dynamic assessment method helps to discover potential problems in time and take corresponding preventive measures. By setting the comprehensive determination coefficient and comparing it with the preset determination coefficient threshold, the scheme can efficiently detect whether the target monitoring device has the risk of abnormal events. Once the comprehensive determination coefficient exceeds the threshold, the risk warning can be triggered and the relevant personnel can be notified in time to handle it. The scheme avoids unnecessary waste of resources (such as frequent manual inspections or equipment maintenance) through accurate risk judgment and efficient abnormality detection. The early warning mechanism will only be triggered when there is a real risk, thereby improving the efficiency of resource utilization. The determination coefficient calculation formula and threshold in this solution can be adjusted and optimized according to actual conditions to meet the needs of different monitoring devices and scenarios. This scalability and flexibility enable the solution to be widely used in various monitoring systems, improving its versatility and practicality.

[0163] In summary, the above technical solutions show technical effects such as accurate risk determination, dynamic risk assessment, efficient anomaly detection, optimized resource utilization, scalability and flexibility in terms of performance indicators. These effects jointly improve the accuracy and efficiency of risk determination of abnormal events of target monitoring equipment, and help ensure the stable operation and security of the monitoring system.

[0164] In general, the monitoring device management and control method and system based on gateway microservices utilizes the gateway microservice framework to parse the add request initiated by the monitoring device, thereby determining the gateway node that performs the add operation, and adding the monitoring device to the corresponding device management cluster to achieve scalable deployment of the monitoring device; preview data feature information is obtained from the preview request, thereby checking and determining the target monitoring device that can provide preview data, and pulling the stream from the target monitoring device to obtain the preview data, thereby simplifying the pulling and forwarding operations of streaming media data and reducing the processing pressure of streaming media data; a work change instruction is issued to the target monitoring device, and based on the operation log after the working status is changed, it is determined whether an abnormal event occurs in the target monitoring device, thereby transmitting an alarm notification message to the gateway microservice framework, improving the high availability and fault tolerance of the monitoring device, and effectively coupling and allocating resources for multiple monitoring devices.

[0165] The above is only a specific implementation of the present invention, and any other improvements made based on the concept of the present invention are considered to be within the protection scope of the present invention.

Claims

1. A monitoring device control method based on gateway microservices, characterized in that: include: The gateway microservice framework parses and processes the adding request initiated by the monitoring device, and determines the gateway node for adding the monitoring device; Based on the operational attributes of the monitoring device, adding the monitoring device to a corresponding device management cluster under the gateway node; The preview request is parsed and processed by the gateway microservice framework to obtain preview data feature information; Based on the preview data characteristic information, identify a target monitoring device that can provide preview data; Pulling a stream from the target monitoring device to obtain preview data based on the working status of the target monitoring device; Sending a work change instruction to the target monitoring device, and obtaining an operation log after the target monitoring device changes its working state; The operation log is analyzed to determine whether an abnormal event occurs after the target monitoring device changes its working state, thereby transmitting an alarm notification message to the gateway microservice framework.

2. The monitoring device management and control method based on gateway microservices according to claim 1, characterized in that: The gateway microservice framework parses and processes the adding request initiated by the monitoring device, and determines the gateway node for adding the monitoring device; Based on the operational attributes of the monitoring device, the monitoring device is added to a device management cluster corresponding to the gateway node, including: The gateway microservice framework parses and processes the add request initiated by the monitoring device to obtain the monitoring data generation characteristic information of the monitoring device; wherein the monitoring data generation characteristic information includes the monitoring data type and the monitoring data generation rate of the monitoring device; the monitoring data generation characteristic information is matched with all the gateway nodes under the gateway microservice framework to determine the gateway node for adding the monitoring device; The operation computing power resource requirement attribute of the monitoring device is obtained, and the operation computing power resource requirement attribute is compared with the available computing power resources of all device management clusters under the gateway node, so as to add the monitoring device to the corresponding device management cluster under the gateway node.

3. The monitoring device management and control method based on gateway microservices according to claim 1, characterized in that: The preview request is parsed and processed by the gateway microservice framework to obtain preview data feature information; Based on the preview data characteristic information, identify a target monitoring device that can provide preview data; Pulling a stream from the target monitoring device to obtain preview data based on the working status of the target monitoring device includes: The preview request is parsed and processed by the gateway microservice framework to obtain the generation location and time information of the preview data; based on the generation location and time information of the preview data, the monitoring data generation logs of all monitoring devices under the device management cluster are checked and identified to determine the target monitoring device that can provide the preview data; Based on the memory working status of the target monitoring device, determine whether the target monitoring device is in a memory readable state; when the target monitoring device is in a memory readable state, generate a corresponding RTSP URL to pull the stream from the target monitoring device to obtain preview data; when the target monitoring device is not in a memory readable state, do not pull the stream from the target monitoring device to obtain preview data.

4. The monitoring device management and control method based on gateway microservices according to claim 1, characterized in that: Sending a work change instruction to the target monitoring device, and obtaining an operation log after the target monitoring device changes its working state; Analyze the operation log to determine whether an abnormal event occurs after the target monitoring device changes its working state, thereby transmitting an alarm notification message to the gateway microservice framework, including: Based on the streaming progress of the preview data, a work change instruction is issued to the target monitoring device, and a monitoring task execution log after the target monitoring device changes its working state is obtained; The monitoring task execution log is analyzed to obtain the monitoring task execution waiting time after the target monitoring device changes its working state; the monitoring task execution waiting time is compared with a preset time threshold; if the monitoring task execution waiting time exceeds the preset time threshold, it is determined that an abnormal event occurs after the target monitoring device changes its working state; otherwise, it is determined that no abnormal event occurs after the target monitoring device changes its working state; when an abnormal event occurs after the target monitoring device changes its working state, an alarm notification message is transmitted to the gateway microservice framework.

5. The monitoring device management and control method based on gateway microservices according to claim 1, characterized in that: When it is determined that no abnormal event occurs after the target monitoring device changes its working state, the risk of abnormal events occurring in the target monitoring device is determined, including: Extracting the time difference between the task execution waiting time corresponding to when the target monitoring device changes its working state without an abnormal event and the preset time threshold; Comparing the time difference with a preset difference threshold; Extracting the task execution waiting time corresponding to the time difference being lower than a preset difference threshold as the first task execution waiting time data; Obtaining a first determination coefficient using the first task execution waiting time data; The first determination coefficient is obtained by the following formula: Among them, A 01 represents the first determination coefficient; n represents the number of data of the first task execution waiting time data; T c01i represents the time difference between the task execution waiting time corresponding to the i-th first task execution waiting time data and the preset time threshold; T 01i represents the task execution waiting time length corresponding to the i-th first task execution waiting time data; T 01b represents the standard deviation of the task execution waiting time length corresponding to the n first task execution waiting time data; T c01max represents the maximum value of the time difference between the task execution waiting time corresponding to the n first task execution waiting time data and the preset time threshold; T 01mb Indicates the standard deviation of the task execution waiting time length corresponding to the moment of maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; Extracting the task execution waiting time corresponding to the time difference being not less than the preset difference threshold as the second task execution waiting time data; Obtaining a second determination coefficient using the second task execution waiting time data; The second determination coefficient is obtained by the following formula: Among them, A 02 represents the second determination coefficient; m represents the number of data of the second task execution waiting time data; T c01p represents the average value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 01p represents the average value of the task execution waiting time length corresponding to the n first task execution waiting time data; T c02i represents the time difference between the task execution waiting time corresponding to the i-th second task execution waiting time data and the preset time threshold; T 02i represents the task execution waiting time length corresponding to the i-th second task execution waiting time data; T 01mb represents the standard deviation of the task execution waiting time length corresponding to the maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 02mb Indicates the standard deviation of the task execution waiting time length corresponding to the time when the minimum time difference between the task execution waiting time corresponding to the second task execution waiting time data and the preset time threshold is reached; Obtaining a comprehensive determination coefficient using the first determination coefficient and the second determination coefficient; The comprehensive determination coefficient is obtained by the following formula: Among them, S represents the comprehensive determination coefficient; S0 represents the preset determination coefficient reference value; A 02 represents the second determination coefficient; A 01 represents the first determination coefficient; Comparing the comprehensive determination coefficient with a preset determination coefficient threshold; When the comprehensive determination coefficient exceeds a preset determination coefficient threshold, it is determined that the target monitoring device is at risk of an abnormal event, and a risk warning is issued.

6. The monitoring equipment control system based on gateway microservices is characterized by: include: The device adding operation module is used to parse and process the adding request initiated by the monitoring device through the gateway microservice framework, and determine the gateway node for adding the monitoring device; A device management cluster connection module, used to add the monitoring device to the device management cluster corresponding to the gateway node based on the operational attributes of the monitoring device; The device troubleshooting module is used to parse and process the preview request through the gateway microservice framework to obtain preview data feature information; Based on the preview data characteristic information, identify a target monitoring device that can provide preview data; A preview data streaming module, used for streaming preview data from the target monitoring device based on the working status of the target monitoring device; A work change operation module, used to issue a work change instruction to the target monitoring device and obtain an operation log after the target monitoring device changes its work status; The alarm notification module is used to analyze the operation log and determine whether an abnormal event occurs after the target monitoring device changes its working state, thereby transmitting an alarm notification message to the gateway microservice framework.

7. The monitoring equipment management and control system based on gateway microservices according to claim 6, characterized in that: The device adding operation module is used to parse and process the adding request initiated by the monitoring device through the gateway microservice framework, and determine the gateway node for adding the monitoring device, including: The gateway microservice framework parses and processes the add request initiated by the monitoring device to obtain the monitoring data generation characteristic information of the monitoring device; wherein the monitoring data generation characteristic information includes the monitoring data type and the monitoring data generation rate of the monitoring device; the monitoring data generation characteristic information is matched with all the gateway nodes under the gateway microservice framework to determine the gateway node for adding the monitoring device; The device management cluster connection module is used to add the monitoring device to the device management cluster corresponding to the gateway node based on the operation attribute of the monitoring device, including: The operation computing power resource requirement attribute of the monitoring device is obtained, and the operation computing power resource requirement attribute is compared with the available computing power resources of all device management clusters under the gateway node, so as to add the monitoring device to the corresponding device management cluster under the gateway node.

8. The monitoring equipment management and control system based on gateway microservices according to claim 6, characterized in that: The device troubleshooting module is used to parse and process the preview request through the gateway microservice framework to obtain preview data feature information; Based on the preview data feature information, a target monitoring device that can provide preview data is checked and determined, including: The preview request is parsed and processed by the gateway microservice framework to obtain the generation location and time information of the preview data; based on the generation location and time information of the preview data, the monitoring data generation logs of all monitoring devices under the device management cluster are checked and identified to determine the target monitoring device that can provide the preview data; The preview data stream pulling module is used to pull the stream from the target monitoring device to obtain preview data based on the working status of the target monitoring device, including: Based on the memory working status of the target monitoring device, determine whether the target monitoring device is in a memory readable state; when the target monitoring device is in a memory readable state, generate a corresponding RTSP URL to pull the stream from the target monitoring device to obtain preview data; when the target monitoring device is not in a memory readable state, do not pull the stream from the target monitoring device to obtain preview data.

9. The monitoring equipment control system based on gateway microservices according to claim 6, characterized in that: The work change operation module is used to issue a work change instruction to the target monitoring device and obtain the operation log after the target monitoring device changes its working state, including: Based on the streaming progress of the preview data, a work change instruction is issued to the target monitoring device, and a monitoring task execution log after the target monitoring device changes its working state is obtained; The alarm notification module is used to analyze the operation log to determine whether an abnormal event occurs after the target monitoring device changes its working state, thereby transmitting an alarm notification message to the gateway microservice framework, including: The monitoring task execution log is analyzed to obtain the monitoring task execution waiting time after the target monitoring device changes its working state; the monitoring task execution waiting time is compared with a preset time threshold; if the monitoring task execution waiting time exceeds the preset time threshold, it is determined that an abnormal event occurs after the target monitoring device changes its working state; otherwise, it is determined that no abnormal event occurs after the target monitoring device changes its working state; when an abnormal event occurs after the target monitoring device changes its working state, an alarm notification message is transmitted to the gateway microservice framework.

10. The monitoring equipment management and control system based on gateway microservices according to claim 6, characterized in that: When it is determined that no abnormal event occurs after the target monitoring device changes its working state, the risk of abnormal events occurring in the target monitoring device is determined, including: Extracting the time difference between the task execution waiting time corresponding to when the target monitoring device changes its working state without an abnormal event and the preset time threshold; Comparing the time difference with a preset difference threshold; Extracting the task execution waiting time corresponding to the time difference being lower than a preset difference threshold as the first task execution waiting time data; The first task execution waiting time data is used to obtain a first determination coefficient; wherein the first determination coefficient is obtained by the following formula: Among them, A 01 represents the first determination coefficient; n represents the number of data of the first task execution waiting time data; T c01i represents the time difference between the task execution waiting time corresponding to the i-th first task execution waiting time data and the preset time threshold; T 01i represents the task execution waiting time length corresponding to the i-th first task execution waiting time data; T 01b represents the standard deviation of the task execution waiting time length corresponding to the n first task execution waiting time data; T c01max represents the maximum value of the time difference between the task execution waiting time corresponding to the n first task execution waiting time data and the preset time threshold; T 01mb Indicates the standard deviation of the task execution waiting time length corresponding to the moment of maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; Extracting the task execution waiting time corresponding to the time difference being not less than the preset difference threshold as the second task execution waiting time data; Obtaining a second determination coefficient using the second task execution waiting time data; The second determination coefficient is obtained by the following formula: Among them, A 02 represents the second determination coefficient; m represents the number of data of the second task execution waiting time data; T c01p represents the average value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 01p represents the average value of the task execution waiting time length corresponding to the n first task execution waiting time data; T c02i represents the time difference between the task execution waiting time corresponding to the i-th second task execution waiting time data and the preset time threshold; T 02i represents the task execution waiting time length corresponding to the i-th second task execution waiting time data; T 01mb represents the standard deviation of the task execution waiting time length corresponding to the maximum value of the time difference between the task execution waiting time corresponding to the first task execution waiting time data and the preset time threshold; T 02mb Indicates the standard deviation of the task execution waiting time length corresponding to the time when the minimum time difference between the task execution waiting time corresponding to the second task execution waiting time data and the preset time threshold is reached; Obtaining a comprehensive determination coefficient using the first determination coefficient and the second determination coefficient; The comprehensive determination coefficient is obtained by the following formula: Among them, S represents the comprehensive determination coefficient; S0 represents the preset determination coefficient reference value; A 02 represents the second determination coefficient; A 01 represents the first determination coefficient; Comparing the comprehensive determination coefficient with a preset determination coefficient threshold; When the comprehensive determination coefficient exceeds a preset determination coefficient threshold, it is determined that the target monitoring device is at risk of an abnormal event, and a risk warning is issued.