A Method and System for Dynamic Discovery of a Device and a Cloud Controller

By receiving and saving the discovered information of the controller, the device can obtain and establish a connection with other controllers when the first controller fails, solving the problem of information interruption of the device when the controller fails, and achieving seamless switching and stable connection.

CN115811543BActive Publication Date: 2025-07-04SHENZHEN WANGLIAN TIANXIA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211454542.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2025-07-04
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

When the controller fails, the devices in the area cannot actively discover and establish connections with other controllers, resulting in information interruption.

Method used

The device receives the discovery information of the first controller, establishes a connection and saves configuration information, acquires the connection configuration information of other controllers, and establishes a connection with other controllers based on these information after the first controller is disconnected.

Benefits of technology

It realizes that in the event of a controller failure, the device can seamlessly switch to other controllers, avoid information interruption, and ensure the stability and reliability of the connection by obtaining and matching the controller's address and identifying encoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115811543B_ABST
    Figure CN115811543B_ABST
Patent Text Reader

Abstract

This application relates to the field of network communication, and in particular, to a method and system for dynamic discovery of a device and a cloud controller. The method includes receiving discovery information of a first controller; based on the discovery information, establishing a connection with the first controller and saving connection configuration information; based on the connection configuration information, obtaining connection configuration information of other controllers; determining whether the connection with the first controller is disconnected; if the connection with the first controller is disconnected, then based on the connection configuration information, sending connection information to other controllers; and based on the connection information, establishing a connection with any one of the other controllers. According to the first controller that has been connected, the connection configuration information of all controllers in the area is obtained, so that after disconnecting from the first controller, a connection can be established with the remaining controllers in the area, without causing information interruption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication, and in particular, to a method and system for dynamic discovery of a device and a cloud controller. Background Art

[0002] With the rapid development of network technology, in recent years, SDN (Software Defined Network) has become a hot and key research topic in the industry. Through the separation of control and forwarding, the control function is centralized on the controller. The controller communicates with all network devices in a certain domain, learns the network topology structure, and programs the network from an all-knowing central point. It can be said that the SDN controller has changed the network programming mode from a distributed mode to a centralized mode. The core technology, the OpenFlow protocol, separates the control plane and the data plane of the network device, thus realizing flexible control of network traffic and providing a good platform for the innovation of the core network and applications.

[0003] In the related art, when exchanging information, usually the controller connects to multiple forwarding devices. The controller can know the status of all devices in the area, and the devices can exchange information through the controller.

[0004] In view of the above related art, the device does not have the ability to actively discover the controller. Once the controller fails, the devices in the area cannot establish a connection with other controllers. Summary of the Invention

[0005] In order to enable the devices in the area to establish a connection with other controllers when any one of the controllers fails, the present application provides a method and system for dynamic discovery of a device and a cloud controller.

[0006] The method and system for dynamic discovery of a device and a cloud controller provided by the present application adopt the following technical solutions:

[0007] A method for dynamic discovery of a device and a cloud controller includes:

[0008] Receiving discovery information of a first controller;

[0009] Based on the discovery information, establishing a connection with the first controller and saving the connection configuration information;

[0010] Based on the connection configuration information, obtaining the connection configuration information of other controllers;

[0011] Judging whether the connection with the first controller is disconnected;

[0012] If disconnected from the first controller, connection information is sent to other controllers based on the connection configuration information.

[0013] Based on the connection information, establish a connection with any one of the other controllers.

[0014] By adopting the above technical solution, after the device is connected to the first controller, the connection configuration information is obtained from the first controller. According to the connection configuration information, the connection configuration information of other controllers is obtained. After disconnecting from the first controller, according to the connection configuration information, a connection is established with the remaining controllers. According to the first controller that has been connected before, the connection configuration information of all controllers in the area is obtained, so that after disconnecting from the first controller, a connection can be established with the remaining controllers in the area, and information interruption will not occur.

[0015] Optionally, the establishing a connection with the first controller and saving the connection configuration information based on the discovery information includes:

[0016] Based on the connection configuration information, obtain the address information of all controllers in the local area network;

[0017] Obtain the identification code of the first controller;

