Equipment management method, equipment management device and cluster system

By setting the first device and the second device in the N+M cluster system and switching the connection mode in different states, the problem of easy loss of cluster data during the main and backup replacement process is solved, and the secure storage and backup of data is realized.

CN120050286APending Publication Date: 2025-05-27ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510191840.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

During the process of primary and standby replacement of N+M clusters, cluster data is easily lost, affecting the security and integrity of the data.

Method used

By setting the first device and the second device in the cluster system and switching the connection mode in different states, the first device is connected to the sensing unit, and the second device backs up the data of the first sensing unit. When the first device is in the second state, the second device takes over the work of the first device to ensure storage and backup of data.

Benefits of technology

Even if data is lost in the first device, the data backed up by the second device can prevent the loss of information and improve the security and integrity of the cluster data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120050286A_ABST
    Figure CN120050286A_ABST
Patent Text Reader

Abstract

The invention relates to an equipment management method, an equipment management device and a cluster system, which are applied to the cluster system provided with first equipment and second equipment, the cluster system is in a first connection mode when the first equipment is in a first state, and the first equipment is connected with a sensing unit in the first connection mode. The second equipment is connected with the first sensing unit in the sensing units; the method comprises: detecting a state of a first device; and when it is detected that the first device is in the second state, the cluster system is controlled to enter a second connection mode, and in the second connection mode, the second device is further connected with a second sensing unit in the sensing units. By adopting the method, the problem that cluster data is easy to lose in a main-standby replacement process can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data storage, and particularly to a device management method, a device management apparatus, and a cluster system. Background Art

[0002] An N+M cluster is a distributed computing architecture that includes N nodes as primary devices and M nodes as standby devices. The N+M cluster solution achieves device-level disaster tolerance, and the disaster tolerance ability is determined by the number of M nodes. During the disaster tolerance process, the standby device provides services externally, historical data cannot be queried, and real-time data can be normally queried and scheduled. After the disaster tolerance ends, the primary device resumes providing services externally, and historical data and real-time data can be normally queried and scheduled. The N+M cluster is often used to improve the availability, reliability, and scalability of the system. However, during the primary-standby replacement process, there is a possibility that the data of the abnormal primary device is lost, which affects the purpose of data security and integrity.

[0003] Regarding the problem that cluster data is prone to loss during the primary-standby replacement process in the related art, no effective solution has been proposed yet. Summary of the Invention

[0004] Based on this, in view of the above technical problems, it is necessary to provide a device management method, a device management apparatus, and a cluster system that can solve the problem of easy loss of cluster data during the primary-standby replacement process.

[0005] In a first aspect, in the present embodiment, a device management method is provided, which is applied to a cluster system provided with a first device and a second device. When the first device is in a first state, the cluster system is in a first connection mode. In the first connection mode, the first device is connected to a sensing unit, and the second device is connected to a first sensing unit in the sensing unit; the method includes:

[0006] Detect the state of the first device;

[0007] When it is detected that the first device is in a second state, control the cluster system to enter a second connection mode. In the second connection mode, the second device is further connected to a second sensing unit in the sensing unit.

[0008] In some of the embodiments, when it is detected that the first device is in a second state, controlling the cluster system to enter a second connection mode includes:

[0009] Obtain a third sensing unit connected by the first device in the first state;

[0010] Determine a target sensing unit in the third sensing unit;

[0011] Among the multiple second devices, determine the second device with the most target sensing units connected thereto as the target device;

[0012] Connect the target device and the third sensing unit.

[0013] In some of the embodiments, in the first connection mode, the first device connects the first sensing unit and the second sensing unit based on a first channel; in the case where it is detected that the first device is in a second state, controlling the cluster system to enter a second connection mode includes:

[0014] Connect the second device and the first sensing unit and the second sensing unit according to the first channel.

[0015] In some of the embodiments, in the first connection mode, the second device connects the first sensing unit based on a second channel; in the case where it is detected that the first device is in a second state, controlling the cluster system to enter a second connection mode includes:

[0016] Obtain the third sensing unit connected by the first device in the first state;

[0017] In the case where there is a corresponding second channel for the third sensing unit, delete the second channel.

[0018] In some of the embodiments, after controlling the cluster system to enter the second connection mode in the case where it is detected that the first device is in the second state, the method further includes:

