Configuration issuing method, device and equipment

By using unique device identifiers and consistent hashing algorithms in the management devices, the problem of quickly finding device access instances in a distributed architecture is solved, enabling efficient configuration distribution and device management, improving processing performance, and supporting large-scale network device access.

CN121125818AActive Publication Date: 2025-12-12NEW H3C TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511310045.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2025-12-12
Estimated Expiration
2045-09-12

AI Technical Summary

Technical Problem

In device management platforms, there is a lack of effective methods for quickly and accurately locating network device access instances, especially in distributed architectures.

Method used

By employing a unique device identifier and a consistent hashing algorithm in the management device, when the management device receives a configuration distribution message, it selects the corresponding device management instance from the device management instance list based on the unique device identifier, establishes an identifier pairing relationship, and transmits the configuration distribution message through a message queue, thus avoiding reliance on Redis caching.

Benefits of technology

It enables the rapid and accurate location of device access instances in a distributed environment, supports the access of a large number of network devices, improves processing performance, and meets the needs of large-scale cloud management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125818A_ABST
    Figure CN121125818A_ABST
Patent Text Reader

Abstract

The invention provides a configuration issuing method, device and equipment, and the method comprises the steps: receiving a configuration issuing message through a first equipment management instance, and enabling the configuration issuing message to comprise a unique equipment identifier of network equipment, selecting a second equipment management instance from the equipment management instance list based on the unique equipment identifier through the first equipment management instance, and sending a configuration issuing message to the second equipment management instance; when a configuration issuing message is received through the second equipment management instance, determining a first equipment access instance corresponding to the unique equipment identifier through the second equipment management instance; and sending a configuration issuing message to the first equipment access instance through the second equipment management instance, so that the first equipment access instance sends the configuration issuing message to the network equipment. Through the technical scheme provided by the invention, the equipment access instance accessed by the network equipment can be quickly and correctly found, the access of a large number of network equipment is supported, and the large-scale cloud management requirement of the network equipment is met.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a configuration delivery method, device and equipment. BACKGROUND

[0002] A device management platform (i.e. a management device) is responsible for the access and management of network devices (such as routers, switches, etc.), and the device management platform can send a to-be-delivered configuration to a network device, and the network device configures itself based on the to-be-delivered configuration. In a device management scenario, in order to access a large number of network devices, the device management platform adopts a distributed architecture, decouples the device access function and the device management function, and each function supports the deployment of multiple instances. For example, the device management platform includes multiple device access instances for implementing the device access function and multiple device management instances for implementing the device management function.

[0003] In such a deployment scenario, a network device randomly accesses a certain device access instance, and when a device management instance sends a to-be-delivered configuration to the network device, it needs to find the device access instance accessed by the network device, send the to-be-delivered configuration to this device access instance, and send the to-be-delivered configuration to the network device by this device access instance. However, how to quickly and correctly find the device access instance accessed by the network device is not effectively implemented in the related art, i.e. the device access instance cannot be quickly and correctly found. SUMMARY

[0004] The present application provides a configuration delivery method applied to a management device, the management device including multiple device access instances and multiple device management instances, and the method includes:

[0005] When a configuration delivery message is received by a first device management instance, the configuration delivery message includes a unique device identifier of a network device, a second device management instance is selected from a device management instance list by the first device management instance based on the unique device identifier, and the configuration delivery message is sent to the second device management instance, and the device management instance list includes instance identifiers of the multiple device management instances;

[0006] When the configuration delivery message is received by the second device management instance, a first device access instance corresponding to the unique device identifier is determined by the second device management instance based on a maintained pairing relationship between the unique device identifier and the instance identifier; wherein when the network device is online from the first device access instance, a pairing relationship between the unique device identifier and an instance identifier of the first device access instance is sent to a second device management instance selected from a device management instance list by the first device access instance based on the unique device identifier.

[0007] sending the configuration delivery message to the first device access instance via the second device management instance, so that the first device access instance sends the configuration delivery message to the network device; wherein the configuration delivery message comprises a configuration to be delivered, and the configuration to be delivered is used for configuring the network device.

[0008] The application provides a configuration delivery device, applied to a management device, the management device comprising a plurality of device access instances and a plurality of device management instances, the device comprising:

[0009] The device management module is configured to, when receiving a configuration delivery message via a first device management instance, the configuration delivery message comprising a unique device identifier of a network device, select a second device management instance from a device management instance list based on the unique device identifier via the first device management instance, send the configuration delivery message to the second device management instance, and the device management instance list comprising instance identifiers of the plurality of device management instances; when receiving the configuration delivery message via the second device management instance, determine a first device access instance corresponding to the unique device identifier based on a pairing relationship between the unique device identifier and the instance identifier which has been maintained via the second device management instance, and send the configuration delivery message to the first device access instance via the second device management instance.

[0010] The device access module is configured to, when a network device is online from a first device access instance, select a second device management instance from a device management instance list based on the unique device identifier via the first device access instance, send a pairing relationship between the unique device identifier and an instance identifier of the first device access instance to the second device management instance, and when receiving the configuration delivery message via the first device access instance, send the configuration delivery message to the network device via the first device access instance; wherein the configuration delivery message comprises a configuration to be delivered, and the configuration to be delivered is used for configuring the network device.

[0011] The application provides a management device, comprising a processor and a machine readable storage medium, the machine readable storage medium storing machine executable instructions capable of being executed by the processor; the processor is configured to execute the machine executable instructions to implement the configuration delivery method of the above examples of the application.

[0012] The application provides a computer program product, which can comprise a computer program, the computer program being executed by a processor to implement the configuration delivery method of the above examples of the application.

[0013] The application provides a machine readable storage medium, which stores machine executable instructions capable of being executed by a processor; wherein the processor is used to execute the machine executable instructions, and a configuration distribution method in the above examples of the application is realized when the machine executable instructions are executed.

[0014] From the above technical solutions, in the embodiment of the application, when the network device is online from the first device access instance, the first device access instance selects the second device management instance from the device management instance list based on the unique device identifier, and sends the pairing relationship between the unique device identifier and the instance identifier of the first device access instance to the second device management instance. When the configuration distribution message is received through the first device management instance, the first device management instance selects the second device management instance from the device management instance list based on the unique device identifier, and sends the configuration distribution message to the second device management instance. The second device management instance determines the first device access instance corresponding to the unique device identifier, and sends the configuration distribution message to the first device access instance, so that the first device access instance sends the configuration distribution message to the network device. In this way, the device access instance (i.e. the first device access instance) accessed by the network device can be quickly and correctly found, and the access of a large number of network devices is supported, meeting the needs of large-scale cloud management of network devices. By using the same algorithm in the device access instance and the device management instance, it is ensured that the configuration distribution message and the online message of the same network device are processed by the same device management instance, which can greatly improve the processing performance. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 is a flowchart of a configuration distribution method in an embodiment of the application;

[0016] Figure 2A is a structural schematic diagram of a device management platform in an embodiment of the application;

[0017] Figure 2B is a structural schematic diagram of a device management platform in an embodiment of the application;

[0018] Figure 3 is a structural schematic diagram of a device management platform in an embodiment of the application;

[0019] Figure 4 is a schematic diagram of an initialization process in an embodiment of the application;