[0018] Based on the identification code and the address information of all controllers, establish a connection with the first controller.

[0019] By adopting the above technical solution, according to the discovery information of the first controller that has been connected before, the address information of all controllers in the area is obtained, and then the identification code of the first controller is obtained. The identification code and the address information are matched to obtain the address of the first controller. According to the address of the first controller, a connection is established with the first controller. The discovery information of all controllers in the area includes the address information of all controllers, which facilitates the establishment of a connection between the device and the controller.

[0020] Optionally, the establishing a connection with the first controller based on the identification code and the address information of all controllers includes:

[0021] Based on the identification code, match the address information of all controllers to obtain the address information of the first controller;

[0022] Based on the address information of the first controller, send connection information to the first controller and determine whether an allow - connection information is received;

[0023] If the allow - connection information is received, establish a connection with the first controller.

[0024] By adopting the above technical solution, the identification codes of each controller are different. Obtain the codes of all controllers and the address information corresponding to the codes, and then establish a connection with the first controller according to the address information. When establishing the connection, the controller will judge whether to allow the connection according to the received connection information. If allowed, the device can receive the connection permission information and establish a connection with the first controller.

[0025] Optionally, before establishing a connection with any of the other controllers, it includes:

[0026] Obtain the number of controllers;

[0027] Judge whether the number of controllers is greater than a preset number;

[0028] If the number of controllers is greater than the preset number, obtain the device connection number of each controller;

[0029] Establish a connection based on the device connection number of the controller.

[0030] By adopting the above technical solution, before disconnecting from the first controller and establishing a connection with other controllers, first obtain the number of controllers. When the number of controllers is greater than the preset number, or select which controller to establish a connection with the device according to the number of devices connected to each controller, to avoid too many devices connected to the controller.

[0031] Optionally, the establishing a connection based on the device connection number of the controller includes:

[0032] Based on the device connection number of each controller, take the controller with the least device connection number as the target controller;

[0033] Establish a connection with the target controller.

[0034] By adopting the above technical solution, according to the device connection number of each controller, obtain the controller with the least device connection number as the target controller, and the device disconnected from the first controller is connected to the target controller. When it is necessary to establish a connection with other controllers, try to select the controller with fewer connected devices to connect, to avoid too many devices connected to the controller.

[0035] Optionally, before establishing a connection with the target controller, it includes:

[0036] If there are multiple controllers with the least device connection number, obtain the distance between the device and the controller;

[0037] Based on the distance between the device and the controller, obtain the controller with the shortest distance to the device as the connection controller;

[0038] Establish a connection with the connection controller.

[0039] By adopting the above technical solution, if the number of devices with multiple controller connections is the same and the least, at this time, select which controller to connect according to the distance between the device and the controller, and select the controller with the closest distance between the device and the controller to connect. It can effectively reduce the power consumption of the controller or the device.

[0040] Optionally, before receiving the discovery information of the first controller, it includes:

[0041] Judge whether a controller signal is scanned;

[0042] If no controller signal is scanned, obtain the current power;

[0043] Based on the current power, increase the output power.

[0044] By adopting the above technical solution, after the first controller is damaged, due to the distance problem or signal interference problem of other controllers, the device may not be able to scan the signal sent by the controller. At this time, it is necessary to increase the output power of the device so that the controller signal can be received.

[0045] In a second aspect, the present application provides a device and cloud controller dynamic discovery system, adopting the following technical solution:

[0046] A device and cloud controller dynamic discovery system includes:

[0047] A receiving module, configured to receive the discovery information of the first controller;

[0048] A first connection module, configured to establish a connection with the first controller based on the discovery information and save the connection configuration information;

[0049] An obtaining module, configured to obtain the connection configuration information of other controllers based on the connection configuration information;

[0050] A judging module, configured to judge whether the connection with the first controller is disconnected;

[0051] A second connection module, configured to, if the connection with the first controller is disconnected, send connection information to other controllers based on the connection configuration information

[0052] A third connection module, configured to establish a connection with any one of the other controllers based on the connection information.

[0053] By adopting the above technical solution, the receiving module is connected to the first connection module. The receiving module is used to receive the discovery information of the first controller. The first connection module establishes a connection with the first controller according to the discovery information and saves the connection configuration information. The obtaining module is connected to the first connection module. The obtaining module obtains the connection configuration information of other controllers according to the connection configuration information. The judging module is connected to the obtaining module. The judging module is used to judge whether the connection with the first controller is disconnected. When the connection is disconnected, the second connection module sends connection information to other controllers according to the connection configuration information. The third connection module is connected to the second connection module. The third module is used to connect to any other controller based on the connection information. According to the first controller that has been connected, the connection configuration information of all controllers in the area is obtained, so that after disconnecting from the first controller, connections can be established with the remaining controllers in the area, and information interruption will not occur.

[0054] In summary, the present application includes the following beneficial technical effects:

[0055] After the device is connected to the first controller, the connection configuration information is obtained from the first controller. According to the connection configuration information, the connection configuration information of other controllers is obtained. After disconnecting from the first controller, connections are established with the remaining controllers according to the connection configuration information. According to the first controller that has been connected, the connection configuration information of all controllers in the area is obtained, so that after disconnecting from the first controller, connections can be established with the remaining controllers in the area, and information interruption will not occur. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 is a schematic flowchart of one implementation manner of a method for dynamically discovering a device and a cloud controller according to an embodiment of the present application;

[0057] Figure 2 is a schematic flowchart of one implementation manner of a method for dynamically discovering a device and a cloud controller according to an embodiment of the present application;

[0058] Figure 3 is a schematic flowchart of one implementation manner of a method for dynamically discovering a device and a cloud controller according to an embodiment of the present application;

[0059] Figure 4 is a schematic flowchart of one implementation manner of a method for dynamically discovering a device and a cloud controller according to an embodiment of the present application;

[0060] Figure 5 is a schematic flowchart of one implementation manner of a method for dynamically discovering a device and a cloud controller according to an embodiment of the present application;

[0061] Figure 6It is a schematic flowchart of one implementation manner of a method for dynamically discovering an apparatus and a cloud controller according to an embodiment of the present application;

[0062] Figure 7 It is a schematic flowchart of one implementation manner of a method for dynamically discovering an apparatus and a cloud controller according to an embodiment of the present application;

[0063] Figure 8 It is a system cross-block diagram of a system for dynamically discovering an apparatus and a cloud controller according to an embodiment of the present application.

[0064] Description of reference numerals:

[0065] 1. Receiving module; 2. First connection module; 3. Obtaining module; 4. Judging module; 5. Second connection module; 6. Third connection module. Detailed implementation manners

[0066] The following further describes the present application in detail with reference to all the accompanying drawings.

[0067] An embodiment of the present application discloses a method for dynamically discovering an apparatus and a cloud controller. Referring to Figure 1 , including:

[0068] S100. Receive discovery information of a first controller.

[0069] Specifically, the discovery information is a signal sent by the first controller, which can be in the form of electromagnetic waves, and the apparatus can receive the discovery information. The first controller is the initial default connection controller of the apparatus. For example, there are 5 apparatuses A, B, C, D, and E, and a total of 2 controllers, controller one and controller two. Among them, ABC is connected to controller one, and DE is connected to controller two. Then, for apparatuses ABC, controller one is the first controller, and for apparatuses DE, controller two is the first controller.

[0070] S110. Based on the discovery information, establish a connection with the first controller and save the connection configuration information.

[0071] Specifically, the connection configuration information is the configuration information required when the apparatus is connected to the controller, such as the account for connecting to the controller, and also includes the network addresses of other controllers in the same local area network as the first controller.

[0072] S120. Based on the connection configuration information, obtain the connection configuration information of other controllers.

[0073] Specifically, the connection configuration information can be transmitted to the apparatus in the form of a network text, and the addresses of all controllers in the area are marked in the text. For example, controller one: 202.201.11.1, controller two: 202.201.11.2.

[0074] S130. Determine whether it is disconnected from the first controller.

[0075] Specifically, determining whether it is disconnected from the first controller can be judged according to the connection status of the device. For example, when the device is connected to the controller, the information of the controller can be obtained and the green light flashes in the physical structure.

[0076] S140. If it is disconnected from the first controller, send connection information to other controllers based on the connection configuration information.

[0077] Specifically, after being disconnected from the first controller, in order to continue communication, the device selects to connect to other controllers and connects to other controllers according to the network addresses of all controllers in the area obtained when the device is connected to the first controller.

[0078] S150. Establish a connection with any one of the other controllers based on the connection information.

[0079] The implementation principle of a method for dynamic discovery of a device and a cloud controller in an embodiment of the present application is as follows: after the device is connected to the first controller, the connection configuration information is obtained from the first controller. According to the connection configuration information, the connection configuration information of other controllers is obtained. After being disconnected from the first controller, according to the connection configuration information, a connection is established with the remaining controllers. According to the first controller that has been connected, the connection configuration information of all controllers in the area is obtained, so that after being disconnected from the first controller, a connection can be established with the remaining controllers in the area, and information interruption will not occur.

[0080] In one implementation manner of this embodiment, as Figure 2 shown, step S110, that is, establishing a connection with the first controller and saving the connection configuration information based on the discovery information includes:

[0081] S200. Obtain the address information of all controllers in the local area network based on the connection configuration information.

[0082] Specifically, after the device is connected to the first controller, the obtained connection configuration information includes the address information of all controllers in the local area network, and the controllers in the local area network are the controllers connected in the same network state.

[0083] S210. Obtain the identification code of the first controller.

[0084] Specifically, the identification code of the first controller can be a preset code. Since the device is connected to the default controller under normal circumstances, the identification code of the default controller can be preset in the device. The identification code represents the identity of the controller, indicating which specific controller it is. The dial-in identification code S1 represents the No. 1 controller, and S2 represents the No. 2 controller. The identification code is only for naming within the same local area network, and the naming does not conflict in different local area networks. For example, the controller in Local Area Network 1 is S1, and the controller in another local area network is also S1, but since they are two different local area networks, they are not the same controller.

[0085] S220. Establish a connection with the first controller based on the identification code and all controller address information.

[0086] Specifically, each identification code represents a controller, so the controller is matched with the identification code. According to the address information of all controllers in the connection configuration information, the address of the controller to be connected is found for connection.

[0087] The implementation principle of this embodiment is as follows: According to the discovery information of the first controller that has been connected before, the address information of all controllers in the area is obtained, and then the identification code of the first controller is obtained. The identification code and the address information are matched to obtain the address of the first controller. Based on the address of the first controller, a connection is established with the first controller. The discovery information of all controllers in the area includes the address information of all controllers, which is convenient for the device to establish a connection with the controller.

[0088] In one implementation manner of this embodiment, as Figure 3 shown, step S220, that is, establishing a connection with the first controller based on the identification code and all controller address information, includes:

[0089] S300. Match the address information of all controllers based on the identification code to obtain the address information of the first controller.

[0090] Specifically, one identification code corresponds to one controller, and the address information of all obtained controllers is preceded by an identification code. For example, S1: 202.201.11.1, S2: 202.201.11.2, S3: 202.201.11.3. Since the identification code of the first controller is the known S1, it can be known that the address of S1 is 202.201.11.1. Except for the known identification code of the first controller, the identification codes of other controllers are obtained through the connection configuration information. When it is necessary to connect to a certain controller, the corresponding address is directly matched. For example, when it is necessary to connect to controller S3, the address of S3, which is 202.201.11.3, is directly found.

[0091] S310. Send connection information to the first controller based on the address information of the first controller, and determine whether the permission to connect information is received.