[0019] Add the virtual address of the first device to the second device.

[0020] In some of the embodiments, the method further includes:

[0021] In the case where the first device is converted from the second state to the first state, transmit the data in the second device to the first device and control the cluster system to enter the first connection mode.

[0022] In some of the embodiments, the cluster system includes multiple second devices, and detecting the state of the first device includes:

[0023] Determine a management device among the multiple second devices and detect the state of the first device based on the management device.

[0024] Second aspect, in this embodiment, a device management apparatus is provided, including a memory and a processor. It is characterized in that a computer program is stored in the memory, and the processor is configured to run the computer program to execute the device management method described in the first aspect above.

[0025] Third aspect, in this embodiment, a cluster system is provided. The cluster system includes a first device and a second device. Among them,

[0026] The first device is connected to the sensing unit and is used to store and output data of multiple sensing units;

[0027] When the first device is in the first state, the second device is connected to the first sensing unit in the sensing unit and is used to back up the data of the first sensing unit in the sensing unit; when the first device is in the second state, the second device is connected to the first sensing unit and the second sensing unit in the sensing unit and is used to store the data in the first sensing unit and the second sensing unit in the sensing unit. In some of the embodiments, the cluster system further includes a cluster management platform. Among them,

[0028] The cluster management platform is used to access the data in the sensing unit through the first device or the second device.

[0029] For the above device management method, device management apparatus and cluster system, when the first device is in the first state, through the first connection mode, while the first device stores the data in the sensing unit, the second device backs up the data of the first sensing unit in the sensing unit; when the first device is in the second state, through the second connection mode, the second device can replace the first device to obtain the data in the sensing unit; even if there is a situation where data is lost in the first device, the data of the first sensing unit backed up by the second device can also be used to prevent the loss of at least part of the information, solving the problem that cluster data is prone to loss during the primary-backup replacement process. Description of the Drawings

[0030] Figure 1 Schematic diagram of an N+M cluster in the prior art;

[0031] Figure 2 Application environment diagram of the device management method in an embodiment of this application;

[0032] Figure 3 Flow schematic diagram of the device management method in an embodiment of this application;

[0033] Figure 4 Schematic diagram of an N+M cluster in an embodiment of this application;

[0034] Figure 5 It is a structural block diagram of a cluster system in an embodiment of the present application;

[0035] Figure 6 It is an internal structure diagram of a computer device in an embodiment of the present application. Detailed implementation manners

[0036] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0037] Figure 1 A schematic diagram of a traditional N+M cluster is provided. Figure 1 The shown N+M cluster is used to store data acquired by cameras. Among them, N+M service nodes jointly form a cluster and provide services externally. N represents the primary devices, and the N+M cluster includes primary devices N1, N2, N3,.... M represents the standby devices, and the N+M cluster includes standby devices M1, M2,.... The N nodes are connected to the front-end cameras as primary devices to store video data and provide services to the platform management device at the same time; the M nodes do not provide services externally as backup devices. When there are multiple M nodes, one of the standby devices is selected as the standby device master node, which is responsible for managing and coordinating all standby devices. When the devices are running normally, the platform management device schedules and manages the real-time and historical video data of the primary devices. When a primary device fails and shuts down abnormally, the standby device takes over its business, restores video storage, and the platform management device schedules and manages the standby device to obtain the real-time video data of the standby device. When the primary device recovers abnormally, the primary device takes over the business again, and the standby device returns to idle. However, during the primary-standby replacement process, the data of the abnormal primary device may be lost, affecting the purpose of data security and integrity.

[0038] Based on this, the embodiment of the present application provides a device management method. The method embodiment provided in this embodiment can be executed on a terminal, a computer or a similar computing device. For example, it runs on a terminal. Figure 2 It is a hardware structure block diagram of a terminal of the device management method in an embodiment of the present application. As Figure 2 shown, the terminal may include one or more ( Figure 2 only one is shown in Figure 2The structure shown is only schematic and does not limit the structure of the above terminal. For example, the terminal may further include more or fewer components than those shown in Figure 2 or have a different configuration from that shown in Figure 2 .

[0039] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the device management method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.

[0040] The transmission device 106 is used to receive or send data via a network. The above network includes the wireless network provided by the communication provider of the terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0041] The device management method provided by the embodiments of the present application can be applied to a cluster system provided with a first device and a second device. When the first device is in the first state, the cluster system is in the first connection mode. In the first connection mode, the first device is connected to the sensing unit, and the second device is connected to the first sensing unit in the sensing unit;