[0020] Figure 5 is a schematic diagram of a device online process in an embodiment of the application;

[0021] Figure 6 is a schematic diagram of a configuration distribution process in an embodiment of the application;

[0022] Figure 7 FIG. 1 is a structural schematic diagram of a configuration issuing device in an embodiment of the present application;

[0023] Figure 8 FIG. 2 is a hardware structure diagram of a management device in an embodiment of the present application. DETAILED DESCRIPTION

[0024] An embodiment of the present application proposes a configuration issuing method, which can be applied to a management device (such as a device management platform), and the management device includes a plurality of device access instances and a plurality of device management instances. Referring to FIG. 1, which is a flowchart of the method, the method can include the following steps. Figure 1

[0025] Step 101, when a configuration issuing message is received through a first device management instance, the configuration issuing message includes a unique device identifier of a network device, then a second device management instance is selected from a device management instance list based on the unique device identifier through the first device management instance, and the configuration issuing message is sent to the second device management instance, and the device management instance list includes instance identifiers of the plurality of device management instances.

[0026] Step 102, when the configuration issuing message is received through the second device management instance, then a first device access instance corresponding to the unique device identifier is determined based on a pairing relationship between the unique device identifier and an instance identifier which has been maintained through the second device management instance; wherein when the network device is online from the first device access instance, the second device management instance is selected from the device management instance list based on the unique device identifier through the first device access instance, and a pairing relationship between the unique device identifier and the instance identifier of the first device access instance is sent to the second device management instance. On this basis, when the configuration issuing message is received by the second device management instance, the first device access instance corresponding to the unique device identifier can be determined based on the pairing relationship between the unique device identifier and the instance identifier of the first device access instance.

[0027] Step 103, the configuration issuing message is sent to the first device access instance through the second device management instance, so that the first device access instance sends the configuration issuing message to the network device; wherein the configuration issuing message can include a to-be-issued configuration, and the to-be-issued configuration is used for configuring the network device.

[0028] In an example, the configuration issuing message is sent to the second device management instance through the first device management instance, which can include but is not limited to: the configuration issuing message is written to a message queue through the first device management instance, the configuration issuing message can correspond to a first message topic of the second device management instance; the configuration issuing message is sent to the second device management instance corresponding to the first message topic through the message queue.

[0029] ​In one example, the sending, by the first device access instance, to the second device management instance, of the pairing of the unique device identifier and the instance identifier of the first device access instance can include, but is not limited to, writing, by the first device access instance, an online message to a message queue, the online message corresponding to a first message topic of the second device management instance; and sending, by the message queue, the online message to the second device management instance corresponding to the first message topic, the online message including the unique device identifier and the instance identifier of the first device access instance.

[0030] In one example, the sending, by the second device management instance, to the first device access instance, of the configuration delivery message can include, but is not limited to, writing, by the second device management instance, the configuration delivery message to a message queue, the configuration delivery message corresponding to a second message topic of the first device access instance; and sending, by the message queue, the configuration delivery message to the first device access instance corresponding to the second message topic.

[0031] In one example, the selecting, by the first device management instance, of the second device management instance from the list of device management instances based on the unique device identifier can include, but is not limited to, for each device management instance in the list of device management instances, determining, by the first device management instance, a node position of the device management instance on a hash ring, and determining, by the first device management instance, a data position of the unique device identifier on the hash ring; and selecting, from the list of device management instances, a device management instance as the second device management instance based on a positional relationship between the data position and the node position of each device management instance.

[0032] In one example, the selecting, by the first device access instance, of the second device management instance from the list of device management instances based on the unique device identifier can include, but is not limited to, for each device management instance in the list of device management instances, determining, by the first device access instance, a node position of the device management instance on a hash ring, and determining, by the first device access instance, a data position of the unique device identifier on the hash ring; and selecting, from the list of device management instances, a device management instance as the second device management instance based on a positional relationship between the data position and the node position of each device management instance.

[0033] In one example, for each device management instance, periodically sending, by the device management instance, to the registered device, the instance identifier of the device management instance, so that the registered device updates the instance identifier of the device management instance in the list of device management instances to obtain an updated list of device management instances.

[0034] On this basis, for each device access instance, periodically obtaining, by the device access instance, from the registered device, the updated list of device management instances; and for each device management instance, periodically obtaining, by the device management instance, from the registered device, the updated list of device management instances.

[0035] In one example, when an existing device management instance is offline, the registration device does not receive the instance identifier of the existing device management instance within a preset time, and deletes the instance identifier of the existing device management instance from the device management instance list to obtain an updated device management instance list; when a new device management instance is online, the registration device receives the instance identifier of the new device management instance, and adds the instance identifier of the new device management instance to the device management instance list to obtain an updated device management instance list.

[0036] The second device management instance can be selected from the updated device management instance list based on the unique device identifier by the first device management instance; the second device management instance can be selected from the updated device management instance list based on the unique device identifier by the first device access instance.

[0037] In one example, when a configuration delivery message is sent from the first device management instance to the second device management instance, a configuration message header is added to the configuration delivery message, which can include but is not limited to the serial number of the configuration to be delivered, the instance identifier of the second device management instance, and the unique device identifier. When the configuration delivery message is sent from the second device management instance to the first device access instance, the configuration message header can also be sent to the first device access instance, so that the first device access instance stores the configuration message header when receiving the configuration message header. When the first device access instance receives a configuration result message in response to the configuration delivery message, the configuration result message can include the unique device identifier, and the first device access instance queries the configuration message header corresponding to the unique device identifier, and sends the serial number in the configuration result message and the configuration message header to the second device management instance corresponding to the instance identifier in the configuration message header, so that the second device management instance determines that the configuration corresponding to the serial number has been successfully delivered.

[0038] As can be seen from the above technical solutions, in this embodiment, when a network device comes online from a first device access instance, the first device access instance selects a second device management instance from the device management instance list based on a unique device identifier, and sends the pairing relationship between the unique device identifier and the instance identifier of the first device access instance to the second device management instance. When a configuration delivery message is received through the first device management instance, the first device management instance selects a second device management instance from the device management instance list based on the unique device identifier, and sends the configuration delivery message to the second device management instance. The second device management instance determines the first device access instance corresponding to the unique device identifier and sends the configuration delivery message to the first device access instance, so that the first device access instance sends the configuration delivery message to the network device. In this way, the device access instance (i.e., the first device access instance) to which the network device is accessed can be found quickly and correctly, and the access of a large number of network devices can be supported, meeting the needs of large-scale cloud management of network devices. By using the same algorithm in the device access instance and the device management instance, it is ensured that the configuration delivery message and the online message of the same network device are processed by the same device management instance, which can guarantee a significant improvement in processing performance.

[0039] The technical solutions described above in the embodiments of this application will be explained below in conjunction with specific application scenarios.

[0040] The device management platform is responsible for the access and management of network devices. In large-scale device management scenarios, such as public cloud-based device management SaaS (Software as a Service) platforms, a distributed architecture is adopted to handle a large number of network devices. This architecture decouples device access and device management functions, with each function supporting the deployment of multiple instances. For example, multiple device access instances are used to implement device access functions, and multiple device management instances are used to implement device management functions. In such a deployment scenario, network devices will randomly connect to a device access instance. When a device management instance sends a configuration to be distributed to a network device, it needs to find the device access instance to which the network device is connected, send the configuration to be distributed to that device access instance, and then that device access instance sends the configuration to be distributed to the network device.

[0041] In one example, see Figure 2A The diagram shows the structure of a device management platform. The platform includes multiple device management instances and multiple device access instances. Taking m device management instances and n device access instances as an example, where m and n are both positive integers greater than 1, the device management platform includes device management instance 1, device management instance 2, ..., device management instance m, device access instance 1, device access instance 2, ..., device access instance n. Furthermore, the device management platform may also include a message queue.

[0042] Referring to Figure 2B As shown in FIG. 1, it is a structural schematic diagram of a device management platform. In addition to m device management instances, n device access instances and a message queue, the device management platform can include a Redis (Remote Dictionary Server) cache. In this scenario, when a network device is online on a certain device access instance (e.g., device access instance 1), the device access instance 1 records the unique device identifier of the network device and the instance identifier of the device access instance 1 in the Redis cache. When a device management instance (e.g., device management instance 2) sends a to-be-downloaded configuration to the network device, the instance identifier corresponding to the unique device identifier of the network device is queried from the Redis cache, such as the instance identifier of the device access instance 1. The device management instance 2 writes the to-be-downloaded configuration into the message queue, and the to-be-downloaded configuration corresponds to the message topic of the device access instance 1.

[0043] When there is a to-be-downloaded configuration in the message queue, the to-be-downloaded configuration can be sent to the device access instance 1 corresponding to the message topic through the message queue. The device access instance 1 can send the to-be-downloaded configuration to the network device, and the network device configures itself based on the to-be-downloaded configuration.

[0044] The above-mentioned method needs to rely on the Redis cache. When there are a large number of network devices, the Redis cache needs to be updated (i.e., the unique device identifier of the network device and the instance identifier of the device access instance are recorded in the Redis cache) when each network device is online, and the Redis cache needs to be queried (i.e., the instance identifier corresponding to the unique device identifier of the network device is queried from the Redis cache) when the configuration is downloaded. The update and query of the Redis cache generate a large number of IO operations, and the Redis cache becomes a performance bottleneck, which limits the number of network devices that can be accessed.

[0045] In view of the above discovery, a device configuration downloading method in a distributed environment is proposed in the embodiments of the present application, which does not rely on the Redis cache to centrally store the unique device identifier of the network device and the instance identifier of the device access instance, and uses a consistent hash algorithm and a local cache to solve the problem of limited access number.

[0046] In one example, referring to Figure 3 As shown in FIG. 1, it is a structural schematic diagram of a device management platform. In addition to m device management instances, n device access instances and a message queue, the device management platform can include a Redis (Remote Dictionary Server) cache. In this scenario, when a network device is online on a certain device access instance (e.g., device access instance 1), the device access instance 1 records the unique device identifier of the network device and the instance identifier of the device access instance 1 in the Redis cache. When a device management instance (e.g., device management instance 2) sends a to-be-downloaded configuration to the network device, the instance identifier corresponding to the unique device identifier of the network device is queried from the Redis cache, such as the instance identifier of the device access instance 1. The device management instance 2 writes the to-be-downloaded configuration into the message queue, and the to-be-downloaded configuration corresponds to the message topic of the device access instance 1.

[0047] For each device access instance, the device access instance has a unique instance identifier, and the instance identifier is used to uniquely represent the device access instance. For each device management instance, the device management instance has a unique instance identifier, and the instance identifier is used to uniquely represent the device management instance. For example, the instance identifier can be an instance name, the instance identifier can be an instance number, and the instance identifier can be an instance name and an instance number.

[0048] The n device access instances are used to implement the device access function, that is, the device access instance is an entity for implementing the device access function, which can be implemented by software or hardware, and no limitation is made to this.

[0049] The device access instance can also be referred to as a device access module, and the device access instance is responsible for the connection of the network device, implements the service function of the TCP (Transmission Control Protocol), UDP (User Datagram Protocol), MQTT (Message Queuing Telemetry Transport) and other access protocols, that is, the device access instance is connected with the network device through the TCP, UDP, MQTT and other access protocols. The device access instance supports multi-instance deployment and supports expansion and contraction, that is, it supports deploying multiple device access instances and supports increasing or decreasing device access instances.

[0050] Each device access instance listens to the message topic of the device access instance in the message queue, and the name of the message topic is consistent with the instance identifier of the device access instance, that is, when there is a message corresponding to the message topic of the device access instance in the message queue, the message is sent to the device access instance.

[0051] Each device access instance periodically obtains a device management instance list from a registered device, and the device management instance list is used for consistency hash calculation. Before and after each device access instance restarts, the instance identifier remains unchanged.

[0052] The m device management instances are used to implement the device management function, that is, the device management instance is an entity for implementing the device management function, which can be implemented by software or hardware, and no limitation is made to this.

[0053] The device management instance can also be referred to as a device management module, and is responsible for the configuration function of the network device, implements the external configuration issuing interface, and implements the saving of the configuration. The device management instance supports multi-instance deployment and supports expansion and contraction, that is, it supports deploying multiple device management instances and supports increasing or decreasing device management instances.

[0054] Each device management instance listens for its own message topic from the message queue, and the name of the message topic is consistent with the instance identifier of the device management instance. That is, when there is a message corresponding to the message topic of the device management instance in the message queue, the message is sent to the device management instance.

[0055] Each device management instance can periodically update its instance identifier to the registered device, thereby generating a device management instance list on the registered device. Each device management instance can also periodically retrieve the device management instance list from the registered device, and this list is used for consistent hash calculations. Each device management instance maintains its instance identifier before and after a restart.

[0056] Message queues can be message queues using Kafka (a distributed messaging system) or other types of message queues. Message queues are used to implement message routing between different instances.

[0057] See Figure 3 As shown, in addition to the device management platform, it can also involve registered devices (also known as registration centers) and multiple network devices. The registered device is used to maintain the instance list of device management instances, which can be called the device management instance list. If the device management instance does not receive an update message from the device management instance regularly, the device management instance will age out from the registered device. The registered device provides an external interface to obtain the device management instance list.

[0058] For each network device, which can be a router or switch, or a smart home device, there are no restrictions; it can be any device that can be remotely controlled.

[0059] In the above application scenario, this embodiment proposes a configuration distribution method, which may involve an initialization process, a device online process, a configuration distribution process, and an instance exception handling process. The initialization process, the device online process, the configuration distribution process, and the instance exception handling process are described below.

[0060] First, regarding the initialization process.

[0061] See Figure 4 The diagram shown illustrates the initialization process, which may include:

[0062] Step 401: For each device access instance, after the device access instance starts, it registers a message topic it listens on with the message queue. The message topic is the instance identifier of the device access instance. Thus, if a message needs to be sent to this device access instance, it only needs to be written to the corresponding message topic in the message queue, and the message queue can then send the message to the device access instance corresponding to that message topic. Clearly, since there is a one-to-one correspondence between the message topic (i.e., the instance identifier) ​​and the device access instance, messages can be sent to the device access instance corresponding to that message topic.