[0092] Specifically, after the device sends connection information to the controller, the controller also needs to decide whether to allow the device to connect. There may be many devices requesting to connect to the controller. If all are connected, on the one hand, the information is not secure, and on the other hand, the load on the controller is too large. Therefore, only the devices that meet the conditions can connect to the controller. Specifically, after the controller receives the connection information, the controller will identify the connected device ID, and then match it with the preset device ID list. If a match can be found, the connection is allowed. The device ID list includes all the device IDs of the devices connected to the controller within the same local area network or all the device IDs of the devices allowed to connect to the controller within the same local area network. For example, in the ID list, it includes device A1, A2, and A4. If the device ID requested to connect is A3, then the connection is not allowed. If it is A1, the connection is allowed, and the permission to connect information is sent to the device. If the connection method between the device and the controller is to first enter the network address and then use the ID of each device as the account, then the permission to connect information can be the login password. After the device receives the permission to connect information, it establishes a connection with the controller through its own device ID and the password sent by the controller. When the permission to connect information is received, step S320 is executed. Otherwise, the connection fails.

[0093] If the permission to connect information is not received, the connection fails.

[0094] S320. If the permission to connect information is received, establish a connection with the first controller.

[0095] The implementation principle of this embodiment is: the identification codes of each controller are different. Obtain the codes of all controllers and the address information corresponding to the codes, and then establish a connection with the first controller according to the address information. When establishing a connection, the controller will judge whether to allow the connection according to the received connection information. If allowed, the device can receive the permission to connect information and establish a connection with the first controller.

[0096] In one implementation manner of this embodiment, as Figure 4 shown, before step S150, that is, establishing a connection with any other controller based on the connection information, includes:

[0097] S400. Obtain the number of controllers.

[0098] Specifically, the number of controllers is the number of controllers existing within the same local area network.

[0099] S410. Judge whether the number of controllers is greater than the preset number.

[0100] Specifically, the preset quantity is used to determine whether there are other backup controllers among the controllers within a region. Therefore, the preset quantity is usually 2. If there are only two controllers within a region, then when one of the controllers breaks down, there is no other choice but to select the other controller. If the number of controllers within a local area network is greater than 2, then when a breakdown occurs, multiple controllers can be selected, which is convenient for selection based on the number of devices connected to the controllers.

[0101] If the number of controllers is less than the preset quantity, no action is taken.

[0102] S420. If the number of controllers is greater than the preset quantity, obtain the number of devices connected to each controller.

[0103] Specifically, the number of devices connected to each controller is the number of devices currently connected to each controller.

[0104] S430. Establish a connection based on the number of devices connected to the controllers.

[0105] Specifically, when there are controllers available for selection, instead of making a random selection, the controller with a smaller number of devices connected can be selected to reduce the number of devices connected to the controller.

[0106] The implementation principle of this embodiment is as follows: Before disconnecting from the first controller and establishing a connection with other controllers, first obtain the number of controllers. If the number of controllers is greater than the preset quantity, or select which controller to establish a connection with the device based on the number of devices connected to each controller, so as to avoid an excessive number of devices connected to the controller.

[0107] In one implementation manner of this embodiment, as Figure 4 shown, step S430, that is, establishing a connection based on the number of devices connected to the controllers, includes:

[0108] S500. Based on the number of devices connected to each controller, use the controller with the least number of devices connected as the target controller.

[0109] Specifically, the device obtains the number of devices currently connected to all controllers within the region, then compares the number of devices connected to each controller, selects the controller with the least number of devices connected therefrom, and then uses the controller with the least number of devices connected as the controller to be connected for the device that disconnects from the default controller, that is, the first controller.

[0110] S510. Establish a connection with the target controller.

[0111] Specifically, the device selects the controller with the fewest number of connected devices for connection, which can effectively avoid the unreasonable allocation of resources. When multiple default controllers fail, some controllers are connected to a large number of devices, while some controllers are only connected to a small number of devices.

[0112] The implementation principle of this embodiment is as follows: According to the number of devices connected to each controller, obtain the controller with the fewest number of connected devices as the target controller, and connect the devices disconnected from the first controller to the target controller. When establishing a connection with other controllers, try to select the controller with a smaller number of connected devices to avoid having a controller connected to an excessive number of devices.

[0113] In one implementation of this embodiment, as Figure 6 shown, before step S510, that is, before establishing a connection with the target controller, it includes:

[0114] S600. If there are multiple controllers with the fewest number of connected devices, obtain the distance between the device and the controller.

