Equipment allocation method and device, equipment and storage medium

By introducing a target database into the cloud network system to store the latest status of the device management node and redistribute network equipment within the preset time period, the problem of high frequency of network equipment redistribution caused by frequent changes in the device management node state is solved. The effect of reducing the redistribution frequency and improving the stability of the system is achieved.

CN119496782APending Publication Date: 2025-02-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311059372.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-21
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In a cloud network system, multiple device management nodes change frequently in a short period of time, resulting in a higher frequency of redistribution of the same network device.

Method used

By introducing a target database into the cloud controller cluster, the latest status of the device management node is stored and network device reassignment is performed within a preset time period, ensuring the minimum allowable time interval between two consecutive reassignments of the same network device.

Benefits of technology

The redistribution frequency for the same network device is reduced, and multiple state changes are handled through a final-state-oriented device allocation method, which improves the stability and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119496782A_ABST
    Figure CN119496782A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an equipment allocation method and device, equipment and a storage medium, and can relate to the cloud technology, and the method comprises the steps that for any cloud controller in a cloud controller cluster, the cloud controller detects the state of at least one equipment management node connected with the cloud controller; for any one equipment management node in at least one equipment management node connected with the cloud controller, if the state of the equipment management node changes, the cloud controller updates the latest state of the equipment management node in the target database; and the target cloud controller in the cloud controller cluster carries out network equipment redistribution based on the latest state of each equipment management node in the equipment management node cluster at at least one time starting from the first time. Therefore, the redistribution frequency of the same network equipment can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of cloud technology, and in particular to a device allocation method, apparatus, device and storage medium. Background Art

[0002] The cloud network system may include: network devices, device management node clusters, and cloud controller clusters. Each device management node in the device management node cluster is connected to a cloud controller in the cloud controller cluster, and each cloud controller may be responsible for allocating network devices to the device management nodes connected to it, so that each network device is connected to a device management node in the device management node cluster. Each device management node may communicate with the network device connected to it, including sending control instructions to the network device connected to it, or receiving data such as alarms from the network device connected to it.

[0003] Currently, for each cloud controller in the cloud controller cluster, the cloud controller can detect the status of the device management node connected to it. When a device management node is in an unhealthy state, the cloud controller can reallocate the network device connected to the device management node to other device management nodes in a healthy state. However, sometimes multiple device management nodes may change their status within a short period of time, resulting in a high frequency of reallocation of the same network device. Summary of the invention

[0004] Embodiments of the present application provide a device allocation method, apparatus, device, and storage medium, thereby reducing the frequency of reallocation of the same network device.

[0005] In a first aspect, an embodiment of the present application provides a device allocation method, which is applied to a cloud controller cluster, wherein any cloud controller in the cloud controller cluster is connected to at least one device management node in the device management node cluster, and any device management node in the device management node cluster is connected to a cloud controller in the cloud controller cluster, any device management node in the device management node cluster is not currently allocated a network device or is currently allocated a network device, and the latest status of any device management node in the device management node cluster is stored in a target database; the method comprises: for any cloud controller in the cloud controller cluster, the cloud controller detects the status of at least one device management node connected to the cloud controller; for at least one device management node connected to the cloud controller For any device management node in the management node, if the status of the device management node changes, the cloud controller updates the latest status of the device management node in the target database; the target cloud controller in the cloud controller cluster performs network device reallocation based on the latest status of each device management node in the device management node cluster at at least one time starting from the first time; wherein the first time is the end time of the preset time period, and the start time of the preset time period is the second time, the duration is the preset duration, the second time is the first update time of the target database during the current round of status detection performed by each cloud controller in the cloud controller cluster on the device management nodes connected to each other, and the preset duration is the minimum allowed time interval between two consecutive reallocation processes of the same network device.

[0006] In a second aspect, an embodiment of the present application provides a cloud controller cluster, wherein any cloud controller in the cloud controller cluster is connected to at least one device management node in the device management node cluster, and any device management node in the device management node cluster is connected to a cloud controller in the cloud controller cluster, any device management node in the device management node cluster is not currently assigned a network device or is currently assigned a network device, and the latest status of any device management node in the device management node cluster is stored in a target database; for any cloud controller in the cloud controller cluster, the cloud controller is used to detect the status of at least one device management node connected to the cloud controller; for any device management node in at least one device management node connected to the cloud controller management node, if the status of the device management node changes, the cloud controller is also used to update the latest status of the device management node in the target database; the target cloud controller in the cloud controller cluster is used to perform network device reallocation based on the latest status of each device management node in the device management node cluster at at least one time starting from the first time; wherein the first time is the end time of the preset time period, and the start time of the preset time period is the second time, the duration is the preset duration, the second time is the first update time of the target database during the current round of status detection performed by each cloud controller in the cloud controller cluster on the device management nodes connected to each other, and the preset duration is the minimum allowed time interval between two consecutive reallocation processes of the same network device.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the method in the first aspect or its various implementations.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute the method in the first aspect or its various implementations.

[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, which enable a computer to execute a method as in the first aspect or its various implementations.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program, which enables a computer to execute the method in the first aspect or its various implementations.

[0011] Through the technical solution provided by the embodiment of the present application, when any cloud controller detects that the state of any device management node to which it is connected has changed, the cloud controller updates the latest state of the device management node in the target database; then the target cloud controller performs network device reallocation based on the latest state of each device management node in the device management node cluster at at least one time starting from the first time. By reasonably setting the first time, multiple state changes can be implemented through a final state-oriented device allocation method, thereby reducing the frequency of reallocation of the same network device. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A cloud network system architecture diagram provided for an embodiment of the present application;

[0013] Figure 2 A flow chart of a device allocation method provided in an embodiment of the present application;

[0014] Figure 3 A schematic diagram of event writing and reading provided in an embodiment of the present application;

[0015] Figure 4 A schematic diagram of a cloud controller cluster provided in an embodiment of the present application;

[0016] Figure 5 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0018] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0019] The technical solution of this application may involve cloud technology:

[0020] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0021] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.

[0022] The following is an explanation of the technical problems to be solved by the technical solution of this application, the inventive concept and the cloud network system architecture:

[0023] As mentioned above, currently for each cloud controller in the cloud controller cluster, the cloud controller can detect the status of the device management node connected to it. When a device management node is in an unhealthy state, the cloud controller can reallocate the network device connected to the device management node to other device management nodes in a healthy state. However, sometimes multiple device management nodes may change their state in a short period of time, resulting in a high frequency of reallocation of the same network device. For example, assuming that there are two parts of device management nodes, one of which is down. At this time, the cloud controller responsible for them will reallocate the network devices under this part of the nodes to the device management nodes in a healthy state, but soon the other part of the device management nodes will also go down, and the part of the device management nodes that was down before has been restored, and the network devices under the device management nodes that are currently down are reallocated back to the original part of the device management nodes.

[0024] Based on this, the embodiment of the present application proposes that multiple state changes can be implemented through a device allocation method oriented to the final state, thereby reducing the frequency of reallocation of the same network device.

[0025] It should be understood that the final state-oriented device allocation method refers to a method in which a cloud controller reallocates network devices under all management device nodes in an unhealthy state based on the current health state of all device management nodes after multiple state changes. This method is relative to the device allocation method provided by the related art, wherein the device allocation method in the related art refers to the following method: once a device management node enters an unhealthy state from a healthy state, the cloud controller connected to the device management node reallocates the network devices under the device management node.

[0026] The embodiments of the present application may be applicable to the following cloud network systems, but are not limited thereto:

[0027] For example, Figure 1 A cloud network system architecture diagram provided in an embodiment of the present application, such as Figure 1 As shown, the cloud network system includes: a cloud controller cluster 11 composed of multiple cloud controllers 111 , a device management node cluster 12 composed of multiple device management nodes 121 , and at least one network device 13 .

[0028] Each device management node 121 is connected to a cloud controller 111, and each cloud controller 111 can be responsible for allocating network devices to the device management node 121 connected thereto, so that each device management node 121 can be connected to the network device 13 it is responsible for, and each network device 13 can only be connected to one device management node 121 at the same time. Each device management node 121 can communicate with the network device 13 connected thereto, including sending control instructions to the network device 13 connected thereto, or receiving data such as alarms from the network device 13 connected thereto. The control instructions can come from the cloud controller 111 connected to the device management node 121.

[0029] In some possible implementations, the connection involved in the embodiments of the present application may be a wireless or wired connection.

[0030] In some possible implementations, the cloud controller cluster 11 may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, and the cloud controller 11 may be a functional module in the cloud server, but is not limited to this.

[0031] In some implementations, the device management node 121 may be a desktop computer, a laptop computer, a tablet computer, etc., but is not limited thereto.

[0032] In some implementations, the network device 13 may be a router, a switch, etc., but is not limited thereto.

[0033] In some possible implementations, the network device 13 may also be a core network device such as an access and mobility management function (AMF) entity, a session management function (SMF) entity, a user plane function (UPF) entity, a policy control function (PCF) entity, a unified data management (UDM) entity, a data network (DN), an application function (AF) entity, an authentication server function (AUSF) entity, a network slice selection function (NSSF) entity, etc.

[0034] In some implementations, the network device 13 may also be a base station (Base Transceiver Station, BTS) in a Global System of Mobile communication (GSM) system or a Code Division Multiple Access (CDMA) system, or a base station (NodeB, NB) in a Wideband Code Division Multiple Access (WCDMA) system, or an evolutionary base station (Evolutional Node B, eNB or eNodeB) in a Long Term Evolution (LTE) system. It may also be a Next Generation Radio Access Network (NG RAN), or a base station (gNB) in an NR system, or a wireless controller in a Cloud Radio Access Network (CRAN), or the access network device may be a relay station, an access point, a vehicle-mounted device, a wearable device, or a network device in a future evolved Public Land Mobile Network (PLMN) and other access network devices.

[0035] In some possible implementations, the network device 13 may also be a terminal device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, a smart TV, a virtual reality (VR) device, an augmented reality (AR) device, etc., but is not limited to this.

[0036] In some implementations, multiple network devices may be deployed in different physical spaces and time spaces, wherein the embodiments of the present application do not impose any restrictions on the granularity of the physical space division.

[0037] In some implementations, the cloud network system further includes: a database for storing at least one of the following, but not limited to: the status of each device management node, the load of each device management node, and the mapping relationship between each device management node and the network device it is responsible for.

[0038] It should be understood that Figure 1 A cloud network system is exemplarily shown, which exemplarily includes two cloud controllers, three device management nodes and four network devices. In fact, the cloud network system may include other numbers of cloud controllers, device management nodes and network devices, and the number of network devices is usually massive.

[0039] The technical solution of this application is described in detail below:

[0040] Figure 2 A flowchart of a device allocation method provided in an embodiment of the present application, the method is applied to a cloud controller cluster, any cloud controller in the cloud controller cluster is connected to at least one device management node in the device management node cluster, and any device management node in the device management node cluster is connected to a cloud controller in the cloud controller cluster, any device management node in the device management node cluster is not currently allocated a network device or is currently allocated a network device, and the latest status of any device management node in the device management node cluster is stored in a target database; Figure 2 As shown, the method may include:

[0041] S210: For any cloud controller in the cloud controller cluster, the cloud controller detects a status of at least one device management node connected to the cloud controller;

[0042] In some implementations, the state of the device management node includes: a healthy state and an unhealthy state.

[0043] It should be understood that in the embodiments of the present application, the healthy state may also be referred to as the normal state, and the unhealthy state may also be referred to as the abnormal state.

[0044] In some implementations, if a device management node operates normally and the network connection is normal, the device management node is determined to be in a healthy state. Conversely, if a device management node operates abnormally and / or the network connection is abnormal, the device management node is determined to be in an unhealthy state.

[0045] In some possible implementations, the operation abnormality of the device management node includes at least one of the following, but is not limited to: the device management node is down, the software on the device management node is abnormal, wherein the software can be system software or third-party software, etc., and the embodiments of the present application do not limit this.

[0046] In some implementations, the cloud controller sends a request message to the device management node. If the cloud controller receives a response message sent by the device management node, the cloud controller determines that the device management node is in a healthy state. If the cloud controller does not receive a response message sent by the device management node, the cloud controller determines that the device management node is in an unhealthy state.