[0063] Step 402: For each device management instance, after the device management instance starts, it registers a message topic it listens on with the message queue. The message topic is the instance identifier of the device management instance. Thus, if a message needs to be sent to this device management instance, it only needs to be written to the corresponding message topic in the message queue, and the message queue can then send the message to the device management instance corresponding to that message topic. Clearly, since there is a one-to-one correspondence between the message topic (i.e., the instance identifier) ​​and the device management instance, messages can be sent to the device management instance corresponding to that message topic.

[0064] Step 403: For each device management instance, the device management instance periodically updates its instance identifier to the registered device. That is, the device management instance periodically sends its instance identifier to the registered device, such as sending the instance identifier to the registered device every 5 seconds.

[0065] In one example, the registered device can maintain a list of device management instances, which can include instance identifiers for multiple device management instances. For instance, the initial state of the device management instance list can be empty. When the registered device receives the instance identifier of device management instance 1, it adds the instance identifier of device management instance 1 to the list. When the registered device receives the instance identifier of device management instance 2, it adds the instance identifier of device management instance 2 to the list, and so on. When the registered device receives the instance identifier of device management instance m, it adds the instance identifier of device management instance m to the list.

[0066] After adding the instance identifier of Device Management Instance 1 to the device management instance list, the registered device can also set a timer for Device Management Instance 1. The timer's timeout period is longer than the update time of the device management instance (e.g., 30 seconds, meaning the device management instance periodically sends the instance identifier to the registered device based on this update time). Thus, if the registered device receives the instance identifier of Device Management Instance 1 before the timer expires, and the instance identifier has not changed, it keeps the instance identifier of Device Management Instance 1 unchanged in the device management instance list and restarts the timer for Device Management Instance 1. If the registered device receives the instance identifier of Device Management Instance 1 before the timer expires, and the instance identifier has changed, it updates the instance identifier of Device Management Instance 1 in the device management instance list, replacing the previous instance identifier with the updated one, and restarts the timer for Device Management Instance 1. If the registered device does not receive the instance identifier of Device Management Instance 1 when the timer expires, it deletes the instance identifier of Device Management Instance 1 from the device management instance list. In summary, registering a device can update the instance identifier of device management instance 1 in the device management instance list to obtain the updated device management instance list.

[0067] After adding the instance identifier of Device Management Instance 2 to the Device Management Instance List, the registered device can set a timer for Device Management Instance 2. If the registered device receives the instance identifier of Device Management Instance 2 before the timer expires, it will either keep the instance identifier of Device Management Instance 2 unchanged or update it. If the registered device does not receive the instance identifier of Device Management Instance 1 when the timer expires, it will delete the instance identifier of Device Management Instance 2. This process is repeated for each Device Management Instance. After performing the above steps for each Device Management Instance, the registered device can update the instance identifier of each Device Management Instance in the Device Management Instance List, resulting in an updated Device Management Instance List.

[0068] Step 404: For each device access instance, the device access instance periodically pulls the device management instance list from the registered device, that is, it periodically obtains the device management instance list from the registered device.

[0069] For example, every 5 seconds, a device access instance retrieves a list of device management instances from the registered device. This list can be the initial list retrieved by the registered device, or it can be the updated list retrieved by the registered device—the latest list is sufficient. After retrieving the list from the registered device, if the retrieved list matches the locally stored list, the locally stored list remains unchanged. If the retrieved list differs from the locally stored list, the locally stored list is replaced with the newer version.

[0070] Step 405: For each device management instance, the device management instance periodically pulls the device management instance list from the registered device, that is, it periodically obtains the device management instance list from the registered device.

[0071] For example, the device management instance retrieves a list of device management instances from the registered device every 5 seconds. This list can be the initial list retrieved by the registered device, or it can be the updated list retrieved by the registered device—the latest list is sufficient. After retrieving the list from the registered device, if the retrieved list matches the locally stored list, the locally stored list remains unchanged. If the retrieved list differs from the locally stored list, the locally stored list is replaced with the newer, more up-to-date list.

[0072] Second, regarding the equipment launch process.

[0073] See Figure 5 The diagram shown illustrates the device deployment process, which may include:

[0074] Step 501: When a network device comes online, the management device selects one device access instance from all device access instances as the device access instance for the network device. This device access instance can be recorded as the first device access instance. That is, the network device comes online from the first device access instance.

