CN108055687B - Wireless network connection method and device and terminal equipment - Google Patents
Wireless network connection method and device and terminal equipment Download PDFInfo
- Publication number
- CN108055687B CN108055687B CN201810098264.3A CN201810098264A CN108055687B CN 108055687 B CN108055687 B CN 108055687B CN 201810098264 A CN201810098264 A CN 201810098264A CN 108055687 B CN108055687 B CN 108055687B
- Authority
- CN
- China
- Prior art keywords
- router
- interference
- network connection
- wireless network
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/12—Communication route or path selection, e.g. power-based or shortest path routing based on transmission quality or channel quality
- H04W40/16—Communication route or path selection, e.g. power-based or shortest path routing based on transmission quality or channel quality based on interference
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/04—Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the application discloses a wireless network connection method, a wireless network connection device, terminal equipment and a storage medium, wherein the method comprises the steps of determining the current interference scene of the terminal equipment when a wireless network connection event is triggered; determining signal intensity adjustment values of different channels corresponding to the interference scene, and adjusting a routing strategy in the wireless network connection event according to the signal intensity adjustment values; and selecting a router for wireless network connection according to the adjusted routing strategy. In the scheme, when the wireless network connection is carried out, the influence on the network connection under an interference scene is considered, and the network connection process is optimized, so that the data transmission efficiency and the stability of the connected network in the data transmission process are obviously improved.
Description
Technical Field
The embodiment of the application relates to computer technologies, and in particular, to a wireless network connection method, a wireless network connection device, and a terminal device.
Background
With the increase of the popularity of the terminal device, more and more users use the terminal device to execute various functions to meet their own needs, such as reading text, watching video, listening to music, playing games, etc., and often need to connect to a network to obtain network resources in the process of using the terminal device, such as a 4G mobile network or a wireless wifi network provided by a mobile operator.
In the prior art, when a user uses a terminal device to connect a wireless wifi network, the terminal device selects a router with the strongest signal strength to connect according to the detected signal strength of the router.
Disclosure of Invention
The invention provides a wireless network connection method, a wireless network connection device and terminal equipment, and provides data transmission efficiency and transmission stability.
In a first aspect, an embodiment of the present application provides a wireless network connection method, including:
when detecting that a wireless network connection event is triggered, determining a current interference scene of terminal equipment;
determining signal intensity adjustment values of different channels corresponding to the interference scene, and adjusting a routing strategy in the wireless network connection event according to the signal intensity adjustment values;
and selecting a router for wireless network connection according to the adjusted routing strategy.
In a second aspect, an embodiment of the present application further provides a wireless network connection apparatus, including:
the interference determining module is used for determining the current interference scene of the terminal equipment when detecting that the wireless network connection event is triggered;
the signal strength determining module is used for determining signal strength adjusting values of different channels corresponding to the interference scene;
the routing setting module is used for adjusting a routing strategy in the wireless network connection event according to the signal intensity adjusting value;
and the route connection module is used for selecting the router to carry out wireless network connection according to the adjusted route selection strategy.
In a third aspect, an embodiment of the present application further provides a terminal device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, the processor implementing the wireless network connection method as described in the embodiments of the present application when executing the computer program.
In a fourth aspect, the present application further provides a storage medium containing terminal device executable instructions, where the terminal device executable instructions are executed by a terminal device processor to perform the wireless network connection method according to the present application.
According to the scheme, when a wireless network connection event is detected to be triggered, the current interference scene of the terminal equipment is determined, signal intensity adjustment values of different channels corresponding to the interference scene are determined, a routing strategy in the wireless network connection event is adjusted according to the signal intensity adjustment values, a router is selected according to the adjusted routing strategy to carry out wireless network connection, when the wireless network connection is carried out, the influence on the network connection under the interference scene is considered, the network connection process is optimized, and the data transmission efficiency and stability of a connected network in the data transmission process are obviously improved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
fig. 1 is a flowchart of a wireless network connection method according to an embodiment of the present application;
fig. 2 is a flowchart of another wireless network connection method provided in an embodiment of the present invention;
fig. 3 is a flowchart of another wireless network connection method provided in an embodiment of the present application;
fig. 4 is a flowchart of another wireless network connection method provided in an embodiment of the present application;
fig. 5 is a flowchart of another wireless network connection method provided in an embodiment of the present application;
fig. 6 is a block diagram illustrating a wireless network connection device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Fig. 1 is a flowchart of a wireless network connection method provided in an embodiment of the present application, which is applicable to control when performing network connection on a terminal device, where the method may be executed by the terminal device provided in the embodiment of the present application, and a wireless network connection apparatus of the terminal device may be implemented in a software and/or hardware manner, as shown in fig. 1, a specific scheme provided in this embodiment is as follows:
step S101, when detecting that a wireless network connection event is triggered, determining a current interference scene of the terminal equipment.
A wireless network (wireless network) is a network implemented using wireless communication technology. The wireless network comprises a global voice and data network allowing the terminal equipment to establish long-distance wireless connection, and also comprises an infrared technology and a radio frequency technology which are optimized for short-distance wireless connection, the purpose of the wireless network is very similar to that of a wired network, the biggest difference lies in the difference of transmission media, the wireless technology is used for replacing a network cable, and the wireless network and the wired network can be mutually backed up.
The wireless network connection event may be triggered manually by a user, for example, the wireless network connection event is activated when it is detected that the WLAN control is clicked and a control binding event is executed correspondingly, or the wireless network connection event is activated and triggered when the terminal device detects that a network state changes (for example, network connection is disconnected).
Exemplarily, taking an Android operating system as an example, when it is detected that a connect () method of WifiManager is called, a current interference scenario of the terminal device is determined. The interference scenario is a scenario that interference is generated to wireless network data transmission, and may be an interference scenario generated by an internal interference source of the terminal device, or an interference scenario generated by an external interference source of the terminal device. For example, the interference scenario corresponding to the internal interference source may be data transmission interference of a 4G network, and the interference scenario corresponding to the external interference source may be interference corresponding to other wireless network devices such as a bluetooth device (e.g., a bluetooth headset). In an embodiment, the determining of the current interference scenario of the terminal device may be determining the current interference scenario of the terminal device in real time when it is detected that the wireless network connection event is triggered, or acquiring the interference scenario recorded by the terminal device as the interference scenario of the current terminal device.
Step S102, determining signal intensity adjustment values of different channels corresponding to the interference scene, and adjusting the routing strategy in the wireless network connection event according to the signal intensity adjustment values.
The channel (also called frequency band) is a data signal transmission channel using wireless signals as transmission media, for example, the commonly used ieee802.11b/g works in the frequency band of 2.4 to 2.4835GHz, and these frequency bands are divided into 11 or 13 channels. Where different interference scenarios have different degrees of impact on different channels, the specific degree of impact may be determined by testing, which may be, for example, taking the LTEB 40 interference scenario as an example, the interference to different WiFi channels is tested, wherein, LTE (Long Term Evolution) is The Long Term Evolution of UMTS (Universal Mobile Telecommunications System) technical standard organized by 3GPP (The 3rd Generation Partnership Project), B40, i.e. band 40, refers to The operating frequency band (2300 + 2400Mhz), currently, LTE can support 40 operating bands from B1 to B40, and different operating bands generate different interference situations for different WiFi channels, WiFi channels at 2.4GHz according to international standard are divided into 13 channels (spanning frequency 2412 to frequency 2472), the interference of LTE B40 on the WiFi 1 channel is 4db as obtained through the test.
In one embodiment, wireless network data transmission of different channels is tested in advance under different interference scenarios, signal strength interference of the different interference scenarios on the different channels is determined, corresponding signal strength adjustment values are set and recorded, wherein the signal strength adjustment values serve as a basis for selecting a router in a subsequent wireless network connection process, the signal strength adjustment values of the different channels corresponding to the different interference scenarios can be recorded and stored in a terminal device in a table form, and after a wireless network connection event is triggered to determine an interference scenario of a current terminal device, the signal strength adjustment values of the interference scenario on the different channels are determined according to the recorded table. For example, the specific test procedure may be: respectively testing the signal strength of each channel under the interference and non-interference conditions to determine the influence of an interference scene on the signal strength of different channels, and further setting corresponding signal strength adjustment values, wherein the stronger the interference, the larger the corresponding signal strength adjustment value, the smaller the interference, and the smaller the corresponding signal strength adjustment value, for example, when the interference strength is 4db, the corresponding signal strength adjustment value is 10db, and when the interference strength is 0.2db, the signal strength adjustment value is-5 db.
The terminal device scans different Wifi channels in the wireless network connection process to obtain routers for connection, selects the router with the strongest scanned signal strength for connection, or connects the stored optimal router, and does not consider the situation that the terminal device generates interference on wireless network data in an interference scene. For example, the terminal device scans a router a with a signal intensity of a on a WiFi 1 channel, scans a router B with a signal intensity of 0.9a on a WiFi 4 channel, and connects with the router a according to an inherent routing policy, but if the terminal device generates a large amount of interference on data transmission of the WiFi 1 channel in an interference scene (e.g., an LTE B40 scene), the data transmission efficiency of the terminal device is significantly reduced, and the interference of the scene on the WiFi 4 channel is small, so that in an actual use process, the data transmission efficiency of the terminal device connected with the router B is higher, and the stability is stronger. In this step, the signal strength adjustment values of different channels corresponding to the interference scenario are determined, and the routing policy in the wireless network connection event is adjusted according to the signal strength adjustment values, for example, if the adjustment value of the WiFi 1 channel is 10db, the routing policy is correspondingly adjusted such that the signal strength of the WiFi 1 channel is higher than the signal strength of other channels by 10db for connection, so as to ensure that even if the LTE B40 is in a channel transmission state, the data transmission efficiency and stability of the WiFi 1 channel are better than those of other channels, and if the signal strength of the WiFi 1 channel is not higher than the signal strength of other channels by more than 10db, the routing of other channels is selected for connection.
In one embodiment, the adjustment of the routing policy may be to override the original router selection mode or to jump to a new set router selection mode. Taking an Android operating system as an example, saving router parameter information (including signal strength of a fixed channel scanned to a router) transmitted by a connect () method into a wificfigstore object, updating Priority attributes of the wificfigstore and config through a wificfigstore:: selectNetwork () function, and updating into a wpa _ s configuration file, in this step, when updating the Priority attributes, iterating the determined signal strength values of different channels into a set method function, and adjusting an original routing strategy by introducing signal strength adjustment value parameters of the different channels, optionally, the strategy adjustment is as follows: when updating the optimal router, if the signal intensity of the router scanned by the current channel minus the signal intensity adjustment value is greater than the recorded signal intensity of the optimal router, setting the currently scanned router as the optimal router, and continuing to scan the next channel.
And S103, selecting a router for wireless network connection according to the adjusted routing strategy.
In one embodiment, selecting a router for wireless network connection according to the adjusted routing policy comprises: and selecting the connected router for network connection according to the signal intensity adjustment values of the different channels and the signal intensity value of the scanned router in the fixed channel. For example, the interference scenario determined in step S101 is an LTE B40 scenario, the signal strength adjustment values in corresponding Wifi channels 1 to 13 are 10db, 2db, -5db, -8db, 7db, -9db, 3db, 4db, -4db, 5db, and 8db in sequence, it is assumed that there are 3 routers that can be connected to the current terminal device, which are respectively a router a, a router B, and a router c, default channels set by the routers are 1, 4, and 11 in sequence, when the terminal device performs wireless network connection, the signal strength scanned to channel 1 is 32db, the signal strength scanned to channel 4 is 30db, the signal strength scanned to channel 11 is 12db, and a router B is selected according to the routing policy adjusted in step S102 to perform network connection.
In another embodiment, the channels used by the router may also be set according to the signal strength adjustment values of different channels and network connection may be performed. For example, the signal strength adjustment values of Wifi channels 1 to 13 corresponding to the interference scenario 1 are 10db, 2db, -5db, -8db, 7db, -9db, 3db, 4db, -4db, 5db, and 8db in sequence, where the default channel of the router that can be connected is channel 1, the channel with the smallest interference scenario influence (the signal strength adjustment value is the smallest) is determined according to the signal strength adjustment values of channels 1 to 13, the router signal is set to the channel (e.g., channel 8 in this example), and network connection is performed with the router whose channel is set.
According to the above, after the network connection event is triggered, the current interference scenario of the terminal device is determined, and the routing strategy is adjusted in a targeted manner to ensure that the data transmission of the router connected in the interference scenario is more efficient and stable.
Fig. 2 is a flowchart of another wireless network connection method provided in the embodiment of the present application, where optionally, the determining a current interference scenario of a terminal device includes: determining a channel transmitting frequency band used by the terminal equipment; correspondingly, the determining the signal strength adjustment values of the different channels corresponding to the interference scenario includes: and determining signal intensity adjustment values of different channels corresponding to the channel transmitting frequency bands. As shown in fig. 2, the technical solution is as follows:
step S201, when detecting that the wireless network connection event is triggered, determining a channel transmission frequency band used by the terminal equipment.
The channel transmitting frequency band is a data transmitting and receiving frequency band when the terminal device uses a mobile network (such as GSM, 3G and 4G), the terminal device can use the mobile network to transmit and receive partial data during the wireless network data transmission process of the access router, channel interference can be generated on a wireless network accessed by the terminal device, different channel transmitting frequency bands have different interference degrees on different channels, and the interference can be determined through software testing, wherein the interference comprises adjacent channel interference, frequency multiplication interference and the like. In this step, the channel transmission frequency band used by the terminal device (for example, the LTE B40 frequency band in the 4G mobile network is used) is determined.
Step S202, determining signal intensity adjustment values of different channels corresponding to the channel transmitting frequency bands, and adjusting the routing strategy in the wireless network connection event according to the signal intensity adjustment values.
The transmitting frequencies used by different channel transmitting frequency bands are different, so that the interference degrees of the different Wifi channels corresponding to the different channel transmitting frequency bands are different, and different signal intensity adjusting values are further set. Optionally, the terminal device stores and records a list of signal intensity adjustment values of different Wifi channels corresponding to different channel transmission frequency bands, and determines the signal intensity adjustment values of the different Wifi channels corresponding to the list after determining the channel transmission frequency band used by the terminal device. The process of adjusting the routing policy in the wireless network connection event according to the signal strength adjustment value may adopt the method in step S102, and details are not described here.
And step S203, selecting a router for wireless network connection according to the adjusted routing strategy.
Therefore, when the terminal equipment is accessed to the wireless network selection router, the mobile communication interference of the equipment is avoided, so that the data transmission with the router connected finally is more stable, and the interference degree is reduced to the minimum.
Fig. 3 is a flowchart of another wireless network connection method provided in this embodiment, and optionally, before determining the signal strength adjustment values of different channels corresponding to the channel transmission frequency bands, the method further includes: determining the data transmission quantity of the terminal equipment in the channel transmission frequency band within a preset time; correspondingly, the determining the signal strength adjustment values of different channels corresponding to the channel transmission frequency bands includes: and determining the signal intensity adjustment values of corresponding different channels according to the channel transmitting frequency band and the data transmitting quantity. As shown in fig. 3, the technical solution is as follows:
step S301, when detecting that the wireless network connection event is triggered, determining a channel transmitting frequency band used by the terminal equipment.
Step S302, determining the data transmission quantity of the terminal equipment in the channel transmission frequency band within a preset time.
In one embodiment, the mobile data information transmission of the terminal device after accessing the wireless routing network is monitored and recorded, and the amount of data transmitted by the terminal device using the mobile network channel frequency band at a preset time (for example, 30 minutes, 60 minutes or 120 minutes) is recorded.
Step S303, determining signal intensity adjustment values of corresponding different channels according to the channel transmitting frequency band and the data transmitting quantity.
When determining the signal strength adjustment values of different channels, in addition to considering the aforementioned channel frequency band, the data transmission amount of the terminal device in the frequency band is further combined, and illustratively, the larger the data transmission amount is, the larger the signal strength adjustment value is, the smaller the data transmission amount is, and the smaller the signal strength adjustment value is.
And step S304, selecting a router for wireless network connection according to the adjusted routing strategy.
Therefore, when the terminal equipment selects the wireless routing network for connection, the interference frequency band of the interference source and the data transmission quantity are comprehensively considered to determine the influence of the interference source on the wireless routing network, and then the optimal route is selected for network connection, so that the data transmission efficiency and the transmission stability are improved.
Fig. 4 is a flowchart of another wireless network connection method provided in the embodiment of the present application, where optionally, the determining a current interference scenario of a terminal device includes: determining a wireless interference source of the current environment of the terminal equipment; correspondingly, the determining the signal strength adjustment values of the different channels corresponding to the interference scenario includes: and determining signal strength adjustment values of different channels corresponding to the wireless interference source, wherein the wireless interference source comprises at least one of a Bluetooth interference source, a ZigBee interference source, a WiMax interference source and a microwave interference source. As shown in fig. 4, the technical solution is as follows:
step S401, when detecting that the wireless network connection event is triggered, determining a wireless interference source of the environment where the terminal device is currently located.
The wireless interference source comprises at least one of a Bluetooth interference source, a ZigBee interference source, a WiMax interference source and a microwave interference source. In one embodiment, when a wireless network connection event is detected to be triggered, the Bluetooth device currently connected with the terminal device is determined, or a stored record table is inquired to determine whether other wireless network interference sources exist (such as ZigBee interference sources are recorded).
Step S402, determining signal intensity adjustment values of different channels corresponding to the wireless interference source, and adjusting the routing strategy in the wireless network connection event according to the signal intensity adjustment values.
In one embodiment, after the interference source is determined, a preset signal strength adjustment value list of different channels corresponding to different interference sources is queried according to different interference source types, and a signal strength adjustment value of the current interference source in each channel is determined. The manner of adjusting the routing policy in the wireless network connection event according to the signal strength adjustment value may refer to step S102, which is not described herein again.
And S403, selecting a router for wireless network connection according to the adjusted routing strategy.
Therefore, when the terminal equipment selects the wireless routing network for connection, the external wireless interference source is comprehensively considered, the influence of the external wireless interference source on wireless network transmission is considered, the optimal routing is further selected for network connection, and the data transmission efficiency and the transmission stability are improved.
Fig. 5 is a flowchart of another wireless network connection method provided in the embodiment of the present application, and optionally, after the selecting a router according to the adjusted routing policy to perform wireless network connection, the method further includes: and if the change of the interference scene of the terminal equipment is detected, adjusting the routing strategy according to the changed interference scene, and re-determining the connected router and performing network connection when the terminal equipment is in a network idle state. As shown in fig. 5, the technical solution is as follows:
step S501, when detecting that a wireless network connection event is triggered, determining a current interference scene of the terminal equipment.
Step S502, determining signal intensity adjustment values of different channels corresponding to the interference scene.
Step S503, adjusting the routing strategy in the wireless network connection event according to the signal intensity adjustment value.
And step S504, selecting a router for wireless network connection according to the adjusted routing strategy.
And step S505, monitoring an interference source transmitted by the wireless network of the terminal equipment.
Illustratively, the data transceiving state of each frequency band is monitored through a wireless transceiving device (module) integrated with the terminal device.
And step S506, judging whether the interference scene of the terminal equipment is changed, if so, executing step S507, otherwise, continuing to monitor.
And step S507, adjusting the routing strategy according to the changed interference scene, and re-determining the connected router and performing network connection when the terminal equipment is in a network idle state.
When the interference scene of the terminal equipment is monitored to be changed (an interference source is newly added or reduced), the interference scene of the terminal equipment is redetermined to adjust the routing strategy, and in one embodiment, when the terminal equipment is in a network idle state, the router connected with the terminal equipment is redetermined according to the updated routing strategy and network connection is carried out.
Therefore, the route selection strategy is monitored and changed in real time on the interference scene of the terminal equipment, the scheme is further perfected, and the situation that the route selection strategy cannot be adaptively adjusted due to the change of an interference source so as to connect the router with lower data transmission rate is avoided.
Fig. 6 is a block diagram of a wireless network connection device according to an embodiment of the present application, where the wireless network connection device is configured to execute the wireless network connection method according to the embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 6, the apparatus specifically includes: an interference determination module 101, a signal strength determination module 102, a routing setup module 103, and a route connection module 104, wherein,
the interference determining module 101 is configured to determine a current interference scenario of the terminal device when detecting that the wireless network connection event is triggered.
Exemplarily, taking an Android operating system as an example, when it is detected that a connect () method of WifiManager is called, a current interference scenario of the terminal device is determined. The interference scenario is a scenario that interference is generated to wireless network data transmission, and may be an interference scenario generated by an internal interference source of the terminal device, or an interference scenario generated by an external interference source of the terminal device. For example, the interference scenario corresponding to the internal interference source may be data transmission interference of a 4G network, and the interference scenario corresponding to the external interference source may be interference corresponding to other wireless network devices such as a bluetooth device (e.g., a bluetooth headset). In an embodiment, the determining of the current interference scenario of the terminal device may be determining the current interference scenario of the terminal device in real time when it is detected that the wireless network connection event is triggered, or acquiring the interference scenario recorded by the terminal device as the interference scenario of the current terminal device.
A signal strength determining module 102, configured to determine signal strength adjustment values of different channels corresponding to the interference scenario; and the routing setting module 103 is configured to adjust a routing policy in the wireless network connection event according to the signal strength adjustment value.
The channel (also called frequency band) is a data signal transmission channel using wireless signals as transmission media, for example, the commonly used ieee802.11b/g works in the frequency band of 2.4 to 2.4835GHz, and these frequency bands are divided into 11 or 13 channels. Where different interference scenarios have different degrees of impact on different channels, the specific degree of impact may be determined by testing, which may be, for example, taking the LTEB 40 interference scenario as an example, the interference to different WiFi channels is tested, wherein, LTE (Long Term Evolution) is The Long Term Evolution of UMTS (Universal Mobile Telecommunications System) technical standard organized by 3GPP (The 3rd Generation Partnership Project), B40, i.e. band 40, refers to The operating frequency band (2300 + 2400Mhz), currently, LTE can support 40 operating bands from B1 to B40, and different operating bands generate different interference situations for different WiFi channels, WiFi channels at 2.4GHz according to international standard are divided into 13 channels (spanning frequency 2412 to frequency 2472), the interference of LTE B40 on the WiFi 1 channel is 4db as obtained through the test.
In one embodiment, wireless network data transmission of different channels is tested in advance under different interference scenarios, signal strength interference of the different interference scenarios on the different channels is determined, corresponding signal strength adjustment values are set and recorded, wherein the signal strength adjustment values serve as a basis for selecting a router in a subsequent wireless network connection process, the signal strength adjustment values of the different channels corresponding to the different interference scenarios can be recorded and stored in a terminal device in a table form, and after a wireless network connection event is triggered to determine an interference scenario of a current terminal device, the signal strength adjustment values of the interference scenario on the different channels are determined according to the recorded table. For example, the specific test procedure may be: respectively testing the signal strength of each channel under the interference and non-interference conditions to determine the influence of an interference scene on the signal strength of different channels, and further setting corresponding signal strength adjustment values, wherein the stronger the interference, the larger the corresponding signal strength adjustment value, the smaller the interference, and the smaller the corresponding signal strength adjustment value, for example, when the interference strength is 4db, the corresponding signal strength adjustment value is 10db, and when the interference strength is 0.2db, the signal strength adjustment value is-5 db.
The terminal device scans different Wifi channels in the wireless network connection process to obtain routers for connection, selects the router with the strongest scanned signal strength for connection, or connects the stored optimal router, and does not consider the situation that the terminal device generates interference on wireless network data in an interference scene. For example, the terminal device scans a router a with a signal intensity of a on a WiFi 1 channel, scans a router B with a signal intensity of 0.9a on a WiFi 4 channel, and connects with the router a according to an inherent routing policy, but if the terminal device generates a large amount of interference on data transmission of the WiFi 1 channel in an interference scene (e.g., an LTE B40 scene), the data transmission efficiency of the terminal device is significantly reduced, and the interference of the scene on the WiFi 4 channel is small, so that in an actual use process, the data transmission efficiency of the terminal device connected with the router B is higher, and the stability is stronger. In this step, the signal strength adjustment values of different channels corresponding to the interference scenario are determined, and the routing policy in the wireless network connection event is adjusted according to the signal strength adjustment values, for example, if the adjustment value of the WiFi 1 channel is 10db, the routing policy is correspondingly adjusted such that the signal strength of the WiFi 1 channel is higher than the signal strength of other channels by 10db for connection, so as to ensure that even if the LTE B40 is in a channel transmission state, the data transmission efficiency and stability of the WiFi 1 channel are better than those of other channels, and if the signal strength of the WiFi 1 channel is not higher than the signal strength of other channels by more than 10db, the routing of other channels is selected for connection.
In one embodiment, the adjustment of the routing policy may be to override the original router selection mode or to jump to a new set router selection mode. Taking an Android operating system as an example, saving router parameter information (including signal strength of a fixed channel scanned to a router) transmitted by a connect () method into a wificfigstore object, updating Priority attributes of the wificfigstore and config through a wificfigstore:: selectNetwork () function, and updating into a wpa _ s configuration file, in this step, when updating the Priority attributes, iterating the determined signal strength values of different channels into a set method function, and adjusting an original routing strategy by introducing signal strength adjustment value parameters of the different channels, optionally, the strategy adjustment is as follows: when updating the optimal router, if the signal intensity of the router scanned by the current channel minus the signal intensity adjustment value is greater than the recorded signal intensity of the optimal router, setting the currently scanned router as the optimal router, and continuing to scan the next channel.
And a route connection module 104, configured to select a router according to the adjusted routing policy to perform wireless network connection.
In one embodiment, selecting a router for wireless network connection according to the adjusted routing policy comprises: and selecting the connected router for network connection according to the signal intensity adjustment values of the different channels and the signal intensity value of the scanned router in the fixed channel. For example, the interference scenario determined in step S101 is an LTE B40 scenario, the signal strength adjustment values in corresponding Wifi channels 1 to 13 are 10db, 2db, -5db, -8db, 7db, -9db, 3db, 4db, -4db, 5db, and 8db in sequence, it is assumed that there are 3 routers that can be connected to the current terminal device, which are respectively a router a, a router B, and a router c, default channels set by the routers are 1, 4, and 11 in sequence, when the terminal device performs wireless network connection, the signal strength scanned to channel 1 is 32db, the signal strength scanned to channel 4 is 30db, the signal strength scanned to channel 11 is 12db, and a router B is selected according to the routing policy adjusted in step S102 to perform network connection.
In another embodiment, the channels used by the router may also be set according to the signal strength adjustment values of different channels and network connection may be performed. For example, the signal strength adjustment values of Wifi channels 1 to 13 corresponding to the interference scenario 1 are 10db, 2db, -5db, -8db, 7db, -9db, 3db, 4db, -4db, 5db, and 8db in sequence, where the default channel of the router that can be connected is channel 1, the channel with the smallest interference scenario influence (the signal strength adjustment value is the smallest) is determined according to the signal strength adjustment values of channels 1 to 13, the router signal is set to the channel (e.g., channel 8 in this example), and network connection is performed with the router whose channel is set.
According to the above, after the network connection event is triggered, the current interference scenario of the terminal device is determined, and the routing strategy is adjusted in a targeted manner to ensure that the data transmission of the router connected in the interference scenario is more efficient and stable.
In a possible embodiment, before the determining the signal strength adjustment value of the different channel corresponding to the interference scenario, the method further includes:
and testing wireless network data transmission of different channels in different interference scenes, and determining corresponding signal intensity adjustment values according to the test results.
In a possible embodiment, the interference determination module 101 is specifically configured to:
determining a channel transmitting frequency band used by the terminal equipment;
correspondingly, the determining the signal strength adjustment values of the different channels corresponding to the interference scenario includes:
and determining signal intensity adjustment values of different channels corresponding to the channel transmitting frequency bands.
In one possible embodiment, the interference determination module 101 is further configured to:
determining the data transmission amount of the terminal equipment in the channel transmission frequency band within a preset time before determining the signal intensity adjustment values of different channels corresponding to the channel transmission frequency band;
the signal strength determination module 102 is specifically configured to:
and determining the signal intensity adjustment values of corresponding different channels according to the channel transmitting frequency band and the data transmitting quantity.
In a possible embodiment, the interference determination module 101 is specifically configured to:
determining a wireless interference source of the current environment of the terminal equipment;
correspondingly, the signal strength determining module 102 is specifically configured to:
and determining signal strength adjustment values of different channels corresponding to the wireless interference source, wherein the wireless interference source comprises at least one of a Bluetooth interference source, a ZigBee interference source, a WiMax interference source and a microwave interference source.
In a possible embodiment, the route connection module 104 is specifically configured to:
and selecting the connected router for network connection according to the signal intensity adjustment values of the different channels and the signal intensity value of the scanned router in the fixed channel.
In a possible embodiment, the apparatus further comprises an updating module 105 configured to:
after the router is selected according to the adjusted routing strategy to carry out wireless network connection, if the change of the interference scene of the terminal equipment is detected, the routing strategy is adjusted according to the changed interference scene, and when the terminal equipment is in a network idle state, the router connected is determined again and network connection is carried out.
In this embodiment, a terminal device is provided on the basis of the foregoing embodiments, and fig. 7 is a schematic structural diagram of a terminal device provided in an embodiment of the present application, and as shown in fig. 7, the terminal device 200 includes: memory 201, processor (CPU) 202, peripheral interfaces 203, RF (Radio Frequency) circuitry 205, audio circuitry 206, speaker 211, power management chip 208, input/output (I/O) subsystem 209, touch screen 212, Wifi module 213, other input/control devices 210, and external port 204, which communicate via one or more communication buses or signal lines 207.
It should be understood that the illustrated terminal device 200 is only one example of a terminal device, and that the terminal device 200 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail a terminal device for rights management of multi-open applications provided in this embodiment, where the terminal device is a smart phone as an example.
A memory 201, the memory 201 being accessible by the CPU202, the peripheral interface 203, and the like, the memory 201 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 203, said peripheral interface 203 may connect input and output peripherals of the device to the CPU202 and the memory 201.
An I/O subsystem 209, the I/O subsystem 209 may connect input and output peripherals on the device, such as a touch screen 212 and other input/control devices 210, to the peripheral interface 203. The I/O subsystem 209 may include a display controller 2091 and one or more input controllers 2092 for controlling the other input/control devices 210. Where one or more input controllers 2092 receive electrical signals from or transmit electrical signals to other input/control devices 210, the other input/control devices 210 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 2092 may be coupled to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 212, the touch screen 212 being an input interface and an output interface between the user terminal and the user, displaying visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 2091 within the I/O subsystem 209 receives electrical signals from the touch screen 212 or transmits electrical signals to the touch screen 212. The touch screen 212 detects a contact on the touch screen, and the display controller 2091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 212, i.e., implements a human-machine interaction, and the user interface object displayed on the touch screen 212 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 205 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, the RF circuitry 205 receives and transmits RF signals, also referred to as electromagnetic signals, through which the RF circuitry 205 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. RF circuitry 205 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 206 is mainly used to receive audio data from the peripheral interface 203, convert the audio data into an electric signal, and transmit the electric signal to the speaker 211.
And a speaker 211 for reproducing the voice signal received by the handset from the wireless network through the RF circuit 205 into sound and playing the sound to the user.
And the power management chip 208 is used for supplying power and managing power to the hardware connected with the CPU202, the I/O subsystem and the peripheral interface.
The wireless network connection device of the terminal device and the terminal device provided in the above embodiments may execute the wireless network connection method of the terminal device provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. For details of the wireless network connection method of the terminal device, reference may be made to the embodiments of the present invention.
Embodiments of the present application further provide a storage medium containing terminal device-executable instructions, which when executed by a terminal device processor, are configured to perform a wireless network connection method, where the method includes:
when detecting that a wireless network connection event is triggered, determining a current interference scene of terminal equipment;
determining signal intensity adjustment values of different channels corresponding to the interference scene, and adjusting a routing strategy in the wireless network connection event according to the signal intensity adjustment values;
and selecting a router for wireless network connection according to the adjusted routing strategy.
In a possible embodiment, before the determining the signal strength adjustment value of the different channel corresponding to the interference scenario, the method further includes:
and testing wireless network data transmission of different channels in different interference scenes, and determining corresponding signal intensity adjustment values according to the test results.
In a possible embodiment, the determining the current interference scenario of the terminal device includes:
determining a channel transmitting frequency band used by the terminal equipment;
correspondingly, the determining the signal strength adjustment values of the different channels corresponding to the interference scenario includes:
and determining signal intensity adjustment values of different channels corresponding to the channel transmitting frequency bands.
In a possible embodiment, before the determining the signal strength adjustment value of the different channel corresponding to the channel transmission frequency band, the method further includes:
determining the data transmission quantity of the terminal equipment in the channel transmission frequency band within a preset time;
correspondingly, the determining the signal strength adjustment values of different channels corresponding to the channel transmission frequency bands includes:
and determining the signal intensity adjustment values of corresponding different channels according to the channel transmitting frequency band and the data transmitting quantity.
In a possible embodiment, the determining the current interference scenario of the terminal device includes:
determining a wireless interference source of the current environment of the terminal equipment;
correspondingly, the determining the signal strength adjustment values of the different channels corresponding to the interference scenario includes:
and determining signal strength adjustment values of different channels corresponding to the wireless interference source, wherein the wireless interference source comprises at least one of a Bluetooth interference source, a ZigBee interference source, a WiMax interference source and a microwave interference source.
In a possible embodiment, the selecting a router for wireless network connection according to the adjusted routing policy includes:
and selecting the connected router for network connection according to the signal intensity adjustment values of the different channels and the signal intensity value of the scanned router in the fixed channel.
In a possible embodiment, after the selecting a router for wireless network connection according to the adjusted routing policy, the method further includes:
and if the change of the interference scene of the terminal equipment is detected, adjusting the routing strategy according to the changed interference scene, and re-determining the connected router and performing network connection when the terminal equipment is in a network idle state.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems connected by a wireless network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the wireless network connection method described above, and may also perform related operations in the wireless network connection method provided in any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (9)
1. A wireless network connection method, comprising:
when detecting that a wireless network connection event is triggered, determining a current interference scene of terminal equipment;
determining signal intensity adjustment values of different channels corresponding to the interference scene, and adjusting a routing strategy in the wireless network connection event according to the signal intensity adjustment values;
selecting a router for wireless network connection according to the adjusted routing strategy;
the determining the current interference scene of the terminal device includes:
determining a channel transmitting frequency band used by the terminal equipment;
correspondingly, the determining the signal strength adjustment values of the different channels corresponding to the interference scenario includes:
determining signal intensity adjustment values of different channels corresponding to the channel transmitting frequency bands;
the adjusting the routing strategy in the wireless network connection event according to the signal intensity adjusting value comprises the following steps: if the difference value between the signal intensity of the router scanned by the current channel and the signal intensity of the router scanned by other channels is larger than the signal intensity adjustment value of the current channel, adjusting the routing strategy to select the router scanned by the current channel for connection;
or if the signal intensity of the router scanned by the current channel minus the signal intensity adjustment value of the current channel is greater than the recorded signal intensity of the optimal router, setting the currently scanned router as the optimal router, continuing to scan the next channel, and adjusting the routing strategy to select the optimal router for connection.
2. The method of claim 1, wherein prior to determining the signal strength adjustment value for the different channel corresponding to the interference scenario, further comprising:
and testing wireless network data transmission of different channels in different interference scenes, and determining corresponding signal intensity adjustment values according to the test results.
3. The method of claim 1, further comprising, prior to said determining signal strength adjustment values for different channels corresponding to said channel transmission frequency bands:
determining the data transmission quantity of the terminal equipment in the channel transmission frequency band within a preset time;
correspondingly, the determining the signal strength adjustment values of different channels corresponding to the channel transmission frequency bands includes:
and determining the signal intensity adjustment values of corresponding different channels according to the channel transmitting frequency band and the data transmitting quantity.
4. The method of claim 1, wherein the determining the current interference scenario of the terminal device comprises:
determining a wireless interference source of the current environment of the terminal equipment;
correspondingly, the determining the signal strength adjustment values of the different channels corresponding to the interference scenario includes:
and determining signal strength adjustment values of different channels corresponding to the wireless interference source, wherein the wireless interference source comprises at least one of a Bluetooth interference source, a ZigBee interference source, a WiMax interference source and a microwave interference source.
5. The method according to any of claims 1-4, wherein selecting a router for wireless network connection according to the adjusted routing policy comprises:
and selecting the connected router for network connection according to the signal intensity adjustment values of the different channels and the signal intensity value of the scanned router in the fixed channel.
6. The method of claim 5, further comprising, after the selecting a router for wireless network connection according to the adjusted routing policy:
and if the change of the interference scene of the terminal equipment is detected, adjusting the routing strategy according to the changed interference scene, and re-determining the connected router and performing network connection when the terminal equipment is in a network idle state.
7. A wireless networking apparatus, comprising:
the interference determining module is used for determining the current interference scene of the terminal equipment when detecting that the wireless network connection event is triggered;
the signal strength determining module is used for determining signal strength adjusting values of different channels corresponding to the interference scene;
the routing setting module is used for adjusting a routing strategy in the wireless network connection event according to the signal intensity adjusting value;
the route connection module is used for selecting a router to carry out wireless network connection according to the adjusted route selection strategy;
the interference determination module is specifically configured to determine a channel transmission frequency band used by the terminal device;
correspondingly, the signal strength determining module is specifically configured to determine signal strength adjustment values of different channels corresponding to the channel transmission frequency bands;
the routing setting module is used for adjusting the routing strategy to select the router scanned by the current channel for connection if the difference value between the signal intensity of the router scanned by the current channel and the signal intensity of the router scanned by other channels is greater than the signal intensity adjustment value of the current channel;
or if the signal intensity of the router scanned by the current channel minus the signal intensity adjustment value of the current channel is greater than the recorded signal intensity of the optimal router, setting the currently scanned router as the optimal router, continuing to scan the next channel, and adjusting the routing strategy to select the optimal router for connection.
8. A terminal device, comprising: processor, memory and computer program stored on the memory and executable on the processor, characterized in that the processor implements the wireless network connection method according to any of claims 1-6 when executing the computer program.
9. A storage medium storing terminal device-executable instructions, which when executed by a terminal device processor, are configured to perform the wireless network connection method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810098264.3A CN108055687B (en) | 2018-01-31 | 2018-01-31 | Wireless network connection method and device and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810098264.3A CN108055687B (en) | 2018-01-31 | 2018-01-31 | Wireless network connection method and device and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108055687A CN108055687A (en) | 2018-05-18 |
CN108055687B true CN108055687B (en) | 2020-01-14 |
Family
ID=62125252
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810098264.3A Active CN108055687B (en) | 2018-01-31 | 2018-01-31 | Wireless network connection method and device and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108055687B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108882380B (en) * | 2018-06-12 | 2023-06-16 | Oppo广东移动通信有限公司 | Wireless communication transmission method, device, mobile terminal and computer readable storage medium |
CN109218136B (en) * | 2018-09-30 | 2021-09-14 | 广州掌动智能科技有限公司 | WIFI connection performance test method and device, computer equipment and storage medium |
CN112153716B (en) * | 2019-09-24 | 2024-02-06 | 中兴通讯股份有限公司 | Transmission path selection method and device and storage medium |
CN111464247B (en) * | 2020-04-09 | 2022-01-07 | 长风信联科技有限公司 | Signal receiving adjustable system and method based on data communication |
CN111935277A (en) * | 2020-08-07 | 2020-11-13 | 上海汉枫电子科技有限公司 | Router connection method, router connection device, computer equipment and storage medium |
CN114697921B (en) * | 2020-12-30 | 2023-07-04 | 美的集团股份有限公司 | Method and device for connecting devices, electronic device and storage medium |
CN113938927B (en) * | 2021-10-12 | 2023-08-08 | 中国联合网络通信集团有限公司 | Wireless network optimization method, device, electronic equipment and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104244366B (en) * | 2014-09-17 | 2017-09-12 | 广东欧珀移动通信有限公司 | A kind of wireless network connecting method, device and mobile device |
CN106131898B (en) * | 2016-06-21 | 2018-07-27 | 广东欧珀移动通信有限公司 | A kind of method, device and mobile terminal of handover access access point |
US9743418B1 (en) * | 2016-06-30 | 2017-08-22 | Fortinet, Inc. | Automatic channel selection in wireless local area network (WLAN) controller based deployments using color graphs |
CN106332238B (en) * | 2016-08-19 | 2017-08-01 | 广东欧珀移动通信有限公司 | A kind of scanning wireless local area network (LAN) channels method, device and mobile terminal |
CN106413051A (en) * | 2016-09-21 | 2017-02-15 | 乐视控股(北京)有限公司 | WiFi connection method and system |
CN106658652B (en) * | 2016-12-07 | 2020-03-10 | Oppo广东移动通信有限公司 | Method and device for connecting WiFi hotspot |
-
2018
- 2018-01-31 CN CN201810098264.3A patent/CN108055687B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108055687A (en) | 2018-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108055687B (en) | Wireless network connection method and device and terminal equipment | |
CN109548075B (en) | Measurement report reporting method, device, storage medium and mobile terminal | |
US9066327B2 (en) | Low energy wireless proximity pairing | |
WO2019222954A1 (en) | Method for receiving signal and terminal device | |
CN107889092B (en) | Bluetooth device communication control method, device, terminal device and storage medium | |
CN107820723B (en) | Frequency selection method, random access method and device | |
US9369858B2 (en) | Wi-Fi P2P communication terminal device and communication method thereof | |
CN106230492B (en) | Terminal antenna switching method and device and mobile terminal | |
CN109450851B (en) | Device connection method, electronic device, and computer-readable medium | |
CN108093444B (en) | Wireless network transmission rate control method and device, terminal equipment and storage medium | |
WO2020098411A1 (en) | Electromagnetic interference control method and related apparatus | |
CN114007267A (en) | Channel adjusting method and electronic equipment | |
EP4274293A1 (en) | Wifi scan control method and related device | |
CN108307485B (en) | Wireless network scanning method and device, terminal equipment and storage medium | |
CN108337719B (en) | Wireless network scanning method and device, terminal equipment and storage medium | |
CN111642003A (en) | Radio frequency interference processing method, electronic device and storage medium | |
CN110856086A (en) | Method and device for controlling sound system and readable storage medium | |
CN108337715B (en) | Wireless network connection method, device, terminal equipment and storage medium | |
CN108832944B (en) | Power compensation method, device, terminal equipment and storage medium | |
CN108055706B (en) | Wireless network connection control method, device, storage medium and terminal equipment | |
CN108307447B (en) | Wireless network transmission control method, device, storage medium and terminal equipment | |
CN110213789B (en) | Bluetooth connection method, terminal device, Bluetooth device, and computer storage medium | |
CN108337718B (en) | Wireless network scanning method and device, terminal equipment and storage medium | |
CN108174452B (en) | Wireless network connection control method, device, storage medium and terminal equipment | |
CN112351461A (en) | WiFi network switching method, device, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after: OPPO Guangdong Mobile Communications Co., Ltd. Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant before: Guangdong OPPO Mobile Communications Co., Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |