A router and a router relay connection method

By implementing dual-band scanning and SSID filtering in the router, selecting the optimal SSID for relay connections and performing frequency band reconnection, the problem of disconnection of the router's relay connection is solved, and the performance and user experience of the wireless network are improved.

CN114051274BActive Publication Date: 2024-11-15NAZHEN TECHNOLOGY (SINGAPORE) PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111321582.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2024-11-15
Estimated Expiration
2041-11-09

AI Technical Summary

Technical Problem

The router relay connection is easily disconnected when the environment changes or signal strength changes, resulting in service interruption and the frequency band cannot be switched effectively, affecting the user experience.

Method used

By implementing dual-band scanning and SSID screening in the router, weighted operations are performed based on the received signal strength, frequency band, wireless mode and the success of the last connection, select the optimal SSID for relay connection, and perform frequency band optimization replication when the connection is disconnected to ensure optimal local performance.

Benefits of technology

It realizes that the router automatically selects the optimal SSID after the relay connection is disconnected, providing a local optimal wireless network, and improving user experience and business continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114051274B_ABST
    Figure CN114051274B_ABST
Patent Text Reader

Abstract

In the router and router relay connection method provided in the embodiment of the present application, the router includes a WiFi antenna, a WiFi chip, which is used to initiate dual-frequency scanning through the WiFi antenna, and a processor, which is configured to: filter each SSID scanned by the dual-frequency scanning, and perform weighted operations on the filtered SSID information based on four parameters: the strength indication of the received signal, the frequency band, the wireless mode, and whether the upstream AP was successfully connected last time to obtain the SSID to be connected. After the router relay connection of the present application is disconnected, the surrounding SSID information is obtained through dual-frequency scanning, and the SSID that meets the requirements is selected through the screening strategy, and a relay connection is initiated to achieve the purpose of providing users with a local optimal network. The optimized relay reconnection method provided by the present application is applied to a router, which can provide a terminal with a local optimal wireless network in relevant scenarios, thereby providing users with a better experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a router and a router relay connection method. Background Art

[0002] The router has a wireless relay function, which can combine two or more wireless routers to play the role of a relay in the network connection, and can realize the relay and method of signals, thereby extending the coverage of the wireless network.

[0003] When the router turns on the relay function, the user can initiate a scan to select the most appropriate upstream AP (AccessPoint, wireless access point) SSID (ServiseSet Identifier) ​​to initiate a relay connection.

[0004] Due to the wireless properties of the relay device, the signal strength and wireless performance between the router and the upstream AP device are different due to different environments, resulting in the relay connection being disconnected due to the poor signal strength of the original connection SSID, or the frequency band cannot be switched when the original frequency band signal is lost, which will cause the service of the terminal device connected to the router to be interrupted, affecting the service experience. Summary of the invention

[0005] The embodiment of the present application provides a router and a router relay connection method to select the optimal SSID to initiate a relay connection to achieve optimal local performance.

[0006] In a first aspect, an embodiment of the present application provides a router, including:

[0007] WiFi antenna;

[0008] A WiFi chip, used to initiate dual-frequency scanning through the WiFi antenna;

[0009] The processor is configured to: filter each SSID scanned by the dual-frequency scanning, and perform weighted calculation on the filtered SSID information based on the received signal strength indication, frequency band, wireless mode and whether the upstream AP was successfully connected last time to obtain the SSID to be connected.

[0010] In a second aspect, based on the above router, the embodiment of the present application further provides a router relay connection method, including:

[0011] Check whether the relay function of each SSID is turned on, and initiate dual-frequency scanning after the relay function of each SSID is turned on;

[0012] The SSID, encryption mode and encryption algorithm that initiate the relay connection request are used as the screening conditions to screen the SSIDs scanned by the dual-frequency.

[0013] Filter out SSIDs that match the filtering conditions from each SSID to obtain each filtered SSID;

[0014] When the current relay connection does not specify the MAC address of the upstream AP to be connected, the parameters in the filtered SSIDs are calculated to obtain evaluation values, and the SSID with the largest evaluation value is the SSID to be connected, wherein the parameters include: a strength indication of the received signal, a frequency band, a wireless mode, and whether the upstream AP was successfully connected last time;