[0075] For example, when a network device comes online, the management device can randomly select one device access instance from all device access instances as the first device access instance. Alternatively, the management device can use a certain algorithm to select one device access instance from all device access instances as the first device access instance. For example, a round-robin algorithm can be used to select one device access instance from all device access instances as the first device access instance (i.e., the first network device corresponds to device access instance 1, the second network device corresponds to device access instance 2, and so on). A hash modulo algorithm can be used to select one device access instance from all device access instances as the first device access instance (e.g., taking the modulo operation between the network device's IP address and the total number of device access instances, with a remainder of 0 corresponding to device access instance 1, a remainder of 1 corresponding to device access instance 2, and so on).

[0076] For example, when a network device comes online from the first device access instance, connection information for the network device can be established, and the mapping between the network device's unique device identifier and the connection information can be stored in memory. For instance, the unique device identifier could be the network device's MAC address, device serial number (devSN), etc., without restriction, as long as it uniquely identifies the network device. The connection information for the network device can be connection information related to the network device, based on which messages can be sent to the network device.

[0077] Step 502: When a network device comes online from the first device access instance, the first device access instance selects a second device management instance from the device management instance list based on the unique device identifier of the network device. This second device management instance is the device management instance used to manage the network device.

[0078] In one example, the first device access instance can construct a hash ring. A hash ring is a circular data structure where each node represents a hash value, and the nodes are arranged in order of their hash values ​​to form a ring. When data needs to be mapped to a node, the hash value of the data can be calculated using a hash function, and then the first node on the hash ring with a hash value greater than or equal to that hash value can be found, and the data can be mapped to that node.

[0079] For each device management instance in the device management instance list, the first device access instance determines the node position of that device management instance on the hash ring. For example, a hash function is used to calculate the hash value of the instance identifier of the device management instance (i.e., performing a hash operation on the instance identifier to obtain the hash value). Then, the first node on the hash ring that is greater than or equal to this hash value is found; this node is the node position of the device management instance on the hash ring. Clearly, after performing the above operations for each device management instance in the device management instance list, the node position of each device management instance on the hash ring can be obtained.

[0080] The first device access instance can determine the data location of the network device's unique device identifier on the hash ring. For example, a hash function is used to calculate the hash value of the unique device identifier (i.e., a hash operation is performed on the unique device identifier to obtain the hash value). Then, the first node on the hash ring that is greater than or equal to the hash value is found. This node is the data location of the unique device identifier on the hash ring.

[0081] The first device access instance selects a device management instance as the second device management instance from the list of device management instances based on the positional relationship between the data location and the node location of each device management instance. For example, based on the distance between the data location and each node location, the device management instance corresponding to the node location with the smallest distance is selected as the second device management instance; the smallest distance means the fewest number of nodes separated by the hash ring. For example, the device management instance corresponding to the first node location preceding the data location is selected as the second device management instance, where the hash value of the node location preceding the data location is greater than the hash value of the data location. For example, the device management instance corresponding to the second node location preceding the data location is selected as the second device management instance. For example, the device management instance corresponding to the first node location following the data location is selected as the second device management instance; there are no restrictions on this.

[0082] In one example, when the first device access instance selects the second device management instance from the list of device management instances based on the unique device identifier of the network device, the first device access instance can calculate the second device management instance using a consistent hash algorithm based on the unique device identifier of the network device and the list of device management instances. That is, a device management instance in the list of device management instances is used as the second device management instance, and the second device management instance indicates which device management instance manages the network device.

[0083] Step 503: The first device access instance writes an online message to the message queue. This online message corresponds to the first message topic of the second device management instance (the message topic of the second device management instance is recorded as the first message topic). That is, the first device access instance writes the online message to the first message topic of the message queue. The online message includes the unique device identifier of the network device and the instance identifier of the first device access instance.

[0084] In one example, a message queue can include multiple message topics (each message topic can be understood as a sub-queue, meaning the message queue is composed of sub-queues of multiple message topics). Specifically, each device access instance can correspond to one message topic, and each device management instance can correspond to one message topic. Furthermore, a second device management instance can correspond to one message topic within the message queue, denoted as the first message topic. The first message topic corresponds to the instance identifier of the second device management instance.

[0085] After the first device access instance selects the second device management instance, the first device access instance writes the online message to the first message topic of the message queue, meaning the online message corresponds to the first message topic. For example, if the message queue includes multiple sub-queues for message topics, the first device access instance writes the online message to the sub-queue of the first message topic, ensuring the online message corresponds to the first message topic. Alternatively, the first device access instance writes the online message to the message queue and marks the online message with the first message topic, ensuring the online message corresponds to the first message topic. Of course, these are just a few examples, and the implementation method is not limited, as long as the online message corresponds to the first message topic.

[0086] For example, an online message indicates that a network device has come online, and the online message may include the unique device identifier of the network device and the instance identifier of the first device access instance. The online message indicates that the network device corresponding to this unique device identifier has come online in the first device access instance corresponding to this instance identifier.

[0087] Step 504: Send an online message to the second device management instance corresponding to the first message topic through the message queue. The online message includes the unique device identifier of the network device and the instance identifier of the first device access instance.

[0088] In one example, the message queue has a proactive message sending function. After an online message is written to the message queue, the message queue needs to send the online message to the corresponding consumer. Considering that the first message topic corresponds to the second device management instance, and the online message corresponds to the first message topic, the consumer of the online message is the second device management instance, and the online message is sent to the second device management instance through the message queue.

[0089] Step 505: After receiving the online message, the second device management instance can store the pairing relationship between the unique device identifier of the network device and the instance identifier of the first device access instance.

[0090] In one example, the second device management instance can parse the unique device identifier of the network device and the instance identifier of the first device access instance from the online message. This allows the instance management instance to store the pairing relationship between the unique device identifier of the network device and the instance identifier of the first device access instance. For instance, if the message header of the online message carries the unique device identifier of the network device and the instance identifier of the first device access instance, the second device management instance can parse these two identifiers from the message header.

[0091] Third, regarding the configuration distribution process.

[0092] See Figure 6 The diagram shown illustrates the configuration and distribution process, which may include:

[0093] Step 601: When the configuration is distributed, the management device selects one device management instance from all device management instances as the device management instance to receive the configuration. This device management instance can be recorded as the first device management instance, that is, the configuration distribution message is received through the first device management instance.

[0094] For example, during configuration distribution, the management device can randomly select one device management instance from all device management instances as the first device management instance, or it can use a certain algorithm to select one device management instance from all device management instances as the first device management instance. For example, a round-robin algorithm can be used to select one device management instance from all device management instances as the first device management instance, a hash modulo algorithm can be used to select one device management instance from all device management instances as the first device management instance (such as taking the modulo operation between the unique device identifier of the network device and the total number of device management instances, with a remainder of 0 corresponding to device management instance 1 and a remainder of 1 corresponding to device management instance 2), or a load balancing algorithm can be used to select one device management instance from all device management instances as the first device management instance.

[0095] For example, after selecting the first device management instance, configuration delivery messages can be received through this instance. These messages may include the configuration to be delivered and the unique device identifier of the network device, indicating that the configuration to be delivered will be sent to the network device corresponding to that unique device identifier. The configuration to be delivered can be Wi-Fi configuration, network configuration, VLAN configuration, WAN port configuration, etc.

[0096] Step 602: The first device management instance assigns a sequence number to the configuration to be issued in the configuration issuance message.

[0097] For example, the first device management instance generates a serial number for the configuration to be distributed. This serial number is a unique identifier for the configuration, such as a randomly generated one. Based on this, the mapping between the configuration to be distributed and the serial number can be saved in the memory of the first device management instance, and an aging timer can be set for this mapping. Before the aging timer expires, if the first device management instance receives a configuration result message in response to the configuration distribution message, and the configuration result message includes the serial number, it indicates that the configuration to be distributed corresponding to that serial number has been successfully distributed. The instance returns a message indicating successful configuration distribution to the user and deletes the mapping between the configuration to be distributed and the serial number. When the aging timer expires, if the first device management instance does not receive a configuration result message in response to the configuration distribution message, it indicates that the configuration to be distributed corresponding to that serial number has not been successfully distributed, i.e., the configuration distribution failed. The instance returns a message indicating configuration distribution failure to the user.

[0098] Step 603: When the configuration distribution message is received through the first device management instance, the first device management instance selects a second device management instance from the list of device management instances based on the unique device identifier of the network device. It should be noted that the first device management instance and the first device access instance use the same algorithm to select the second device management instance; therefore, the second device management instance selected by the first device management instance can be the same as the second device management instance selected by the first device access instance (see step 502).

[0099] In one example, the first device management instance can construct a hash ring, where each node represents a hash value. For each device management instance in the list of device management instances, the first device management instance determines its node position on the hash ring. For instance, it calculates the hash value of the instance identifier of the device management instance using a hash function, finds the first node on the hash ring that is greater than or equal to that hash value, and that node is the node position of the device management instance on the hash ring. The first device management instance can also determine the data position of the unique device identifier of a network device on the hash ring. For instance, it calculates the hash value of the unique device identifier using a hash function, finds the first node on the hash ring that is greater than or equal to that hash value, and that node is the data position of the unique device identifier on the hash ring. Based on the positional relationship between the data position and the node position of each device management instance, the first device management instance selects a device management instance from the list of device management instances as the second device management instance.

[0100] In one example, when the first device management instance selects the second device management instance from the list of device management instances based on the unique device identifier of the network device, the first device management instance can calculate the second device management instance using a consistent hash algorithm based on the unique device identifier of the network device and the list of device management instances. That is, a device management instance in the list of device management instances is selected as the second device management instance, and the second device management instance indicates which device management instance manages the network device.

[0101] Step 604: The first device management instance writes a configuration distribution message to the message queue. This configuration distribution message corresponds to the first message topic of the second device management instance; that is, the first device management instance writes the configuration distribution message to the first message topic of the message queue. For example, if the second device management instance is the same as the first device management instance, the first device management instance (or second device management instance) can directly receive the configuration distribution message. If the second device management instance is different from the first device management instance, the first device management instance needs to send the configuration distribution message to the second device management instance. In order to send the configuration distribution message to the second device management instance, the first device management instance writes the configuration distribution message to the message queue.

[0102] In one example, the message queue can include multiple message topics, meaning each device management instance can correspond to one message topic, and a second device management instance can correspond to a first message topic within the message queue, with the first message topic corresponding to the instance identifier of the second device management instance. Based on this, the first device management instance writes the configuration delivery message into the first message topic of the message queue, thus assigning the configuration delivery message to the first message topic. For example, the message queue includes sub-queues for multiple message topics, and the first device management instance writes the configuration delivery message into a sub-queue of the first message topic, ensuring the configuration delivery message corresponds to the first message topic. Alternatively, the first device management instance writes the configuration delivery message into the message queue and marks the configuration delivery message with the first message topic, ensuring the configuration delivery message corresponds to the first message topic. Of course, these are just a few examples, and the implementation method is not limited.

[0103] In one example, when the first device management instance writes a configuration delivery message to the message queue, it can also add a configuration message header to the message before writing the message with the header to the message queue. For instance, the configuration delivery message can carry a data portion, such as the actual content of the configuration to be delivered. This configuration message header can include, but is not limited to, the sequence number of the configuration to be delivered, the instance identifier of the second device management instance, and the unique device identifier of the network device, indicating that the configuration to be delivered is being sent to that network device.

[0104] Step 605: Send a configuration distribution message to the second device management instance corresponding to the first message topic through the message queue. The configuration distribution message may be a configuration distribution message carrying a configuration message header.

[0105] Step 606: After receiving the configuration distribution message, the second device management instance obtains the unique device identifier of the network device from the configuration distribution message and determines the first device access instance corresponding to the unique device identifier.

[0106] In one example, the second device management instance has pre-stored the pairing relationship between the unique device identifier of the network device and the instance identifier of the first device access instance, as shown in steps 501-505. After receiving the configuration distribution message, the second device management instance can parse the unique device identifier of the network device from the configuration message header of the configuration distribution message. Based on this, and according to the pairing relationship between the unique device identifier and the instance identifier of the first device access instance, the second device management instance can determine the instance identifier of the first device access instance corresponding to the unique device identifier, that is, determine the first device access instance.

[0107] Step 607: The second device management instance writes a configuration distribution message to the message queue (the configuration distribution message may carry a configuration message header). This configuration distribution message corresponds to the second message topic of the first device access instance (the message topic of the first device access instance is recorded as the second message topic). That is, the second device management instance writes the configuration distribution message to the second message topic of the message queue.

[0108] In one example, the message queue can include multiple message topics, that is, each device access instance can correspond to one message topic. The first device access instance can correspond to one message topic in the message queue, which is denoted as the second message topic. The second message topic corresponds to the instance identifier of the first device access instance.

[0109] The second device management instance can write configuration distribution messages to a second message topic in the message queue, meaning the configuration distribution message corresponds to the second message topic. For example, if the message queue includes multiple sub-queues for message topics, the second device management instance can write the configuration distribution message to a sub-queue of the second message topic, ensuring the correspondence between the configuration distribution message and the second message topic. Alternatively, the second device management instance can write the configuration distribution message to the message queue and mark the configuration distribution message with a second message topic, further confirming the correspondence. These are just a few examples, and the implementation method is not limited.

[0110] Step 608: Send the configuration delivery message to the first device access instance corresponding to the second message topic via the message queue. For example, the message queue has an active message sending function. After the configuration delivery message is written to the message queue, the message queue needs to send the configuration delivery message to the corresponding consumer. Considering that the second message topic corresponds to the first device access instance, and the configuration delivery message corresponds to the second message topic, the consumer is the first device access instance, and the configuration delivery message is sent to the first device access instance via the message queue.

[0111] Step 609: After receiving the configuration distribution message, the first device access instance can send the configuration distribution message to the network device. The configuration distribution message may include the configuration to be distributed.

[0112] In one example, when the first device access instance receives a configuration delivery message, the message may also include a configuration header. The first device access instance can then parse and store this header. When the first device access instance sends a configuration delivery message to the network device, this message does not include the header; it only includes the configuration to be delivered.

[0113] When the first device access instance sends a configuration distribution message to the network device, it can query the connection information corresponding to the unique device identifier by storing the correspondence between the unique device identifier and the connection information in memory. Based on this connection information, the first device access instance can send the message to the network device.

[0114] After receiving a configuration distribution message, a network device can parse the configuration to be distributed from the message, and this configuration is used to configure the network device. Therefore, the network device can configure itself based on this configuration, and there are no restrictions on this configuration process.

[0115] In one example, after completing the configuration, the network device can also return a configuration result message to the first device access instance, and the first device access instance can receive the configuration result message in response to the configuration delivery message. The configuration result message may include the unique device identifier of the network device.

[0116] The first device access instance can parse the unique device identifier of the network device from the configuration result message and query the configuration message header corresponding to that unique device identifier. For example, since the configuration message header may include the sequence number of the configuration to be issued, the instance identifier of the second device management instance, and the unique device identifier of the network device, the configuration message header corresponding to that unique device identifier can be queried.

[0117] The first device access instance can send the configuration result message and the sequence number in the configuration message header to the second device management instance corresponding to the instance identifier in the configuration message header. For example, the first device access instance can encapsulate the configuration message header in the configuration result message and send the configuration result message (i.e., the configuration result message carrying the configuration message header) to the second device management instance. Alternatively, the first device access instance can write the configuration result message to a message queue, where the configuration result message corresponds to the first message topic of the second device management instance, and send the configuration result message to the second device management instance corresponding to the first message topic through the message queue. In this way, the second device management instance can receive the configuration result message.

[0118] After receiving the configuration result message, the second device management instance can obtain the sequence number of the configuration to be distributed (e.g., by parsing the sequence number of the configuration to be distributed from the configuration message header), determine that the configuration to be distributed corresponding to the sequence number has been successfully distributed, return the information that the configuration was successfully distributed to the user, and save the configuration to be distributed to the database, indicating that the network device is using this configuration to be distributed.

[0119] The configuration result message may carry information indicating that the configuration was successfully delivered or that it failed to deliver. Based on this, if the configuration result message carries information indicating that the configuration was successfully delivered, it is determined that the configuration to be delivered corresponding to the sequence number has been successfully delivered. If the configuration result message carries information indicating that the configuration to be delivered corresponding to the sequence number failed to deliver, it is determined that the configuration to be delivered corresponding to the sequence number failed to deliver, and the information indicating that the configuration was delivered failed is returned to the user.

[0120] Fourth, regarding the instance exception handling process.

[0121] When an existing device management instance goes offline (e.g., due to a device management instance failure), if a registered device does not receive the instance identifier of the existing device management instance within a preset time, the instance identifier of the existing device management instance is deleted from the device management instance list, resulting in an updated device management instance list. When a new device management instance comes online, the registered device receives the instance identifier of the new device management instance, adds the instance identifier of the new device management instance to the device management instance list, resulting in an updated device management instance list.

[0122] Based on this, the first device management instance selects the second device management instance from the updated list of device management instances based on the unique device identifier of the network device. The first device access instance selects the second device management instance from the updated list of device management instances based on the unique device identifier of the network device.

[0123] In summary, during system operation, each device management instance and each device access instance periodically synchronizes the device management instance list of registered devices, retaining only the synchronized list from registered devices. The latest device management instance list can be used, and when using the consistent hash algorithm to find a second device management instance, it can be based on the latest device management instance list. Through this process, normal operation is possible even in the event of device management instance anomalies.

[0124] As can be seen from the above technical solutions, this embodiment of the application does not have a single point of Redis caching performance bottleneck, supports the access of a large number of network devices, and meets the needs of large-scale cloud management of network devices. By using the same consistent hash algorithm in the device access instance and the device management instance, it is ensured that the configuration distribution message and the online message of the same device are processed by the same device management instance. In this way, it is only necessary to maintain the correspondence between the instance identifier of the device access instance and the unique device identifier of the network device in the local memory of the device management instance, which can ensure that the processing performance is significantly improved compared to the centralized Redis caching method.

[0125] Based on the same application concept as the above method, this application proposes a configuration distribution device for use in a management device. The management device includes multiple device access instances and multiple device management instances. See [link to relevant documentation]. Figure 7 The diagram shown is a structural schematic of the configuration distribution device, which may include:

[0126] The device management module 71 is configured to, when receiving a configuration distribution message through a first device management instance (the configuration distribution message includes a unique device identifier for the network device), select a second device management instance from a list of device management instances based on the unique device identifier, and send the configuration distribution message to the second device management instance; the list of device management instances includes instance identifiers of multiple device management instances; and when receiving the configuration distribution message through a second device management instance, determine a first device access instance corresponding to the unique device identifier based on a maintained pairing relationship between unique device identifiers and instance identifiers, and send the configuration distribution message to the first device access instance through the second device management instance.

[0127] The device access module 72 is configured to, when a network device comes online from a first device access instance, select a second device management instance from a list of device management instances based on the unique device identifier through the first device access instance, and send the pairing relationship between the unique device identifier and the instance identifier of the first device access instance to the second device management instance; when the configuration distribution message is received through the first device access instance, the configuration distribution message is sent to the network device through the first device access instance; wherein, the configuration distribution message includes a configuration to be distributed, and the configuration to be distributed is used to configure the network device.

[0128] In one example, the configuration distribution device further includes: a message queue management module 73;

[0129] The device management module 71 is further configured to write the configuration distribution message to the message queue through the first device management instance, wherein the configuration distribution message corresponds to the first message topic of the second device management instance; the message queue management module 73 is configured to send the configuration distribution message to the second device management instance corresponding to the first message topic through the message queue.

[0130] The device access module 72 is further configured to write an online message to a message queue through the first device access instance, the online message corresponding to a first message topic of the second device management instance; the message queue management module 73 is configured to send the online message to the second device management instance corresponding to the first message topic through the message queue; wherein, the online message includes a pairing relationship between the unique device identifier and the instance identifier of the first device access instance;

[0131] The device management module 71 is further configured to write the configuration distribution message to the message queue through the second device management instance, the configuration distribution message corresponding to the second message topic of the first device access instance; the message queue management module 73 is configured to send the configuration distribution message to the first device access instance corresponding to the second message topic through the message queue.

[0132] In one example, when the device management module 71 selects a second device management instance from the device management instance list based on the unique device identifier using a first device management instance, it specifically performs the following steps: for each device management instance in the device management instance list, it determines the node position of the device management instance on the hash ring using the first device management instance, and determines the data position of the unique device identifier on the hash ring using the first device management instance; based on the positional relationship between the data position and the node position of each device management instance, it selects a device management instance from the device management instance list as the second device management instance. Similarly, when the device access module 72 selects a second device management instance from the device management instance list based on the unique device identifier using the first device access instance, it specifically performs the following steps: for each device management instance in the device management instance list, it determines the node position of the device management instance on the hash ring using a first device access instance, and determines the data position of the unique device identifier on the hash ring using the first device access instance; based on the positional relationship between the data position and the node position of each device management instance, it selects a device management instance from the device management instance list as the second device management instance.

[0133] In one example, the device management module 71 is further configured to, for each device management instance, periodically send the instance identifier of the device management instance to the registered device, so that the registered device updates the instance identifier of the device management instance in the device management instance list to obtain an updated device management instance list; and for each device management instance, periodically obtain the updated device management instance list from the registered device through the device management instance.

[0134] The device access module 72 is also used to periodically obtain the updated list of device management instances from the registered device for each device access instance.

[0135] In one example, when an existing device management instance goes offline, if the registered device does not receive the instance identifier of the existing device management instance within a preset time, it deletes the instance identifier of the existing device management instance from the device management instance list, resulting in an updated device management instance list. When a new device management instance comes online, the registered device receives the instance identifier of the new device management instance and adds the instance identifier of the new device management instance to the device management instance list, resulting in an updated device management instance list. Based on this, the device management module 71 is further configured to select a second device management instance from the updated device management instance list using the first device management instance based on a unique device identifier; the device access module 72 is further configured to select a second device management instance from the updated device management instance list using the first device access instance based on a unique device identifier.

[0136] In one example, the device management module 71 is further configured to add a configuration message header to the configuration distribution message when sending the configuration distribution message from the first device management instance to the second device management instance. The configuration message header includes a sequence number of the configuration to be distributed, an instance identifier of the second device management instance, and a unique device identifier. The device management module 71 is further configured to send the configuration message header to the first device access instance when sending the configuration distribution message from the second device management instance to the first device access instance, so that the first device access instance stores the configuration message header upon receiving it. The device access module 72 is further configured to, when receiving a configuration result message in response to the configuration distribution message through the first device access instance, wherein the configuration result message includes the unique device identifier, query the configuration message header corresponding to the unique device identifier through the first device access instance, and send the configuration result message and the sequence number to the second device management instance corresponding to the instance identifier in the configuration message header, so that the second device management instance determines that the configuration to be distributed corresponding to the sequence number has been successfully distributed.

[0137] Based on the same application concept as the above method, this application proposes a management device, see [link to relevant documentation]. Figure 8 As shown, the management device includes a processor 81 and a machine-readable storage medium 82, wherein the machine-readable storage medium 82 stores machine-executable instructions that can be executed by the processor 81; the processor 81 is used to execute the machine-executable instructions to implement the configuration distribution method disclosed in the above example of this application.

[0138] Based on the same application concept as the above method, this application embodiment also provides a machine-readable storage medium storing a plurality of computer instructions, which, when executed by a processor, can implement the configuration distribution method disclosed in the above examples of this application.

[0139] The aforementioned machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0140] Based on the same concept as the methods described above, this application also provides a computer program product, which may include a computer program. When executed by a processor, the computer program implements the configuration distribution method disclosed in the examples above.

