CN110602738B - Network connection method and device and electronic device - Google Patents

Network connection method and device and electronic device Download PDF

Info

Publication number
CN110602738B
CN110602738B CN201810619538.9A CN201810619538A CN110602738B CN 110602738 B CN110602738 B CN 110602738B CN 201810619538 A CN201810619538 A CN 201810619538A CN 110602738 B CN110602738 B CN 110602738B
Authority
CN
China
Prior art keywords
wireless access
access points
access point
sequencing
channel
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
Application number
CN201810619538.9A
Other languages
Chinese (zh)
Other versions
CN110602738A (en
Inventor
俞义
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810619538.9A priority Critical patent/CN110602738B/en
Publication of CN110602738A publication Critical patent/CN110602738A/en
Application granted granted Critical
Publication of CN110602738B publication Critical patent/CN110602738B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0055Transmission or use of information for re-establishing the radio link
    • H04W36/0072Transmission or use of information for re-establishing the radio link of resource information of target access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/20Selecting an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application discloses a network connection method, a network connection device and an electronic device, and relates to the technical field of terminals. Wherein the method comprises the following steps: acquiring the signal intensity of each monitored wireless access point and the number of wireless access points of a channel; sequencing the wireless access points according to the signal strength and the number of the wireless access points; and connecting the wireless access points according to the sequencing result, so as to connect with the wireless access points with better network connection effect.

Description

Network connection method and device and electronic device
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a network connection method, a device, and an electronic device.
Background
Existing electronic devices may typically transmit network data over WiFi (Wireless Fidelity ). When the electronic device enters a new area or the WiFi network is disconnected and needs to be reconnected, each channel is scanned to find an access point suitable for connection. However, the wireless access point to which the electronic device is connected may not be a network-efficient access point.
Disclosure of Invention
In view of the above problems, the present application proposes a network connection method, a device and an electronic device, which connect to a line access point with good network effect according to the signal strength of the wireless access point and the number of wireless access points of a channel where the wireless access point is located.
In a first aspect, an embodiment of the present application provides a network connection method, where the method includes: acquiring the signal intensity of each monitored wireless access point and the number of wireless access points of a channel; sequencing the wireless access points according to the signal strength and the number of the wireless access points; and connecting the wireless access points according to the sequencing result.
In a second aspect, embodiments of the present application provide a network connection device, where the device includes: the monitoring module is used for acquiring the monitored signal intensity of each wireless access point and the number of the wireless access points of the channel; the ordering module is used for ordering the wireless access points according to the signal strength and the number of the wireless access points; and the connection module is used for connecting the wireless access points according to the sequencing result.
In a third aspect, an embodiment of the present application provides an electronic device including a WiFi module, a memory, and a processor, the WiFi module and the memory being coupled to the processor, the memory storing instructions that when executed by the processor perform the method described above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having program code executable by a processor, the program code causing the processor to perform the method described above. .
According to the network connection method, the network connection device and the electronic device, the connection is performed according to the signal intensity of the wireless access points and the number of the wireless access points of the channel, so that the wireless access points with the channel condition and the signal intensity are connected, and a good network effect is obtained.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a network connection method according to an embodiment of the present application;
FIG. 2 is another flow chart of a network connection method according to an embodiment of the present application;
FIG. 3 is a flowchart showing a portion of the steps of a network connection method according to an embodiment of the present application;
FIG. 4 is a flowchart showing another part of the steps of the network connection method according to the embodiment of the present application;
Fig. 5 is a flowchart illustrating a further part of steps of a network connection method according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating a network connection method according to an embodiment of the present application;
FIG. 7 is a functional block diagram of a network connection device according to an embodiment of the present application;
fig. 8 shows a block diagram of an electronic device according to an embodiment of the present application;
fig. 9 shows a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 10 shows a block diagram of an electronic device for performing a network connection method according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Electronic devices such as mobile phones and tablet computers are generally connected to a network through a WiFi network. The electronic device may make a WiFi connection when entering a new environment, or when returning to a certain WiFi coverage area that was previously left for a long period of time. When the electronic device is used for selecting the router for connection, the connection priority of the router is ordered according to the existing strategy, the connection is selected according to the ordering result, and the optimal route is selected for connection. For example, the electronic device records according to the condition that the electronic device is connected with a certain route, and the record is used as a subsequent connection reference. If the route has not been connected before, there is no data that can be referenced, and the connection can only be ordered according to signal strength, etc.
The inventor finds that if the wireless access points can be connected only according to the signal strength, the signal strength of the wireless access points can be strong, but the signal stability is poor, the channel is congested, and the like, so that the connection effect between the electronic device and the wireless access points is not ideal, and the user experience is poor. Therefore, the embodiment of the application provides a network connection method, which can comprehensively consider the signal strength of the wireless access point and the number of wireless access points of the channel where the wireless access point is located, connect the wireless access point with relatively good signal strength and signal stability, obtain good network connection effect and improve the experience of users.
The network connection method, device and electronic device provided in the embodiments of the present application will be described below with reference to the accompanying drawings and through specific embodiments.
First embodiment
Referring to fig. 1, a first embodiment of the present application provides a network connection method, which is applied to an electronic device, where the electronic device may be a wireless apparatus, and includes a WiFi module, and may connect to a wireless access point through the WiFi module, so as to access a network. The electronic device may be a device capable of WiFi connection, such as a mobile phone, a tablet computer, an intelligent wearable device, a reader, and the like, which is not limited in the embodiment of the present application.
In the method, the connected wireless access points can be determined according to the obtained signal strength and the number of the wireless access points of the channel. In a specific embodiment, the network connection method is applied to the network connection device shown in fig. 7 and the electronic device 500 (fig. 8 and 9) corresponding to the network connection device 400. The network connection method specifically includes the following steps:
step S110: and acquiring the monitored signal strength of each wireless access point and the number of the wireless access points of the channel.
The electronic device may scan each channel around to obtain wireless access point information of each channel, thereby obtaining related information of wireless access points existing around.
Typically, the wireless access point will send beacon frames in broadcast form at regular intervals to announce the presence of the wireless network. Accordingly, the electronic device may receive the beacon frames sent by the wireless access points, and obtain the signal strength of the corresponding wireless access point through the beacon frames sent by each wireless access point.
Of course, the manner in which the electronic device obtains the signal strength of the wireless access point is not limited herein, and other data packet analysis received from the wireless access point may be used to obtain the signal strength of the wireless access point.
In addition, if the signal strength of the wireless access point is high, but the channel where the wireless access point is located is congested, the network connection effect is poor, the connection is unstable, and the user experience is affected. Thus, the congestion situation of the channel on which the wireless access point is located can also be considered. Specifically, the number of wireless access points in the available channels can be obtained, so that the number of wireless access points in the channels used by each wireless access point is determined, and the channel congestion condition is measured through the number of wireless access points in the channel where the electronic device is located, and the number of wireless access points is used as one of the measurement standards for whether the wireless access points are connected.
Step S120: and sequencing the wireless access points according to the signal strength and the number of the wireless access points.
And sequencing the wireless access points according to the signal strength and the number of the wireless access points of the channel, comprehensively considering the signal strength and the channel congestion condition, and sequencing the wireless access points with the signal strength and the idle channel before and sequencing the wireless access points with the low signal strength or the congestion channel after.
Step S130: and connecting the wireless access points according to the sequencing result.
And selecting the wireless access point from the sequencing result to connect. For example, wireless access point connections are preferred in which the signal strength is higher and the number of wireless access points on the channel is lower; or, for example, preferentially selecting a wireless access point with a smaller number of wireless access points of the channel; or, for example, wireless access points in which the signal strength is higher are preferentially selected.
In the embodiment of the application, the wireless access points are ranked according to the signal intensity of the wireless access points and the number of the wireless access points of the channel, and are connected according to the ranking result, so that the signal intensity of the connected wireless access points is higher, the data transmission stability is better, a good network connection effect is obtained, and the user experience is improved.
The network connection method further comprises a specific signal strength acquisition mode and a specific ordering mode for comprehensively considering the signal strength and the number of wireless access points in the channel. As shown in fig. 2, the method includes:
step S210: and acquiring the monitored signal strength of each wireless access point.
Step S220: and acquiring the number of the monitored wireless access points of the channel where each wireless access point is located.
In the embodiment of the present application, the execution sequence between the step S210 and the step S220 is not limited, and the step S210 may be performed first, the step S220 may be performed first, or both steps may be performed simultaneously.
Optionally, in an embodiment of the present application, the electronic device may be in a wifi roaming network to perform the ordered connection of the wireless access points. Specifically, before the signal strength of each monitored wireless access point and the number of wireless access points of the channel where the signal strength is located are obtained, whether the signal strength is in the WiFi roaming network or not can be judged; if yes, the signal intensity of each monitored wireless access point and the number of the wireless access points of the channel are obtained.
The WIFI roaming network may be a plurality of wireless access points (for example, 10 wireless access points are called aaa) with the same WIFI name in the wireless network, such as an internal network of a company, a mall network, and the like, where the plurality of wireless access points with the same name correspond to a wireless local area network. The handset moves in these routing environments while seemingly always connecting to one router (the name of the wireless access point is unchanged), but in practice several routes have been switched.
Optionally, in the embodiment of the present application, if there are multiple access points with the same name in the wifi roaming network or the connected access points, during monitoring, the access points with the same name are monitored, so as to implement automatic switching of the wireless access points, and wireless access point switching that is not perceived by the user is achieved.
Step S230: and sequencing the wireless access points according to the signal strength and the number of the wireless access points.
And acquiring the number of the wireless access points according to the signal strength and the channel where the wireless access points are located, and comprehensively sequencing. Specifically, as shown in fig. 3, the sorting manner may be:
step S231: and distributing the ordering index to each wireless access point according to the signal intensity of each wireless access point and the number of the wireless access points of the channel.
When the signal strength of the wireless access points and the number of the wireless access points of the channel are comprehensively ordered, an ordering index can be allocated to each wireless access point, so that the order of each wireless access point is determined according to the ordering index under the condition of comprehensively considering the signal strength and the signal stability.
Specifically, the ranking index may be determined according to the ranking position of the wireless access point in the ranking sequence corresponding to the number of wireless access points and the ranking position of the wireless access point in the ranking sequence corresponding to the signal strength.
As one embodiment, as shown in fig. 4, obtaining the ranking index may include:
step S2311A: and sequencing the wireless access points from high to low according to the number of the wireless access points of the channel to obtain a first sequencing sequence. The fewer the number of wireless access points of the channels where the wireless access points are located, the higher the ordering in the first ordering sequence.
Step S2312A: and sequencing the wireless access points from high to low in signal strength to obtain a second sequencing sequence.
And sequencing the wireless access points according to the number of the wireless access points of the channel, and sequencing the signal intensity to obtain a first sequencing sequence corresponding to the signal stability and a second sequencing sequence corresponding to the average signal intensity. The fewer the number of wireless access points in the channel where the wireless access points are located, the higher the ranking in the first ranking sequence, for example, a wireless access points in channel 1, b wireless access points in channel 6, 10 wireless access points in channel 1, and 15 wireless access points in channel 6. Then in the first ranking sequence, the a wireless access points rank higher than the b wireless access points rank earlier. The higher the average signal strength, the earlier the ranking of the wireless access points in the second ranking sequence.
The sequence between step S2311A and step S2312A is not limited.
Step S2313A: and allocating indexes for each wireless access point in the first sequencing sequence according to a preset index rule as the first indexes of each wireless access point, wherein the preset index rule comprises indexes respectively corresponding to different sequencing positions in the first sequencing sequence.
The preset index rule may be that an index is determined according to the number of wireless access points to be sequenced and the positions of each wireless access point in the first sequencing sequence, and the index is used as a first index of the corresponding wireless access point. For example, five wireless access points correspond to rank positions one to five in the first rank order, an allocation index 5 for rank position 1, an allocation index 4 for rank position 2, an allocation index 3 for rank position 3, and so on. Of course, the index value corresponding to a specific ordering location is not limited in the embodiment of the present application.
Step S2314A: and allocating indexes for each wireless access point in the second ordering sequence as the second indexes of each wireless access point according to a preset index rule, wherein the preset index rule comprises indexes respectively corresponding to different ordering positions in the second ordering sequence.
In the second ranking sequence, the index may also be determined according to the number of wireless access points performing ranking and the positions of the wireless access points in the first ranking sequence, and the specific determining manner may refer to the manner of determining the index in the first ranking sequence.
Of course, the index determined at each position in the second ranking sequence may not be the same as the index determined at the same position in the first ranking sequence, e.g., five wireless access points may correspond to ranking positions one to five in the first ranking sequence, an allocation index 4 for ranking position 1, an allocation index 4 for ranking position 2, etc.
In addition, depending on whether the comprehensive ranking results are more biased towards channel congestion conditions or signal strength, a greater index may be assigned to the more biased parameters. For example, if a connected wireless access point needs to connect to a wireless access point in a more idle channel, and the wireless access point corresponds to a position in the second ordered sequence, a higher index is allocated to the first ordered sequence. For example, the five wireless access points are respectively ranked in a first ranking sequence according to the number of the wireless access points of the channel, ranked in a second ranking sequence according to the signal strength, a first index 8 is allocated to the wireless access points with ranking positions 1 in the first ranking sequence, and a second index specific gravity allocated to the wireless access points with ranking positions 1 in the second ranking sequence is smaller than 8, for example, 5.
The sequence between step S2313A and step S2314A is not limited.
Step S2315A: and acquiring the ordering index of each wireless access point according to the first index and the second index of each wireless access point.
And for each wireless access point, integrating the first index and the second index to obtain the ordering index. For example, a value obtained by adding the first index and the second index of each wireless access point is used as the ranking index of the wireless access point. Of course, the manner in which the first index and the second index are obtained is not limited to this.
As an embodiment, the ranking index may be allocated to each wireless access point according to the signal strength of each wireless access point and the number of wireless access points of the channel where the wireless access point is located, or an initial score may be preset, and then the adjustment is performed with respect to the initial score according to the signal strength or the number of wireless access points of the channel where the wireless access point is located. Specifically, an initial score value and a score reduction table may be prestored, where the score reduction table includes a score reduction value corresponding to the signal strength and a score reduction value corresponding to the number of wireless access points. In the score reduction table, the initial score value and the score reduction value may be a score, and one signal strength interval corresponds to one score reduction value, and one wireless access point number interval corresponds to one score reduction value. In addition, the lower the signal strength, the higher the corresponding average reduction, and the greater the number of wireless access points in the channel, the higher the corresponding average reduction.
In this embodiment, as shown in fig. 5, it may include:
step S2311B: and for each monitored wireless access point, searching a scoring subtracted value corresponding to the signal strength of the wireless access point and a scoring subtracted value corresponding to the number of wireless access points of a channel according to the scoring subtracted value table.
Step S2312B: and subtracting the obtained score minus value from the initial score as a ranking index of the wireless access point.
Subtracting the score minus value corresponding to each wireless access point from the initial score value of each wireless access point, and taking the finally obtained data as the ranking index of the wireless access point. For example, default to an initial score of 100, the number of wireless access points in the score reduction table is x1 to x2, and the score reduction is 5; the signal intensities were y1 to y2, and the score was subtracted by 8. Then for a wireless access point, if the number of wireless access points on the channel is between x1 and x2 and the received signal strength is between y1 and y2, the ranking index is subtracted by 100 by 5 and then by 8.
Of course, in the embodiment of the present application, the ranking index may also be obtained by other manners, such as setting a scoring value corresponding to different wireless access points, setting a scoring value corresponding to different signal strengths, and adding the corresponding scoring value to the initial scoring value.
Step S232: and ordering the wireless access points from high to low according to the ordering index of the wireless access points.
And ordering the wireless access points according to the size of the ordering index. If the wireless access points with the same ranking indexes exist, determining ranking sequence according to the biased parameters. For example, if a connected wireless access point needs to have a more stable signal, among two wireless access points with the same ranking index, the ranking of the wireless access points with a smaller number of wireless access points in the channel is higher.
In this embodiment of the present invention, the manner of ranking may be other, for example, a functional relationship between the ranking position of the comprehensive ranking and the position in the first ranking sequence and the position in the second ranking sequence is preset through a functional form, and the ranking positions of the comprehensive consideration signal stability and the signal strength to the mobile wireless access points are obtained according to the functional relationship and the position of each wireless access point in the first ranking sequence and the position in the second ranking sequence that are actually determined.
Step S240: and connecting the wireless access points according to the sequencing result.
And connecting the wireless access points by taking the ordering result as a connection basis.
As an embodiment, when connecting, the wireless access point in the ranking result can try to connect from high to low. If the connection with the wireless access point which is currently tried to be connected is successful, stopping the connection attempt; if the connection with the wireless access point which is tried to be connected at present is unsuccessful, the next wireless access point in the connection sequencing result can be connected to the wireless access point which has high signal stability and high signal strength in terms of integration as soon as possible.
As an implementation manner, the wireless access point in the ranking result from high to low may attempt to connect, if the connection with the wireless access point that is currently attempting to connect is successful, it may be determined whether the data transmission quality between the wireless access point and the wireless access point, such as retransmission rate, error rate, etc., satisfies a preset condition, and if so, the connection attempt is stopped; if not, the next wireless access point in the sequencing result is tried to be connected.
In the embodiment of the application, the wireless access points are comprehensively sequenced according to the number of the wireless access points and the signal intensity of the channel, and the wireless access point connection is selected from the sequencing result, so that the wireless access points with both signal stability and signal intensity are connected, and a good network connection effect is obtained.
In this embodiment of the present application, the parameter for ordering may not only be limited to the signal strength of the wireless access point and the number of wireless access points of the channel where the wireless access point is located, but also include other parameters, such as signal stability, frequency bands of the wireless access point, where the frequency bands are respectively 2.4G or 5G, and the like. For example, as shown in fig. 6, in the method provided in the embodiment of the present application, the method may include:
step S310: and acquiring the monitored signal strength of each wireless access point and the number of the wireless access points of the channel.
Step S320: and acquiring the monitored frequency bands of the wireless access points.
When the frequency bands of the wireless access points are different, the signal strength is different and the interference is different. For example, the 5G frequency band has high frequency and small interference relative to the 2.4G frequency band.
Step S330: and sequencing the wireless access points according to the signal strength, the number of the wireless access points and the frequency band.
The signal intensity, the frequency band and the number of the wireless access points of the channel are comprehensively considered for sequencing.
Specifically, the ranking indexes may be allocated to the wireless access points according to the signal strength of each wireless access point, the number of wireless access points on the channel, and the frequency band of the wireless access points.
In one embodiment, the wireless access points may be ranked from high to low according to the number of wireless access points of the channel to obtain a first ranking sequence; sequencing the wireless access points from high to low in signal intensity to obtain a second sequencing sequence; and sequencing different frequency bands of each wireless access point to obtain a third sequencing sequence. If two or more wireless access points are the same in the channel, the number of wireless access points in the channel is the same, and the wireless access points can be arranged in the same position in the second ordering sequence, i.e. the ordering positions are the same. If the frequency bands of two or more wireless access points are the same, they may be ranked in the same position in the third ranking sequence.
Allocating indexes for each wireless access point in the first sequencing sequence according to a preset index rule, and taking the indexes as first indexes of each wireless access point; according to a preset index rule, assigning indexes to each wireless access point in the second ordering sequence as second indexes of each wireless access point; and allocating indexes for each wireless access point in the third ordering sequence as the third indexes of each wireless access point according to a preset index rule, wherein the preset index rule comprises indexes respectively corresponding to different ordering positions in the third ordering sequence.
And acquiring the ordering index of each wireless access point according to the first index, the second index and the third index of each wireless access point.
In this embodiment, the process of how to obtain the ranking index may be referred to the foregoing, and will not be described herein.
In addition, as an embodiment, the score reduction value table may further include a score reduction value corresponding to the frequency band, for example, a score of 10 is subtracted from the initial score value corresponding to 2.4G, and a score of 5 is subtracted from the initial score value corresponding to 5G. For each monitored wireless access point, searching a scoring value corresponding to the signal strength of the wireless access point, a scoring value corresponding to the number of wireless access points of a channel and a scoring value corresponding to a frequency band according to the scoring value table; and subtracting the obtained score minus value from the initial score value to obtain a value serving as a ranking index of the wireless access point.
Of course, the above embodiment is not limited to the manner of ordering the wireless access points in the embodiment of the present application, and the wireless access points with better integrated signal quality may be ordered higher by characterizing the quality of the signal of the wireless access points in other manners.
Step S340: and connecting the wireless access points according to the sequencing result.
In the embodiment of the application, the wireless access points can be ordered according to various parameters of the wireless access points, such as signal strength, the number of the wireless access points of the channel, the frequency bands of the wireless access points and the like, so that an ordering sequence which has more objective ordering results and can more represent the signal quality of the wireless access points is obtained. And connecting the wireless access points according to the sequencing result to obtain a better network connection effect. The signal strength, the number of wireless access points in the channel, the frequency band of the wireless access points and the like belong to a part of the wireless environment and are influenced by other factors in the wireless environment.
The embodiment of the application also provides a network connection device 400. Referring to fig. 7, the apparatus 400 includes: the monitoring module 410 is configured to obtain the monitored signal strength of each wireless access point and the number of wireless access points of the channel. The ranking module 420 is configured to rank each wireless access point according to the signal strength and the number of wireless access points. And the connection module 430 is configured to connect the wireless access points according to the sorting result.
Optionally, the ranking module 420 may include an index allocation unit, configured to allocate ranking indexes to the wireless access points according to signal strengths of the wireless access points and the number of wireless access points on the channel; and the ordering unit is used for ordering the wireless access points from high to low according to the ordering index of the wireless access points.
Optionally, the index allocation unit may be configured to perform ranking from high to low on each wireless access point according to the number of wireless access points of the channel where the wireless access point is located, so as to obtain a first ranking sequence, where the fewer the number of wireless access points of the channel where the wireless access point is located, the higher the ranking in the first ranking sequence; sequencing the wireless access points from high to low in signal intensity to obtain a second sequencing sequence; according to a preset index rule, indexes are distributed to each wireless access point in the first sequencing sequence and used as the first indexes of each wireless access point, wherein the preset index rule comprises indexes respectively corresponding to different sequencing positions in the first sequencing sequence; allocating indexes for each wireless access point in a second ordering sequence as second indexes of each wireless access point according to a preset index rule, wherein the preset index rule comprises indexes respectively corresponding to different ordering positions in the second ordering sequence; and acquiring the ordering index of each wireless access point according to the first index and the second index of each wireless access point.
Optionally, the electronic device may pre-store an initial score value and a score reduction table, where the score reduction table includes a score reduction value corresponding to the signal strength and a score reduction value corresponding to the number of wireless access points. The index allocation unit may be configured to, for each monitored wireless access point, search, according to the score value table, a score value corresponding to the signal strength of the wireless access point, and a score value corresponding to the number of wireless access points of the channel where the score value is located; and subtracting the obtained score minus value from the initial score as a ranking index of the wireless access point.
Optionally, the method further comprises a frequency band acquisition module, which is used for acquiring the monitored frequency band of each wireless access point. The ranking module 420 may be configured to rank the wireless access points according to the signal strength, the number of wireless access points, and the frequency band.
Alternatively, the connection module 430 may be configured to attempt connection from high to low with the wireless access point in the ranking result; if the connection with the wireless access point which is currently tried to be connected is successful, stopping the connection attempt; if the connection with the wireless access point which is tried to be connected currently is unsuccessful, the next wireless access point in the sequencing result is connected.
Optionally, the embodiment of the application may further include a judging module, configured to judge whether the WiFi roaming network is located; if the determination result is yes, the monitor module 410 may be configured to obtain the signal strength of each monitored wireless access point.
Referring to fig. 8 again, based on the network connection method and apparatus described above, an electronic device 500 is further provided in the embodiment of the present application. As shown in fig. 8, the electronic device 500 includes a WiFi module 501, a memory 104, and a processor 102, the WiFi module 501 and the memory 104 are coupled to the processor 102, the WiFi module 501 is configured to transmit data through a network, the memory 104 stores instructions, and the processor 102 performs the above method when the instructions are executed by the processor 102.
Specifically, as shown in fig. 9, a mobile phone is described as an electronic device. The electronic device 500 may include an electronic body 10, where the electronic body 10 includes a housing 12 and a display 120 disposed on the housing 12. The housing 12 may be made of metal, such as steel, aluminum alloy. In this embodiment, the display screen 120 generally includes a display panel 111, and may also include a circuit for performing a touch operation on the display panel 111 in response to the touch operation. The display panel 111 may be a liquid crystal display panel (Liquid Crystal Display, LCD), and in some embodiments, the display panel 111 is also a touch screen 109.
Referring to fig. 10, in an actual application scenario, the electronic device 500 may be used as a smart phone terminal, where the electronic body 10 generally further includes one or more (only one is shown in the figure) processors 102, a memory 104, an RF (Radio Frequency) module 106, an audio circuit 110, a sensor 114, an input module 118, a power module 122, a WiFi module 501, and so on. It will be appreciated by those skilled in the art that the structure shown in fig. 10 is merely illustrative, and is not limiting of the structure of the electronic body 10. For example, the electronic body part 10 may further include more or less components than those shown in fig. 10, or have a different correspondence from that shown in fig. 10.
Those of ordinary skill in the art will appreciate that all other components are peripherals with respect to the processor 102, and that the processor 102 is coupled to these peripherals via a plurality of peripheral interfaces 124. The peripheral interface 124 may be implemented based on the following criteria: a universal asynchronous receiver/Transmitter (Universal Asynchronous Receiver/Transmitter, UART), a universal input/output (General Purpose Input Output, GPIO), a serial peripheral interface (Serial Peripheral Interface, SPI), an Inter-integrated circuit (Inter-Integrated Circuit, I2C), but is not limited to the above standards. In some examples, the peripheral interface 124 may include only a bus; in other examples, the peripheral interface 124 may also include other elements, such as one or more controllers, for example a display controller for interfacing with the display panel 111 or a memory controller for interfacing with a memory. These controllers may also be separate from the peripheral interface 124 and integrated within the processor 102 or a corresponding peripheral.
The memory 104 may be used to store software programs and modules, and the processor 102 may execute various functional applications and data processing by executing the software programs and modules stored in the memory 104. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located with respect to the processor 102, which may be connected to the electronic body portion 10 or the display 120 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The RF module 106 is configured to receive and transmit electromagnetic waves, and to implement mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. The RF module 106 may communicate with various networks such as the internet, intranets, wireless networks, or other devices via wireless networks. The wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various communication standards, protocols, and technologies including, but not limited to, global system for mobile communications (Global System for Mobile Communication, GSM), enhanced mobile communications technology (Enhanced Data GSM Environment, EDGE), wideband code division multiple access technology (wideband code division multiple access, W-CDMA), code division multiple access technology (Code division access, CDMA), time division multiple access technology (time division multiple access, TDMA), wireless Fidelity (WiFi) (e.g., american institute of electrical and electronics engineers standards IEEE 802.10a, IEEE802.11b, IEEE802.11g, and/or IEEE802.11 n), internet telephony (Voice over internet protocal, voIP), worldwide interoperability for microwave access (Worldwide Interoperability for Microwave Access, wi-Max), other protocols for mail, instant messaging, and short messaging, as well as any other suitable communication protocols, including even those not currently developed.
The audio circuit 110, speaker 101, microphone 103, microphone 105 together provide an audio interface between a user and the electronic body part 10 or the display screen 120.
The sensor 114 is disposed within the electronic body portion 10 or the display 120, and examples of the sensor 114 include, but are not limited to: acceleration sensor 114F, gyroscope 114G, magnetometer 114H, and other sensors.
In this embodiment, the input module 118 may include the touch screen 109 disposed on the display 120, and the touch screen 109 may collect touch operations (such as operations of the user on the touch screen 109 or in the vicinity of the touch screen 109 using any suitable object or accessory such as a finger, a stylus, etc.) thereon or nearby, so that a touch gesture of the user may be obtained, and the corresponding connection device may be driven according to a preset program, so that the user may select a target area through a touch operation on the display. Alternatively, the touch screen 109 may include a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 102, and can receive and execute commands sent by the processor 102. In addition, the touch detection function of the touch screen 109 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch screen 109, in other variations, the input module 118 may include other input devices, such as keys 107. The keys 107 may include, for example, character keys for inputting characters, and control keys for triggering control functions. Examples of the control keys include a "return home screen" key, a power on/off key, and the like.
The display 120 is used to display information entered by a user, information provided to the user, and various graphical user interfaces of the electronic body 10, which may be composed of graphics, text, icons, numbers, video, and any combination thereof. In one example, the touch screen 109 may be disposed on the display panel 111 so as to be integral with the display panel 111.
The power module 122 is used to provide a power supply to the processor 102 and other components. Specifically, the power module 122 may include a power management system, one or more power sources (e.g., batteries or ac power), a charging circuit, a power failure detection circuit, an inverter, a power status indicator, and any other components related to the generation, management, and distribution of power within the electronic body portion 10 or the display 120.
The electronic device 500 further comprises a locator 119, the locator 119 being adapted to determine the actual position of the electronic device 500. In this embodiment, the locator 119 implements location of the electronic device 500 by using a location service, which is understood to be a technology or service for obtaining location information (such as longitude and latitude coordinates) of the electronic device 500 by using a specific location technology, and marking the location of the located object on an electronic map.
It should be understood that the above-described electronic apparatus 500 is not limited to a smart phone terminal, but should refer to a computer device that can be used in a mobile. Specifically, the electronic device 500 refers to a mobile computer device on which a smart operating system is mounted, and the electronic device 500 includes, but is not limited to, a smart phone, a smart watch, a tablet computer, and the like.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points. Any of the described processing manners in the method embodiment may be implemented by a corresponding processing module in the device embodiment, which is not described in detail in the device embodiment.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" is at least two, such as two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments. In addition, each functional unit in each embodiment of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. Although embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, one of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (7)

1. A method of network connection, the method comprising:
monitoring each wireless access point with the same name in a plurality of connected wireless access points which are in a WiFi roaming network;
Acquiring the signal intensity of each monitored wireless access point and the number of wireless access points of a channel;
acquiring the monitored frequency bands of each wireless access point;
according to the signal intensity, the number of the wireless access points and the frequency band, and combining the sorting bias of the channel congestion condition and the signal intensity, sorting the wireless access points; when the wireless access points are ranked in the same order, determining the sequence of the wireless access points by combining the ranking bias of the channel congestion status and the signal strength; attempting to connect with the wireless access points in the sequencing result in the order from high to low;
if the connection with the wireless access point which is tried to be connected at present is successful, judging whether the data transmission quality between the wireless access point and the wireless access point meets the preset condition, and if the data transmission quality meets the preset condition, stopping the connection attempt; wherein, the data transmission quality comprises retransmission rate and error rate;
if the connection with the wireless access point which is tried to be connected currently is unsuccessful, or the preset condition is not met, the next wireless access point in the sequencing result is connected.
2. The method of claim 1, wherein ranking the wireless access points according to signal strength and number of wireless access points comprises:
Distributing ordering indexes to the wireless access points according to the signal intensity of the wireless access points and the number of the wireless access points of the channel;
and ordering the wireless access points from high to low according to the ordering index of the wireless access points.
3. The method of claim 2, wherein assigning a ranking index to each wireless access point based on the signal strength of each wireless access point and the number of wireless access points on the channel comprises:
sequencing each wireless access point from high to low according to the number of the wireless access points of the channel where the wireless access point is located, and obtaining a first sequencing sequence, wherein the sequencing is higher in the first sequencing sequence as the number of the wireless access points of the channel where the wireless access point is located is smaller;
sequencing the wireless access points from high to low in signal intensity to obtain a second sequencing sequence;
according to a preset index rule, indexes are distributed to each wireless access point in the first sequencing sequence and used as the first indexes of each wireless access point, wherein the preset index rule comprises indexes respectively corresponding to different sequencing positions in the first sequencing sequence;
allocating indexes for each wireless access point in a second ordering sequence as second indexes of each wireless access point according to a preset index rule, wherein the preset index rule comprises indexes respectively corresponding to different ordering positions in the second ordering sequence;
And acquiring the ordering index of each wireless access point according to the first index and the second index of each wireless access point.
4. The method of claim 2, wherein an initial scoring value and a scoring value reduction table are pre-stored, the scoring value reduction table includes scoring values corresponding to signal strengths and scoring values corresponding to the number of wireless access points, and the assigning a ranking index to each wireless access point according to the signal strength of each wireless access point and the number of wireless access points of the channel comprises:
for each monitored wireless access point, searching a scoring subtracted value corresponding to the signal intensity of the wireless access point and a scoring subtracted value corresponding to the number of wireless access points of a channel according to the scoring subtracted value table;
and subtracting the obtained score minus value from the initial score as a ranking index of the wireless access point.
5. A network connection device, the device comprising:
the monitoring module is used for monitoring each wireless access point with the same name when a plurality of wireless access points with the same name exist in the WiFi roaming network and connected wireless access points; acquiring the signal intensity of each monitored wireless access point and the number of wireless access points of a channel; acquiring the monitored frequency bands of each wireless access point;
The sequencing module is used for sequencing the wireless access points according to the signal intensity, the number of the wireless access points and the frequency band and combining the sequencing bias of the channel congestion condition and the signal intensity; when the wireless access points are ranked in the same order, determining the sequence of the wireless access points by combining the ranking bias of the channel congestion status and the signal strength; attempting to connect with the wireless access points in the sequencing result in the order from high to low;
the connection module is used for judging whether the data transmission quality between the wireless access point and the wireless access point meets the preset condition or not if the wireless access point which is connected with the current attempt is successfully connected, and stopping the connection attempt if the data transmission quality meets the preset condition; wherein, the data transmission quality comprises retransmission rate and error rate; if the connection with the wireless access point which is tried to be connected currently is unsuccessful, or the preset condition is not met, the next wireless access point in the sequencing result is connected.
6. An electronic device comprising a WiFi module, a memory, and a processor, the WiFi module and the memory coupled to the processor, the memory storing instructions that when executed by the processor perform the method of any of claims 1-4.
7. A computer readable storage medium storing program code executable by a processor, the program code causing the processor to perform the method of any one of claims 1 to 4.
CN201810619538.9A 2018-06-12 2018-06-12 Network connection method and device and electronic device Active CN110602738B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810619538.9A CN110602738B (en) 2018-06-12 2018-06-12 Network connection method and device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810619538.9A CN110602738B (en) 2018-06-12 2018-06-12 Network connection method and device and electronic device

Publications (2)

Publication Number Publication Date
CN110602738A CN110602738A (en) 2019-12-20
CN110602738B true CN110602738B (en) 2023-06-13

Family

ID=68849632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810619538.9A Active CN110602738B (en) 2018-06-12 2018-06-12 Network connection method and device and electronic device

Country Status (1)

Country Link
CN (1) CN110602738B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW202226862A (en) * 2020-12-25 2022-07-01 香港商吉達物聯科技股份有限公司 A communication system comprising a modified network joining program, method, and wireless network device thereof
CN113630828B (en) * 2021-10-11 2022-02-08 东集技术股份有限公司 Wireless roaming method, device, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103889011A (en) * 2014-04-09 2014-06-25 上海斐讯数据通信技术有限公司 Wireless bandwidth selecting method and system based on WLAN wireless bandwidth assessment
CN106304278A (en) * 2015-05-19 2017-01-04 中兴通讯股份有限公司 Network selecting method, device and mobile terminal
CN107820322B (en) * 2017-09-13 2020-09-11 捷开通讯(深圳)有限公司 Network access method, terminal and device with storage function
CN108111977B (en) * 2017-12-07 2021-03-02 Oppo广东移动通信有限公司 Network scanning method, device, storage medium and electronic equipment
CN108040358B (en) * 2017-12-29 2020-07-31 Oppo广东移动通信有限公司 Wireless network connection method, terminal device and storage medium

Also Published As

Publication number Publication date
CN110602738A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
US10314098B2 (en) Method and apparatus for connecting short-range wireless communication in terminal
EP3917205A1 (en) Data packet distribution method and apparatus, mobile terminal, and storage medium
CN109716826B (en) Access method, network equipment, terminal equipment and AMF (advanced metering framework) equipment
CN108990105B (en) Wireless communication transmission method, device, mobile terminal and computer readable storage medium
KR20210038968A (en) Reference signal transmission and reception method, apparatus, on-vehicle device and terminal
KR101719365B1 (en) Video call method and apparatus
CN108924908B (en) WiFi scanning method and device and electronic device
CN108811045B (en) WiFi channel scanning method and device, mobile terminal and storage medium
US20120315885A1 (en) Mobile communication terminal, network-side device, mobile communication system, program and method of changing operation period of mobile communication system
CN110602738B (en) Network connection method and device and electronic device
EP3739952A1 (en) Cell type indication method and apparatus
CN110603824B (en) Antenna panel selection method, device and storage medium
EP4138451A1 (en) Resource selection method and apparatus, and user equipment
CN111095982B (en) Signal measurement method, device, communication equipment and storage medium
CN111615143B (en) Information reporting method, information receiving method, terminal and network control entity
CN108848566B (en) Wireless communication transmission method, device, mobile terminal and computer readable storage medium
CN108696917B (en) Communication connection method, device, electronic device and computer readable medium
CN108471622B (en) WiFi connection adjustment method and device, mobile terminal and storage medium
EP3720190B1 (en) Method and apparatus for controlling terminal access
CN108882335A (en) Method for connecting network, device and electronic device
CN108463955A (en) Antenna switching method, device and terminal
WO2012073059A1 (en) Methods, apparatuses and computer program products for using downlink and uplink over separate radio channels or different operators
CN108668335B (en) Communication connection method, device, mobile terminal and computer readable storage medium
CN113141576B (en) Data transmission method, user equipment and network side equipment
CN108924902B (en) Wireless network disconnection method and device and electronic device

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
GR01 Patent grant
GR01 Patent grant