[0015] Determine whether the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID;

[0016] When the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID, initiating a relay connection request according to the information of the SSID to be connected;

[0017] When the frequency band of the SSID to be connected is different from the frequency band of the original connection SSID, the connection task of the original connection SSID is closed, the frequency band value of the SSID to be connected is written into the parameters for initiating the connection, and a relay connection request is initiated according to the generated connection parameters.

[0018] Beneficial effect: In the router and router relay connection method provided in the embodiments of the present application, the router includes a WiFi antenna, a WiFi chip, which is used to initiate dual-frequency scanning through the WiFi antenna, and a processor, which is configured to: filter each SSID scanned by the dual-frequency scanning, and perform weighted operations on the filtered SSID information based on four parameters: the strength indication of the received signal, the frequency band, the wireless mode, and whether the upstream AP was successfully connected last time to obtain the SSID to be connected. After the router relay connection of the present application is disconnected, the surrounding SSID information is obtained through dual-frequency scanning, and the SSID that meets the requirements is selected through the screening strategy, and a relay connection is initiated to achieve the purpose of providing users with a local optimal network. The optimized relay reconnection method provided by the present application is applied to a router, which can provide a terminal with a local optimal wireless network in relevant scenarios, thereby providing users with a better experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 A flowchart of a router relay connection method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] When the router enables the relay function, the user can initiate a scan and select the most reasonable upstream SSID to initiate a relay connection. However, due to the mobility of wireless devices or changes in the actual networking environment, such as changes in the upstream AP location, AP parameters, device power failure, etc., the relay connection may be disconnected, and there will be a reconnection process after disconnection. At this time, the networking environment may change, and the original SSID may not be the best option. How to let the router automatically select the most suitable SSID for relay connection to achieve optimal performance is a very practical issue.

[0022] The embodiments of the present application provide a router and a router relay connection method to select the optimal SSID to initiate a relay connection to achieve optimal local performance.

[0023] In the embodiment of the present application, the mobile terminal is connected to a dual-band router, and the dual-band includes 2.4 GHz and 5 GHz.

[0024] The main frequency bands used by routers are 2.4GHz and 5GHz. Comparing the two, 2.4GHz Wi-Fi has a larger coverage range than 5GHz, and is more suitable for penetrating walls because it has longer radio waves; while 5GHz Wi-Fi, although its signal propagation distance is short and coverage is small, has faster transmission speed, higher frequency characteristics and stronger signal capabilities. When the quality of Wi-Fi signals varies due to differences in networking environments, choosing a relay hotspot AP will provide a better Internet experience.

[0025] The SSID (Service Set Identifier), authentication method and password settings of the dual-band router 2.4GHz and 5GHz are the same.

[0026] In some embodiments, the router periodically monitors the relay function enablement state. When the state is disabled, the router re-detects the relay function enablement state of the router after a timer_0 cycle, and continues to detect the relay function enablement state of the router when the state is enabled.

[0027] Then, the router periodically monitors the relay connection status. When the status is connected, it monitors the relay connection status again after the timer_0 cycle. When the status is disconnected, it determines whether it is the first connection status detection after power-on.

[0028] If the first connection status detection after power-on is determined, the router's relay function is disconnected at this time. At this time, it is necessary to traverse the repeater (relay) enable state of the SSID to ensure that the repeater function is turned on. Traverse the repeater enable state again to avoid the repeater enable state changing within the timer_1 cycle.

[0029] If it is not the first connection status detection after power-on, determine whether it is the first time to detect a disconnection. If it is the first time to detect a disconnection, re-detect after the timer_1 cycle; if it is not the first time to detect a disconnection, traverse the repeater enable status of the SSID to ensure that the repeater function is turned on, and traverse the repeater enable status again to avoid changes in the repeater enable status within the timer_1 cycle.

[0030] Among them, waiting for timer_1 cycle to detect again after the first detection is to ensure that the temporary link disconnection caused by link signal, chip restart and other reasons can be restored within the timer1 cycle to avoid meaningless reconnection.