[0047] In this implementation, the request message may be understood as a heartbeat packet, and the request message and the response message are used together to detect the state of the device management node.

[0048] It should be understood that, in this implementable manner, when the cloud controller can receive the response message, it means that the device management node is operating normally and the network connection is normal. In this case, it can be determined that the device management node is in a healthy state. When the cloud controller cannot receive the response message, it means that the device management node is operating abnormally and / or the network connection is abnormal. In this case, it can be determined that the device management node is in an unhealthy state.

[0049] In other possible implementations, the cloud controller sends a request message to the device management node. If the cloud controller receives a response message sent by the device management node, and the response message carries first indication information, the cloud controller determines that the device management node is in a healthy state, wherein the first indication information is used to indicate that the device management node is operating normally and the network connection between the device management node and the network device is normal. On the contrary, if the cloud controller does not receive a response message sent by the device management node; or the cloud controller receives a response message sent by the device management node, and the response message does not carry the first indication information, or the cloud controller receives a response message sent by the device management node, and the response message carries second indication information, the cloud controller determines that the device management node is in an unhealthy state. The second indication information is used to indicate that the device management node is operating abnormally, and / or that the network connection between the device management node and the network device is abnormal.

[0050] In this implementable manner, the request message is used to request to obtain the operation status of the device management node and the network connection status between the device management node and the network device.

[0051] It should be understood that the network connection of the device management node may include: a network connection between the device management node and the cloud controller to which it is connected, and a network connection between the device management node and the network device to which it is connected. Based on this, when the cloud controller can receive a response message, it first indicates that the network connection between the cloud controller and the device management node is normal. If the cloud controller also learns from the device management node that the device management node is operating normally, and the network connection between the device management node and the network device is normal, in this case, it can be determined that the device management node is in a healthy state. When the cloud controller cannot receive a response message, it first indicates that the network connection between the cloud controller and the device management node is abnormal. In this case, it can be determined that the device management node is in an unhealthy state. When the cloud controller receives a response message, but the response message does not carry the first indication information, it can indicate that the device management node is operating abnormally, and / or that the network connection between the device management node and the network device is abnormal. In this case, it can be determined that the device management node is in an unhealthy state. When the cloud controller receives a response message, the response message carries a second indication information, which clearly indicates that the device management node is operating abnormally and / or that the network connection between the device management node and the network device is abnormal. In this case, it can be determined that the device management node is in an unhealthy state.

[0052] In some implementations, the cloud controller may periodically detect the state of at least one device management node connected to the cloud controller. For example, the cloud controller may detect the state of at least one device management node connected to the cloud controller every millisecond (ms).

[0053] It should be understood that, assuming that the process of a cloud controller periodically detecting the state of at least one device management node connected to the cloud controller is called a periodic state detection process. Based on this, in some implementable embodiments, for any two cloud controllers in a cloud controller cluster, the periods of the periodic state detection process of the two cloud controllers may be the same or different. In addition, the start time of the first round of detection process of the two cloud controllers may be the same or different.

[0054] In some other implementations, the cloud controller may detect the state of at least one device management node connected to the cloud controller under a triggering condition. For example, when the cloud controller receives an indication message, the cloud controller may detect the state of at least one device management node connected to the cloud controller under the triggering condition of the indication message. The indication message is used to indicate the detection of the state of at least one device management node to which it is connected.

[0055] S220: For any device management node among the at least one device management node connected to the cloud controller, if the state of the device management node changes, the cloud controller updates the latest state of the device management node in the target database;

[0056] In some implementations, the target database includes at least one of the following mapping relationships, but is not limited thereto: a first mapping relationship between a device management node and a state, a second mapping relationship between a device management node and a load, and a third mapping relationship between a network device and a device management node to which it is connected.

[0057] For example, Table 1 exemplarily shows the first mapping relationship and the second mapping relationship:

[0058] Table 1

[0059] Device management node identifier state load Node-1 healthy 10 Node-2 Non-health 12

[0060] As shown in Table 1, the first mapping relationship includes: the mapping relationship between device management node 1 and healthy state, the mapping relationship between device management node 2 and unhealthy state. The second mapping relationship includes: the mapping relationship between device management node 1 and load 10, the mapping relationship between device management node 2 and load 12.

[0061] Table 2 exemplarily shows the third mapping relationship:

[0062] Table 2

[0063] Network device identification The device management node ID Device-1 Node-1 Device-2 Node-2

[0064] It should be understood that, for any device management node, there are two state changes of the device management node, one is a change from a healthy state to an unhealthy state, and the other is a change from an unhealthy state to a healthy state.

[0065] When the state of a device management node changes from a healthy state to an unhealthy state, the cloud controller updates the latest state of the device management node in the target database for the purpose of: the cloud controller subsequently reallocating other device management nodes for the network devices under the device management node.

[0066] When the status of a device management node changes from an unhealthy state to a healthy state, the cloud controller updates the latest status of the device management node in the target database so that the device management node can subsequently participate in the reallocation process. For example, since the device management node has just recovered to a healthy state and its load is small, the cloud controller can allocate network devices to the device management node preferentially.

[0067] In some implementations, the target database may be a local database or a remote database relative to the cloud controller cluster, which is not limited in the embodiments of the present application.

[0068] S230: The target cloud controller in the cloud controller cluster performs network device reallocation based on the latest status of each device management node in the device management node cluster at at least one time starting from the first time;

[0069] Among them, the first time is the end time of the preset time period, and the start time of the preset time period is the second time, the duration is the preset duration, and the second time is the first update time of the target database during the current round of status detection performed by each cloud controller in the cloud controller cluster on the device management nodes connected to each other. The preset duration is the minimum allowed time interval between two consecutive reallocation processes of the same network device.

[0070] It should be understood that when the status of any device management node in the target database is updated, it can be said that the target database is updated.

[0071] The following is an exemplary description of the first time:

[0072] For example, assume that there are two cloud controllers in the cloud controller cluster, namely cloud controller 1 and cloud controller 2, cloud controller 1 is connected to device management node 01, and cloud controller 2 is connected to device management node 02. Assume that cloud controller 1 detects that the state of device management node 01 changes from a healthy state to an unhealthy state at time t1, and updates the state of device management node 01 in the target database from a healthy state to an unhealthy state, and cloud controller 2 detects that the state of device management node 02 changes from a healthy state to an unhealthy state at time t1+2ms, and updates the state of device management node 02 in the target database from a healthy state to an unhealthy state. Assume that the minimum allowed time interval between two consecutive reallocation processes of the same network device is 30ms. In this case, the target cloud controller can determine t1+30ms as the first time.

[0073] It should be understood that the reason why the first time is set in this way in the embodiment of the present application is explained in combination with the above example: if according to the device allocation method in the relevant technology, assuming that the cloud controller 1 detects that the state of the device management node 01 changes from a healthy state to an unhealthy state at time t1, it can update the state of the device management node 01 in the target database from a healthy state to an unhealthy state, and the cloud controller 1 reallocates the network device 001 under the device management node 01 to other device management nodes, such as the device management node 02, at time t1+1ms. Assuming that the cloud controller 2 detects that the state of the device management node 02 changes from a healthy state to an unhealthy state at t1+2ms, it can update the state of the device management node 02 in the target database from a healthy state to an unhealthy state, and the cloud controller 2 reallocates the network device 001 under the device management node 02 to other device management nodes at t1+3ms, such as the device management node 01 that has just recovered to a healthy state. At this time, the time interval between two consecutive reallocation processes of the network device 001 is (t1+3ms)-(t1+1ms)=2ms. Obviously, this time is less than the minimum allowed time interval of 30ms between two consecutive reallocation processes of the same network device, resulting in too low a reallocation frequency for the network device.

[0074] Based on this, the embodiment of the present application proposes to compress at least two consecutive reallocation processes that are not allowed in the related art into one reallocation process, and at least two consecutive reallocation processes that are not allowed in the related art refer to reallocation processes with a time interval less than the minimum allowed time interval. In other words, the time interval between at least two consecutive reallocation processes that are not allowed in the related art is at most the minimum allowed time interval. Based on this, if there are at least two consecutive reallocation processes that are not allowed according to the related art, the embodiment of the present application can compress at least two consecutive reallocation processes that are not allowed in the related art into one reallocation process before the first time by setting the first time. Continuing with the above example, assuming that the target cloud controller detects that the latest state of the device management node 01 is a healthy state and the latest state of the device management node 02 is an unhealthy state at t1+30ms, the target cloud controller can reallocate the network device under the device management node 02 to the device management node 01. The network device 001 under the device management node 01 does not need to be reallocated, which reduces the reallocation frequency for the network device 001 compared to the related art.

[0075] It should be understood that the above-mentioned at least one time includes: one time or multiple times. It should be understood that if the first time is set appropriately, for this round of status detection process, all continuous reallocation processes that are not allowed in the relevant technology can be compressed into one reallocation process before the first time, and the target cloud controller can perform a reallocation process at the first time or at a certain time thereafter. Of course, if the first time is not set appropriately, for this round of status detection process, some continuous reallocation processes that are not allowed in the relevant technology can be compressed into one reallocation process before the first time, and the target cloud controller can perform multiple reallocation processes at multiple times, or the target cloud controller can perform a reallocation process at a certain time after the first time.

[0076] In some possible implementations, the at least one time mentioned above may correspond one-to-one to the number of updates to the target database during this round of status detection. In other words, the target database is updated several times during this round of status detection, and the target controller may perform several network device reallocations based on the latest status of each device management node in the device management node cluster.

[0077] In some other possible implementations, the number of the at least one time may be less than the number of updates to the target database during the current round of status detection.

[0078] In some implementations, the target cloud controller is preconfigured. For example, assuming that the cloud controller cluster includes cloud controller 1 and cloud controller 2, cloud controller 1 can be configured as a target cloud controller for reallocation of network devices.

[0079] In some implementable embodiments, the target cloud controller is the cloud controller with the strongest current capability in the cloud controller cluster, wherein the capability of the cloud controller can be measured by at least one of the current load condition, the current processor speed, and the current memory occupancy of the cloud controller. For example, the cloud controller with a smaller current load condition has a stronger current capability. For another example, the cloud controller with a faster current processing speed has a stronger current capability. For another example, the cloud controller with a smaller current memory occupancy has a stronger current capability. If the capability of a cloud controller can be measured by at least two of the current load condition, the current processor speed, and the current memory occupancy of the cloud controller, weights can be set for the at least two items, and the current capability of the cloud controller can be obtained by weighted average.

[0080] In the embodiment of the present application, when any cloud controller detects that the state of any device management node to which it is connected has changed, the cloud controller updates the latest state of the device management node in the target database; then the target cloud controller performs network device reallocation based on the latest state of each device management node in the device management node cluster at at least one time starting from the first time. By reasonably setting the first time, multiple state changes can be implemented through a final state-oriented device allocation method, thereby reducing the frequency of reallocation of the same network device.

[0081] It should be understood that if the device allocation method provided by the relevant technology is adopted, there may be a special situation: two groups of device management nodes in the device management node cluster enter an unhealthy state from a healthy state at the same time. In this case, there are no available device management nodes for reallocation. However, if the device allocation method provided by the embodiment of the present application is adopted, even if two groups of device management nodes enter an unhealthy state from a healthy state at the same time, since the target cloud controller performs device reallocation at least at a time starting from the first time, some device management nodes may have recovered to a healthy state at this time, thereby reducing the possibility of no available device management nodes.

[0082] In some implementations, the device allocation method further includes: for any cloud controller in the cloud controller cluster, the cloud controller generates a target event and writes the target event into a target queue; wherein the target event is used to indicate that the state of at least one device management node in the device management node cluster has changed.

[0083] In some implementations, for any one of the at least one device management nodes connected to the cloud controller, if the state of the device management node changes, the cloud controller generates a target event corresponding to the device management node. In other words, there is a one-to-one correspondence between the target event and the device management node whose state has changed.

[0084] In other possible implementations, for at least two device management nodes whose states change simultaneously among at least one device management node connected to the cloud controller, the cloud controller generates target events corresponding to the at least two device management nodes. In other words, at least two device management nodes whose states change at the same time correspond to one target event. For example, when all device management nodes under a certain cloud controller change from a healthy state to an unhealthy state at the same time, the cloud controller generates one target event.

[0085] In this implementable manner, the number of target events in the target queue can be reduced, thereby improving the reallocation efficiency for the network device.

[0086] In some possible implementations, S230 may include:

[0087] S230-1: The target cloud controller reads the target events in the target queue in sequence;

[0088] S230-2: The target cloud controller, triggered by at least one target event read, reallocates network devices based on the latest status of each device management node in the device management node cluster.

[0089] The at least one time is the reading time of the at least one target event; and the first time is the reading time of the first target event in the target queue.

[0090] For example, Figure 3 A schematic diagram of event writing and reading provided in an embodiment of the present application, such as Figure 3 As shown, the cloud controller cluster includes two cloud controllers, namely: cloud controller 1 and cloud controller 2. The device management node cluster includes: device management node 01, device management node 02 and device management node 03. Among them, cloud controller 1 is connected to device management node 01 and device management node 02, and cloud controller 2 is connected to device management node 03. When the state of device management node 01 changes, cloud controller 1 generates a target event and writes the target event into the target queue. When the state of device management node 02 changes, cloud controller 1 generates a target event and writes the target event into the target queue. When the state of device management node 03 changes, cloud controller 2 generates a target event and writes the target event into the target queue. Assuming that cloud controller 2 is used as the target controller, the target controller can read the target event from the target queue, and under the trigger of at least one target event read, the network device is reallocated based on the latest state of each device management node in the device management node cluster.

[0091] In some implementations, S230-2 may include:

[0092] S230-2-1A: The target cloud controller, triggered by each target event read, reallocates network devices based on the latest status of each device management node in the device management node cluster.

[0093] In other words, each time the target cloud controller reads a target event, it can reallocate network devices based on the latest status of each device management node in the device management node cluster under the triggering of the target event.

[0094] For example, then Figure 3Corresponding examples, in the order from the head to the tail of the target queue, when the target cloud controller reads the first target event, the target controller performs network device reallocation based on the latest status of each device management node in the device management node cluster. When the target cloud controller reads the second target event, the target controller performs network device reallocation based on the latest status of each device management node in the device management node cluster. When the target cloud controller reads the third target event, the target controller performs network device reallocation based on the latest status of each device management node in the device management node cluster.

[0095] It should be understood that the reason why the target cloud controller reallocates network devices based on the latest status of each device management node in the device management node cluster when triggered by each target event read is because when the status of any device management node changes, a network device reallocation should theoretically be performed. Therefore, the number of device reallocations performed by the target cloud controller is the same as the number of target events in the target queue.

[0096] However, the embodiments of the present application can compress at least two consecutive reallocation processes that are not allowed in the related art into one reallocation process before the first time by setting the first time. In particular, if the first time is set appropriately, all the consecutive reallocation processes that are not allowed in the related art can be compressed into one reallocation process before the first time for the current round of status detection process. At this time, the target cloud controller can perform a reallocation process at the first time or at a time thereafter. In other words, under the triggering of any target event in the target queue, the latest status of each device management node read by the target cloud controller from the target queue remains unchanged. For example, then Figure 3 Corresponding example, in the order from the head to the tail of the target queue, when the target cloud controller reads the first target event, the latest state of device management node 01 is healthy, the latest state of device management node 02 is unhealthy, and the latest state of device management node 03 is unhealthy. When the target cloud controller reads the second target event, the latest state of device management node 01 is still healthy, the latest state of device management node 02 is unhealthy, and the latest state of device management node 03 is unhealthy. When the target cloud controller reads the third target event, the latest state of device management node 01 is healthy, the latest state of device management node 02 is unhealthy, and the latest state of device management node 03 is unhealthy. Based on this, the embodiment of the present application proposes the following implementable method:

[0097] In some implementations, S230-2 may include:

[0098] S230-2-1B: The target cloud controller, triggered by the first target event read, reallocates network devices based on the latest status of each device management node in the device management node cluster.

[0099] It should be understood that if the target cloud controller performs network device reallocation based on the latest status of each device management node in the device management node cluster under the triggering of each target event, even if the latest status of each device management node remains unchanged, so that the target cloud controller does not need to perform network device reallocation, the target cloud controller must read the latest status of each device management node from the target database, which makes the target cloud controller consume a lot of power. However, through this achievable method, the target cloud controller performs network device reallocation based on the latest status of each device management node in the device management node cluster under the triggering of the first target event read, and when reading subsequent target events, the target cloud controller does not need to perform any processing, thereby reducing the power consumption of the target cloud controller.

[0100] It should be understood that if the first time is not set appropriately, for the current round of state detection process, the continuous reallocation process that is not allowed in the related art can be compressed into one reallocation process before the first time. In this case, the embodiment of the present application proposes the following implementable manner:

[0101] In some possible implementations, for any cloud controller in a cloud controller cluster, the cloud controller generates an identifier of the target event while generating a target event, and writes the identifier of the target event into the target queue while writing the target event into the target queue; wherein the identifier of the latest target event is stored in the target database.

[0102] It should be understood that the identifier of the latest target event may also be stored in the cache. Accordingly, when the subsequent target cloud controller queries and updates the identifier of the latest target event, it may query and update the identifier of the latest target event in the cache.

[0103] In some achievable embodiments, for any cloud controller in the cloud controller cluster, when generating a target event, the cloud controller may query whether there is an identifier of the latest target event in the target database. If the identifier of the latest target event does not exist in the target database, the cloud controller generates an identifier of the target event, which may be an arbitrary value. Further, the cloud controller may store the identifier of the target event in the target database as the identifier of the latest target event. If the identifier of the latest target event exists in the target database, the cloud controller adds a fixed value to the identifier of the latest target event to obtain the identifier of the target event generated by it. Further, the cloud controller may update the identifier of the latest target event stored in the target database to the identifier of the target event.