[0115] Specifically, there being multiple controllers with the fewest number of connected devices means there are multiple controllers with the fewest number of connected devices, that is, the number of devices connected to the controllers is the same and both are the fewest. For example, there are 3 controllers, two of which are both connected to 3 devices and one is connected to 5 devices, then these two controllers are the ones with multiple controllers having the fewest number of connected devices.

[0116] The distance between the device and the controller is the distance between the devices that need to be connected to the controller. Here, the distances of all connectable controllers within the same local area network can be obtained. The distance of the controller can be obtained according to the identification code of each controller. Based on the identification code, the installation location of the controller can be obtained, and then based on the installation location of the device and the installation location of the controller, the distance between the device and the controller can be calculated.

[0117] The installation location of the device obtained according to the identification code can be that each controller is encoded during installation, and the identification code is recorded in text form and saved. Just by querying the identification code, the installation location can be obtained. The installation location can be recorded in the form of coordinates, in the form of three-dimensional coordinates. Similarly, the device is also recorded in the form of three-dimensional coordinates, and the distance is calculated based on the two three-dimensional coordinates. It can also use GPS positioning to directly calculate the distance between the device and the controller.

[0118] S610. Based on the distance between the device and the controller, obtain the controller with the shortest distance to the device as the connection controller.

[0119] Specifically, the closer the distance between the device and the controller, the smaller the range for the device or the controller to transmit or receive signals, and the smaller the operating power of the device or the controller. If a device disconnected from the first controller selects a controller with a relatively long distance, the controller needs to increase the power. Therefore, select the controller with the closest distance between the device and the controller to connect.

[0120] S620. Establish a connection with the connected controller.

[0121] The implementation principle of this embodiment is as follows: If the number of devices connected to multiple controllers is the same and the least, at this time, select which controller to connect according to the distance between the device and the controller, and select the controller with the closest distance between the device and the controller to connect. It can effectively reduce the power consumption of the controller or the device.

[0122] In one implementation of this embodiment, as Figure 7 shown, before the discovery information of the first controller in step S100 includes:

[0123] S700. Determine whether a controller signal is scanned.

[0124] Specifically, the controller signal is a wireless signal emitted by the controller itself. The device connects to the controller by connecting to the controller signal, so as to receive or forward information.

[0125] S710. If no controller signal is scanned, obtain the current power.

[0126] Specifically, if no controller signal is scanned, it means that the distance between the device and the controller is relatively far, and the device cannot receive the signal emitted by the controller. The current power is the current operating power of the device, and the greater the operating power of the device.

[0127] S720. Based on the current power, increase the output power.

[0128] Specifically, on the premise that the current power is insufficient, increase the output power of the device so that the device can detect the controller signal.

[0129] The implementation principle of this embodiment is as follows: After the first controller is damaged, due to the distance problem or signal interference problem of other controllers, the device may not be able to scan the signal emitted by the controller. At this time, it is necessary to increase the output power of the device so that the controller signal can be received.

[0130] In a second aspect, the present application provides a device and cloud controller dynamic discovery system.

[0131] A device and cloud controller dynamic discovery system includes:

[0132] A receiving module 1 for receiving discovery information from a first controller;

[0133] A first connection module 2 for establishing a connection with the first controller based on the discovery information and saving connection configuration information;

[0134] An obtaining module 3 for obtaining connection configuration information of other controllers based on the connection configuration information;

[0135] A judging module 4 for judging whether the connection with the first controller is disconnected;

[0136] A second connection module 5 for, if the connection with the first controller is disconnected, sending connection information to other controllers based on the connection configuration information

[0137] A third connection module 6 for establishing a connection with any one of the other controllers based on the connection information.

[0138] The implementation principle of this embodiment is as follows: The receiving module 1 is connected to the first connection module 2. The receiving module 1 is used to receive the discovery information of the first controller. The first connection module 2 establishes a connection with the first controller according to the discovery information and saves the connection configuration information. The obtaining module 3 is connected to the first connection module 2. The obtaining module 3 obtains the connection configuration information of other controllers according to the connection configuration information. The judging module 4 is connected to the obtaining module 3. The judging module 4 is used to judge whether the connection with the first controller is disconnected. When the connection is disconnected, the second connection module 5 sends connection information to other controllers according to the connection configuration information. The third connection module 6 is connected to the second connection module 5. The third module is used to establish a connection with any one of the other controllers based on the connection information. According to the first controller that has been connected, the connection configuration information of all the controllers in the area is obtained, so that after disconnecting from the first controller, a connection can be established with the remaining controllers in the area, and information interruption will not occur.