[0042] Among them, the first device and the second device are devices with storage functions. The first device and the second device can store the data in the sensing units connected thereto. The sensing unit can be composed of one or more sensors for collecting data. Optionally, the sensing unit can be a temperature sensor, an image sensor, an electrical sensor, etc. The data obtained by the sensing unit can be multimedia data such as video, image, and sound, or other data that can be collected. One or more first sensing units can be included in the multiple sensing units. Optionally, the first sensing unit can be selected by the user. Or, one or more sensing units with a high degree of importance among the respective sensing units can be set as the target sensing unit. Further, the maximum number of sensing units that the second device can connect can be determined according to the storage capacity of the second device. According to the maximum number of sensing units that the second device can connect, one or more sensing units are selected from the sensing units in the order from the highest degree of importance to the lowest degree of importance as the first sensing unit, so that the number of first sensing units does not exceed the maximum number of sensing units that the second device can connect. Among them, when it is possible to connect all the sensing units based on the access capability of the second device, each sensing unit can be set as the first sensing unit.

[0043] Among them, the first state is used to indicate that the first device can normally store and output the data in the multiple sensing units. Optionally, when the first device is in the first state, the first device and the multiple sensing units are connected so that the first device stores and outputs the data of the multiple sensing units. The first sensing unit among the multiple sensing units is obtained, and the second device and one or more first sensing units are connected so that the second device stores the data of the first sensing unit. When an external device needs to query the data of the sensing unit, the first device provides the data in the sensing unit to the external device. Among them, an identifier can be added to the data of the target sensing unit obtained by the second device, and the data stored in the second device is represented as backup data through the identifier.

[0044] One or more first devices and one or more second devices can be set in the cluster system. Among them, when the cluster system includes multiple first devices, each first device is respectively connected to different sensing units. The number of sensing units connected to each first device can be the same or different. When the cluster system includes multiple second devices, one or more first sensing units are respectively assigned to at least some of the second devices. Optionally, a management device can be selected from the second devices. The management device can assign multiple first sensing units to each second device. When the cluster module includes multiple first devices and multiple second devices, by allocating the first sensing units to the second devices, the first sensing units connected to each second device respectively belong to the sensing units corresponding to different first devices. This means that after the primary and standby replacement, only the data of the first sensing units connected to the first device being replaced is stored in the second device used to replace the first device; the other second devices not used to replace the first device can normally back up the data of the first sensing units in the other first devices not being replaced; the impact of the primary and standby replacement on the backup of the data of the first sensing units is reduced. Alternatively, the first sensing units can also be randomly assigned to the second devices.

[0045] Figure 3 The flowchart of the device management method in this embodiment is provided, as Figure 3 , and the device management method includes the following steps:

[0046] Step S301, detect the status of the first device.

[0047] Among them, detecting the status of the first device is to determine whether the first device can normally store and output the data in multiple sensing units. Optionally, the status of the first device can be detected by the second device, or can be detected by a terminal with detection ability connected to the first device.

[0048] Step S302, when it is detected that the first device is in the second state, control the cluster system to enter the second connection mode. In the second connection mode, the second device is also connected to the second sensing unit in the sensing unit.

[0049] Among them, the second state is used to indicate that the first device may not be able to normally store and output the data in multiple sensing units. The second sensing unit is the other sensing units except the first sensing unit among the sensing units connected to the first device.

[0050] Optionally, determine the sensing units connected to the first device in the first connection mode; connect the second device to these sensing units, so that the second device is simultaneously connected to the first sensing unit and the second sensing unit, and takes over the work of the first device to store and output the data in the first sensing unit and the second sensing unit.

[0051] In the above device management method, by connecting the second device to the first sensing unit, when the first device stores and outputs data of multiple sensing units, the second device can perform backup storage on the data in the first sensing unit; by backing up the data, the utilization value of the standby device can be improved. When the first device is in the second state, the second device can take over the work of the first device; even if the data stored in the first device is lost, the second device connecting the first sensing unit and the second sensing unit still stores the data in the first sensing unit, which can reduce the impact caused by the easy loss of the video data of the primary device, and achieve the purpose of improving the security and integrity of the cluster data.