[0104] For example, then Figure 3 Corresponding example, assuming that when cloud controller 1 generates the first target event, it queries the target database and finds that there is no identifier of the latest target event. At this time, cloud controller 1 can generate the identifier 0001 of the first target event, write the first target event and the identifier 0001 into the target queue, and store 0001 as the identifier of the latest target event in the target database. When cloud controller 1 generates the second target event, it queries the target database and finds that there is an identifier of the latest target event, which is 0001. At this time, cloud controller 1 can add 1 to 0001 to obtain the identifier 0002, and use the identifier 0002 as the identifier of the second target event, write the second target event and the identifier 0002 into the target queue, and update the identifier of the latest target event in the target database to 0002. When cloud controller 2 generates the third target event, it queries the target database for the identifier of the latest target event, which is 0002. At this time, cloud controller 2 can add 1 to 0002 to obtain identifier 0003, and use identifier 0003 as the identifier of the third target event. It writes the third target event and identifier 0003 into the target queue together, and updates the identifier of the latest target event in the target database to 0003.

[0105] In some implementations, for any cloud controller in the cloud controller cluster, when generating a target event, the cloud controller may generate an identifier of the target event, which may be a random string. Furthermore, the cloud controller queries the target database for the identifier of the latest target event. If the identifier of the latest target event does not exist in the target database, the cloud controller may store the identifier of the target event as the identifier of the latest target event in the target database; if the identifier of the latest target event exists in the target database, the cloud controller may update the identifier of the latest target event in the target database to the identifier of the target event.

[0106] For example, then Figure 3Corresponding example, assuming that when cloud controller 1 generates the first target event, cloud controller 1 generates an identifier for the first target event, which is a random string abc, writes the first target event and the identifier abc into the target queue, and stores abc as the identifier of the latest target event in the target database. When cloud controller 1 generates the second target event, cloud controller 1 generates an identifier for the second target event, which is a random string def, writes the second target event and the identifier def into the target queue, and updates the identifier abc of the latest target event in the target database to def. When cloud controller 2 generates the third target event, cloud controller 2 generates an identifier for the third target event, which is a random string jhk, writes the third target event and the identifier jhk into the target queue, and updates the identifier def of the latest target event in the target database to jhk.

[0107] In some implementations, S230-2 may include:

[0108] S230-2-1C: When the identifier of the target event read is consistent with the identifier of the latest target event stored in the target database, the target cloud controller can reallocate network devices based on the latest status of each device management node in the device management node cluster under the trigger of the latest target event.

[0109] On the contrary, when the identifier of the target event read is inconsistent with the identifier of the latest target event stored in the target database, the target cloud controller does not perform any processing.

[0110] For example, then Figure 3 Corresponding example, assuming that the identifier of the latest target event stored in the target database is 0003. When the target cloud controller reads target event 0001, since the identifier 0001 of the target event is different from the identifier 0003 of the latest target event, the target cloud controller does not perform any processing. When the target cloud controller reads target event 0002, since the identifier 0002 of the target event is different from the identifier 0003 of the latest target event, the target cloud controller still does not perform any processing. When the target cloud controller reads target event 0003, since the identifier 0003 of the target event is the same as the identifier 0003 of the latest target event, the target cloud controller performs network device reallocation based on the latest status of each device management node in the device management node cluster.

[0111] It should be understood that through this implementable method, on the one hand, it can be ensured that each network device deployed under a device management node in an unhealthy state can eventually be deployed under a device management node in a healthy state; on the other hand, the target cloud controller will only reallocate network devices based on the latest status of each device management node in the device management node cluster when triggered by reading the latest target event, and when other target events are read, the target cloud controller does not need to perform any processing, thereby reducing the power consumption of the target cloud controller.

[0112] In some possible implementations, network device reallocation is performed based on the latest status of each device management node in the device management node cluster, including: the target cloud controller reallocates network devices on a device management node in an unhealthy state to a device management node in a healthy state based on the latest status of each device management node in the device management node cluster.

[0113] For example, assume that the device management node cluster includes: device management node 01, device management node 02 and device management node 03, wherein device management node 01 is in a healthy state, and device management node 02 and device management node 03 are both in an unhealthy state. In this case, the target cloud controller can reallocate the network devices under device management node 02 and device management node 03 to device management node 01.

[0114] In some possible implementations, after the target cloud controller reallocates network devices on a device management node that is not in a state to a device management node that is in a state based on the latest state of each device management node in the device management node cluster, it also includes: the target cloud controller reallocates some network devices on a device management node whose load is greater than a first threshold to a device management node whose load is less than a second threshold; wherein the first threshold is greater than the second threshold.

[0115] In other words, the target cloud controller may also reallocate some network devices on the device management nodes with higher loads to the device management nodes with lower loads to achieve load balancing.

[0116] For example, assume that the device management node cluster includes: device management node 01, device management node 02 and device management node 03, wherein device management node 01 and device management node 02 are in a healthy state, and device management node 03 is in an unhealthy state. In this case, the target cloud controller can reallocate the network devices under device management node 03 to device management node 01 or device management node 02. Furthermore, if the load on device management node 01 is high and the load on device management node 02 is small, the target cloud controller can also reallocate some of the network devices on device management node 01 to device management node 02.

[0117] In some implementations, for a device management node whose load is greater than a first threshold, the target cloud controller may randomly select a preset number of network devices in the device management node and reallocate these network devices to a device management node whose load is less than a second threshold.

[0118] In some possible implementations, the value of the preset number may be 1, 2, etc., and this embodiment of the present application does not impose any limitation on this.

[0119] In some implementations, for a device management node whose load is greater than a first threshold, the target cloud controller may select the first N network devices in the device management node in descending order of priority, and reallocate these network devices to a device management node whose load is less than a second threshold.

[0120] In some implementations, when the capability of a network device is stronger, its priority is higher. When the capability of a network device is weaker, its priority is lower. The embodiment of the present application does not limit the priority of a network device.

[0121] It should be understood that, from the above content, when the target cloud controller performs network device reallocation, it needs to query the status, load, etc. of each device management node in the target database. This process may fail. Based on this, the network device reallocation process performed by the target cloud controller may also fail. When the device reallocation fails, the target cloud controller needs to perform reallocation again. Based on this, the embodiment of the present application also proposes the following implementation method:

[0122] In some implementations, after the target cloud controller performs network device reallocation based on the latest status of each device management node in the device management node cluster under the trigger of at least one target event read, the method further includes:

[0123] S240: If the network device reallocation fails, the target cloud controller reads the target event in the target queue;

