Keep-alive method and device for monitoring equipment in monitoring management platform, equipment and medium
By grouping monitoring equipment and determining the team leader equipment, establishing mutual maintenance and revitalization relationships between the equipment, the maintenance pressure faced by the monitoring management platform after the registration of massive equipment is solved, and the stable operation and cost control of the platform are achieved.
Patent Information
- Application Number
- CN202311684274.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2025-06-10
AI Technical Summary
The monitoring and management platform faces the pressure of keeping active after registering a massive monitoring equipment, resulting in an increase in network pressure and affecting the stable operation of the platform.
By grouping monitoring equipment, determining the group leader equipment, and establishing mutual maintenance relationships between equipment group members through the group leader equipment, dispersing the platform's maintenance pressure.
It effectively reduces the pressure of maintaining the monitoring and management platform, avoids increasing the operating costs of the platform, and promotes the stable operation of the platform.
Smart Images

Figure CN120128622A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video surveillance, and particularly to a method, device, equipment and medium for keeping alive monitoring devices in a monitoring management platform. Background Art
[0002] In the field of security, with the increasing number of monitoring points, the monitoring management platform is facing increasing pressure in point registration and keeping alive. Among them, the registration pressure can be achieved by current limiting and fusing for registering to the platform in different time periods. However, the pressure of keeping the devices alive after they are registered and online always exists. Therefore, how to effectively reduce the platform's keeping-alive pressure is one of the issues worthy of attention at present.
[0003] Regarding the pressure of keeping the devices alive after they are registered and online, the current mainstream solution is to expand the platform's capabilities or build a distributed architecture to increase the access of devices, so as to reduce the platform's keeping-alive pressure. However, no matter which method is used, it increases the platform's deployment cost, and as the number of devices increases, the keeping-alive pressure borne by the platform will become greater and greater, which is not conducive to the stable operation of the platform. Summary of the Invention
[0004] The present invention provides a method, device, equipment and medium for keeping alive monitoring devices in a monitoring management platform, which can effectively reduce the keeping-alive pressure of the monitoring management platform by means of the monitoring devices in the monitoring management platform, without increasing the operating cost of the monitoring management platform, and at the same time helps to promote the stable operation of the monitoring management platform.
[0005] According to one aspect of the present invention, there is provided a method for keeping alive monitoring devices in a monitoring management platform, which is executed by the monitoring management platform. The method includes:
[0006] Group the monitoring devices according to the registration information of the monitoring devices to obtain a plurality of device groups, and determine any one monitoring device in the device group as the group leader device; wherein, each device group includes two or three monitoring devices;
[0007] After receiving the keep-alive message sent by other devices in the device group, carry the IP information of the group leader device of the device group in the response message, so that the other devices change to send the keep-alive message to the group leader device according to the IP information of the group leader device; wherein, the other devices are non-group leader devices in the device group;
[0008] Establish a mutual keep-alive relationship among the group members in the device group through the group leader device, and at the same time keep receiving the keep-alive message sent by the group leader device; wherein, the group members include the group leader device and the other devices.
[0009] According to another aspect of the present invention, there is provided a keep-alive device for monitoring devices in a monitoring and management platform, configured in the monitoring and management platform. The device includes:
[0010] A group leader device determination module, configured to group the monitoring devices according to the registration information of the monitoring devices to obtain a plurality of device groups, and determine any one monitoring device in the device group as the group leader device; wherein, two or three monitoring devices are included in the device group.
[0011] A keep-alive message response module, configured to, after receiving a keep-alive message sent by other devices in the device group, carry the IP information of the group leader device of the device group in the response message, so that the other devices change to send keep-alive messages to the group leader device according to the IP information of the group leader device; wherein, the other devices are non-group leader devices in the device group.
[0012] A keep-alive relationship establishment module, configured to establish a mutual keep-alive relationship between the group members in the device group through the group leader device, and at the same time keep receiving the keep-alive messages sent by the group leader device; wherein, the group members include the group leader device and the other devices.
[0013] According to another aspect of the present invention, there is provided an electronic device, which includes:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the keep-alive method for monitoring devices in the monitoring and management platform according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, there is provided a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to implement the keep-alive method for monitoring devices in the monitoring and management platform according to any embodiment of the present invention when executed by a processor.
[0018] In the technical solution of the embodiment of the present invention, the monitoring devices are grouped according to the registration information of the monitoring devices to obtain multiple device groups, and any one monitoring device in the device group is determined as the group leader device; wherein, there are two or three monitoring devices in the device group; after receiving the keep-alive messages sent by other devices in the device group, the IP information of the group leader device of the device group is carried in the response message, so that other devices change to send keep-alive messages to the group leader device according to the IP information of the group leader device; wherein, the other devices are non-group leader devices in the device group; the mutual keep-alive relationship between the members in the device group is established through the group leader device, and at the same time, the keep-alive messages sent by the group leader device are received; wherein, the group members include the group leader device and other devices. In this technical solution, by establishing the mutual keep-alive relationship between the monitoring devices, the keep-alive pressure can be evenly and smoothly dispersed from the monitoring management platform to each monitoring device, and the keep-alive pressure of the monitoring management platform can be effectively reduced by means of the monitoring devices in the monitoring management platform, without increasing the operating cost of the monitoring management platform, and at the same time, it helps to promote the stable operation of the monitoring management platform.
[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Brief Description of the Drawings
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0021] Figure 1 is a flowchart of a method for keeping alive monitoring devices in a monitoring management platform according to Embodiment 1 of the present invention;
[0022] Figure 2A is a schematic diagram of establishing a mutual keep-alive relationship between monitoring devices according to Embodiment 1 of the present invention;
[0023] Figure 2B is another schematic diagram of establishing a mutual keep-alive relationship between monitoring devices according to Embodiment 1 of the present invention;
[0024] Figure 3 is still another schematic diagram of establishing a mutual keep-alive relationship between monitoring devices according to Embodiment 1 of the present invention;
[0025] Figure 4It is a flowchart of a method for keeping monitoring devices in the monitoring and management platform alive according to Embodiment 2 of the present invention;
[0026] Figure 5 It is a schematic structural diagram of a device for keeping monitoring devices in the monitoring and management platform alive according to Embodiment 3 of the present invention;
[0027] Figure 6 It is a schematic structural diagram of an electronic device for implementing the method for keeping monitoring devices in the monitoring and management platform alive according to the embodiments of the present invention. Detailed implementation manners
[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0029] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily need to be limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1 It is a flowchart of a method for keeping monitoring devices in the monitoring and management platform alive provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of reducing the platform's keep-alive pressure by means of the monitoring devices in the monitoring and management platform. This method can be executed by the device for keeping monitoring devices in the monitoring and management platform. The device for keeping monitoring devices in the monitoring and management platform can be implemented in the form of hardware and / or software, and the device for keeping monitoring devices in the monitoring and management platform can be configured in an electronic device with data processing capabilities. As Figure 1 shown, the method includes:
[0032] S110. Group the monitoring devices according to the registration information of the monitoring devices to obtain multiple device groups, and determine any one monitoring device in the device group as the group leader device.
[0033] The technical solution of this embodiment is executed by the monitoring and management platform. Aiming at the problem that after a large number of monitoring devices are registered in the video monitoring field, the environmental network pressure increases due to the large keep-alive pressure of the monitoring and management platform, which affects the upper-layer services, a keep-alive solution based on SIP (Session Initiation Protocol) is proposed, so as to achieve the effect of significantly reducing the keep-alive pressure of the monitoring and management platform under limited bandwidth. Among them, the monitoring device can refer to the front-end device of the monitoring and management platform, such as a camera or a video camera and a series of devices that can perform image acquisition functions. The registration information may include the IP information of the monitoring device. Each device group includes two monitoring devices or three monitoring devices.
[0034] In this embodiment, first, the monitoring device registers with the monitoring and management platform. When the monitoring device registers successfully, it will be converted into periodic normal keep-alive. For the monitoring and management platform, a large number of monitoring devices registering instantaneously can be realized by the current limiting and fusing mechanism to go online successively in different time periods, so as to solve the platform registration pressure. However, the periodic normal keep-alive pressure cannot use the fusing mechanism, otherwise it will cause the monitoring device to go online and offline repeatedly, which affects the use of the upper-layer services. Therefore, a reasonable and effective method is needed to reduce the keep-alive pressure of the monitoring and management platform.
[0035] In this embodiment, the keep-alive pressure of the platform in a cycle can be evenly shared by the monitoring devices in the monitoring and management platform. When the monitoring device registers successfully, the monitoring devices can be randomly grouped according to the registration information of the monitoring devices or grouped according to the network segment information in the registration information to obtain multiple device groups, and any one monitoring device in the device group is determined as the group leader device. Among them, each device group includes two monitoring devices or three monitoring devices. Optionally, grouping the monitoring devices according to the registration information of the monitoring devices to obtain multiple device groups includes: determining that the monitoring devices in the same network segment belong to the same large group according to the network segment information in the registration information of the monitoring devices; grouping the monitoring devices belonging to the same large group to obtain multiple device groups.
[0036] In this embodiment, when the monitoring device registers successfully, the monitoring and management platform will record the IPs of each monitoring device and group them according to the network segment where the monitoring device IP is located. First, the monitoring devices in the same network segment are assigned to the same large group, and then the monitoring devices in each large group are divided into one group every three. If there are less than three, they are divided into one group every two, so as to obtain multiple device groups. Exemplarily, the monitoring device grouping situation can be shown in Table 1:
[0037] Table 1 Grouping of Monitoring Devices
[0038]
[0039] It should be noted that the monitoring and management platform can randomly assign a group leader device to each device group. Exemplarily, taking Table 1 as an example, the monitoring device corresponding to 172.20.30.1 in device group a1 can be used as the group leader device of a1.
[0040] S120, after receiving the keep-alive message sent by other devices in the device group, carry the IP information of the group leader device of the device group in the response message, so that other devices change to send keep-alive messages to the group leader device according to the IP information of the group leader device.
[0041] In this embodiment, after the monitoring device is successfully registered on the monitoring and management platform, it will send keep-alive messages to the monitoring and management platform respectively to inform the monitoring and management platform of the current operating status of the monitoring device. After the monitoring and management platform receives the keep-alive message sent by other devices in the device group, it will carry the IP information of the group leader device of the device group in the response message. Among them, other devices are non-group leader devices in the device group. If other devices in the device group receive the IP information of the group leader device of the device group, it indicates that the other devices have joined the keep-alive group (device group) with the group leader device as the group leader. At this time, the other devices no longer send keep-alive messages to the monitoring and management platform, but change to send keep-alive messages to the group leader device according to the IP information of the group leader device. After the monitoring and management platform receives the keep-alive message sent by the group leader device in the device group, it will send a regular response message to the group leader device. Thereafter, the group leader device continues to send keep-alive messages to the monitoring and management platform.
[0042] S130, establish a mutual keep-alive relationship among the group members in the device group through the group leader device, and at the same time keep receiving the keep-alive messages sent by the group leader device.
[0043] Among them, the group members include the group leader device and other devices. In this embodiment, based on the number of monitoring devices in the device group (two or three), the group leader device can establish the mutual keep-alive relationship among the group members in different ways, and at the same time, the monitoring and management platform continues to receive the keep-alive messages sent by the group leader device. Specifically, if there are two monitoring devices in the device group (i.e., one group leader device and one other device), after the other device receives the response message returned by the monitoring and management platform and carrying the IP information of the group leader device, it can know which device group it belongs to. After that, the other device sends a keep-alive message to the group leader device in its device group. After receiving the keep-alive message sent by the other device, the group leader device will record the IP information of the other device, return a response message to the other device, and at the same time, the group leader device will send a keep-alive message to the other device, thus forming a pairwise keep-alive among the monitoring devices.
[0044] In this embodiment, optionally, establishing the mutual keep-alive relationship among the group members in the device group through the group leader device includes: if the group leader device receives the keep-alive message sent by the first other device among the group members, the group leader device responds to the keep-alive message and at the same time sends a keep-alive message to the first other device according to the IP information of the first other device; if the group leader device receives the keep-alive message sent by the second other device among the group members, the group leader device responds to the keep-alive message and carries the IP information of the first other device in the response message, so that the second other device changes to send a keep-alive message to the first other device according to the IP information of the first other device, and at the same time, the group leader device sends a keep-alive message to the second other device according to the IP information of the second other device.
[0045] Among them, the first other device may refer to the first other device among the group members that sends a keep-alive message to the group leader device. The second other device may refer to the second other device among the group members that sends a keep-alive message to the group leader device.
[0046] Specifically, if there are three monitoring devices in a device group (i.e., one group leader device and two other devices), when the first other device receives a response message carrying the IP information of the group leader device returned by the monitoring management platform, it can know which device group it belongs to. After that, the first other device sends a keep-alive message to the group leader device in its device group. After receiving the keep-alive message sent by the first other device, the group leader device records the IP information of the first other device and returns a response message to the first other device. When the second other device receives a response message carrying the IP information of the group leader device returned by the monitoring management platform, it can also know which device group it belongs to and sends a keep-alive message to the group leader device in its device group. After receiving the keep-alive message sent by the second other device, the group leader device returns a response message carrying the IP information of the first other device to the second other device, so that the second other device sends a keep-alive message to the first other device thereafter. At the same time, the group leader device sends a keep-alive message to the second other device to form a three-way cyclic keep-alive among the monitoring devices.
[0047] In this embodiment, optionally, if a device group includes one group leader device and one other device, the mutual keep-alive relationship between the members of the device group is that the group leader device sends a keep-alive message to the other device, and the other device sends a keep-alive message to the group leader device; if a device group includes one group leader device and two other devices, the mutual keep-alive relationship between the members of the device group is that the group leader device sends a keep-alive message to the second other device, the second other device sends a keep-alive message to the first other device, and the first other device sends a keep-alive message to the group leader device. Herein, the first other device and the second other device may respectively refer to two different other devices in the device group.
[0048] Figure 2A It is a schematic diagram for establishing a mutual keep-alive relationship between monitoring devices provided in Embodiment 1 of the present invention. Among them, Figure 2A the device group in includes 2 monitoring devices, IPC0 is the group leader device, IPC1 is the other device, and IPC is an IP camera. As Figure 2A shown, the mutual keep-alive relationship between the members of this device group is that IPC0 sends a keep-alive message to IPC1 and IPC1 sends a keep-alive message to IPC0. At the same time, IPC0 will send a keep-alive message to the monitoring management platform.
[0049] Figure 2B It is another schematic diagram for establishing a mutual keep-alive relationship between monitoring devices provided in Embodiment 1 of the present invention. Among them, Figure 2BThe device group in it includes three monitoring devices, and IPC0 is the group leader device, while IPC1 and IPC2 are both other devices. Specifically, IPC1 is the first other device and IPC2 is the second other device. As Figure 2B shown, the mutual keep-alive relationship among the group members in this device group is that IPC0 sends keep-alive messages to IPC2, IPC2 sends keep-alive messages to IPC1, and IPC1 sends keep-alive messages to IPC0. At the same time, IPC0 will send keep-alive messages to the monitoring management platform.
[0050] With such a setting in this solution, through pairwise keep-alive or three-way cyclic keep-alive among the monitoring devices, the keep-alive pressure can be evenly and smoothly dispersed from the monitoring management platform to each monitoring device, thereby effectively reducing the keep-alive pressure on the monitoring management platform and contributing to the stable operation of the monitoring management platform.
[0051] Furthermore, since the device groups are interconnected with each other, when the network between the monitoring management platform and the monitoring devices is poor, the group leader device can proxy-forward the signaling sent by the monitoring management platform to other devices, realizing a similar multi-path function, thereby reducing the use of network bandwidth, effectively reducing network pressure, and improving the communication efficiency between the monitoring management platform and the monitoring devices.
[0052] The technical solution of the embodiment of the present invention groups the monitoring devices according to the registration information of the monitoring devices to obtain multiple device groups, and determines any one monitoring device in the device group as the group leader device; wherein, each device group includes two or three monitoring devices; after receiving the keep-alive message sent by other devices in the device group, the IP information of the group leader device of the device group is carried in the response message, so that other devices change to send keep-alive messages to the group leader device according to the IP information of the group leader device; wherein, other devices are non-group leader devices in the device group; the mutual keep-alive relationship among the group members in the device group is established through the group leader device, and at the same time, the keep-alive message sent by the group leader device is received; wherein, the group members include the group leader device and other devices. With this technical solution, by establishing the mutual keep-alive relationship among the monitoring devices, the keep-alive pressure can be evenly and smoothly dispersed from the monitoring management platform to each monitoring device, and the keep-alive pressure on the monitoring management platform can be effectively reduced by means of the monitoring devices in the monitoring management platform without increasing the operating cost of the monitoring management platform, and at the same time, it helps to promote the stable operation of the monitoring management platform.
[0053] In this embodiment, optionally, after grouping the monitoring devices according to their registration information to obtain multiple device groups, the following steps are further included: If the number of device groups is greater than a preset number threshold, the device groups are further grouped to obtain multiple medium-sized device groups; where each medium-sized device group includes two or three group leader devices; determining any one of the group leader devices in the medium-sized device group as the medium-sized group leader device; after receiving the keep-alive messages sent by other medium-sized devices in the medium-sized device group, the IP information of the medium-sized group leader device of the medium-sized device group is carried in the response message, so that other medium-sized devices change to send keep-alive messages to the medium-sized group leader device according to the IP information of the medium-sized group leader device; where the other medium-sized devices are non-medium-sized group leader devices in the medium-sized device group; establishing a mutual keep-alive relationship among the members of the medium-sized device group through the medium-sized group leader device, and at the same time keeping receiving the keep-alive messages sent by the medium-sized group leader device; where the group members include the medium-sized group leader device and other medium-sized devices.
[0054] In this embodiment, when the number of formed device groups is relatively large, the monitoring and management platform still has a relatively large keep-alive pressure. At this time, the same method can be used to form each three device groups into a medium-sized device group. Each device group still includes the original three or two group members (monitoring devices). The monitoring and management platform randomly selects one group leader device from each medium-sized device group as the medium-sized group leader device, and the medium-sized group leader device sends keep-alive messages to the monitoring and management platform. Among them, if the number of device groups is insufficient, each two device groups can be formed into a medium-sized device group.
[0055] Among them, the preset quantity threshold may refer to a reference value of the number of device groups preset according to actual application requirements. Exemplarily, taking the case of grouping monitoring devices according to network segment information as an example, after grouping the monitoring devices belonging to the same large group to obtain multiple device groups, first determine whether the number of device groups in each large group is greater than the preset quantity threshold. If the number of device groups in a certain large group is greater than the preset quantity threshold, it indicates that the number of device groups formed in this large group is relatively large, that is, the monitoring and management platform still has a relatively large keep-alive pressure. At this time, this large group can be determined as the target large group, and the device groups in the target large group are continued to be grouped according to the above grouping method to obtain multiple device middle groups, and the monitoring and management platform randomly determines a group leader device from the device middle groups as the middle group leader device. When the monitoring and management platform receives a keep-alive message sent by other middle devices (non-group leader devices) in the device middle group, the IP information of the middle group leader device of the device middle group is carried in the response message. When other middle devices receive the IP information of the middle group leader device sent by the monitoring and management platform, they can know which device middle group they belong to. At this time, other middle devices no longer send keep-alive messages to the monitoring and management platform, but send keep-alive messages to the middle group leader device according to the IP information of the middle group leader device, thereby establishing an inter-keep-alive relationship between the middle group members in the device middle group through the middle group leader device, and at the same time, the monitoring and management platform will keep receiving the keep-alive messages sent by the middle group leader device. Among them, the process of establishing the inter-keep-alive relationship between the middle group members in the device middle group can refer to the process of establishing the inter-keep-alive relationship between the group members in the above-mentioned device group, which will not be elaborated here.
[0056] Figure 3 This is another schematic diagram for establishing an inter-keep-alive relationship between monitoring devices provided in the first embodiment of the present invention. Among them, Figure 3 it includes three group leader devices, namely IPC0, IPC3, and IPC6, and IPC0 is the middle group leader device. At the same time, IPC0-IPC2, IPC3-IPC5, and IPC6-IPC8 respectively form different device groups. As Figure 3 shown, in the three device groups, the inter-keep-alive relationship between the group members in the device group is established in the way that the group leader device sends a keep-alive message to the second other device, the second other device sends a keep-alive message to the first other device, and the first other device sends a keep-alive message to the group leader device. At the same time, the middle group leader device IPC0 sends a keep-alive message to the second other middle device IPC6, the second other middle device IPC6 sends a keep-alive message to the first other middle device IPC3, the first other middle device IPC3 sends a keep-alive message to the middle group leader device IPC0, and the middle group leader device IPC0 sends a keep-alive message to the monitoring and management platform.
[0057] With this setup, when there are a large number of device groups formed, the device groups can be further grouped to determine multiple device mid - groups, and mutual keep - alive relationships are established among the mid - group members in the device mid - groups, which can further reduce the keep - alive pressure on the monitoring and management platform, thereby further promoting the stable operation of the monitoring and management platform.
[0058] Embodiment 2
[0059] Figure 4 The flowchart of a keep - alive method for monitoring devices in a monitoring and management platform provided in Embodiment 2 of the present invention is based on the above - mentioned embodiment for optimization. Specifically, the optimization is as follows: If a refresh registration message sent by any monitoring device in a device group is received, the downstream monitoring device corresponding to this monitoring device is determined as a candidate faulty device according to the mutual keep - alive relationship, and the running state of the candidate faulty device is determined, and the device group is re - allocated.
[0060] As Figure 4 shown, the method of this embodiment specifically includes the following steps:
[0061] S210, group the monitoring devices according to the registration information of the monitoring devices to obtain multiple device groups, and determine any one monitoring device in the device group as the group leader device.
[0062] Among them, each device group includes two or three monitoring devices.
[0063] S220, after receiving the keep - alive message sent by other devices in the device group, carry the IP information of the group leader device of the device group in the response message, so that other devices change to send keep - alive messages to the group leader device according to the IP information of the group leader device.
[0064] Among them, other devices are non - group - leader devices in the device group.
[0065] S230, establish mutual keep - alive relationships among the members in the device group through the group leader device, and at the same time keep receiving the keep - alive messages sent by the group leader device.
[0066] Among them, the specific implementation manners of S210 - S230 can refer to the detailed descriptions in S110 - S130, which will not be elaborated here. Among them, the group members include the group leader device and other devices.
[0067] S240, if a refresh registration message sent by any monitoring device in the device group is received, the downstream monitoring device corresponding to this monitoring device is determined as a candidate faulty device according to the mutual keep - alive relationship, and the running state of the candidate faulty device is determined, and the device group is re - allocated.
[0068] In this embodiment, after each monitoring device in the device group enters the keep-alive state according to the above keep-alive relationship, if any monitoring device fails to keep alive three times, it will send a refresh registration message to the monitoring management platform. After receiving the refresh registration message sent by a certain monitoring device, the monitoring management platform will query the device group to which the monitoring device belongs, and determine the downstream monitoring device corresponding to the monitoring device as a candidate faulty device according to the mutual keep-alive relationship. Among them, the monitoring device sends a keep-alive message to the downstream monitoring device, and the candidate faulty device can be understood as a device that may have a fault.
[0069] Exemplarily, taking Figure 2B as an example, if IPC2 sends a keep-alive message to IPC1 three times in a row, but does not receive a response message returned by IPC1 each time, it can be determined that IPC2 fails to keep alive three times in a row. At this time, IPC2 sends a refresh registration message to the monitoring management platform. After receiving the refresh registration message sent by IPC2, the monitoring management platform will query the device group to which IPC2 belongs. If it is found through the query that IPC0 keeps alive normally, it is guessed that IPC1 has a fault. At this time, IPC1 can be determined as the candidate faulty device. If the monitoring management platform senses that IPC0's keep-alive times out or receives a refresh registration message sent by IPC1, it is guessed that IPC0 has a fault. At this time, IPC0 can be determined as the candidate faulty device.
[0070] After determining the candidate faulty device, it is necessary to further determine the running state of the candidate faulty device. Among them, the running state includes normal and faulty offline. Optionally, determining the running state of the candidate faulty device includes: if the candidate faulty device is the group leader device, determining the running state of the group leader device according to the periodic keep-alive message of the group leader device; if the candidate faulty device is other devices, determining the running state of other devices according to the running state query result.
[0071] In this embodiment, if the candidate faulty device is the group leader device, the running state of the group leader device can be determined according to the periodic keep-alive message of the group leader device. Specifically, if the monitoring management platform can normally receive the periodic keep-alive message sent by the group leader device, it can be determined that the running state of the group leader device is normal; otherwise, it can be determined that the running state of the group leader device is faulty offline. If the candidate faulty device is other devices, the running state of other devices can be determined according to the running state query result. Specifically, the monitoring management platform sends a running state query message to other devices. If other devices can make a normal response, it can be determined that the running state of other devices is normal; otherwise, it can be determined that the running state of other devices is faulty offline.
[0072] After determining the operating status of the candidate faulty device, the device groups can be reallocated based on the operating status. Optionally, reallocating the device groups includes: if the operating status of the group leader device is faulty and offline, then allocate other devices to other device groups, and adjust the mutual keep-alive relationship in other device groups according to the allocation result; where the number of devices in other device groups is less than three; if the operating status of other devices is faulty and offline, then delete the other devices from the device group, and adjust the mutual keep-alive relationship in the device group according to the deletion result.
[0073] In this embodiment, if the operating status of the group leader device is faulty and offline, then perform offline processing on the group leader device and dissolve the device group. At the same time, find other device groups with less than 3 members in the same large group, and allocate other devices in the device group to other device groups, and then adjust the mutual keep-alive relationship in other device groups according to the allocation result. If the operating status of other devices is faulty and offline, then delete the other devices from the device group, and adjust the mutual keep-alive relationship in the device group according to the deletion result.
[0074] Exemplarily, taking Figure 2B as an example, if it is determined that the operating status of IPC2 is faulty and offline, then delete IPC2 from the device group. At this time, there are two devices, IPC0 and IPC1, left in the device group, and IPC0 is the group leader device. In this case, it is necessary to adjust the mutual keep-alive relationship in the device group so that IPC0 sends a keep-alive message to IPC1, and at the same time IPC1 sends a keep-alive message to IPC0, that is, the mutual keep-alive relationship in the adjusted device group is as Figure 2A shown.
[0075] In the technical solution of the embodiment of the present invention, if a refresh registration message sent by any one of the monitoring devices in the device group is received, the downstream monitoring device corresponding to the monitoring device is determined as a candidate faulty device according to the mutual keep-alive relationship, and the operating state of the candidate faulty device is determined, and the device group is reallocated. In this technical solution, by establishing the mutual keep-alive relationship between the monitoring devices, the keep-alive pressure can be evenly and smoothly dispersed from the monitoring management platform to each monitoring device, and the keep-alive pressure of the monitoring management platform can be effectively reduced by means of the monitoring devices in the monitoring management platform, without increasing the operating cost of the monitoring management platform. At the same time, it helps to promote the stable operation of the monitoring management platform. When the monitoring management platform receives the refresh registration message sent by the monitoring device, the candidate faulty device can be determined according to the mutual keep-alive relationship between the monitoring devices, and the device group can be reallocated based on the operating state of the candidate faulty device, so as to avoid the change of the states of a large number of monitoring devices due to the failure of a certain monitoring device, and avoid the monitoring management platform transferring the keep-alive pressure to the monitoring device and affecting the normal business use of the monitoring device, which helps to further promote the stable operation of the monitoring management platform.
[0076] Embodiment III
[0077] Figure 5 FIG. is a schematic structural diagram of a keep-alive device for monitoring devices in a monitoring management platform provided in Embodiment III of the present invention. The device is configured in the monitoring management platform and can execute the keep-alive method for monitoring devices in the monitoring management platform provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. As Figure 5 shown, the device includes:
[0078] The group leader device determination module 310 is configured to group the monitoring devices according to the registration information of the monitoring devices to obtain a plurality of device groups, and determine any one of the monitoring devices in the device group as the group leader device; wherein, two or three monitoring devices are included in the device group;
[0079] The keep-alive message response module 320 is configured to, after receiving the keep-alive message sent by other devices in the device group, carry the IP information of the group leader device of the device group in the response message, so that the other devices change to send the keep-alive message to the group leader device according to the IP information of the group leader device; wherein, the other devices are non-group leader devices in the device group;
[0080] The keep-alive relationship establishment module 330 is configured to establish a mutual keep-alive relationship between the group members in the device group through the group leader device, and at the same time keep receiving the keep-alive message sent by the group leader device; wherein, the group members include the group leader device and the other devices.
[0081] Optionally, the device further includes:
[0082] A candidate faulty device determination module, configured to, if a refresh registration message sent by any one of the monitoring devices in the device group is received, determine the downstream monitoring device corresponding to the monitoring device as a candidate faulty device according to the mutual keep-alive relationship, determine the operating state of the candidate faulty device, and reassign the device group.
[0083] Optionally, the candidate faulty device determination module is configured to:
[0084] If the candidate faulty device is the group leader device, determine the operating state of the group leader device according to the periodic keep-alive message of the group leader device;
[0085] If the candidate faulty device is another device, determine the operating state of the other device according to the query result of the operating state.
[0086] Optionally, the candidate faulty device determination module is further configured to:
[0087] If the operating state of the group leader device is faulty offline, assign the other devices to other device groups, and adjust the mutual keep-alive relationship in the other device groups according to the assignment result; wherein, the number of devices in the other device groups is less than three;
[0088] If the operating state of the other device is faulty offline, delete the other device from the device group, and adjust the mutual keep-alive relationship in the device group according to the deletion result.
[0089] Optionally, if the device group includes a group leader device and an other device, the mutual keep-alive relationship between the members in the device group is that the group leader device sends a keep-alive message to the other device, and the other device sends a keep-alive message to the group leader device;
[0090] If the device group includes a group leader device and two other devices, the mutual keep-alive relationship between the members in the device group is that the group leader device sends a keep-alive message to the second other device, the second other device sends a keep-alive message to the first other device, and the first other device sends a keep-alive message to the group leader device.
[0091] Optionally, the keep-alive relationship establishment module 330 is configured to:
[0092] If the team leader device receives a keep-alive message sent by the first other device among the team members, the team leader device responds to the keep-alive message and simultaneously sends a keep-alive message to the first other device according to the IP information of the first other device;
[0093] If the team leader device receives a keep-alive message sent by the second other device among the team members, the team leader device responds to the keep-alive message and carries the IP information of the first other device in the response message, so that the second other device changes to send a keep-alive message to the first other device according to the IP information of the first other device, and at the same time the team leader device sends a keep-alive message to the second other device according to the IP information of the second other device.
[0094] Optionally, the device further includes:
[0095] After grouping the monitoring devices according to the registration information of the monitoring devices to obtain multiple device groups, if the number of device groups is greater than a preset number threshold, the device groups are grouped to obtain multiple device middle groups; wherein, there are two team leader devices or three team leader devices in the device middle groups;
[0096] Determine any one of the team leader devices in the device middle group as the middle team leader device;
[0097] After receiving a keep-alive message sent by other middle devices in the device middle group, carry the IP information of the middle team leader device of the device middle group in the response message, so that the other middle devices change to send a keep-alive message to the middle team leader device according to the IP information of the middle team leader device; wherein, the other middle devices are non-middle team leader devices in the device middle group;
[0098] Establish a mutual keep-alive relationship among the middle group members in the device middle group through the middle team leader device, and at the same time keep receiving the keep-alive message sent by the middle team leader device; wherein, the middle group members include the middle team leader device and the other middle devices.
[0099] The keep-alive device for monitoring devices in a monitoring management platform provided by an embodiment of the present invention can execute the keep-alive method for monitoring devices in a monitoring management platform provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
[0100] Embodiment 4
[0101] Figure 6The structural schematic diagram of the electronic device 10 that can be used to implement the embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0102] As Figure 6 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0103] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0104] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the keep-alive method for monitoring devices in the monitoring management platform.
[0105] In some embodiments, the method for keeping the monitoring devices alive in the monitoring and management platform may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for keeping the monitoring devices alive in the monitoring and management platform described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for keeping the monitoring devices alive in the monitoring and management platform by any other suitable means (e.g., by means of firmware).
[0106] The various embodiments of the systems and techniques described above in this document may be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs may be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0108] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0110] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0111] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0112] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0113] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for keeping monitoring devices alive in a monitoring and management platform, characterized in that, executed by the monitoring and management platform, the method includes: Grouping the monitoring devices according to the registration information of the monitoring devices to obtain multiple device groups, and determining any one monitoring device in the device group as the group leader device; wherein, two or three monitoring devices are included in the device group; After receiving the keep-alive message sent by other devices in the device group, carry the IP information of the group leader device of the device group in the response message, so that the other devices change to send the keep-alive message to the group leader device according to the IP information of the group leader device; wherein, the other devices are non-group leader devices in the device group; Establish a mutual keep-alive relationship between the members of the device group through the group leader device, and at the same time keep receiving the keep-alive message sent by the group leader device; wherein, the group members include the group leader device and the other devices.
2. The method according to claim 1, characterized in that, If a refresh registration message sent by any one monitoring device in the device group is received, determine the downstream monitoring device corresponding to the monitoring device as a candidate faulty device according to the mutual keep-alive relationship, determine the operating state of the candidate faulty device, and reassign the device group.
3. The method according to claim 2, characterized in that, Determining the operating state of the candidate faulty device includes: If the candidate faulty device is a group leader device, determine the operating state of the group leader device according to the periodic keep-alive message of the group leader device; If the candidate faulty device is other device, determine the operating state of the other device according to the operating state query result.
4. The method according to claim 3, characterized in that, Reassigning the device group includes: If the operating state of the group leader device is faulty offline, assign the other devices to other device groups, and adjust the mutual keep-alive relationship in the other device groups according to the assignment result; wherein, the number of devices in the other device groups is less than three; If the operating state of the other device is faulty offline, delete the other device from the device group, and adjust the mutual keep-alive relationship in the device group according to the deletion result.
5. The method according to any one of claims 1-4, characterized in that, If the device group includes a group leader device and an other device, the mutual keep-alive relationship between the group members in the device group is that the group leader device sends a keep-alive message to the other device, and the other device sends a keep-alive message to the group leader device; If the device group includes a group leader device and two other devices, the mutual keep-alive relationship between the group members in the device group is that the group leader device sends a keep-alive message to the second other device, the second other device sends a keep-alive message to the first other device, and the first other device sends a keep-alive message to the group leader device.
6. The method according to any one of claims 1 - 4, characterized in that, establishing a mutual keep - alive relationship among the members of the device group through the group leader device, including: if the group leader device receives a keep - alive message sent by the first other device among the group members, the group leader device responds to the keep - alive message and simultaneously sends a keep - alive message to the first other device according to the IP information of the first other device; if the group leader device receives a keep - alive message sent by the second other device among the group members, the group leader device responds to the keep - alive message and carries the IP information of the first other device in the response message, so that the second other device changes to send a keep - alive message to the first other device according to the IP information of the first other device, and at the same time the group leader device sends a keep - alive message to the second other device according to the IP information of the second other device.
7. The method according to claim 1, characterized in that, after grouping the monitoring devices according to the registration information of the monitoring devices to obtain a plurality of device groups, the method further includes: if the number of device groups is greater than a preset number threshold, grouping the device groups to obtain a plurality of device middle - groups; wherein, each device middle - group includes two group leader devices or three group leader devices; determining any one of the group leader devices in the device middle - group as the middle - group leader device; after receiving a keep - alive message sent by other middle - devices in the device middle - group, carrying the IP information of the middle - group leader device of the device middle - group in the response message, so that the other middle - devices change to send a keep - alive message to the middle - group leader device according to the IP information of the middle - group leader device; wherein, the other middle - devices are non - middle - group leader devices in the device middle - group; establishing a mutual keep - alive relationship among the middle - group members in the device middle - group through the middle - group leader device and simultaneously keeping receiving the keep - alive message sent by the middle - group leader device; wherein, the middle - group members include the middle - group leader device and the other middle - devices.
8. A keep - alive device for monitoring devices in a monitoring management platform, characterized in that, configured in the monitoring management platform, the device includes: a group leader device determination module, configured to group the monitoring devices according to the registration information of the monitoring devices to obtain a plurality of device groups, and determine any one of the monitoring devices in the device group as the group leader device; wherein, each device group includes two monitoring devices or three monitoring devices; a keep - alive message response module, configured to carry the IP information of the group leader device of the device group in the response message after receiving a keep - alive message sent by other devices in the device group, so that the other devices change to send a keep - alive message to the group leader device according to the IP information of the group leader device; wherein, the other devices are non - group leader devices in the device group. The keep-alive relationship establishment module is used to establish mutual keep-alive relationships among the members of the device group through the group leader device, and at the same time keep receiving the keep-alive messages sent by the group leader device; wherein, the group members include the group leader device and the other devices.
9. An electronic device, characterized in that, the electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the keep-alive method of the monitoring device in the monitoring and management platform according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the keep-alive method of the monitoring device in the monitoring and management platform according to any one of claims 1-7 is realized.