[0141] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0142] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A configuration distribution method, characterized in that, Applied to a management device, the management device including multiple device access instances and multiple device management instances, the method includes: When a configuration delivery message is received through a first device management instance, the configuration delivery message includes a unique device identifier of the network device. The first device management instance selects a second device management instance from a list of device management instances based on the unique device identifier and sends the configuration delivery message to the second device management instance. The list of device management instances includes instance identifiers of multiple device management instances. When the configuration distribution message is received through the second device management instance, the second device management instance determines the first device access instance corresponding to the unique device identifier based on the maintained pairing relationship between the unique device identifier and the instance identifier. Specifically, when a network device comes online from the first device access instance, the first device access instance selects a second device management instance from the device management instance list based on the unique device identifier and sends the pairing relationship between the unique device identifier and the instance identifier of the first device access instance to the second device management instance. The configuration distribution message is sent from the second device management instance to the first device access instance, so that the first device access instance sends the configuration distribution message to the network device; wherein, the configuration distribution message includes a configuration to be distributed, which is used to configure the network device.

2. The method according to claim 1, characterized in that, Sending the configuration delivery message to the second device management instance includes: writing the configuration delivery message to a message queue through the first device management instance, wherein the configuration delivery message corresponds to a first message topic of the second device management instance; and sending the configuration delivery message to the second device management instance corresponding to the first message topic through the message queue. Sending the pairing relationship between the unique device identifier and the instance identifier of the first device access instance to the second device management instance includes: writing an online message to a message queue through the first device access instance, the online message corresponding to a first message topic of the second device management instance; and sending the online message to the second device management instance corresponding to the first message topic through the message queue, the online message including the unique device identifier and the instance identifier of the first device access instance. Sending the configuration distribution message to the first device access instance through the second device management instance includes: writing the configuration distribution message to a message queue through the second device management instance, wherein the configuration distribution message corresponds to a second message topic of the first device access instance; and sending the configuration distribution message to the first device access instance corresponding to the second message topic through the message queue.

