Device management method, device, electronic device and storage medium
By initiating a device status acquisition request in the management terminal, determining the online service node connected to the central cache area, and obtaining device status information in multiple online service nodes, the problem of difficulty in managing large-scale device status in the prior art is solved, and the problem of realizing the Accurate and efficient management of equipment status.
Patent Information
- Application Number
- CN202411172393.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-26
AI Technical Summary
Existing device management methods are difficult to meet the needs of large-scale device status management, especially after the scale of the Internet of Things has expanded, higher requirements are put forward for device status management and monitoring, and existing methods may not be able to effectively manage multiple device status.
By initiating a device status acquisition request in the management terminal, the online service node connected to the central cache area is determined, and the device status information is obtained in multiple online service nodes, the device status acquisition request is distributed to obtain the device status information of the second service node, and the device status acquisition request is returned. The target device status information is sent to the management terminal to avoid obtaining the device status information of multiple nodes through the central cache area.
It realizes accurate management of large-scale equipment status, improves the efficiency and reliability of equipment status acquisition, and meets the needs of large-scale equipment status management.
Smart Images

Figure CN118713976B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a device management method, apparatus, electronic device, and storage medium. Background Art
[0002] Device status monitoring is crucial in device access gateway systems, especially in distributed mode. Accurately tracking device online and offline status is crucial. Device status statistics in distributed mode involve several technical aspects, including the total number of offline devices, the number of devices connected to each node, the number of devices connected by different types, and device status updates when gateway nodes experience abnormalities. This is a key technology for ensuring the stable operation of device access gateway systems.
[0003] However, existing device management typically sets a maximum number of devices per node. This requires a management service to manage the number of devices connected to each gateway node and assign information about the gateway nodes to which newly added devices are connected. As the IoT scales, the number of devices is rapidly increasing, placing higher demands on device status management and monitoring. Existing methods may not be able to meet the demands of large-scale device management.
[0004] There is currently no effective solution to the problem that related technologies cannot meet the needs of large-scale device status management. Summary of the Invention
[0005] In this embodiment, a device management method, apparatus, electronic device, and storage medium are provided to solve the problem that related technologies cannot meet the needs of large-scale device status management.
[0006] In a first aspect, this embodiment provides a device management method, the method comprising:
[0007] In response to a device status acquisition request initiated by a management terminal, a first service node is determined; the first service node is an online service node connected to the central cache area;
[0008] Determine first device status information of the first service node, and distribute the device status acquisition request to a second service node; the second service node is determined by the first service node;
[0009] Acquire second device status information of a second service node; and return target device status information including the first device status information and the second device status information to the management terminal.
[0010] In some of the embodiments, the central cache is connected to a plurality of service nodes;
[0011] The determining the first service node in response to the device status acquisition request includes:
[0012] Synchronizing the node status of multiple service nodes to the central cache area;
[0013] In response to the device status acquisition request, obtaining the online service node connected to the central cache area,
[0014] According to a preset request strategy, a first service node among the online service nodes is determined.
[0015] In some embodiments, distributing the device status acquisition request to the second service node includes:
[0016] Determining an online service node other than the first service node as a first node to be requested;
[0017] Determining whether the first node to be requested has responded to the device status acquisition request;
[0018] According to a preset request strategy, determining an online service node among the first nodes to be requested that has not responded to the device status request as the second service node;
[0019] Distribute the device status acquisition request to the second service node.
[0020] In some embodiments, determining whether the first node to be requested has responded to the device status acquisition request includes:
[0021] Obtaining the link identifier carried in the device status acquisition request;
[0022] The cache data in the node to be requested is obtained, and it is determined according to the cache data whether the first node to be requested has received the link identifier.
[0023] In some embodiments, after obtaining the second device status information of the second service node, the method further includes:
[0024] Determining a second node to be requested, where the second node to be requested includes an online service node other than the first service node and the second service node;
[0025] Determine, according to a preset request strategy, a third service node from the second to-be-requested nodes that have not responded to the device status acquisition request;
[0026] Distribute the device status acquisition request to the third service node.
[0027] In some embodiments, the method further comprises:
[0028] The device status acquisition request carries target device status information; the target device status information includes status information of the online service node that has completed the request.
[0029] In some embodiments, the method further comprises:
[0030] When the number of the second service node is zero, stop responding to the device status acquisition request.
[0031] In a second aspect, a device management apparatus is provided in this embodiment, the apparatus comprising: a service node determination module and a device information acquisition module;
[0032] The service node determination module is configured to determine a first service node in response to a device status acquisition request initiated by a management terminal; the first service node is an online service node connected to the central cache area; and is further configured to determine first device status information of the first service node and distribute the device status acquisition request to a second service node; the second service node is determined by the first service node.
[0033] The device information acquisition module is configured to acquire second device status information of a second service node; and return target device status information including the first device status information and the second device status information to the management terminal.
[0034] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the device management method described in the first aspect above when executing the computer program.
[0035] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored. When the program is executed by a processor, the device management method described in the first aspect is implemented.
[0036] Compared with related technologies, the device management method, device, electronic device and storage medium provided in this embodiment respond to a device status acquisition request initiated by a management terminal, determine a first service node, and obtain the device status information of the first service node; then obtain the online service node connected in the central cache area based on the first service node, and obtain the second service node from multiple online service nodes, and then obtain the device status information of the second service node, and return the device status information to the management terminal, thereby avoiding obtaining the device status information of multiple nodes through the server in the central cache area, and thus avoiding the problem of being unable to manage the status of multiple devices when there are large-scale devices. This application determines other online service nodes through service nodes, and then determines the device status information connected to the service nodes, meeting the needs of large-scale device status management.
[0037] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0039] Figure 1 This is a hardware structure block diagram of a terminal of the device management method provided in an embodiment of the present application;
[0040] Figure 2 This is a flow chart of the device management method provided by an embodiment of the present application;
[0041] Figure 3 is a system diagram of the device status statistics method provided by this specific embodiment;
[0042] Figure 4 This is a flow chart of a method for counting device status in a distributed mode provided by this specific embodiment;
[0043] Figure 5 This is a structural block diagram of the device management device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0045] Unless otherwise defined, technical or scientific terms used in this application shall have the ordinary meanings as understood by persons of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," "these," and similar expressions in this application do not denote limitations on quantity and may be singular or plural. The terms "comprise," "include," "have," and any variations thereof, as used in this application, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include unlisted steps or modules (units) or other steps or modules (units) inherent to the process, method, product, or device. The terms "connected," "connected," "coupled," and similar expressions used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. As used in this application, "plurality" means two or more. "And / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone; A and B exist simultaneously; or B exists alone. Generally, the character " / " indicates that the objects in the preceding and following relationship are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0046] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 This is a hardware structure diagram of the terminal of the device management method provided in the embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 The processor 102 (only one is shown) and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The terminal may also include a transmission device 106 for communication functions and an input / output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0047] 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, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0048] Transmission device 106 is used to receive or transmit data via a network. This network may include a wireless network provided by the terminal's communications provider. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0049] In the device access gateway system, device status monitoring is crucial, especially in the distributed mode. Accurate statistics of the online and offline status of devices are of great significance. It mainly includes the following aspects:
[0050] Number of devices online and offline: Accurate total number of connected devices and total number of online devices is crucial for device management within the service cluster.
[0051] Number of online devices connected to each node: After an actively registered device registers with a service node, all subsequent device operations will require communication with that service node. However, there is an upper limit on the number of devices that can connect to each service node. It is necessary to understand the real-time number of devices connected to each service node to achieve load balancing when devices connect across the service cluster. Actively registered devices actively register with the service. After successful registration, a handle belonging to the device will be created within the service. The device uses this handle to interact with the service for various subsequent functions.
[0052] Number of connected devices of different types: There are many types of devices, and the number of connected devices of different types needs to be counted. For example, video surveillance equipment is mainly divided into IPC (IP Camera) and NVR (Network Video Recorder), where multiple channel devices can be mounted under the NVR device. IPC is composed of a network coding module and an analog camera. It is a new generation of camera that combines traditional cameras with network technology. NVR is the storage and forwarding part of the network video surveillance system. NVR works with video encoders or network cameras to complete video recording, storage, and forwarding functions. Different types of devices have different resource usage on the service node. Therefore, each service node must not only perceive the number of devices connected to the current node, but also the number of IPCs and NVRs connected to the current node.
[0053] Device Status Updates When a Gateway Node malfunctions: When a service node experiences an anomaly, devices connected to it will re-register and re-establish connections with other nodes. During this time, the device offline notifications sent by the device to the malfunctioning service node are not detected by the service cluster. Furthermore, in some cases, devices will not re-register with other service nodes, causing the device connection to remain abnormal. In this scenario, accurate statistics on the real-time number of connected devices at each service node are required to facilitate monitoring of service node anomalies.
[0054] In summary, the statistical method of device status in distributed mode involves technical content in many aspects, such as the total number of offline devices, the number of device accesses to each node, the number of accesses of different device types, and the update of device status when the gateway node is abnormal. It is one of the important technologies to ensure the stable operation of the device access gateway system.
[0055] Currently, when actively registering devices to access a gateway, a maximum device access limit is typically set for each node. A management service is added before the gateway cluster to manage the number of devices connected to each gateway node and to assign information about the gateway nodes to which newly added devices are connected. However, as the scale of the IoT expands, the number of devices is rapidly increasing, placing higher demands on device status management and monitoring. Existing methods may not be able to meet the needs of large-scale device management. Furthermore, when a gateway node fails, goes down, or shrinks, the current common central caching solution requires processing the cached data of the abnormal node upon detecting a node anomaly, which results in delays and status errors.
[0056] Therefore, in this embodiment, a device management method is provided to achieve accurate statistics of the device status of each service node when a gateway service node is down or downsized in large-scale device cluster management. Figure 2 This is a flow chart of the device management method provided by the embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0057] Step S210 : In response to a device status acquisition request initiated by a management terminal, a first service node is determined; the first service node is an online service node connected to the central cache area.
[0058] Among them, when the management terminal initiates a device status acquisition request to the processor, the processor obtains the device status acquisition request initiated by the management terminal. The management terminal here can be a client that needs to manage the device, or a server that obtains the device management status, which is not specifically limited here; the processor includes the aforementioned gateway system. The central cache area is connected to multiple service nodes, and the status of multiple service nodes can be online or offline. The status of the service node is determined according to the actual processing situation. Afterwards, the processor first determines the online service node connected to the central cache area based on the device status acquisition request; then randomly requests any node in the online service node, that is, the first service node. Each online service node maintains its own online service node information in the central cache area through the node heartbeat. At the same time, each online service node can obtain the information of other current online service nodes from the central cache area.
[0059] Step S220 , determining first device status information of the first service node, and distributing a device status acquisition request to a second service node; the second service node is determined by the first service node.
[0060] Among them, after determining the first service node, the processor obtains the first device status information connected to the first service node; the first device status information includes the status information of all devices connected to the first service node. The device accesses the corresponding service node through the device access module, and the device will continue to interact with the service node. After the device accesses the corresponding service node, the status of the device is updated in real time to the device status data maintained by the service node, that is, the status information of the device is synchronized to the service node in real time. After determining the first service node, the first service node is controlled to distribute the device status acquisition request to the second service node. Specifically, the unrequested service nodes are determined among all online service nodes, and multiple second service nodes are randomly selected from the unrequested service nodes. Further, the above-mentioned distribution process is recursively repeated until the device status acquisition request is distributed to all unrequested online service nodes. When the device status acquisition request is distributed to the second service node, it carries the first device status information of the first service node.
[0061] Step S230: Acquire second device status information of the second service node; and return target device status information including the first device status information and the second device status information to the management terminal.
[0062] The processor obtains second device status information of the device connected to the second service node, and returns target device status information including the first device status information and the second device status information to the management terminal to obtain device status information of all devices connected to the online service node.
[0063] Through the above steps, the first service node is determined according to the device status acquisition request, and the device status information of the first service node is obtained; then, the online service node connected to the central cache area is obtained according to the first service node, and the second service node is obtained from multiple online service nodes, and then the device status information of the second service node is obtained, and the device status information is returned to the management terminal, thereby avoiding obtaining the device status information of multiple nodes through the server in the central cache area, and thus avoiding the problem of being unable to manage the status of multiple devices when there are large-scale devices. This application determines other online service nodes through service nodes, and then determines the device status information connected to the service nodes, meeting the needs of large-scale device status management.
[0064] In some embodiments, the central cache area is connected to multiple service nodes; in step S210, in response to the device status acquisition request, the first service node is determined, including: synchronizing the node status of multiple service nodes to the central cache area; in response to the device status acquisition request, obtaining the online service nodes connected to the central cache area, and determining the first service node among the online service nodes according to a preset request strategy.
[0065] Among them, the central cache area is connected to multiple service nodes, and multiple service nodes are connected to multiple devices; the node status of multiple service nodes is synchronized to the central cache area. Specifically, the node status includes online and offline; when the service node is online, the online status is synchronized to the central cache area, and when the service node is offline, the offline status is synchronized to the central cache area. After receiving the device status acquisition request, the online service node connected to the central cache area is obtained according to the device status acquisition request, and the first service node is determined among the online service nodes. When there is only one online service node, the online service node is directly determined as the first service node; when there are multiple online service nodes, the first service node among the online service nodes is determined according to the preset request strategy. Furthermore, the preset request strategy can be simple random sampling, random number table method, stratified sampling method, random number decision method, etc., which are not specifically limited here. Preferably, the number of first service nodes is set to one.
[0066] The central cache area provided in the above embodiment is connected to multiple service nodes, and multiple service nodes are connected to multiple devices. By obtaining the online service nodes connected to the central cache area, the first service node among the online service nodes is determined, which is conducive to the subsequent distribution of device status acquisition requests to other online service nodes based on the first service node, and directly obtaining the status information of the connected devices from the service nodes, without the need to synchronize the device status information to the central cache area, thereby improving the efficiency and reliability of large-scale device management.
[0067] In some embodiments, distributing the device status acquisition request to the second service node in step S220 includes:
[0068] Step S221: determine an online service node other than the first service node as a first node to be requested; and determine whether the first node to be requested has responded to a device status acquisition request.
[0069] Furthermore, determining whether the first node to be requested has responded to the device status acquisition request includes: obtaining the link identifier carried in the device status acquisition request; obtaining cached data in the node to be requested, and determining whether the first node to be requested has received the link identifier based on the cached data.
[0070] After determining the first service node, the online service nodes connected to the central cache area, other than the first service node, are identified as first pending request nodes. A second service node to which the device status acquisition request is to be distributed is then determined from among the first pending request nodes. Subsequently, a determination is made as to whether the first pending request node has previously received a device status acquisition request. Specifically, the link identifier carried in the device status acquisition request is obtained, and the link identifier is determined to be included in the cached data of the requesting node. This is followed by a determination as to whether the first pending request node has previously responded to the device status acquisition request.
[0071] Step S222: According to a preset request strategy, an online service node among the first nodes to be requested that has not responded to the device status request is determined as a second service node; and the device status acquisition request is distributed to the second service node.
[0072] According to a preset request strategy, ie, the random selection method in the aforementioned embodiment, the second service node is determined from the first node to be requested, and the device status acquisition request is distributed to the second service node.
[0073] Through the above steps, the processor randomly determines multiple second service nodes from the unrequested first requesting nodes, and then distributes the device status acquisition request to the second service nodes, thereby avoiding repeated distribution of the device status acquisition request to multiple service nodes, which is beneficial to improving the efficiency of obtaining the device status.
[0074] In some embodiments, after obtaining the second device status information of the second service node in step S230, the method further includes: determining a second node to be requested, the second node to be requested including online service nodes other than the first service node and the second service node; determining a third service node from the second node to be requested that has not responded to the device status acquisition request according to a preset request strategy; and distributing the device status acquisition request to the third service node.
[0075] Among them, when the number of first service nodes and second service nodes is less than the number of online service nodes, request distribution needs to be performed again; the second node to be requested is obtained from the online service node, that is, the node that needs to distribute the request from the second service node, and then according to the preset request strategy, the third service node is determined in the second request node, and the device status acquisition request is distributed to the third service node to obtain the device status information of the third service node.
[0076] Through the above solution, the device status acquisition request is distributed to all online service nodes connected to the central cache area, which is conducive to improving the integrity of the acquired device status.
[0077] In some embodiments, the device status acquisition request carries target device status information; the target device status information includes status information of an online service node that has completed the request.
[0078] In the process of distributing the device status acquisition request, the device status acquisition request carries all device status information of the completed request, thereby avoiding obtaining the device status information from the central buffer area and reducing the processing burden of the central buffer area.
[0079] In some embodiments, the device management method further includes: when the number of nodes of the second service node is zero, stopping responding to the device status acquisition request.
[0080] Among them, when the number of nodes of the second service node is zero, that is, when the total number of nodes of the first service node and the second service node is equal to the number of online service nodes, it means that the device status information of all online service nodes has been obtained. At this time, there is no need to respond to the device status acquisition request, saving processing resources.
[0081] The present embodiment is described and illustrated below through specific examples.
[0082] In this embodiment, each service node maintains its own device access information. Each service node maintains a heartbeat with a central cache or central management service; a loss of the heartbeat indicates the service node has gone offline. Each service node can obtain information about all currently online nodes. When a device status request is sent to any service node, the service node not only obtains its own device status information, but also the device status information of multiple other online service nodes. Each service node recursively repeats the above process until it has obtained data from all online service nodes.
[0083] Figure 3 This is a system diagram of the device status statistics method provided by this specific embodiment. Figure 3 The system includes: a central cache, multiple service nodes, and multiple devices; wherein the service node includes a device status statistics module, a node status maintenance module, and a device access module, and the node status maintenance modules of multiple service nodes are connected to the central cache. Multiple devices access the service node through the device access module. The device here is set to be a camera, and can also be other devices that require status monitoring. When the device status statistics module in service node 1 receives a device status statistics request sent by the management terminal, it obtains the node status data of service node 1 itself and distributes the request to service node n. Service node 1 has multiple devices connected to it, such as device 1, device 2...device n; service node n has multiple devices connected to it, such as device 4, device 5...device n.
[0084] Furthermore, the device accesses a service node through the device access module and will continue to interact with the node. After the device is connected, the device status is updated to the device status data maintained by the service node. Each service node maintains its own node status information in the central cache through the node heartbeat. Each service node can obtain the information of all currently online service nodes from the central cache. When a device status statistics request is received, a random request is made to a service node, which obtains its own device status data and requests to distribute it to other online service nodes to obtain the device status data of other online nodes. Finally, the device status data of all online nodes are summarized and returned. When request distribution is performed, all currently unrequested node information is obtained, and multiple nodes are randomly selected from them for request, and the respective request results are obtained. The central cache here is the central cache area in the aforementioned embodiment; the service node 1 here is the first service node in the aforementioned embodiment, and the service node n is the second service node in the aforementioned embodiment.
[0085] Figure 4 This is a flow chart of the statistical method for device status in a distributed mode provided by this specific embodiment. Figure 4 As shown, the device status statistics method includes the following steps:
[0086] S101: When a management terminal requests device status statistics, it sends a request to any gateway service node. Specifically, the device status statistics request carries or generates a globally unique link ID. A service node receives the device status statistics request. Specifically, the link ID here is the link identifier in the aforementioned embodiment. The device status statistics request is the device status acquisition request in the aforementioned embodiment.
[0087] S102: After receiving a request, each service node uses its local cache to determine whether the link ID for this request has already been requested, filtering out duplicate requests. If it is a duplicate request, the request is terminated. If this is the first request to the node, the link ID is stored in the service node's local cache, with a default cache duration equal to the request timeout.
[0088] S103, the service node obtains the device status data in the node's own cache, specifically, the total number of devices of each manufacturer and model connected to each node, the number of online devices, etc., and distributes the request at the same time.
[0089] S104: Request distribution is performed. Before distribution, all currently active service nodes and the requested node information carried in the device status statistics request are retrieved from the central cache. This information then determines the active nodes that have not yet been requested, namely, the first and second nodes to be requested in the aforementioned embodiment. Multiple nodes to be requested are randomly retrieved from these nodes, namely, the second service node in the aforementioned embodiment (the number of nodes to be requested can be adjusted through configuration). If the number of nodes to be requested is zero, distribution is terminated. If the number of nodes to be requested is greater than zero, the request data is assembled and distributed, requesting device status data from other service nodes and obtaining the device status data results.
[0090] S105 , summarizing and returning the device status statistical information obtained in step S103 and the device status statistical information obtained in step S104 . The summarized device status statistical information is the target device status information in the aforementioned embodiment.
[0091] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0092] This embodiment also provides a device management device for implementing the above-mentioned embodiments and preferred implementations. Details already described will not be repeated. The terms "module," "unit," "subunit," etc. used below refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0093] Figure 5 This is a structural block diagram of the device management device provided in the embodiment of the present application. Figure 5 As shown, the apparatus includes: a service node determination module 10 and a device information acquisition module 20.
[0094] The service node determination module 10 is used to determine the first service node in response to the device status acquisition request initiated by the management terminal; the first service node is an online service node in the central cache area; it is also used to determine the first device status information of the first service node and distribute the device status acquisition request to the second service node; the second service node is determined by the first service node.
[0095] The device information acquisition module 20 is configured to acquire second device status information of the second service node and return target device status information including the first device status information and the second device status information to the management terminal.
[0096] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0097] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0098] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0099] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0100] S1, in response to a device status acquisition request initiated by a management terminal, determining a first service node; the first service node is an online service node in a central cache area.
[0101] S2, determining first device status information of the first service node, and distributing a device status acquisition request to a second service node; the second service node is determined by the first service node.
[0102] S3, obtaining second device status information of the second service node; and returning target device status information including the first device status information and the second device status information to the management terminal.
[0103] It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0104] In addition, in conjunction with the device management method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the device management method. The storage medium stores a computer program that, when executed by a processor, implements any of the device management methods in the above embodiments.
[0105] It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0106] Obviously, the accompanying drawings are merely examples or embodiments of the present application. A person skilled in the art can also apply the present application to other similar situations based on these drawings without inventive effort. Furthermore, it is understandable that, although the work involved in this development process may be complex and lengthy, certain design, manufacturing, or production changes based on the technical content disclosed in this application are merely routine technical means for a person skilled in the art and should not be considered to constitute a deficiency in the disclosure of the present application.
[0107] The term "embodiment" as used in this application refers to specific features, structures, or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily mean that the embodiment is the same, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is understood, either explicitly or implicitly, by those skilled in the art that the embodiments described in this application can be combined with other embodiments when there is no conflict.
[0108] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A device management method, It is characterized in that The method comprises: In response to a device status acquisition request initiated by a management terminal, a first service node is determined; the first service node is an online service node connected to a central cache area; Determine first device status information of the first service node, and distribute the device status acquisition request to a second service node; the second service node is determined by the first service node; Acquire second device status information of a second service node; return target device status information including the first device status information and the second device status information to the management terminal; The device status acquisition request carries target device status information; the target device status information includes status information of the online service node that has completed the request.
2. The device management method according to claim 1, It is characterized in that The central cache area is connected to a plurality of service nodes; The step of determining the first service node in response to the device status acquisition request includes: Synchronizing node states of multiple service nodes to the central cache area; In response to the device status acquisition request, acquiring the online service node connected to the central cache area, According to a preset request strategy, a first service node among the online service nodes is determined.
3. The device management method according to claim 1, It is characterized in that The distributing the device status acquisition request to the second service node includes: Determining an online service node other than the first service node as a first to-be-requested node; Determine whether the first node to be requested has responded to the device status acquisition request; According to a preset request strategy, determining an online service node among the first nodes to be requested that has not responded to the device status request as the second service node; Distribute the device status acquisition request to the second service node.
4. The device management method according to claim 3, It is characterized in that The determining whether the first node to be requested has responded to the device status acquisition request includes: Obtaining the link identifier carried in the device status acquisition request; The cache data in the node to be requested is obtained, and it is determined according to the cache data whether the first node to be requested has received the link identifier.
5. The device management method according to claim 1, It is characterized in that After obtaining the second device status information of the second service node, the method further includes: Determining a second node to be requested, where the second node to be requested includes an online service node other than the first service node and the second service node; According to a preset request strategy, determining a third service node from the second to-be-requested nodes that have not responded to the device status acquisition request; Distribute the device status acquisition request to the third service node.
6. The device management method according to claim 1, It is characterized in that The method further comprises: When the number of nodes of the second service node is zero, stop responding to the device status acquisition request.
7. A device management apparatus, It is characterized in that The device comprises: a service node determination module and a device information acquisition module; The service node determination module is used to determine a first service node in response to a device status acquisition request initiated by a management terminal; the first service node is an online service node connected to a central cache area; and is also used to determine first device status information of the first service node, and distribute the device status acquisition request to a second service node; the second service node is determined by the first service node; The device information acquisition module is used to obtain the second device status information of the second service node; return the target device status information including the first device status information and the second device status information to the management terminal; the device status acquisition request carries the target device status information; the target device status information includes the status information of the online service node that has completed the request.
8. An electronic device comprising 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 according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the device management method according to any one of claims 1 to 6 are implemented.