[0052] In one embodiment, when it is detected that the first device is in the second state, controlling the cluster system to enter the second connection mode includes: obtaining the third sensing unit connected by the first device in the first state; determining the target sensing unit in the third sensing unit; among multiple second devices, determining the second device with the most connected target sensing units as the target device; connecting the target device and the third sensing unit.

[0053] Among them, when the cluster system includes multiple first devices, the sensing units connected by different first devices are different. The third sensing unit is the unit among multiple sensing units that is connected to the first device. The target sensing unit is the sensing unit in the third sensing unit that remains connected to the second device in the first connection state; that is, the target sensing unit is at least part of the first sensing unit. When the cluster system includes multiple second devices, when the cluster system is in the first connection state, the target sensing unit in the third sensing unit may be connected to different second devices: the more the number of target sensing units connected by the second device, the greater the coincidence rate of the data in the second device and the data in the first device in the second state; conversely, the smaller the coincidence rate of the data in the second device and the data in the first device in the second state.

[0054] Optionally, among multiple first devices, determine the first device in the second state to obtain the third sensing unit corresponding to this device. Take the second device with the most target sensing units added in the third sensing unit as the target device, and by connecting the target device and the third sensing unit, the target device takes over the service of the first device in the second state.

[0055] Further, the cluster system includes multiple second devices. Before determining the target device, it is possible to determine whether the second device is in an idle state, including: if the second device is connected to a unit other than the first sensing unit, it is determined that the second device is not in an idle state, and the second device may be in a state of taking over the work of some of the first devices; if the second device is only connected to the first sensing unit, it is determined that the second device is in an idle state. Among the multiple second devices in the idle state, the second device with the most target sensing units connected is determined as the target device.

[0056] In this embodiment, in the first connection mode, the target device connects to and backs up the data in the first sensing unit; in the second connection mode of the cluster system, the target device connects to the third sensing unit; and the more new sensing units are accessed, the greater the impact on the data backup ability of the target device. In the case where the target device is connected to the first sensing unit other than the target sensing unit, if the second device is connected to the third sensing unit in the second connection mode, the target device cannot continue to back up the first sensing unit other than the target sensing unit, further affecting the data backup ability of the target device. Therefore, the target device for connecting to the third sensing unit is determined according to the number of connected target sensing units, reducing the number of new sensing units that the target device needs to access, enabling as many first sensing devices as possible to be in the backup state, and reducing the impact of device replacement on data backup.

[0057] In one embodiment, in the first connection mode, the first device connects the first sensing unit and the second sensing unit based on the first channel; in the case where it is detected that the first device is in the second state, controlling the cluster system to enter the second connection mode includes: connecting the second device and the first sensing unit, and the second sensing unit according to the first channel.

[0058] Wherein, the first channel is a communication path for realizing data transmission between the first device and the sensing unit. Optionally, at the access position specified in the first device and another access position specified in the sensing unit, a communication channel for transmitting data is constructed through these two access positions to obtain the first channel. Different sensing units are connected to the first device through different first channels. Connecting the second device and the first sensing unit, and the second sensing unit through the first channel means that the access positions at both ends of the first channel remain unchanged, and the data in the first sensing unit can always be transmitted through the same channel. For ease of understanding, taking the sensing unit A that the second device needs to connect as an example, in the first connection state, the sensing unit A is connected to the first device through channel 2; another sensing unit B that the second device needs to connect is connected to the first device through channel 2 in the first connection state; connecting the second device and the corresponding sensing unit according to the first channel means connecting the second device and the sensing unit A based on channel 1, and connecting the second device and the sensing unit B based on channel 2.

[0059] In this embodiment, the second device and the sensing unit are connected through the first channel between the first device and the sensing unit, so that after the second device takes over the work of the first device, the corresponding relationship between the sensing unit and the first channel remains unchanged. For the sensing unit, it is always the device corresponding to the same interface position that provides the data storage service. This avoids the situation of communication connection disconnection and re - communication configuration caused by the replacement of the second device. Therefore, by maintaining the same communication channel, the possibility of real - time data stream transmission interruption caused by channel transformation can be reduced, and the possibility of data loss caused by the main - standby replacement process can be reduced.