[0124] S240: When the identifier of the target event read by the target cloud controller is consistent with the identifier of the latest target event stored in the target database, the target cloud controller reallocates network devices based on the latest status of each device management node in the device management node cluster under the triggering of the latest target event.

[0125] It should be understood that since the network device reallocation process performed by the target cloud controller takes a certain amount of time, when the process fails to execute, the state of at least one device management node in the device management node cluster may have changed. Accordingly, there will be a new target event in the target queue, and the identifier of the latest target event will also be stored in the target database. In order to ensure that the target cloud controller executes the latest target event, the target cloud controller needs to compare the identifier of the read target event with the identifier of the latest target event stored in the target database. If the two are consistent, the target database can perform network device reallocation based on the latest state of each device management node in the device management node cluster. If the two are inconsistent, the target database does not perform any processing, thereby reducing the power consumption of the target cloud controller.

[0126] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.

[0127] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0128] The method provided in the embodiment of the present application is described above, and the device provided in the embodiment of the present application is described below.

[0129] Figure 4 A schematic diagram of a cloud controller cluster provided in an embodiment of the present application, such as Figure 4As shown, the cloud controller cluster includes: multiple cloud controllers, wherein any cloud controller is connected to at least one device management node in the device management node cluster, and any device management node in the device management node cluster is connected to a cloud controller in the cloud controller cluster, any device management node in the device management node cluster is not currently assigned a network device or is currently assigned a network device, and the latest status of any device management node in the device management node cluster is stored in a target database; for any cloud controller in the cloud controller cluster, the cloud controller is used to detect the status of at least one device management node connected to the cloud controller; for any device management node in at least one device management node connected to the cloud controller, If the status of the device management node changes, the cloud controller is also used to update the latest status of the device management node in the target database; the target cloud controller in the cloud controller cluster is used to reallocate network devices based on the latest status of each device management node in the device management node cluster at at least one time starting from the first time; wherein the first time is the end time of the preset time period, and the start time of the preset time period is the second time, the duration is the preset duration, the second time is the first update time of the target database during the current round of status detection performed by each cloud controller in the cloud controller cluster on the device management nodes connected to each other, and the preset duration is the minimum allowed time interval between two consecutive reallocation processes of the same network device.

[0130] In some possible implementations, for any cloud controller in the cloud controller cluster, the cloud controller is also used to generate a target event and write the target event into a target queue; wherein the target event is used to indicate that the status of at least one device management node in the device management node cluster has changed; accordingly, the target cloud controller is specifically used to: read the target events in the target queue in sequence; under the trigger of at least one target event read, reallocate network devices based on the latest status of each device management node in the device management node cluster; wherein at least one time is the reading time of at least one target event; the first time is the reading time of the first target event in the target queue.

[0131] In some implementations, the target cloud controller is specifically used to: when triggered by each read target event, perform network device reallocation based on the latest status of each device management node in the device management node cluster.

[0132] In some possible implementations, the target cloud controller is specifically configured to: upon being triggered by the first target event read, perform network device reallocation based on the latest status of each device management node in the device management node cluster.

[0133] In some possible implementations, for any cloud controller in a cloud controller cluster, the cloud controller is also used to: generate an identifier of a target event while generating a target event, and write the identifier of the target event into a target queue while writing the target event into a target queue; wherein the identifier of the latest target event is stored in the target database; accordingly, the target cloud controller is specifically used to: when the identifier of the read target event is consistent with the identifier of the latest target event stored in the target database, under the triggering of the latest target event, perform network device reallocation based on the latest status of each device management node in the device management node cluster.

[0134] In some possible implementations, the target cloud controller is also used to: upon being triggered by at least one target event read, perform network device reallocation based on the latest status of each device management node in the device management node cluster, and if the network device reallocation fails, read the target event in the target queue; and upon being triggered by the latest target event, perform network device reallocation based on the latest status of each device management node in the device management node cluster when the identifier of the read target event is consistent with the identifier of the latest target event stored in the target database.

[0135] In some possible implementations, for any cloud controller in a cloud controller cluster, the cloud controller is specifically used to: for any device management node among at least one device management node connected to the cloud controller, if the state of the device management node changes, generate a target event corresponding to the device management node.

[0136] In some possible implementations, for any cloud controller in a cloud controller cluster, the cloud controller is specifically used to: for at least two device management nodes whose states change simultaneously among at least one device management node connected to the cloud controller, generate target events corresponding to at least two device management nodes.

[0137] In some implementations, the target cloud controller is specifically used to: reallocate network devices on device management nodes in an unhealthy state to device management nodes in a healthy state based on the latest state of each device management node in the device management node cluster.

[0138] In some possible implementations, the target cloud controller is also used to: based on the latest status of each device management node in the device management node cluster, after reallocating network devices on a device management node that is not in a state to a device management node that is in a state, reallocate some network devices on a device management node whose load is greater than a first threshold to a device management node whose load is less than a second threshold; wherein the first threshold is greater than the second threshold.

[0139] In some implementations, the target cloud controller is pre-configured; or, the target cloud controller is the cloud controller with the strongest current capability in the cloud controller cluster.

[0140] It should be understood that the cloud controller cluster embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be repeated here. Specifically, Figure 4 The cloud controller cluster shown can execute the above method embodiments, and the aforementioned and other operations and / or functions of each module in the cloud controller cluster are respectively for implementing the corresponding processes in each method in the above method embodiments, which will not be repeated here for the sake of brevity.

[0141] The cloud controller cluster of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or a combination of hardware and software modules in the decoding processor to execute. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0142] Figure 5 It is a schematic block diagram of an electronic device provided in an embodiment of the present application.

[0143] like Figure 5 As shown, the electronic device may include:

[0144] The memory 510 and the processor 520, the memory 510 is used to store the computer program and transmit the program code to the processor 520. In other words, the processor 520 can call and run the computer program from the memory 510 to implement the method in the embodiment of the present application.

[0145] For example, the processor 520 may be configured to execute the above method embodiments according to instructions in the computer program.

[0146] In some embodiments of the present application, the processor 520 may include but is not limited to:

[0147] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0148] In some embodiments of the present application, the memory 510 includes but is not limited to:

[0149] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0150] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 510 and executed by the processor 520 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.

[0151] like Figure 5 As shown, the electronic device may also include:

[0152] The transceiver 530 may be connected to the processor 520 or the memory 510 .

[0153] The processor 520 may control the transceiver 530 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 530 may include a transmitter and a receiver. The transceiver 530 may further include an antenna, and the number of antennas may be one or more.

[0154] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0155] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0156] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0157] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0158] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0159] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0160] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A device allocation method, characterized in that: The method is applied to a cloud controller cluster, any cloud controller in the cloud controller cluster is connected to at least one device management node in the device management node cluster, and any device management node in the device management node cluster is connected to a cloud controller in the cloud controller cluster, any device management node in the device management node cluster is not currently assigned a network device or is currently assigned a network device, and the latest state of any device management node in the device management node cluster is stored in a target database; the method comprises: For any cloud controller in the cloud controller cluster, the cloud controller detects a status of at least one device management node connected to the cloud controller; For any one of the at least one device management nodes connected to the cloud controller, if the state of the device management node changes, the cloud controller updates the latest state of the device management node in the target database; The target cloud controller in the cloud controller cluster performs network device reallocation based on the latest status of each device management node in the device management node cluster at at least one time starting from the first time; Among them, the first time is the end time of the preset time period, and the start time of the preset time period is the second time, the duration is the preset duration, the second time is the first update time of the target database during the current round of status detection performed by each cloud controller in the cloud controller cluster on the device management node connected to each other, and the preset duration is the minimum allowed time interval between two consecutive reallocation processes of the same network device.

2. The method according to claim 1, characterized in that Also includes: For any cloud controller in the cloud controller cluster, the cloud controller generates a target event and writes the target event into a target queue; wherein the target event is used to indicate that the state of at least one device management node in the device management node cluster has changed; The target cloud controller in the cloud controller cluster performs network device reallocation based on the latest status of each device management node in the device management node cluster at at least one time starting from the first time, including: The target cloud controller sequentially reads the target events in the target queue; The target cloud controller performs network device reallocation based on the latest status of each device management node in the device management node cluster under the triggering of at least one target event read; The at least one time is the reading time of the at least one target event; and the first time is the reading time of the first target event in the target queue.

3. The method according to claim 2, characterized in that The target cloud controller, under the triggering of at least one target event read, performs network device reallocation based on the latest status of each device management node in the device management node cluster, including: The target cloud controller, triggered by each read target event, performs network device reallocation based on the latest status of each device management node in the device management node cluster.

4. The method according to claim 2, characterized in that: The target cloud controller, under the triggering of at least one target event read, performs network device reallocation based on the latest status of each device management node in the device management node cluster, including: The target cloud controller, triggered by the first target event read, performs network device reallocation based on the latest status of each device management node in the device management node cluster.

5. The method according to claim 2, characterized in that: Also includes: For any cloud controller in the cloud controller cluster, the cloud controller generates an identifier of the target event while generating the target event, and writes the identifier of the target event into the target queue while writing the target event into the target queue; Wherein, the target database stores the identifier of the latest target event; The target cloud controller, under the triggering of at least one target event read, performs network device reallocation based on the latest status of each device management node in the device management node cluster, including: When the identifier of the target event read by the target cloud controller is consistent with the identifier of the latest target event stored in the target database, the target cloud controller reallocates network devices based on the latest status of each device management node in the device management node cluster under the triggering of the latest target event.

6. The method according to claim 5, characterized in that After the target cloud controller performs network device reallocation based on the latest status of each device management node in the device management node cluster under the triggering of at least one target event read, the target cloud controller further includes: If the network device reallocation fails, the target cloud controller reads the target event in the target queue; When the identifier of the target event read by the target cloud controller is consistent with the identifier of the latest target event stored in the target database, the target cloud controller reallocates network devices based on the latest status of each device management node in the device management node cluster under the triggering of the latest target event.

7. The method according to any one of claims 2 to 6, characterized in that: The cloud controller generates a target event, including: For any one of the at least one device management nodes connected to the cloud controller, if the state of the device management node changes, the cloud controller generates a target event corresponding to the device management node.

8. The method according to any one of claims 2 to 6, characterized in that: The cloud controller generates a target event, including: For at least two device management nodes whose states change simultaneously among at least one device management node connected to the cloud controller, the cloud controller generates target events corresponding to the at least two device management nodes.

9. The method according to any one of claims 1 to 5, characterized in that: The reallocation of network devices based on the latest status of each device management node in the device management node cluster includes: The target cloud controller reallocates network devices on the device management nodes in an unhealthy state to the device management nodes in a healthy state based on the latest state of each device management node in the device management node cluster.

10. The method according to claim 9, characterized in that After the target cloud controller reallocates the network devices on the device management nodes in a non-status state to the device management nodes in a status state based on the latest status of each device management node in the device management node cluster, the following steps are included: The target cloud controller reallocates part of the network devices on the device management node whose load is greater than the first threshold value to the device management node whose load is less than the second threshold value; The first threshold is greater than the second threshold.

11. The method according to any one of claims 1 to 5, characterized in that: Also includes: The target cloud controller is pre-configured; or, The target cloud controller is the cloud controller with the strongest current capability in the cloud controller cluster.

12. A cloud controller cluster, characterized in that: Any cloud controller in the cloud controller cluster is connected to at least one device management node in the device management node cluster, and any device management node in the device management node cluster is connected to a cloud controller in the cloud controller cluster, any device management node in the device management node cluster is not currently assigned a network device or is currently assigned a network device, and the latest state of any device management node in the device management node cluster is stored in a target database; For any cloud controller in the cloud controller cluster, the cloud controller is used to detect the status of at least one device management node connected to the cloud controller; For any one of the at least one device management nodes connected to the cloud controller, if the state of the device management node changes, the cloud controller is further used to update the latest state of the device management node in the target database; The target cloud controller in the cloud controller cluster is used to perform network device reallocation based on the latest status of each device management node in the device management node cluster at at least one time starting from the first time; Among them, the first time is the end time of the preset time period, and the start time of the preset time period is the second time, the duration is the preset duration, the second time is the first update time of the target database during the current round of status detection performed by each cloud controller in the cloud controller cluster on the device management node connected to each other, and the preset duration is the minimum allowed time interval between two consecutive reallocation processes of the same network device.

13. An electronic device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 10.