A multi-gateway intelligent adaptation method and system
By calculating the scores of each gateway device in a multi-gateway environment and selecting the optimal gateway, the problems of gateway selection and load balancing in a multi-gateway environment are solved, and the stability and efficiency of network communication are achieved.
Patent Information
- Application Number
- CN202211000386.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2042-08-19
AI Technical Summary
In a multi-gateway environment, it is difficult for the existing technology to achieve intelligent selection and load balancing of gateways, resulting in untimely network state switching, excessive load on a single gateway device, and reduced network speed.
Obtain the IP of other devices in the LAN through the device's ad hoc network, judge the network status and start the Socket server and client, calculate the scores of each gateway device, select the optimal gateway based on parameters such as SNR, RSRP and distance, and disconnect the network or When the load is too high, the gateway will be automatically switched and the optimal gateway will be reselected periodically.
It realizes intelligent gateway selection and load balancing in a multi-gateway environment, ensures the stability and efficiency of network communication, and avoids the problems of reduced network speed and excessive equipment load.
Smart Images

Figure CN115474213B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a multi-gateway intelligent adaptation method and system, belonging to the technical field of no-signal area communication. Background Art
[0002] In a self-organizing local area network, network nodes need to set up a gateway to communicate data with the external network through the gateway node. Currently, various gateway selections are generally manual settings or program control methods, which have problems such as being unable to switch gateways in time according to network status, excessive load on a single gateway device, and gateway configuration not being the global optimal choice. To this end, the relevant patent documents disclosed in this technical field are:
[0003] For example: Chinese patent document CN111342984A discloses an information processing method, system and device, which is used for the self-organizing network system to realize automatic network scene recognition through cognitive learning mechanism, switch network working mode in time, and support automatic adjustment of network parameters, so as to realize elastic transmission service of self-organizing network. An information processing method provided in this document includes: the networking strategy scheduling module of the self-organizing network entity receives the service strategy selection information sent by the policy matching module of the decision agent and the service supporting the self-organizing network entity to perform networking strategy scheduling; the networking strategy scheduling module performs networking strategy scheduling according to the service strategy selection and the service supporting the self-organizing network entity to perform networking strategy scheduling. As can be seen from the above, the existing patent document solves the problem of network communication between all devices in the local area network and the Internet, automatically switches the network gateway when the network communication between the device and the Internet is disconnected, ensures the network communication between the devices in the local area network and the Internet, and intelligently selects the appropriate gateway when there are multiple network gateways in the local area network, avoiding the problem of excessive network load and reduced network rate caused by too many devices connecting to the same gateway and uneven distribution.
[0004] In summary, how to intelligently select gateways, intelligently switch gateways according to network status, and reasonably distribute the load of a single gateway in a multi-gateway network are issues that need to be solved urgently. Summary of the invention
[0005] In view of the problems in the prior art, the present invention discloses a multi-gateway intelligent adaptation method.
[0006] The invention also discloses a system for realizing the adaptation method.
[0007] The present invention provides an optimal gateway node after calculating various parameters in the network, and is suitable for the situation where there are multiple available gateway nodes in the network.
[0008] The detailed technical scheme of the present invention is as follows:
[0009] A multi-gateway intelligent adaptation method, characterized in that it includes the following steps:
[0010] Step 1: The device forms a self-organized network and obtains the IP addresses of other devices in the local area network, including gateway devices and ordinary devices;
[0011] Step 2: Determine the network status and device type: Gateway devices: have LTE network and LAN network, and have the ability to communicate with the Internet; Ordinary devices: need to communicate with the Internet through the gateway device;
[0012] Step 3: The gateway device and the common device start the Socket server and Socket client for communication between the gateway device and the common device in the LAN;
[0013] Step 4: The gateway device connects to the Socket server of the common device through the Socket client, and sends the gateway configuration to the common device in the LAN. After the common device obtains the IP of the gateway device, it adds the gateway device to the gateway device list;
[0014] Step 5: The common device sequentially connects to the Socket server of each gateway device in the gateway device list to obtain the number of common devices connected to the gateway device; at the same time, the distance from the common device to each gateway device node, SNR data (signal-to-noise ratio data), RSRP data (reference signal received power), and the number of common device nodes connected are obtained, and added to the corresponding gateway device parameters in the gateway device list;
[0015] Step 6: The data stored in the gateway device list is passed to the data processing module for performing algorithm calculations on each gateway device in the gateway device list:
[0016]
[0017] In formula (I), Z: the current calculated gateway device score; k1: the weight value of the SNR data; k2: the weight value of the RSRP data; k3: the weight value of the distance from the common device to each gateway device node; k1+k2+k3=1, and the specific value needs to be obtained according to the actual application environment, scenario testing and data collection;
[0018] S: SNR data score value = 10*SNR / 30, SNR value range is 0 to 30;
[0019] P: RSRP data score = (RSRP+140) / 10, RSRP value range is -44 to -140;
[0020] D: The score value of the distance from the common device to each gateway device node = 10-(the distance from the common device to each gateway device node / the minimum unit distance). The minimum unit distance needs to be set according to the actual application environment and scenario;
[0021] m: the number of common devices in the current LAN; n: the number of gateway devices in the current LAN; s: the number of common devices connected to the current gateway device;
[0022] After the calculation is completed, the score of each gateway device is calculated;
[0023] Step 7: After obtaining the calculation scores of each gateway device, select the gateway device with the highest score for gateway switching.
[0024] Preferably, according to the present invention, in the seventh step: when the calculated score of the gateway device becomes negative, it means that the number of ordinary devices connected to the gateway device has reached the maximum value, and the access to ordinary devices is prohibited.
[0025] Preferably, according to the present invention, the method further comprises an eighth step, entering a network monitoring state after the gateway switching is completed and the network communication is established.
[0026] Preferably, according to the present invention, the network monitoring status includes:
[0027] When the network is disconnected, go to step 4;
[0028] When the network is normal, the fourth step is executed every reselection time to reselect the optimal gateway; the reselection time can be selected according to the requirements of network communication rate and real-time performance, and the present invention does not limit the reselection time.
[0029] A system for implementing a multi-gateway intelligent adaptation method, characterized by comprising:
[0030] Ordinary devices, gateway devices and data processing modules connected via the Internet;
[0031] The gateway device and the common device start the Socket server and the Socket client for communication between the gateway device and the common device in the local area network;
[0032] The data stored in the gateway device list is passed to the data processing module for performing algorithm calculation on each gateway device in the gateway device list to execute the sixth step; and the seventh step is executed according to the calculation result.
[0033] Preferably, according to the present invention, the system also includes a network monitoring module, which is used to: enter the network monitoring state after the gateway switching is completed and the network communication is established: when the network is disconnected, execute the fourth step; when the network is normal, execute the fourth step every reselection time to reselect the optimal gateway; the reselection time can be selected according to the requirements of the network communication rate and real-time performance, and the present invention does not limit the reselection time.
[0034] The technical advantages of the present invention are:
[0035] 1. The present invention uses network monitoring and network access status to determine whether the device itself has the ability to communicate on the Internet or connect to a specific network, and calculates the optimal gateway through the distance between nodes, SNR data, RSRP data and the number of gateway device loads.
[0036] 2. The present invention can adapt to a variety of network environments. When the device has the ability to communicate with the Internet, it can be used as a gateway node device. The gateway node device can use the LTE network for network communication, and can also use the LAN network for communication.
[0037] 3. The present invention can have an automatic adjustment function according to the network: when the network is disconnected or the gateway access device is overloaded, the gateway switching method will be automatically executed to ensure the network communication capabilities of ordinary devices and gateway devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a schematic diagram of the process of the method of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further described below in conjunction with the embodiments and the accompanying drawings, but is not limited thereto.
[0040] Embodiment 1,
[0041] In an ad hoc local area network, there are 12 node devices, of which the devices numbered 1 and 12 are gateway devices 1 and 12 respectively, and the rest are common devices;
[0042] In combination with the process steps described in the embodiment, the process steps of executing the multi-gateway intelligent adaptation method are as follows, taking the device 5, i.e., ordinary device 5, as an example.
[0043] like Figure 1 As shown, a multi-gateway intelligent adaptation method includes the following steps:
[0044] Step 1: connect the common device 5 to the ad hoc network and obtain the IP addresses of other devices in the local area network, including gateway devices and common devices;
[0045] Step 2: Determine the network status of the device and determine the device type: the gateway device: has an LTE network and a LAN network, and has the ability to communicate with the Internet; the ordinary device: needs to communicate with the Internet through the gateway device; in this embodiment, the ordinary device 5 obtains its own network status after startup, and does not have the ability to communicate with the Internet, so it is configured as an ordinary device;
[0046] Step 3: The gateway device and the common device 5 start the Socket server and the Socket client for communication between the gateway device and the common device in the LAN;
[0047] Step 4: The gateway device connects to the Socket server of the common device through the Socket client, and sends the gateway configuration to the common device in the local area network. The common device 5 obtains the IP of the gateway device, that is, the IP and configuration information, and then adds the gateway device 1 and the gateway device 12 to the gateway device list;
[0048] Step 5: The common device sequentially connects to the Socket server of each gateway device in the gateway device list to obtain the number of common devices connected to the gateway device; at the same time, the distance from the common device to each gateway device node, SNR data (signal-to-noise ratio data), RSRP data (reference signal received power), and the number of common device nodes connected are obtained, and added to the corresponding gateway device parameters in the gateway device list;
[0049] In this embodiment, the common device 5 obtains the node distance, SNR data, RSRP data and the number of common device accesses from itself to the gateway device 1 and the gateway device 12 through Socket, and adds the data to the corresponding gateway device parameters in the gateway list:
[0050] The data of gateway device 1 are: SNR data (22), RSRP data (-73), distance (900), number of common device accesses (4);
[0051] The data of the gateway device 12 are: SNR data (18), RSRP data (-88), distance (1200), number of common device accesses (4);
[0052] Step 6: The data stored in the gateway device list is passed to the data processing module for performing algorithm calculations on each gateway device in the gateway device list:
[0053]
[0054] In formula (I), Z: the current calculated gateway device score; k1: the weight value of the SNR data; k2: the weight value of the RSRP data; k3: the weight value of the distance from the common device to each gateway device node; k1+k2+k3=1, and the specific value needs to be obtained according to the actual application environment, scenario testing and data collection;
[0055] S: SNR data score value = 10*SNR / 30, SNR value range is 0 to 30;
[0056] P: RSRP data score = (RSRP+140) / 10, RSRP value range is -44 to -140;
[0057] D: The score value of the distance from the common device to each gateway device node = 10-(the distance from the common device to each gateway device node / the minimum unit distance). The minimum unit distance needs to be set according to the actual application environment and scenario;
[0058] m: the number of common devices in the current LAN; n: the number of gateway devices in the current LAN; s: the number of common devices connected to the current gateway device;
[0059] After the calculation is completed, the score of each gateway device is calculated;
[0060] In the sixth step, the data of the gateway device 1 and the gateway device 12 in the gateway list are transferred to the data processing module, and algorithm calculations are performed on the gateway device 1 and the gateway device 12 respectively.
[0061] The calculation formula is as follows:
[0062] Constant values K1 = 0.5, k2 = 0.2, k3 = 0.3
[0063]
[0064] Gateway device 1 calculates a score (1.65), and gateway device 12 calculates a score (1.44). After the calculation is completed, the calculated scores of gateway device 1 and gateway device 12 are returned;
[0065] Step 7: After obtaining the calculation scores of each gateway device, select the gateway device with the highest score for gateway switching;
[0066] In the seventh step: when the calculated score of the gateway device becomes negative, it means that the number of ordinary devices connected to the gateway device has reached the maximum value, and ordinary devices are prohibited from being connected. In this embodiment, after calculation, it is found that the score of gateway device 1 is higher than that of gateway device 12, and gateway device 1 is selected as the optimal gateway for gateway switching.
[0067] Embodiment 2,
[0068] As described in Example 1, the method also includes an eighth step, entering a network monitoring state after the gateway switching is completed and network communication is established.
[0069] The network monitoring status includes:
[0070] When the network is disconnected, go to step 4;
[0071] When the network is normal, the fourth step is executed every reselection time to reselect the optimal gateway; the reselection time can be selected according to the requirements of network communication rate and real-time performance, and the present invention does not limit the reselection time.
[0072] In this embodiment, after the common device 5 establishes network communication with the Internet, it enters the network monitoring state. When it detects that the network is disconnected, it returns to the fourth step to continue running. When the network is normal, it returns to the fourth step every four hours to execute and reselect the optimal gateway.
[0073] Embodiment 3,
[0074] As described in Example 1, there are 20 node devices in an ad hoc network, of which 1, 12 and 20 are all gateway devices, and the remaining devices are common devices;
[0075] Combined with the process steps, the process steps of executing the multi-gateway intelligent adaptation method are as follows, taking the common device 10 as an example:
[0076] In the first step, the common device 10 performs self-network connection, and obtains the device IP in the local area network after the network is successfully established;
[0077] In the second step, after the ordinary device 10 is started, it obtains its own network status and does not have the ability to communicate with the Internet, and is configured as an ordinary device;
[0078] In the third step, the common device 10 starts the Socket client and the Socket server;
[0079] In the fourth step, the common device 10 receives the gateway configuration information of the gateway device 1, the gateway device 12, and the gateway device 20, and adds the gateway device 1, the gateway device 12, and the gateway device 20 to the gateway list;
[0080] Step 5: Ordinary device 10 obtains the distance, SNR data, RSRP data and the number of ordinary device accesses from itself to the nodes of gateway device 1, gateway device 12 and gateway device 20, and adds the data to the corresponding gateway device in the gateway list:
[0081] The data of gateway device 1 are: SNR data (15), RSRP data (-103), distance (1800), number of common device accesses (5);
[0082] The data of the gateway device 12 are: SNR data (25), RSRP data (-68), distance (400), number of common device accesses (5);
[0083] The data of the gateway device 20 are: SNR data (16), RSRP data (-110), distance (2000), number of common device accesses (6);
[0084] Step 6: The data of gateway device 1, gateway device 12 and gateway device 20 in the gateway list are transmitted to the data processing module, and algorithm calculation is performed on gateway device 1, gateway device 12 and gateway device 20 respectively;
[0085] The calculation formula is as follows:
[0086]
[0087] Constant values K1 = 0.5, k2 = 0.2, k3 = 0.3;
[0088] Gateway device 1 calculates a score of (0.71), gateway device 12 calculates a score of (1.05), and gateway device 20 calculates a score of (-0.28);
[0089] After the calculation is completed, the calculated scores of gateway device 1, gateway device 12 and gateway device 20 are returned;
[0090] In the seventh step, after calculation, it is found that the gateway device 12 has the highest calculation score, and the gateway device 12 is selected as the optimal gateway for gateway switching.
[0091] Embodiment 4,
[0092] As in the method described in Example 3, in step 8, after the common device 10 establishes network communication with the Internet, it enters the network monitoring state, and when it detects that the network is disconnected, it returns to step 4 and continues to operate;
[0093] When the network is normal, return to step 4 every four hours to reselect the optimal gateway.
[0094] Embodiment 5,
[0095] A system for implementing the multi-gateway intelligent adaptation method as described in Embodiments 1-4, comprising:
[0096] Ordinary devices, gateway devices and data processing modules connected via the Internet;
[0097] The gateway device and the common device start the Socket server and the Socket client for communication between the gateway device and the common device in the local area network;
[0098] The data stored in the gateway device list is transferred to the data processing module for performing algorithm calculation on each gateway device in the gateway device list to execute the sixth step; and the seventh step is executed according to the calculation result. According to the preferred embodiment of the present invention, the system also includes a network monitoring module, which is used to: enter the network monitoring state after the gateway switching is completed and the network communication is established; when the network is disconnected, the fourth step is executed; when the network is normal, the fourth step is executed every reselection time to reselect the optimal gateway; the reselection time can be selected according to the requirements of the network communication rate and real-time performance, and the present invention does not limit the reselection time.
Claims
1. A multi-gateway intelligent adaptation method, characterized in that: The steps include: Step 1: The device forms a self-organized network and obtains the IP addresses of other devices in the local area network, including gateway devices and ordinary devices; Step 2: Determine the network status and device type: Gateway devices: have LTE network and LAN network, and have the ability to communicate with the Internet; Ordinary devices: need to communicate with the Internet through the gateway device; Step 3: The gateway device and the common device start the Socket server and Socket client for communication between the gateway device and the common device in the LAN; Step 4: The gateway device connects to the Socket server of the common device through the Socket client, and sends the gateway configuration to the common device in the LAN. After the common device obtains the IP of the gateway device, it adds the gateway device to the gateway device list; Step 5: The common device sequentially connects to the Socket server of each gateway device in the gateway device list to obtain the number of common devices connected to the gateway device; at the same time, the distance from the common device to each gateway device node, SNR data, RSRP data, and the number of common device nodes connected are obtained, and added to the corresponding gateway device parameters in the gateway device list; Step 6: The data stored in the gateway device list is passed to the data processing module for performing algorithm calculations on each gateway device in the gateway device list: In formula (I), Z: currently calculated gateway device score; k1: weight value of SNR data; k2: weight value of RSRP data; k3: weight value of distance from common device to each gateway device node; k1+k2+k3=1; S: SNR data score value = 10*SNR / 30, SNR value range is 0 to 30; P: RSRP data score = (RSRP+140) / 10, RSRP value range is -44 to -140; D: The score value of the distance from the common device to each gateway device node = 10-(the distance from the common device to each gateway device node / the minimum unit distance). The minimum unit distance needs to be set according to the actual application environment and scenario; m: the number of common devices in the current LAN; n: the number of gateway devices in the current LAN; s: the number of common devices connected to the current gateway device; After the calculation is completed, the score of each gateway device is calculated; Step 7: After obtaining the calculation scores of each gateway device, select the gateway device with the highest score for gateway switching.
2. The adaptation method according to claim 1 is different in that when the calculated score of the gateway device is negative, it means that the number of ordinary devices connected to the gateway device has reached the maximum value, and ordinary devices are prohibited from being connected.
3. The adaptation method according to claim 1 is different in that the method further comprises an eighth step, in which the network monitoring state is entered after the gateway switching is completed and the network communication is established.
4. The adaptation method according to claim 3, wherein the network monitoring status includes: When the network is disconnected, go to step 4; When the network is normal, the fourth step is executed every reselection time to reselect the optimal gateway.
5. A system for implementing the multi-gateway intelligent adaptation method according to any one of claims 1 to 4, characterized in that: include: Ordinary devices, gateway devices and data processing modules connected via the Internet; The gateway device and the common device start the Socket server and the Socket client for communication between the gateway device and the common device in the local area network; The data stored in the gateway device list is passed to the data processing module for performing algorithm calculation on each gateway device in the gateway device list to execute the sixth step; And execute step 7 according to the calculation results.
6. The system according to claim 5, characterized in that The system also includes a network monitoring module, which is used to: enter the network monitoring state after the gateway switching is completed and the network communication is established; when the network is disconnected, execute the fourth step; when the network is normal, execute the fourth step every reselection time to reselect the optimal gateway.
Citation Information
Patent Citations
Information processing method, system and device
CN111342984A
Method for determining gateway and terminal
CN106455055A
Gateway selection
EP2785109A1