3. The method according to claim 1, characterized in that, The step of selecting a second device management instance from the device management instance list based on the unique device identifier using a first device management instance includes: for each device management instance in the device management instance list, determining the node position of the device management instance on the hash ring using the first device management instance, and determining the data position of the unique device identifier on the hash ring using the first device management instance; and selecting a device management instance from the device management instance list as the second device management instance based on the positional relationship between the data position and the node position of each device management instance. The step of selecting a second device management instance from the device management instance list based on the unique device identifier through the first device access instance includes: for each device management instance in the device management instance list, determining the node position of the device management instance on the hash ring through the first device access instance, determining the data position of the unique device identifier on the hash ring through the first device access instance; and selecting a device management instance from the device management instance list as the second device management instance based on the positional relationship between the data position and the node position of each device management instance.

4. The method according to claim 1 or 3, characterized in that, The method further includes: For each device management instance, the instance identifier of the device management instance is periodically sent to the registered device so that the registered device updates the instance identifier of the device management instance in the device management instance list, thereby obtaining an updated device management instance list; For each device access instance, the updated list of device management instances is periodically obtained from the registered device through the device access instance; for each device management instance, the updated list of device management instances is periodically obtained from the registered device through the device management instance.

5. The method according to claim 4, characterized in that, When an existing device management instance goes offline, if the registered device does not receive the instance identifier of the existing device management instance within a preset time, it will delete the instance identifier of the existing device management instance from the device management instance list and obtain an updated device management instance list; when a new device management instance comes online, the registered device will receive the instance identifier of the new device management instance and add the instance identifier of the new device management instance to the device management instance list and obtain an updated device management instance list. Specifically, the first device management instance selects a second device management instance from the updated list of device management instances based on a unique device identifier; the first device access instance selects a second device management instance from the updated list of device management instances based on a unique device identifier.