[0060] Further, in one embodiment, in the first connection mode, the second device is connected to the first sensing unit based on the second channel; in the case where it is detected that the first device is in the second state, controlling the cluster system to enter the second connection mode includes: obtaining the third sensing unit connected by the first device in the first state; and deleting the second channel if there is a corresponding second channel for the third sensing unit.

[0061] Wherein, the second channel is the communication path for data transmission between the second device and the first sensing unit. Optionally, an access location is specified in the second device, and another access location is specified in the first sensing unit, and a communication channel for transmitting data is constructed through these two access locations to obtain the second channel. Optionally, the second channel can be set as a virtual channel in the network. Different first sensing units are connected to the second device through different second channels.

[0062] Wherein, in the case where there is a corresponding second channel for the third sensing unit, the second device connected to the second channel of the third sensing unit can be the second device used to replace the first device for work, or other second devices.

[0063] In this embodiment, by deleting the second channel after establishing the first channel, the use of the two channels is mutually exclusive, which can prevent the access capacity of the second device from exceeding its upper limit after the second device is connected to the third sensing device. At the same time, first establish the connection between the second device and the third sensing unit through the first channel, ensure that the third sensing unit can transmit data to the second device through the first channel, and then delete the second channel, reducing the possibility of video data loss during the device replacement process.

[0064] In one embodiment, after detecting that the first device is in the second state and controlling the cluster system to enter the second connection mode, the method further includes: adding the virtual address of the first device to the second device.

[0065] Among them, data in the first device can be accessed based on a virtual address. By adding the virtual address of the first device to the second device, the second device can output data of the first sensing unit and the second sensing unit based on the virtual address. Optionally, when an external device accesses the second device based on the virtual address, the external device can obtain the data obtained by the second device in real time, but cannot obtain the historical data transmitted by the sensing unit to the cluster system before the device replacement. In this embodiment, by adding the virtual address, after the device replacement, when the external device accesses the cluster system based on the virtual address of the original first device, it can still successfully obtain the data in the sensing unit.

[0066] In one embodiment, when the first device transitions from the second state to the first state, data in the second device is transmitted to the first device, and the cluster system is controlled to enter the first connection mode.

[0067] Optionally, first determine the time range when the first device is in the second state, and transmit the data obtained by the second device from the first sensing unit and the second sensing unit within this time range to the first device. Determine whether there is missing data in the first device. If there is missing data in the first device, then transmit the data in the first sensing unit obtained by the second device before replacing the first device to the first device to ensure that the first device always stores the data in the first sensing unit.

[0068] Furthermore, when the first device transitions from the second state to the first state, the first device is connected to the sensing unit, the connection between the second device and the second sensing unit is disconnected, and the connection between the second device and the first sensing unit is restored. Optionally, in the first connection mode, the first module and the sensing unit are connected through the first channel, and the second device and the first sensing unit are connected through the second channel.

[0069] Furthermore, if the virtual address of the first device is added to the second device when the first device is in the second state. When the first device transitions from the second state to the first state, the second device deletes the virtual address.

[0070] In this embodiment, by transmitting the data in the second device to the first device, data loss in the first device is avoided.

[0071] In one embodiment, the cluster system includes multiple second devices, and the method further includes: determining a management device among the multiple second devices, and detecting the state of the first device based on the management device.

[0072] Among them, the management device can also be called the master node in the second device; the management device is used to manage multiple second devices in the cluster system. The management device can determine whether the first device is in the second state by sending a heartbeat signal to the first device, obtaining the performance metrics and status information of the first device, and monitoring the first device based on a preset program or protocol. In this embodiment, obtaining the status of the first device through the second device can improve the resource utilization rate of the second device.

[0073] In one embodiment, Figure 4 A schematic diagram of an N+M cluster is provided, as Figure 4 shown, including a platform management device, a primary device module, a standby device module, and an IPC (IP Camera) module.

[0074] Among them, the primary device module is the N nodes of the N+M cluster. The primary device module includes multiple primary devices, that is, the first devices in the above embodiments; the primary device module includes primary devices N1, N2, N3,.... In the monitoring industry, the primary devices are mainly responsible for accessing the front-end cameras and storing video stream data.

[0075] The standby device module is the M points of the N+M cluster. The standby device module includes multiple standby devices, that is, the second devices in the above embodiments; the standby device module includes standby devices M1, M2,.... The management device in the standby device module is used as the standby device master node. Optionally, when there are multiple standby devices, one of the standby devices is selected as the master node. The standby device master node is responsible for managing multiple standby devices and is used to negotiate the replacement work of the standby devices when performing primary-standby replacement. The standby device master node is the management device in the above embodiments.