[0139] The above are all the preferred embodiments of this application. The protection scope of this application is not limited by this. Therefore, all equivalent changes made according to the structure, shape, and principle of this application should be covered by the protection scope of this application.

Claims

1. A method for dynamic discovery of a device and a cloud controller, characterized in that, Including: Receiving discovery information of the first controller; Based on the discovery information, establishing a connection with the first controller and saving connection configuration information; Based on the connection configuration information, obtaining connection configuration information of other controllers; Judging whether the connection with the first controller is disconnected; If the connection with the first controller is disconnected, then based on the connection configuration information, sending connection information to other controllers; Based on the connection information, establishing a connection with any one of the other controllers; Wherein, before establishing a connection with any one of the other controllers includes: Obtaining the number of controllers; Judging whether the number of controllers is greater than a preset number; If the number of controllers is greater than the preset number, then obtaining the device connection number of each controller; Establishing a connection based on the device connection number of the controller; Wherein, establishing a connection based on the device connection number of the controller includes: Based on the device connection number of each controller, taking the controller with the least device connection number as the target controller; Establishing a connection with the target controller; Wherein, before establishing a connection with the target controller includes: If there are multiple controllers with the least device connection number, then obtaining the distance between the device and the controller; Based on the distance between the device and the controller, obtaining the controller with the shortest distance to the device as the connection controller; Establishing a connection with the connection controller.

2. The dynamic discovery method of a device and a cloud controller according to claim 1, characterized in that, The establishing a connection with the first controller and saving connection configuration information based on the discovery information includes: Based on the connection configuration information, obtaining the address information of all controllers within the local area network; Obtaining the identification code of the first controller; Based on the identification code and the address information of all controllers, establishing a connection with the first controller.

3. The dynamic discovery method of a device and a cloud controller according to claim 2, characterized in that, The establishing a connection with the first controller based on the identification code and the address information of all controllers includes: Based on the identification code, matching the address information of all controllers to obtain the address information of the first controller; Based on the address information of the first controller, sending connection information to the first controller and judging whether an allowed connection information is received; If the allowed connection information is received, then establishing a connection with the first controller.

4. The dynamic discovery method of a device and a cloud controller according to claim 1, wherein Before receiving the discovery information of the first controller includes: Judging whether a controller signal is scanned; If the controller signal is not scanned, then obtaining the current power; Based on the current power, increasing the output power.

5. A device and cloud controller dynamic discovery system, characterized in that Including: A receiving module (1) for receiving discovery information of the first controller; A first connection module (2) for establishing a connection with the first controller and saving connection configuration information based on the discovery information; An obtaining module (3) for obtaining connection configuration information of other controllers based on the connection configuration information; A judging module (4) for judging whether the connection with the first controller is disconnected; A second connection module (5) for, if the connection with the first controller is disconnected, sending connection information to other controllers based on the connection configuration information; A third connection module (6) for establishing a connection with any one of the other controllers based on the connection information; Before establishing a connection with any of the other controllers, it includes: Obtain the number of controllers; Determine whether the number of controllers is greater than a preset number; If the number of controllers is greater than the preset number, obtain the device connection number of each controller; Establish a connection based on the device connection number of the controller; Among them, the establishing a connection based on the device connection number of the controller includes: Based on the device connection number of each controller, use the controller with the least device connection number as the target controller; Establish a connection with the target controller; Before establishing a connection with the target controller, it includes: If there are multiple controllers with the least device connection number, obtain the distance between the device and the controller; Based on the distance between the device and the controller, obtain the controller with the shortest distance to the device as the connection controller; Establish a connection with the connection controller.

Citation Information

Patent Citations

  • Method for automatically finding controller in software-defined network, controller and system

    CN104754762A