6. The method according to claim 1, characterized in that, When sending the configuration delivery message to the second device management instance through the first device management instance, a configuration message header is added to the configuration delivery message. The configuration message header includes the sequence number of the configuration to be delivered, the instance identifier of the second device management instance, and the unique device identifier. When the configuration distribution message is sent to the first device access instance through the second device management instance, the configuration message header is sent to the first device access instance so that the first device access instance stores the configuration message header when it receives it. When a configuration result message is received in response to the configuration delivery message through the first device access instance, the configuration result message includes the unique device identifier. The first device access instance queries the configuration message header corresponding to the unique device identifier and sends the configuration result message and the serial number to the second device management instance corresponding to the instance identifier in the configuration message header, so that the second device management instance can determine that the configuration to be delivered corresponding to the serial number has been successfully delivered.

7. A configuration distribution device, characterized in that, Applied to a management device, the management device including multiple device access instances and multiple device management instances, the device includes: The device management module is configured to: upon receiving a configuration distribution message through a first device management instance (the configuration distribution message includes a unique device identifier for the network device), select a second device management instance from a list of device management instances based on the unique device identifier, and send the configuration distribution message to the second device management instance; upon receiving the configuration distribution message through a second device management instance (the device management instance list includes instance identifiers for multiple device management instances), determine a first device access instance corresponding to the unique device identifier based on a maintained pairing relationship between unique device identifiers and instance identifiers, and send the configuration distribution message to the first device access instance through the second device management instance. The device access module is configured to, when a network device comes online from a first device access instance, select a second device management instance from a list of device management instances based on the unique device identifier through the first device access instance, and send the pairing relationship between the unique device identifier and the instance identifier of the first device access instance to the second device management instance; when the configuration distribution message is received through the first device access instance, the module sends the configuration distribution message to the network device through the first device access instance; wherein the configuration distribution message includes a configuration to be distributed, and the configuration to be distributed is used to configure the network device.

8. The apparatus according to claim 7, characterized in that, The configuration distribution device further includes: a message queue management module; The device management module is further configured to write the configuration delivery message to the message queue through the first device management instance, wherein the configuration delivery message corresponds to the first message topic of the second device management instance; the message queue management module is configured to send the configuration delivery message to the second device management instance corresponding to the first message topic through the message queue. The device access module is further configured to write an online message to a message queue through the first device access instance, the online message corresponding to a first message topic of the second device management instance; the message queue management module is configured to send the online message to the second device management instance corresponding to the first message topic through the message queue; wherein, the online message includes a pairing relationship between the unique device identifier and the instance identifier of the first device access instance; The device management module is further configured to write the configuration distribution message to the message queue through the second device management instance, the configuration distribution message corresponding to the second message topic of the first device access instance; the message queue management module is configured to send the configuration distribution message to the first device access instance corresponding to the second message topic through the message queue.

9. The apparatus according to claim 7, characterized in that, When the device management module selects a second device management instance from the device management instance list based on the unique device identifier using the first device management instance, it specifically performs the following steps: for each device management instance in the device management instance list, it determines the node position of the device management instance on the hash ring using the first device management instance, and determines the data position of the unique device identifier on the hash ring using the first device management instance; based on the positional relationship between the data position and the node position of each device management instance, it selects a device management instance from the device management instance list as the second device management instance. When the device access module selects a second device management instance from the device management instance list based on the unique device identifier using the first device access instance, it specifically performs the following steps: for each device management instance in the device management instance list, it determines the node position of the device management instance on the hash ring using the first device access instance, and determines the data position of the unique device identifier on the hash ring using the first device access instance; based on the positional relationship between the data position and the node position of each device management instance, it selects a device management instance from the device management instance list as the second device management instance.

10. A management device, characterized in that, include: A processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; The processor is configured to execute machine-executable instructions to implement the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Message transmission method, device and equipment and machine readable storage medium

    CN110635987A

  • Container unit management method and related equipment

    CN113037522A

  • Virtual network function management message distribution method, device and equipment

    CN113542013A

  • Appartus for providing application services, method thereof, and computationally-implementable storage medium for storing a program for providing application services

    KR102659148B1

  • Configuration management as a service

    US20180309624A1