[0076] The IPC module includes multiple cameras (IPCs), each camera corresponds to a sensing unit respectively, and the video data in the camera is the data in the sensing unit in the above embodiments. The standby device module is associated with the cameras at key points. Among them, the cameras at key points are important cameras designated by the user; the data in the cameras at key points is the data in the first sensing unit. It can be understood that the data in the sensing unit includes but is not limited to multimedia data such as images, videos, and audios.

[0077] Based on Figure 4For the N+M cluster shown, select the primary device and connect the primary device to one or more cameras of the IPC module. Different primary devices are connected to different cameras. Select the standby device, and the standby device is not connected to the camera points. Obtain the cameras at the key points specified by the user, set the key point identifier, and the maximum total number of key points is obtained based on the total access capacity of the standby device. The total access capacity of the standby device is the ability of the standby device to access device channels, that is, the maximum number of cameras that can be accessed. The maximum total number of key points is less than or equal to the maximum number of cameras that can be accessed by each standby device.

[0078] The channel enables the storage device to access the camera carrier, and each channel can access 1 camera. When the N+M cluster is enabled, the N nodes store the video data obtained by each camera through the first channel, that is, the real-time storage channel; the M nodes enable the second channel, that is, the virtual backup channel; through the virtual backup channel, the backup channel camera access capacity can be added to the standby device, so that the standby device can realize the backup storage of the key point videos through the virtual backup channel. Among them, the virtual backup channel and the real-time storage channel cannot be used at the same time; after the virtual backup channel is enabled, the access capacity maintained by the M nodes externally remains unchanged and the virtual backup channel is invisible externally, and only the video data in the backup video is allowed to be accessed externally, which is used for the video data return of the primary device. The following further explains the enabling of the virtual backup channel by the M nodes:

[0079] Optionally, the standby device master node is responsible for distributing the configuration of the key camera points to the corresponding standby devices. The principle for the standby device master node to allocate the key point cameras and standby devices is: the associated camera points corresponding to the same primary device are allocated to the same standby device. In case this principle cannot be followed, the key point cameras are randomly allocated to the standby devices.

[0080] After the M nodes enable the virtual backup channel, different key point cameras respectively correspond to different virtual backup channels and are connected to the corresponding standby devices through the virtual backup channels. Optionally, the standby device adds the key point cameras allocated by the master node in the corresponding virtual backup channel, enables the video stream storage to store the data in the corresponding key point cameras, and defines the stored video type as backup. The standby device can also record the mapping relationship between the added key point cameras and the primary device at the same time. Exemplarily, the mapping relationship is recorded as follows: "Unique identifier of the primary device: device channel number → Unique identifier of the standby device: device channel number: start time: end time."

[0081] After the N+M cluster is turned on, the master node of the standby device detects the main device. When the master node of the standby device detects that the main device is normal, it determines that the main device is in the first state. The N+M cluster enters the second connection state; at this time, the main device is connected to each camera, and the standby device is connected to each key point camera. When the master node of the standby device detects that the main device is abnormal, it determines that the main device is in the second state, and the N+M cluster enters the second connection state; at this time, an idle standby device with the most key points of the main device added in the standby device is selected as the target device, and the target device takes over the business of the abnormal main device. Among them, the target device taking over the business of the abnormal main device refers to the target device taking over the camera connected to the main device, including: determining the camera connected to the main device in the first connection state, and the target device storing and outputting the data in the camera connected to the main device in the first connection state. Among them, when the standby device takes over the camera connected to the main device, the channel relationship of the main device needs to be maintained. For example, when camera 1 is added to the real-time storage channel 1 of the main device, the current standby device is added to the real-time storage channel 1 to connect to camera 1. Maintaining the channel relationship of the primary device can ensure that the channels provided to the outside by the backup device after taking over the business are consistent with the corresponding relationship between the cameras.