[0031] In this way, it can be ensured that no relay reconnection is performed during the first connection after power-on and when a disconnection is first detected, because the relay connection function of the router is not yet enabled during the first connection or when a disconnection is first detected, and no relay reconnection is required at this time. Therefore, this application needs to exclude the situations of the first connection after power-on and when a disconnection is first detected.

[0032] In some embodiments, after ensuring that the relay function of each SSID is turned on, a dual-frequency (2.4GHz and 5GHz) scan is initiated to obtain information of surrounding SSIDs. Each SSID is then screened, specifically, by setting a filtering condition, SSIDs that do not meet the filtering condition are filtered out, and the remaining SSIDs are the screened SSIDs.

[0033] The SSID, encryption mode and encryption algorithm of the relay connection request are used as filtering conditions to filter the SSID information obtained through dual-frequency scanning, and all SSIDs that are inconsistent with one of the filtering conditions are filtered out. In this way, the remaining SSIDs are the SSIDs that are consistent with the SSID, encryption mode and encryption algorithm of the relay connection request, and the remaining SSIDs are the filtered SSIDs.

[0034] In some embodiments, after obtaining the filtered SSID, it is determined whether the current relay connection specifies the MAC of the upstream AP. This is because there may be multiple upstream APs, and there are differences in the processing method of specifying which upstream AP to connect to.

[0035] In some embodiments, when the current relay connection specifies the MAC address of the upstream AP to be connected, the specified MAC address is matched with each of the filtered SSIDs, and if the match is successful, it is set as the SSID to be connected;

[0036] In some embodiments, when the current relay connection does not specify the MAC address of the upstream AP to connect to, the parameters in each filtered SSID are calculated to obtain an evaluation value, and the SSID with the largest evaluation value is the SSID to be connected, wherein the parameters include: a strength indication of the received signal, a frequency band, a wireless mode, and whether the last connection to the upstream AP was successful.

[0037] Specifically, the received signal strength indicator is represented by n_rssi, the frequency band is represented by n_band; the wireless mode is represented by n_mode, and whether the last connection to the upstream AP was successful is represented by n_stored;

[0038] The evaluation value=n_rssi+n_band×n_mode+n_stored.

[0039] Among them, if the received signal strength indication (rssi) value is greater than or equal to -75, the n_rssi value is 100; if the received signal strength indication value is less than -75, the n_rssi value is rssi+100; if the n_rssi value is less than 0, the n_rssi value is assigned 0;

[0040] If the frequency band is 2.4G, the n_band value is 25, if the frequency band is 5G, the n_band value is 50;

[0041] If the frequency band is 2.4G and the wireless mode is wifi4 or wifi5, the n_mode value is 1, if it is wifi6, the n_mode value is 2;

[0042] If the frequency band is 5G and the wireless mode is wifi4, the n_mode value is 1; if it is wifi5, the n_mode value is 1.5; if it is wifi6, the n_mode value is 2;

[0043] If the SSID is the last successfully reconnected SSID, n_stored is set to 50, otherwise it is 0.

[0044] That is, this application scores each SSID to obtain a comprehensive ranking of each SSID.

[0045] It can be seen that the present application provides a criterion for screening the optimal SSID. Based on the criterion, each SSID that meets the conditions can be obtained, and the comprehensive performance of each SSID can be ranked and evaluated.

[0046] In this way, the evaluation value of each SSID can be obtained through the above calculation. The higher the evaluation value, the greater the connection value. Therefore, in this application, the SSID with the highest evaluation value is used as the SSID to be connected.

[0047] The above calculation method comprehensively considers factors such as the received signal strength indication, frequency band, wireless mode and whether the upstream AP was successfully connected last time. The SSID obtained by comprehensively considering various factors is a better SSID to be connected.

[0048] In some embodiments, based on the evaluation value, if two or more SSID information with the same evaluation value appear, for the SSIDs with the same evaluation value, their historical scan evaluation values ​​are taken, the variance value is calculated, and the SSID with the smallest variance value is selected. If the same variance value appears, the first SSID is selected.

[0049] In some embodiments, when a relay connection request is initiated with the optimal SSID to be connected, it is determined whether the frequency band of the current SSID information is the same as the SSID of the original connection. If different, the connection task of the original SSID is closed, and the new frequency band value is written into the parameters for initiating the connection. The relay connection is initiated according to the new parameters. If they are the same, the relay reconnection request is directly initiated according to the frequency band value of the SSID to be connected.

[0050] In some embodiments, when a relay connection request is initiated with the best SSID to be connected, the relay reconnection may fail due to factors such as an incorrect password.

[0051] In some embodiments, when a relay connection request initiated with the optimal SSID to be connected fails, a relay connection request can be initiated with the suboptimal SSID to be connected, and a determination is made as to whether the frequency band of the current SSID information is the same as the SSID of the original connection. If they are different, the connection task of the original SSID is closed, and the new frequency band value is written into the parameters for initiating the connection. A relay connection is initiated according to the new parameters. If they are the same, a relay reconnection request is directly initiated according to the frequency band value of the SSID to be connected.

[0052] In some embodiments, when a relay connection request is initiated with a suboptimal SSID to be connected, a relay reconnection failure may occur. In this case, a relay connection request is initiated with the suboptimal SSID to be connected, and then a determination is made as to whether the frequency band of the current SSID information is the same as the SSID of the original connection. If they are different, the connection task of the original SSID is closed, and the new frequency band value is written into the parameters for initiating the connection. A relay connection is initiated according to the new parameters. If they are the same, a relay reconnection request is directly initiated according to the frequency band value of the SSID to be connected.

[0053] In this way, relay reconnection requests are initiated in order from high to low according to the evaluation values ​​of the SSID to be connected.

[0054] In some embodiments, each qualified SSID is stored in table Tab_1 in descending order of evaluation value, and then when a relay connection request is initiated with the optimal SSID to be connected, it is determined whether the frequency band of the current SSID information is the same as the SSID of the original connection. If different, the connection task of the original SSID is closed, and the new frequency band value is written into the parameters for initiating the connection, and the relay connection is initiated according to the new parameters. If they are the same, the relay reconnection request is directly initiated according to the frequency band value of the SSID to be connected. In some embodiments, when initiating a relay connection request with the optimal SSID to be connected, the relay reconnection may fail due to factors such as incorrect passwords; at this time, the optimal SSID to be connected is stored in table Tab_0; in this way, the SSID that failed to connect in table Tab_1 is stored in Tab_0. It can be seen that table Tab_0 is used to record the SSID information of historical connection failures; in this way, by comparing table Tab_1 and table Tab_0, if the SSID information in table Tab_1 also exists in table Tab_0, the SSID is not selected for relay reconnection, but the next SSID of the SSID is selected to initiate a relay connection request. Among them, table Tab_1 is used to store SSID information that meets the connection conditions and has RSSI compensated, and table Tab_0 is used to store SSID information that has been attempted for repeater connection. Traverse the sub-items of table Tab_1 in sequence until the sub-item no longer exists in Tab_0, or table Tab_1 has been completely traversed.

[0055] And so on, until the successfully connected SSID is found. After the successfully connected SSID is found, the data in the table Tab_1 and the table Tab_0 are cleared.

[0056] In some embodiments, after determining the SSID to be connected, it is determined whether the frequency band of the current SSID information is the same as the SSID of the original connection. If different, the connection task of the original SSID is closed, and the new frequency band value is written into the parameters for initiating the connection. A relay connection is initiated according to the new parameters. If they are the same, a relay connection is initiated directly according to the frequency band value of the SSID to be connected.

[0057] Waiting to receive the connection result, waiting to receive the connection result message, if the connection fails or the message reception times out, then waiting for the router relay to disconnect in the next time period, if a connection success message is received, then updating the connection status, etc., and clearing the table Tab_0.

[0058] Through the above, in the embodiment of the present application, when the router relay function is disconnected and needs to be reconnected, the technical concepts provided include:

[0059] In some embodiments, it is checked whether the relay function of each SSID is turned on, and after the relay function of each SSID is turned on, a dual-frequency scan is initiated;

[0060] The SSID, encryption mode and encryption algorithm that initiate the relay connection request are used as the screening conditions to screen the SSIDs scanned by the dual-frequency.

[0061] Filter out SSIDs that match the filtering conditions from each SSID to obtain each filtered SSID;