[0082] Furthermore, each time the backup device adds a camera connected to the main device in the first connection state and restores the storage of the camera data, the virtual backup channel corresponding to the camera is deleted. Among them, the virtual backup channel corresponding to the camera may be connected to other backup devices. By ensuring the mutual exclusive use of the real-time storage channel and the virtual backup channel, the device capacity can be avoided from being exceeded; at the same time, it is necessary to ensure that the real-time storage channel is added before deleting the virtual backup channel, so as to ensure that the service replacement process has complete video data. In addition, the mutual exclusive use of the real-time storage channel and the real-time storage channel can enable the backup device to provide key point video backup storage with maximum capacity, greatly optimizing the value of the backup device.

[0083] After all cameras connected to the main devices are taken over, the virtual address of the main device can be added to the target device. At this point, the platform management device resumes the management of the abnormal main device point. Users can preview the real-time camera video stream based on the platform management device. Users can play back the current camera recording, but the camera's historical recording is inaccessible.

[0084] After the N+M cluster is enabled, if the master node of the backup device detects that the primary device has been restored from the second state to the first state, it notifies the target device: the primary device restores the storage function; the target device deletes the virtual address, deletes the real-time storage channel, and restores the video storage of the originally deleted virtual backup channel, so that the N+M cluster is restored to the first connection state. At the same time, the primary device adds a virtual IP and goes online again on the platform management device. At this point, the platform management device resumes the management of the primary device, and users can preview the real-time data stream of the camera connected to the primary device through the platform management device, and can also play back current data and historical data.

[0085] Consider the situation that the main device does not include data during the abnormal period. Therefore, it is necessary to initiate a video transmission request to the backup device that takes over the business based on the abnormal time range, and transmit back the missing video of the main device. After the transmission is completed, the first device checks whether there are any missing videos at the key points. If missing, the first device initiates a backup video transmission request to all backup devices. The backup device will correspond to the key point camera and transmit the backup video in the key point camera to the backup device based on the mapping relationship between the key point camera and the main device. At this point, the video recording of the key points of the entire main-backup switching process is complete.

[0086] In traditional technology, when the main device is abnormal, the backup device senses, takes over, and restores the main device service to achieve the main-backup replacement. If the main device is operating normally, the backup device is in an idle state, and the actual use value of the backup device is low. In addition, during the main-backup replacement process, the abnormal main device may lose part of the video, and it can only be guaranteed that the video data will not be lost after the main-backup replacement is successful. In this embodiment, by setting key points, the idle backup device is used to realize the backup storage of key point video data, effectively use storage resources, and improve the use value of the backup device. In addition, after the main device is restored, it can actively request the idle backup device to return the video data of the key points, which ensures the integrity of the video data during the main-backup replacement process of the key points.

[0087] In one embodiment, a device management apparatus is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to implement the steps in the above method embodiments.

[0088] Based on the same inventive concept, the embodiment of the present application also provides a cluster system for implementing the device management method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more cluster system embodiments provided below can refer to the limitations on the device management method above, and will not be repeated here.

[0089] In one embodiment, Figure 5As shown, a cluster system is provided. The cluster system includes a first device and a second device. Among them, the first device is connected to a sensing unit and is used to store and output data of multiple sensing units. The second device is connected to a first sensing unit in the sensing unit to back up the data of the first sensing unit in the sensing unit when the first device is in a first state. The second device is connected to the first sensing unit and the second sensing unit in the sensing unit to store the data in the first sensing unit and the second sensing unit in the sensing unit when the first device is in a second state.

[0090] Optionally, the data in the sensing unit can be video data acquired by a camera device, or can also be multimedia data such as image data and audio data. The sensing unit can also be other sensors, such as: a temperature sensor, an image sensor, and so on.

[0091] In some of the embodiments, the cluster system further includes a cluster management platform. Among them, the cluster management platform is used to access the data in the sensing unit through the first device or the second device.

[0092] Among them, when the first device is in a normal state, the first device accesses the cluster management platform. The cluster management platform schedules the data in the first device. When the first device is in an abnormal state, the second device accesses the cluster management platform. The cluster management platform schedules the data in the second device.

[0093] In some of the embodiments, when the first device is in a second state, the second device being connected to the first sensing unit and the second sensing unit in the sensing unit includes: obtaining a third sensing unit connected by the first device in the first state; determining a target sensing unit among the third sensing units; among multiple second devices, determining the second device with the most connected target sensing units as the target device; connecting the target device and the third sensing unit.