[0062] When the current relay connection does not specify the MAC address of the upstream AP to be connected, the parameters in the filtered SSIDs are calculated to obtain evaluation values, and the SSID with the largest evaluation value is the SSID to be connected, wherein the parameters include: a strength indication of the received signal, a frequency band, a wireless mode, and whether the upstream AP was successfully connected last time;

[0063] Determine whether the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID;

[0064] When the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID, initiating a relay connection request according to the information of the SSID to be connected;

[0065] When the frequency band of the SSID to be connected is different from the frequency band of the original connection SSID, the connection task of the original connection SSID is closed, the frequency band value of the SSID to be connected is written into the parameters for initiating the connection, and a relay connection request is initiated according to the generated connection parameters.

[0066] In some embodiments, it is checked whether the relay function of each SSID is turned on, and after the relay function of each SSID is turned on, a dual-frequency scan is initiated;

[0067] The SSID, encryption mode and encryption algorithm that initiate the relay connection request are used as the screening conditions to screen the SSIDs scanned by the dual-frequency.

[0068] Filter out SSIDs that match the filtering conditions from each SSID to obtain each filtered SSID;

[0069] When the current relay connection specifies the MAC address of the upstream AP, the specified MAC address is matched with each of the filtered SSIDs, and if a match is successful, it is set as the SSID to be connected;

[0070] Determine whether the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID;

[0071] When the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID, initiating a relay connection request according to the information of the SSID to be connected;

[0072] When the frequency band of the SSID to be connected is different from the frequency band of the original connection SSID, the connection task of the original connection SSID is closed, the frequency band value of the SSID to be connected is written into the parameters for initiating the connection, and a relay connection request is initiated according to the generated connection parameters.

[0073] The frequency band optimization-based relay reconnection method provided in the embodiment of the present application is applied to a router, which can provide a locally optimal wireless network for the terminal in relevant scenarios, thereby bringing a better service experience to customers.

[0074] The embodiment of the present application provides a relay reconnection solution based on frequency band optimization. After the relay connection is disconnected, a dual-frequency scan is initiated periodically. Taking into account the frequency band and signal strength, an SSID that meets the requirements is selected for relay connection, so as to provide users with a local optimal network.

[0075] This application can be used when the signal strength of the original connection SSID is poor, resulting in disconnection, or the original frequency band signal is lost and the frequency band cannot be switched, which will cause service interruption of the terminal device connected to the router and affect the service experience; when the distance between devices (or obstacles) changes, resulting in changes in signals in different frequency bands, the frequency band cannot be switched, which will affect the service experience of the devices connected to the router; when there are multiple identical SSIDs (SSID, encryption method, encryption algorithm) in the environment, it is impossible to ensure that the local optimal SSID is selected to initiate a relay connection, affecting the user's service experience, etc., and the frequency band and signal strength are comprehensively considered. The SSID that meets the requirements is preferably selected for frequency band switching and relay connection, so as to provide users with a local optimal network.