[0094] In some of the embodiments, when the first device is in a first state, the first device connects the first sensing unit and the second sensing unit based on a first channel. When the first device is in a second state, the second device being connected to the first sensing unit and the second sensing unit in the sensing unit includes: connecting the second device and the first sensing unit and the second sensing unit according to the first channel. Optionally, when the first device is in a first state, the second device connects to the first sensing unit based on a second channel. When the first device is in a second state, the second device being connected to the first sensing unit and the second sensing unit in the sensing unit includes: obtaining a third sensing unit connected by the first device in the first state; deleting the second channel when there is a corresponding second channel in the third sensing unit.

[0095] In some of these embodiments, when the first device is in the second state and after the second device is connected to the first sensing unit and the second sensing unit in the sensing unit, the method further includes: adding the virtual address of the first device to the second device.

[0096] In some of these embodiments, when the first device transitions from the second state to the first state, the second device also transmits the data in the second device to the first device and controls the cluster system to enter the first connection mode; that is, the first device is connected to the sensing unit; the second device is connected to the first sensing unit in the sensing unit.

[0097] In some of these embodiments, the cluster system includes a plurality of second devices, a management device is determined among the plurality of second devices, and the state of the first device is detected based on the management device.

[0098] Each module in the above cluster system can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or can be stored in the memory in the computer device in software form so that the processor can call and execute the operations corresponding to each of the above modules.

[0099] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 6 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface and the display unit are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program, when executed by the processor, implements a device management method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen or a projection device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and is used to display the data in the sensing unit.

[0100] Those skilled in the art can understand, Figure 6The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0101] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0102] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0103] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., and are not limited thereto.

[0104] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0105] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A device management method, characterized in that: Applicable to a cluster system provided with a first device and a second device, when the first device is in a first state, the cluster system is in a first connection mode, in which the first device is connected to a sensor unit, and the second device is connected to a first sensor unit among the sensor units; the method comprises: detecting a status of the first device; When it is detected that the first device is in the second state, the cluster system is controlled to enter a second connection mode. In the second connection mode, the second device is further connected to a second sensor unit in the sensor units.

2. The method according to claim 1, characterized in that When detecting that the first device is in the second state, controlling the cluster system to enter the second connection mode includes: Acquire a third sensing unit connected to the first device in the first state; In the third sensing unit, determining a target sensing unit; Among the plurality of the second devices, determining the second device with the most target sensing units connected thereto as the target device; The target device and the third sensing unit are connected.

3. The method according to claim 1, characterized in that In the first connection mode, the first device connects the first sensing unit and the second sensing unit based on a first channel; When detecting that the first device is in the second state, controlling the cluster system to enter the second connection mode includes: The second device is connected to the first sensing unit and the second sensing unit according to the first channel.

4. The method according to claim 3, characterized in that In the first connection mode, the second device connects to the first sensing unit based on a second channel; When detecting that the first device is in the second state, controlling the cluster system to enter the second connection mode includes: Acquire a third sensing unit connected to the first device in the first state; In the case that the third sensing unit has a corresponding second channel, the second channel is deleted.

5. The method according to any one of claims 1 to 3, characterized in that: In the case where it is detected that the first device is in the second state, after controlling the cluster system to enter the second connection mode, the method further includes: Add the virtual address of the first device to the second device.

6. The method according to claim 1, characterized in that The method further comprises: When the first device is converted from the second state to the first state, data in the second device is transmitted to the first device, and the cluster system is controlled to enter the first connection mode.

7. The method according to claim 1, characterized in that The cluster system includes a plurality of the second devices, and the detecting the state of the first device includes: A management device is determined among the plurality of second devices, and a state of the first device is detected based on the management device.

8. A device management apparatus, comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the device management method according to any one of claims 1 to 7.

9. A cluster system, characterized in that: The cluster system includes a first device and a second device; wherein, The first device is connected to the sensor unit and is used to store and output data of multiple sensor units; When the first device is in the first state, the second device is connected to the first sensor unit among the sensor units, and is used to back up the data of the first sensor unit among the sensor units; when the first device is in the second state, the second device is connected to the first sensor unit and the second sensor unit among the sensor units, and is used to store the data in the first sensor unit and the second sensor unit among the sensor units.

10. The system according to claim 9, characterized in that: The cluster system also includes a cluster management platform; wherein, The cluster management platform is used to access the data in the sensor unit through the first device or the second device.