[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the following Figure 1 The embodiments of the present invention are described in detail.

[0077] Step 101: The mobile terminal accesses a dual-band router. The SSID (Service Set Identifier) ​​of the dual-band router 2.4GHz and 5GHz, the authentication method and the password must be set to be the same.

[0078] Step 102: The router periodically monitors the relay function enable status. If the status is disabled, the router re-detects and executes step 102.1 after the timer_0 cycle. If the status is enabled, the router continues.

[0079] Step 103: The router periodically monitors the relay connection status. If the status is connected, it re-detects and executes step 102.1 after the timer_0 cycle. If the status is disconnected, it continues.

[0080] Step 104: Determine whether it is the first connection status detection after power-on. If so, execute step 106; otherwise, execute step 105.

[0081] Step 105: If the disconnection is detected for the first time, re-detect after timer_1 cycle and execute step 105.1; otherwise, execute step 106. Waiting for timer_1 cycle to detect again after the first detection is to ensure that the temporary link disconnection caused by link signal, chip restart, etc. can be restored within the timer1 cycle to avoid meaningless reconnection.

[0082] Step 106: traverse the repeater enable state of the SSID to ensure that the repeater function is enabled, otherwise execute step 102.1. Traverse the repeater enable state again to prevent the repeater enable state from changing within the timer_1 period.

[0083] Step 107: Initiate dual-frequency scanning (2.4G and 5G).

[0084] Step 108: Using the SSID, encryption mode, and encryption algorithm of the repeater connection request as filtering conditions, all scanned hotspot information is filtered, and only the SSID information that fully matches is considered.

[0085] Step 109: If the repeater connection specifies the MAC of the connecting device, proceed to step 110; otherwise, proceed to step 111.

[0086] Step 110: Use the specified MAC to match the filtered SSID information. If a match is found, execute step 117; otherwise, wait for the timer_0 cycle to execute step 102.1.

[0087] Step 111: Based on the RSSI value, frequency band value, wireless mode, etc. in the SSID information, score each SSID. The score represents its connection value. The higher the score, the greater the connection value. The specific calculation method is as follows:

[0088] Take the rssi value, frequency band value (2.4G / 5G), wireless mode value (wifi4 / wifi5 / wifi6) and whether the device (mac) was successfully connected last time in the SSID information as input parameters;

[0089] If the rssi value is greater than or equal to -75, the n_rssi value is 100; if the rssi value is less than -75, the n_rssi value is rssi+100; if the n_rssi value is less than 0, assign 0 to the n_rssi value;

[0090] If the SSID is 2.4G, the n_band value is 25, if it is 5G, the n_band value is 50;

[0091] If the SSID is 2.4G and the wireless mode is wifi4 or wifi5, the n_mode value is 1, and if it is wifi6, the n_mode value is 2; if the SSID is 5G and the wireless mode is wifi4, the n_mode value is 1, if it is wifi5, the n_mode value is 1.5, and if it is wifi6, the n_mode value is 2;

[0092] If the SSID is the last successfully reconnected SSID, n_stored is set to 50, otherwise it is 0;

[0093] Calculate the score, the score value (i.e. the aforementioned evaluation value) is equal to n_rssi+n_band×n_mode+n_stored;

[0094] Insert the SSID information into Tab_1 in descending order of score value, and execute step 112.

[0095] Step 112: Based on the score value, if the optimal solution can be selected, execute step 114; if not, and there are two or more SSID information with the same score, execute step 113.

[0096] Step 113: For SSIDs with the same score value, obtain their historical scan scores, calculate the variance value, and select the SSID with the smallest variance value. If the same variance value appears, select the first SSID and execute step 114.

[0097] Step 114: traverse the table Tab_1, if the table sub-item is read to be empty, execute step 114.1, otherwise execute step 115.

[0098] Step 115: Determine whether the current SSID exists in the table Tab_0. If it does, execute step 114. Table Tab_1 is used to store SSID information that meets the connection conditions and has RSSI compensation. Table Tab_0 is used to store SSID information that has attempted to connect to the repeater. Traverse the sub-items of table Tab_1 in sequence until the sub-item no longer exists in Tab_0, or the table Tab_1 has been completely traversed.

[0099] Step 116: Determine whether the frequency band of the current SSID information is the same as the original connection SSID. If they are different, execute step 117; if they are the same, execute step 118.

[0100] Step 117: close the original repeater connection task, write the new frequency band value into the parameters for initiating the connection, and execute step 118.

[0101] Step 118: Initiate a repeater connection according to the new parameters, write the MAC of the SSID into Tab_0, and then execute step 119.

[0102] Step 119: Wait to receive a connection result message. If the connection fails or the message reception times out, execute step 102.1. If a connection success message is received, execute step 120.

[0103] Step 120: Update the connection status, etc., and clear the table Tab_0.

[0104] The frequency band optimization-based relay reconnection method provided in the embodiment of the present application is applied to a router, which can provide a locally optimal wireless network for the terminal in relevant scenarios, thereby bringing a better service experience to customers.

[0105] The embodiment of the present application provides a relay connection solution based on frequency band optimization. After the relay connection is disconnected, a dual-frequency scan is initiated regularly. Taking into account the frequency band and signal strength, an SSID that meets the requirements is selected for relay connection, so as to provide users with a local optimal network.

[0106] Finally, it should be noted that: this embodiment is described in a progressive manner, and different parts can refer to each other; in addition, the above embodiments are only used to illustrate the technical solution of the present application, rather than to limit it; although the present application has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that: they can still modify the technical solutions recorded in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A router, characterized in that: include: WiFi antenna; A WiFi chip, used to initiate dual-frequency scanning through the WiFi antenna; The processor is configured as: When the relay function of each SSID is turned on, initiate a dual-frequency scan to obtain information about each SSID; The SSID, encryption mode and encryption algorithm that initiate the relay connection request are used as filtering conditions to filter the SSIDs scanned by the dual-frequency scanning, and the SSIDs that are inconsistent with one of the filtering conditions are filtered out to obtain the filtered SSIDs; If the current relay connection specifies the MAC address of the upstream AP, the specified MAC address is matched with each of the filtered SSIDs, and if a match is successful, it is set as the SSID to be connected; If the current relay connection does not specify the MAC address of the upstream AP to be connected, the filtered SSID information is weighted based on the received signal strength indication, frequency band, wireless mode and whether the upstream AP was successfully connected last time to obtain an evaluation value to obtain the SSID to be connected, wherein the weighted operation includes: The received signal strength indication is represented by n_rssi, the frequency band is represented by n_band; the wireless mode is represented by n_mode, and whether the last connection to the upstream AP was successful is represented by n_stored; the evaluation value = n_rssi + n_band × n_mode + n_stored; wherein the n_mode value is obtained based on the frequency band and the wireless mode; Determine whether the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID; When the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID, initiating a relay connection request according to the information of the SSID to be connected; When the frequency band of the SSID to be connected is different from the frequency band of the original connection SSID, the connection task of the original connection SSID is closed, the frequency band value of the SSID to be connected is written into the parameters for initiating the connection, and a relay connection request is initiated according to the generated connection parameters.

2. The router according to claim 1, characterized in that: The processor is further configured to: The SSID, encryption mode and encryption algorithm that initiate the relay connection request are used as the screening conditions to screen the SSIDs scanned by the dual-frequency. Filter out SSIDs that match the filtering conditions from each SSID to obtain each filtered SSID; When the current relay connection does not specify the MAC address of the upstream AP to be connected, the parameters in the filtered SSIDs are calculated to obtain an evaluation value, and the SSID with the largest evaluation value is the SSID to be connected, wherein the parameters include: a strength indication of a received signal, a frequency band, a wireless mode, and whether the last connection to the upstream AP was successful.

3. The router according to claim 1, characterized in that: The processor is further configured to: The SSID, encryption mode and encryption algorithm that initiate the relay connection request are used as the screening conditions to screen the SSIDs scanned by the dual-frequency. Filter out SSIDs that match the filtering conditions from each SSID to obtain each filtered SSID; When the current relay connection specifies the MAC address of the upstream AP, the specified MAC address is matched with each of the filtered SSIDs, and if the match succeeds, it is set as the SSID to be connected.

4. The router according to claim 1, characterized in that: The processor is further configured to: After obtaining the SSID to be connected, determining whether the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID; When the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID, initiating a relay connection request according to the information of the SSID to be connected; When the frequency band of the SSID to be connected is different from the frequency band of the original connection SSID, the connection task of the original connection SSID is closed, the frequency band value of the SSID to be connected is written into the parameters for initiating the connection, and a relay connection request is initiated according to the generated connection parameters.

5. The router according to claim 1, characterized in that: The router is a dual-band router, the frequency bands of the router include 2.4 GHz and 5 GHz, and the SSID, authentication method and password settings under 2.4 GHz and 5 GHz are the same.

6. The router according to claim 1, characterized in that: It is checked whether the relay function of each SSID is turned on, and after the relay function of each SSID is turned on, a dual-frequency scan is initiated.

7. The router according to claim 1, characterized in that: In calculating the parameters in each of the screened SSIDs to obtain the evaluation value, the processor is further configured to: If the received signal strength indicator value is greater than or equal to -75, the n_rssi value is 100; if the received signal strength indicator value is less than -75, the n_rssi value is rssi+100; if the n_rssi value is less than 0, the n_rssi value is assigned 0; If the frequency band is 2.4G, the n_band value is 25, if the frequency band is 5G, the n_band value is 50; If the frequency band is 2.4G and the wireless mode is wifi4 or wifi5, the n_mode value is 1, if it is wifi6, the n_mode value is 2; If the frequency band is 5G and the wireless mode is wifi4, the n_mode value is 1; if it is wifi5, the n_mode value is 1.5; if it is wifi6, the n_mode value is 2; If the SSID is the last successfully reconnected SSID, n_stored is set to 50, otherwise it is 0.

8. A router relay connection method, characterized in that: The method comprises: When the relay function of each SSID is turned on, initiate a dual-frequency scan to obtain information about each SSID; The SSID, encryption mode and encryption algorithm that initiate the relay connection request are used as filtering conditions to filter the SSIDs scanned by the dual-frequency scanning, and the SSIDs that are inconsistent with one of the filtering conditions are filtered out to obtain the filtered SSIDs; If the current relay connection specifies the MAC address of the upstream AP, the specified MAC address is matched with each of the filtered SSIDs, and if a match is successful, it is set as the SSID to be connected; If the current relay connection does not specify the MAC address of the upstream AP to be connected, the filtered SSID information is weighted based on the received signal strength indication, frequency band, wireless mode and whether the upstream AP was successfully connected last time to obtain an evaluation value to obtain the SSID to be connected, wherein the weighted operation includes: The received signal strength indicator is represented by n_rssi, the frequency band is represented by n_band; the wireless mode is represented by n_mode, and whether the last connection to the upstream AP was successful is represented by n_stored; The evaluation value=n_rssi+n_band×n_mode+n_stored, wherein the n_mode value is obtained based on the frequency band and the wireless mode; Determine whether the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID; When the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID, initiating a relay connection request according to the information of the SSID to be connected; When the frequency band of the SSID to be connected is different from the frequency band of the original connection SSID, the connection task of the original connection SSID is closed, the frequency band value of the SSID to be connected is written into the parameters for initiating the connection, and a relay connection request is initiated according to the generated connection parameters.

9. The router relay connection method according to claim 8, characterized in that: The method comprises: Check whether the relay function of each SSID is turned on, and initiate dual-frequency scanning after the relay function of each SSID is turned on; The SSID, encryption mode and encryption algorithm that initiate the relay connection request are used as the screening conditions to screen the SSIDs scanned by the dual-frequency. Filter out SSIDs that match the filtering conditions from each SSID to obtain each filtered SSID; When the current relay connection does not specify the MAC address of the upstream AP to be connected, the parameters in the filtered SSIDs are calculated to obtain evaluation values, and the SSID with the largest evaluation value is the SSID to be connected, wherein the parameters include: the strength indication of the received signal, the frequency band, the wireless mode, and whether the upstream AP was successfully connected last time; determine whether the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID; When the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID, initiating a relay connection request according to the information of the SSID to be connected; When the frequency band of the SSID to be connected is different from the frequency band of the original connection SSID, the connection task of the original connection SSID is closed, the frequency band value of the SSID to be connected is written into the parameters for initiating the connection, and a relay connection request is initiated according to the generated connection parameters.

10. The router relay connection method according to claim 8, characterized in that: The method further comprises: Check whether the relay function of each SSID is turned on, and initiate dual-frequency scanning after the relay function of each SSID is turned on; The SSID, encryption mode and encryption algorithm that initiate the relay connection request are used as the screening conditions to screen the SSIDs scanned by the dual-frequency. Filter out SSIDs that match the filtering conditions from each SSID to obtain each filtered SSID; When the current relay connection specifies the MAC address of the upstream AP, the specified MAC address is matched with each of the filtered SSIDs, and if a match is successful, it is set as the SSID to be connected; Determine whether the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID; When the frequency band of the SSID to be connected is the same as the frequency band of the original connection SSID, initiating a relay connection request according to the information of the SSID to be connected; When the frequency band of the SSID to be connected is different from the frequency band of the original connection SSID, the connection task of the original connection SSID is closed, the frequency band value of the SSID to be connected is written into the parameters for initiating the connection, and a relay connection request is initiated according to the generated connection parameters.