Network access method and device, equipment, storage medium and program product
By scanning the network access point and selecting the access point to be connected according to the preset strategy, the problem of poor network selection in the prior art is solved, and the network access is automatically optimized, which improves the stability and efficiency of access.
Patent Information
- Application Number
- CN202510241890.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-02
- Publication Date
- 2025-05-30
AI Technical Summary
The existing wireless network access method requires users to manually select the network, which is poor in intelligence and cannot automatically optimize the network access point.
By scanning the network access point, determine whether there is a first-level network access point in the network connection list, and select the access point to be connected from the network connection list according to the preset policies (first policy and second policy) to establish a wireless connection.
It improves the intelligence of network access, automatically optimizes network selection, reduces the user's manual operation needs, and enhances the stability and efficiency of network connections.
Smart Images

Figure CN120075931A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a network access method, apparatus, device, storage medium, and program product. Background Art
[0002] Currently, accessing the network through a wireless access point (AP) or hotspot is a common wireless network access method. When a terminal selects a wireless network, the user needs to manually select it, and the intelligence of network selection is poor. Summary of the Invention
[0003] In view of the above problems, this application provides a network access method, apparatus, device, storage medium, and program product. The specific solutions are as follows:
[0004] In a first aspect of this application, a network access method is provided. The method includes:
[0005] If the network scanning condition is met, obtain a network connection list including at least one network access point based on a first communication device;
[0006] Determine whether the network connection list includes a first-level network access point based on the record information representing the first-level network access point;
[0007] If the first-level network access point exists in the network connection list, determine a to-be-connected access point from the network connection list based on a first policy;
[0008] Establish a wireless connection between the first communication device and the to-be-connected access point.
[0009] In a possible implementation, if the first-level network access point does not exist in the network connection list, determine a to-be-connected access point from the network connection list based on a second policy, where the second policy is different from the first policy.
[0010] In a possible implementation, the determining a to-be-connected access point from the network connection list based on the first policy includes:
[0011] Determine the first-level network access point as the to-be-connected access point.
[0012] In a possible implementation, the determining a to-be-connected access point from the network connection list based on the first policy includes:
[0013] If the signal quality of the first-level network access point is not less than the signal quality of the access point with the best signal among the non-first-level network access points in the network connection list, determine the first-level network access point as the to-be-connected access point.
[0014] In a possible implementation, determining the access point to be connected from the network connection list based on the first policy includes:
[0015] Obtain the connected access point;
[0016] If it is determined that the connected access point is a second-level network access point, determine the first-level network access point as the access point to be connected based on the signal quality of the first-level network access point being not less than the signal quality of the connected access point.
[0017] In a possible implementation, determining the access point to be connected from the network connection list based on the first policy includes:
[0018] Obtain the connected access point;
[0019] If it is determined that the connected access point is a first-level network access point, and there is another first-level network access point different from the connected access point among the first-level network access points existing in the network connection list, determine the other first-level network access point as the access point to be connected based on the difference between the signal quality of the other first-level network access point and the signal quality of the connected network access point being greater than the threshold.
[0020] In a possible implementation, the satisfaction of the network scanning condition includes one of the following:
[0021] The network switching condition is satisfied;
[0022] The network switching condition is not satisfied, the terminal device to which the first communication device belongs is in a moving state, and it is detected that the signal quality of the connected access point of the terminal device drops to the first target signal quality.
[0023] In a possible implementation, the satisfaction of the network switching condition includes:
[0024] It is detected that the signal quality of the connected access point of the terminal device drops to the second target signal quality; the second target signal quality is lower than the first target signal quality;
[0025] In a possible implementation, it further includes:
[0026] Periodically detect whether the network scanning condition is satisfied;
[0027] Wherein, the detection period when the terminal device to which the first communication device belongs is static is greater than the detection period when the terminal device is in a moving state.
[0028] In a possible implementation, determining the access point to be connected from the network connection list based on the first policy includes:
[0029] Input the level of each network access point in the network connection list and the target parameters characterizing the signal quality of each network access point into a pre-trained priority evaluation model to obtain the priority of each network access point;
[0030] Determine the network access point with the highest priority as the access point to be connected.
[0031] A second aspect of the present application provides a network access device, and the device includes:
[0032] A scanning module, configured to obtain a network connection list including at least one network access point based on a first communication device if a network scanning condition is met;
[0033] A first determination module, configured to determine whether the network connection list includes a first-level network access point based on the record information characterizing the first-level network access point;
[0034] A second determination module, configured to determine an access point to be connected from the network connection list based on a first policy if the first-level network access point exists in the network connection list;
[0035] A connection module, configured to establish a wireless connection with the access point to be connected based on the first communication device.
[0036] A third aspect of the present application provides a computer program product, including computer-readable instructions, which when running on an electronic device, cause the electronic device to implement the following steps:
[0037] If a network scanning condition is met, obtain a network connection list including at least one network access point based on a first communication device;
[0038] Determine whether the network connection list includes a first-level network access point based on the record information characterizing the first-level network access point;
[0039] If the first-level network access point exists in the network connection list, determine an access point to be connected from the network connection list based on a first policy;
[0040] Establish a wireless connection with the access point to be connected based on the first communication device.
[0041] A fourth aspect of the present application provides an electronic device, and the electronic device includes a first communication device and at least one processor, wherein:
[0042] The first communication device is configured to establish a wireless connection with a network access point;
[0043] The processor is configured to:
[0044] If the network scanning conditions are met, obtain a network connection list including at least one network access point based on the first communication device;
[0045] Determine whether the network connection list includes a first-level network access point based on the record information characterizing the first-level network access point;
[0046] If the first-level network access point exists in the network connection list, determine the access point to be connected from the network connection list based on the first policy;
[0047] Establish a wireless connection between the first communication device and the access point to be connected.
[0048] A fifth aspect of the present application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the following steps:
[0049] If the network scanning conditions are met, obtain a network connection list including at least one network access point based on the first communication device;
[0050] Determine whether the network connection list includes a first-level network access point based on the record information characterizing the first-level network access point;
[0051] If the first-level network access point exists in the network connection list, determine the access point to be connected from the network connection list based on the first policy;
[0052] Establish a wireless connection between the first communication device and the access point to be connected. Description of the Drawings
[0053] In combination with the drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale.
[0054] Figure 1a It is a flowchart of an implementation of the network access method provided by the present application;
[0055] Figure 1b It is an example diagram of the scoring model provided by the present application;
[0056] Figure 2 It is a flowchart of an implementation of determining the access point to be connected from the network connection list based on the first policy provided by the present application;
[0057] Figure 3 It is an example diagram of the network structure provided by the present application;
[0058] Figure 4 Another example diagram of the network structure provided for this application;
[0059] Figure 5 Another implementation flowchart for determining the access point to be connected from the network connection list based on the first policy provided for this application;
[0060] Figure 6 Another implementation flowchart for determining the access point to be connected from the network connection list based on the first policy provided for this application;
[0061] Figure 7a Another implementation flowchart for the network access method provided for this application;
[0062] Figure 7b Another example diagram of the network structure provided for this application;
[0063] Figure 8 A schematic structural diagram of the network access device provided for this application;
[0064] Figure 9 A schematic structural diagram of the electronic device provided for this application. Detailed implementation manners
[0065] The embodiments of this application will be described below with reference to the accompanying drawings in the embodiments of this application. The terms used in the implementation part of this application are only used to explain the specific embodiments of this application, rather than aiming to limit this application.
[0066] The embodiments of this application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art know that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0067] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing when describing objects with the same attributes in the embodiments of this application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device including a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these processes, methods, products or devices.
[0068] The network access method provided by the embodiments of this application is used for a terminal device, which has a communication device (for the convenience of description and distinction, denoted as the first communication device). The terminal device can establish a wireless connection with a network access point (for example, a network access point provided by a network device or a network access point provided by another terminal device) based on the first communication device to access the network. As an example, the first communication device can be a wifi module.
[0069] Furthermore, the terminal device may also have a second communication device (such as a Bluetooth module). Based on the second communication device, the terminal device can establish a wireless connection with the second communication device of another terminal device, enabling information interaction between the two terminal devices.
[0070] The terminal device can be a mobile device, such as a mobile phone, a tablet computer, a laptop computer, etc. Of course, the terminal device can also be a non-mobile device, such as a desktop computer, etc.
[0071] As Figure 1a shown, it is a flowchart of an implementation of the network access method provided by the embodiments of this application, which may include:
[0072] Step S101: If the network scanning condition is met, obtain a network connection list including at least one network access point based on the first communication device.
[0073] Optionally, meeting the network scanning condition may include: obtaining a network scanning instruction.
[0074] Optionally, the terminal device (for the convenience of description and distinction, denoted as the first terminal device) can perform network scanning periodically, then meeting the network scanning condition may include: reaching the scanning period.
[0075] The terminal device can perform network scanning based on the first communication device, store the scanned network access points in a list (denoted as the network connection list), and the network connection list can be displayed for the user to view, or it can not be displayed. In the case where the network connection list can be displayed, it can be displayed when the user triggers a viewing request, and the network connection list can not be displayed when the user does not trigger a viewing request.
[0076] Step S102: Determine whether the network connection list includes a first-level network access point based on the record information characterizing the first-level network access point.
[0077] In this application, the first-level network access points are pre-calibrated and recorded, and it can be determined which network access points are the first-level network access points through the record information.
[0078] As an example, the first-level network access points can be specified by the user.
[0079] As an example, the first-level network access point can be a network access point determined by the terminal device according to a preset rule. For example, it can be the network access point with the most access times by the terminal device.
[0080] Compared with the network access points (i.e., hotspots) provided by terminal devices (such as mobile phones, tablets, etc.), the network access points provided by network devices (such as wireless routers) with the ability to connect to the Internet provide better performance when providing network services. Therefore, when calibrating the target network access point, the network access points provided by network devices can be preferentially selected for calibration.
[0081] Moreover, during the daily use of the terminal device by the user, the network access points provided by network devices are usually preferentially selected. Therefore, the network access point with the most access times by the terminal device is usually also the network access point provided by the network device.
[0082] The recorded information can be a list of first-level network access points. For each network access point in the network connection list, if the network access point is in the list of first-level network access points, then the network access point is a first-level network access point; otherwise, it is determined that the network access point is not a first-level network access point.
[0083] Step S103: If there is a first-level network access point in the network connection list, determine the access point to be connected from the network connection list based on the first policy.
[0084] That is to say, when determining the access point to be connected among the scanned network access points in this application, the level of the network access point is considered.
[0085] Optionally, the first policy is a policy related to the level of the network access point. The determined access point to be connected can be a first-level network access point or a non-first-level network access point.
[0086] Step S104: Establish a wireless connection with the access point to be connected based on the first communication device.
[0087] In the case where the first terminal device is not connected to any network access point, the first terminal device can directly establish a wireless connection with the access point to be connected based on the first communication device, thereby establishing a wireless network.
[0088] In the case where the first terminal device is already connected to an access point, the first terminal device can switch from the already connected network access point to the access point to be connected based on the first communication device. Of course, if the already connected access point is the access point to be connected, then the current connection can be maintained and there is no need to perform a network switching operation.
[0089] The network access method provided by the embodiment of the present application divides network access points into levels. Among them, the first-level network access points are the access points provided by routers at home or in enterprises (for example, network access points such as wifi-2.4G, wifi-5G, or / and wifi-6G). In the case of obtaining at least one network access point by scanning, it is possible to determine whether there is a first-level network access point among the at least one scanned network access points. If there is a first-level network access point among the at least one scanned network access points, determine the access point to be connected from the network connection list based on the first policy, and establish a wireless connection with the access point to be connected based on the first communication device. In the network access method of the embodiment of the present application, when it is determined that the access point network provided by the WIFI router is included among the scanned network access points in the same environment, it is automatically connected according to the first policy. That is to say, if the terminal device has already connected to an access point, ignore the access point that the terminal device is currently connected to and give it the highest priority. That is, no longer maintain the connection to the already connected access point and actively switch to the access point to be connected determined based on the first policy. If the terminal device is not connected to any access point, automatically connect to the access point to be connected determined based on the first policy. In the present application, when selecting the access point to be connected, the level of the network access point is considered, providing a new network selection method, increasing the diversity of network selection, and improving the intelligence of network access.
[0090] In an optional embodiment, if there is no first-level network access point in the network connection list, determine the access point to be connected from the network connection list based on the second policy. The second policy is different from the first policy.
[0091] That is to say, according to the two situations of whether there is a first-level network access point in the network connection list or not, the present application adopts different policies to determine the access point to be connected from the network connection list.
[0092] Optionally, the second policy is a policy that is not related to the level of the network access point. That is, when determining the access point to be connected from the network connection list based on the second policy, it will not consider whether the network access point is a first-level network access point.
[0093] As an example, determining the access point to be connected from the network connection list based on the second policy may include: determining the access point to be connected based on the signal quality of each network access point in the network connection list.
[0094] For example, if the first terminal device is not connected to any network access point, it is possible to obtain the target parameter characterizing the signal quality of the network access points in the network connection list, and select the network access point corresponding to the target parameter characterizing the optimal signal quality as the access point to be connected.
[0095] Optionally, the signal quality is related to the target parameter, that is, the larger the target parameter value, the better the signal quality. Then, the network access point corresponding to the maximum target parameter can be selected as the access point to be connected.
[0096] If the first terminal device has connected to a network access point, it can obtain the target parameter characterizing the signal quality of the network access points in the network connection list. If the difference between the target parameter of the connected access point and the target parameter of the network access point corresponding to the target parameter characterizing the optimal signal quality indicates that the signal quality of the connected access point is worse than that of the network access point corresponding to the target parameter characterizing the optimal signal quality, and the difference is greater than the threshold, the network access point corresponding to the target parameter characterizing the optimal signal quality is taken as the access point to be connected. For example, if the target parameter of the connected access point is less than the maximum target parameter among the target parameters of other network access points in the network connection list, and the difference between the maximum target parameter and the target parameter of the connected access point is greater than the target difference, the network access point corresponding to the maximum target parameter is taken as the access point to be connected.
[0097] Optionally, the target parameter of any network access point can be the quality parameter value of that network access point.
[0098] The quality parameter value of any network access point can be determined based on the value of the network parameter characterizing the signal quality of that network access point. The network parameter characterizing the signal quality of the network access point can include, but is not limited to, at least one of the following: Received Signal Strength Indication (RSSI), frequency band (such as 2.4G, 5G, 6G), bandwidth, throughput, encryption method, whether it has been used, etc.
[0099] That is to say, the quality parameter value of the network access point is determined based on the value of at least one network parameter.
[0100] As an example, for any network access point, the values of each network parameter of that network access point obtained in real time can be used as the quality parameter value of that network access point.
[0101] As an example, for each network parameter corresponding to any network access point, the mean value of multiple values of the network parameter obtained at consecutive moments can be calculated, and the mean values corresponding to each network parameter are determined as the quality parameter value of that network access point.
[0102] Optionally, the target parameter of any network access point can be the score characterizing the signal quality of that network access point.
[0103] The score characterizing the signal quality of that network access point can be determined based on at least one network parameter characterizing the signal quality of that network access point.
[0104] Among them, the score of the signal quality of any network access point is positively correlated with the RSSI, that is, the larger the RSSI of any network access point, the higher the score of the signal quality of that network access point.
[0105] The score of the signal quality of any network access point is positively correlated with the frequency band, that is, the higher the frequency band of any network access point, the higher the score of the signal quality of that network access point.
[0106] The score of the signal quality of any network access point is positively correlated with the bandwidth, that is, the wider the bandwidth of any network access point, the higher the score of the signal quality of that network access point.
[0107] The score of the signal quality of any network access point is positively correlated with the throughput, that is, the larger the throughput of any network access point, the higher the score of the signal quality of that network access point.
[0108] The score of the signal quality of any network access point is positively correlated with the security of the encryption method, that is, the higher the security of the encryption method of any network access point, the higher the score of the signal quality of that network access point.
[0109] The score of the signal quality of the target network access point when any network access point is a used network access point is higher than the score of the signal quality of the target network access point when that network access point is an unused network access point.
[0110] In the process of obtaining the score representing the signal quality of any network access point, certain weights can be assigned to each network parameter, and the weights corresponding to different network parameters can be the same or different.
[0111] As an example, the above at least one network parameter can be calculated using a pre-set calculation rule to obtain the score representing the signal quality of that network access point.
[0112] As an example, the above at least one network parameter can be input into a pre-trained scoring model to obtain the score representing the signal quality of that network access point output by the scoring model.
[0113] As Figure 1b shown, it is an example diagram of the scoring model provided by the embodiment of the present application. At least one of the information such as the sensing parameter (see below) indicating whether the terminal device providing the network access point is moving, the signal quality score of the network access point (the calculated network score) or network parameters, the remaining power of the terminal device providing the network access point, and the network level of the network access point can be input into the scoring model to obtain the score representing the signal quality of the network access point output by the scoring model.
[0114] In an optional embodiment, an implementation manner of determining the access point to be connected from the network connection list based on the first policy may be as follows:
[0115] Determine the first-level network access point as the access point to be connected.
[0116] That is to say, as long as the first-level network access point is scanned, a wireless connection is directly established with the first-level network access point. That is, the first-level network access point is preferentially selected to establish a wireless connection.
[0117] In an optional embodiment, another implementation manner of determining the access point to be connected from the network connection list based on the first policy may be as follows:
[0118] If the signal quality of the first-level network access point is not less than the signal quality of the access point with the best signal among the non-first-level network access points in the network connection list, determine the first-level network access point as the access point to be connected.
[0119] Different from the previous embodiment that determines the access point to be connected only based on the level of the network access point, in this embodiment, the access point to be connected is determined by combining the level and signal quality of the network access point.
[0120] Optionally, the non-first-level network access points in the network connection list may be sorted in descending order of signal quality, and the signal quality of the non-first-level network access point ranked first is compared with the signal quality of the first-level network access point. If the signal quality of the first-level network access point is equivalent (or the same) to the signal quality of the non-first-level network access point ranked first, or the signal quality of the first-level network access point is better than the signal quality of the non-first-level network access point ranked first, then the first-level network access point is determined as the access point to be connected; otherwise, the non-first-level network access point ranked first is determined as the access point to be connected.
[0121] The signal quality of the network access point may be characterized by a target parameter, and the obtaining method of the target parameter may refer to the previous embodiment and will not be elaborated here.
[0122] In an optional embodiment, a flowchart of an implementation of determining the access point to be connected from the network connection list based on the first policy is as Figure 2 shown and may include:
[0123] Step S201: Obtain the connected access point.
[0124] The connected access point refers to the network access point currently being used by the first terminal device, and this network access point must be in the network connection list. The connected access point may be a first-level network access point or a second-level network access point.
[0125] Step S202: If it is determined that the connected access point is a second-level network access point, determine the first-level network access point as the access point to be connected based on the signal quality of the first-level network access point being not less than that of the connected access point.
[0126] If the connected access point is a second-level network access point, it indicates that the device providing the connected access point is a terminal device (denoted as the second terminal device for convenience of description and distinction) that has established a wireless connection with the first-level network access point. After establishing a wireless connection with the first-level network access point, the second terminal device enables the hotspot mode, thereby providing the second-level network access point.
[0127] When the first terminal device has established a wireless connection with the second-level network access point and scans the first-level network access point, it is necessary to compare the signal quality of the connected access point and the scanned first-level network access point. Only when the signal quality of the scanned first-level network access point is the same as that of the connected access point, or the signal quality of the scanned first-level network access point is better than that of the connected access point, will the first-level network access point be determined as the access point to be connected. Otherwise, the connected access point is determined as the access point to be connected.
[0128] As Figure 3 shown, it is an example diagram of the network structure provided by the embodiment of the present application. In this example, the network access point provided by the network device is the first-level network access point, and the Mac address of the network device is 192.168.0.1.
[0129] In this example, if the first terminal device has established a wireless connection with the first-level network access point provided by the network device (such as a wireless router), the network device provides the first-level network access point to assign a mac address to the first terminal device (which is 192.168.0.6 in this example).
[0130] Similarly, if the second terminal device has established a wireless connection with the first-level network access point provided by the network device, the network device provides the first-level network access point to assign a mac address to the second terminal device (which is 192.168.0.10 in this example).
[0131] As Figure 4 shown, it is another example diagram of the network structure provided by the embodiment of the present application. In this example, the network access point provided by the network device is the first-level network access point, and the Mac address of the network device is 192.168.0.1.
[0132] In this example, if the second terminal device has established a wireless connection with the first-level network access point provided by the network device, the network device provides the first-level network access point to assign a Mac address to the second terminal device (denoted as Mac1 in this example, specifically: 192.168.0.10).
[0133] After the second terminal device establishes a wireless connection with the first-level network access point provided by the network device and enables the hotspot mode to provide a network access point, the network access point is the second-level network access point. In this example, the Mac address of the network access point provided by the second terminal device (denoted as Mac2 in this example) is: 192.168.6.90.
[0134] The first terminal device establishes a wireless connection with the second-level network access point provided by the second terminal device, and the second-level network access point provided by the second terminal device assigns a Mac address (192.168.6.100 in this example) to the first terminal device.
[0135] It can be seen from the above network structure that the second terminal device providing the second-level network access point will have two Mac addresses, one is the Mac address assigned by the first-level network access point it accesses, and the other is the Mac address of the second-level network access point it provides. Based on this, the terminal device providing the second-level network access point can broadcast the address of the network access point based on the second communication device, so that the terminal device receiving the broadcast information can determine whether the device corresponding to the scanned network access point is a secondary network access point.
[0136] The first terminal device can receive the broadcast information based on the second communication device. If it receives the broadcast information of the device providing the connected access point and parses out two addresses from the broadcast information, it determines that the connected access point is a second-level network access point.
[0137] In the embodiments of the present application, the connected access point may be that the first terminal device switches from the first-level network access point to the connected access point, or it may be that the first terminal device directly establishes a wireless connection with the connected access point.
[0138] That is to say, when the first terminal device establishes a wireless connection with the second-level network access point through the first communication device, if the first-level network access point is scanned, it automatically switches to the first-level network access point.
[0139] In an alternative embodiment, another implementation flowchart of determining the access point to be connected from the network connection list based on the first policy is as Figure 5 shown, and may include:
[0140] Step S501: Obtain the connected access point.
[0141] The connected access point refers to the network access point currently used by the first terminal device, and this network access point must be in the network connection list. The connected access point may be the first-level network access point or the second-level network access point.
[0142] Step S502: If it is determined that the connected access point is a first-level network access point and there is another first-level network access point different from the connected access point in the network connection list, and the difference between the signal quality of the other first-level network access point and the signal quality of the connected network access point is greater than the threshold, determine the other first-level network access point as the access point to be connected.
[0143] That is to say, when the connected access point is a first-level network access point and there is another first-level network access point different from the connected access point among the scanned network access points, compare the signal quality of the other first-level network access point and the connected access point. If the difference between the signal quality of the other first-level network access point and the signal quality of the connected network access point is greater than the threshold, it is necessary to switch the connected access point to the other first-level network access point.
[0144] In an actual application scenario, among the scanned network access points, there may be both another first-level network access point different from the connected access point and a second-level network access point. In the embodiment of the present application, after scanning the network access points, it can first be determined whether there is another first-level network access point different from the connected access point. If not, then it is determined whether there is a second-level network access point. If there is another first-level network access point different from the connected access point, it is no longer determined whether there is a second-level network access point.
[0145] In an optional embodiment, the above-mentioned satisfaction of the network scanning condition may include:
[0146] Satisfying the network switching condition, that is, network scanning is only performed when network switching is required.
[0147] In an optional embodiment, the above-mentioned satisfaction of the network scanning condition may include:
[0148] The network switching condition is not satisfied, the first terminal device to which the first communication device belongs is in a moving state, and it is detected that the signal quality of the connected access point of the first terminal device has dropped to the first target signal quality.
[0149] That is, when the network switching condition is not satisfied, when it is detected that the first terminal device is moving and the signal quality of the connected access point of the first terminal device has dropped to the first target signal quality, it means that the first terminal device is moving away from the second terminal device providing the connected access point, and it may not be able to receive the signal of the connected access point or disconnect from the connected access point later. At this time, network scanning can be performed to determine the access point to be connected in advance, so that when the network switching condition is satisfied, it can be directly switched to the access point to be connected, improving the network switching efficiency.
[0150] Further, the above-mentioned satisfaction of the network switching condition may include:
[0151] It is detected that the signal quality of the connected access point of the first terminal device drops to a second target signal quality; the second target signal quality is lower than the first target signal quality.
[0152] In an alternative embodiment, it is possible to periodically detect whether the network scanning condition is satisfied.
[0153] Among them, the detection period when the first terminal device to which the first communication device belongs is in a static state is longer than the detection period when the first terminal device is in a moving state.
[0154] Raising the detection period when the first terminal device is in a static state can reduce the power consumption of the first terminal device. Lowering the detection period when the first terminal device is in a moving state allows for immediate network switching.
[0155] In an alternative embodiment, another implementation flowchart of determining the access point to be connected from the network connection list based on the first policy is as Figure 6 shown and may include:
[0156] Step S601: Input at least the levels of each network access point in the network connection list and the target parameters representing the signal quality of each network access point into a pre-trained priority evaluation model to obtain the priorities of each network access point.
[0157] Optionally, the target parameter may be a network parameter representing the signal quality of the network access point, or it may be a score representing the signal quality of the network access point. For the specific method, refer to the foregoing embodiments and will not be elaborated here.
[0158] Further, in addition to inputting the level of the network access point and the target parameter into the priority evaluation model, the remaining power of the device providing the network access point and the location data representing whether the device providing the network access point is moving may also be input into the priority evaluation model.
[0159] The data (level, target parameter, remaining power, location data, etc.) that needs to be input into the priority evaluation model can be added to the prompt word template to obtain a prompt word, and the prompt word is input into the priority evaluation model to obtain the priorities of each network access point.
[0160] Step S602: Determine the network access point with the highest priority as the access point to be connected.
[0161] As Figure 7a shown, another implementation flowchart of the network access method provided by the embodiments of the present application may include:
[0162] Step S701: Establish a wireless connection based on the first communication device and the first network access point.
[0163] For example, the first network access point is the network access point provided by the wireless router at the user's home, and the user sets this first network access point as the target network access point. After the user brings the terminal device U home, the terminal device U will establish a wireless connection with the wireless router through the WiFi module, thereby accessing the Internet. After establishing a wireless connection with the first network access point provided by the wireless router, the terminal device U will record some information of the first network access point, and these information include but are not limited to: the frequency band, bandwidth, RSSI, data transmission rate, Mac address of the first network access point, etc.
[0164] Step S702: Determine whether the first network access point belongs to the target network access point. If it is, enter Step S703; if not, end.
[0165] For the specific determination process, please refer to the foregoing embodiments and will not be elaborated here.
[0166] Step S703: Obtain the score representing the signal quality of the first network access point.
[0167] Step S704: Determine whether the score is greater than or equal to the score threshold. If it is, enter Step S705; if not, enter Step S713 to perform a network search.
[0168] Step S705: Determine whether the terminal device U is in a moving state. If it is, enter Step S711; if not, enter Step S706.
[0169] Step S706: Broadcast information through the second communication device (such as a Bluetooth module). The broadcast information (i.e., the broadcast message) may include but is not limited to the following information: the SSID of the hotspot that the terminal device U can provide, the password, the encryption type, the score of the first network access point, the Mac address assigned by the first network access point to the terminal device U, etc.
[0170] Step S707: Monitor whether a hotspot enable request is received. If it is, enter Step S708; if not, continue to monitor whether a hotspot enable request message is received. Specifically, monitor whether a hotspot enable request message is received through the second communication device.
[0171] Step S708: Enable the hotspot mode of the terminal device U.
[0172] Step S709: Monitor whether a terminal device establishes a wireless connection through the first communication device. If no terminal device is connected, proceed to step S710; if there is, keep the hotspot mode of the terminal device enabled.
[0173] Optionally, if no terminal device accesses the hotspot within a preset duration, it is determined that no terminal device is connected.
[0174] Step S710: Turn off the hotspot mode of terminal device U.
[0175] Step S711: Obtain a score representing the signal quality of the first network access point. When terminal device U is in a moving state, it is necessary to obtain the score representing the signal quality of the first network access point again.
[0176] Step S712: Determine whether the score is greater than or equal to the score threshold. If so, proceed to step S706; if not, proceed to step S713 to perform a network search.
[0177] Step S713: Monitor whether broadcast information is received through the second communication device. If so, proceed to step S714; if not, continue to monitor whether broadcast information is received through the second communication device.
[0178] Step S714: Sort the network access points parsed from the broadcast information in descending order of signal quality. If there are multiple network access points with the best quality, proceed to step S715.
[0179] Step S715: Select the network access point with the best quality and closest to terminal device U as the network access point to be connected.
[0180] Step S716: Send a hotspot enable request to the network access point to be connected through the second communication device.
[0181] Step S717: Monitor whether a wireless connection is established with the network access point to be connected. If so, proceed to step S718; if not, return to step S713.
[0182] Step S718: Perform a network scan to obtain a list of network access points.
[0183] The network scan can be performed at a preset period to update the list of network access points. After obtaining the list of network access points, it can be determined whether to perform a network switch based on the signal quality of the scanned network access points, or it can be determined whether to perform a network switch based on the signal quality and level of the scanned network access points.
[0184] Next, a specific application scenario is used to illustrate an implementation manner of the present application:
[0185] As Figure 7b shown, it is another example diagram of the network structure provided by the embodiment of the present application. The network structure is composed of a network device and a terminal device. Among them, the network device is a wireless router, and the terminal devices include a mobile phone and a tablet computer.
[0186] In the initial state, neither of the two terminal devices, mobile phone A and mobile phone B, can scan the network access point provided by the wireless router (denoted as network access point W), that is, both mobile phone A and mobile phone B are outside the signal coverage of network access point W, while the terminal device of tablet computer C can scan the network access point provided by the wireless router, that is, the tablet computer is within the signal coverage of network access point W. Therefore, only the tablet computer can establish a wireless connection with the wireless router through its own first communication device (for example, a WIFI module) and access the Internet.
[0187] If both mobile phone A and mobile phone B calibrate network access point W as the first-level network access point, while the tablet computer does not calibrate network access point W as the first-level network access point, then, after mobile phone A establishes a wireless connection with network access point W, it will enable the network expansion mode of mobile phone A based on the network parameters of network access point W to provide a second-level network access point; mobile phone B will also enable the network expansion mode of mobile phone B based on the network parameters of network access point W after establishing a wireless connection with network access point W to provide a second-level network access point; while the tablet computer will not enable the network expansion mode of the tablet computer based on the network parameters of network access point W.
[0188] Suppose mobile phone B first enters the signal coverage of network access point W. After mobile phone B establishes a wireless connection with network access point W, it can obtain at least one network parameter characterizing the signal quality of network access point W, process the obtained at least one network parameter to obtain a score characterizing the signal quality of network access point W. If the score is greater than or equal to the target value, then enable the network expansion mode of mobile phone B. In the network expansion mode, mobile phone B can broadcast information through the second communication device (for example, Bluetooth), and the broadcast information at least includes: mobile phone B can provide a network access point (denoted as network access point R2) and the score characterizing the signal quality of network access point W. If the score is less than the target value, then mobile phone B enables the network reception mode of mobile phone B. In the network reception mode, mobile phone B can receive the broadcast information of other terminal devices (such as mobile phone A) through the second communication device.
[0189] When the mobile phone B enables the network extension mode to provide the network access point R2, if the mobile phone A moves to the first position and the mobile phone A can simultaneously scan the network access point W provided by the wireless router and the network access point R2 provided by the mobile phone B, at this time, since the network access point W is the first-level network access point, the mobile phone A can directly connect the network access point W as the access point to be connected. Alternatively, the mobile phone A can first compare the signal quality of the network access point W and the network access point R2. If the signal quality of the network access point W is not lower than that of the network access point R2, the mobile phone A will wirelessly connect the network access point W as the access point to be connected; if the signal quality of the network access point W is lower than that of the network access point R2 and the difference between the signal quality of the network access point W and the signal quality of the network access point R2 is greater than the threshold, the mobile phone A will wirelessly connect the network access point R2 as the access point to be connected.
[0190] Suppose that at the first position, the signal quality of the network access point W scanned by the mobile phone A is the same as or comparable to that of the network access point R2 (i.e., the signal quality difference is less than a specific difference). The mobile phone A establishes a wireless connection with the network access point W at the first position. Later, the mobile phone A moves to the second position. At the second position, the mobile phone A can still simultaneously scan the network access point W provided by the wireless router and the network access point R2 provided by the mobile phone B. If the signal quality of the network access point W is still not lower than that of the network access point R2 at this time, the mobile phone A maintains the wireless connection with the network access point W; if the signal quality of the network access point W is lower than that of the network access point R2 and the difference between the signal quality of the network access point W and the signal quality of the network access point R2 is greater than the threshold, the mobile phone A switches from establishing a wireless connection with the network access point W to establishing a wireless connection with the network access point R2.
[0191] After the mobile phone A establishes a wireless connection with the network access point R2, if the mobile phone A returns to the first position, then as long as the signal quality of the network access point W is not lower than that of the network access point R2, the mobile phone A will automatically switch to establish a wireless connection with the network access point W and no longer establish a wireless connection with the network access point R2, unless the signal quality of the network access point W is lower than that of the network access point R2 and the difference between the signal quality of the network access point W and the signal quality of the network access point R2 is greater than the threshold, in which case the mobile phone A will maintain the wireless connection with the network access point R2. This is different from the prior art in that after the mobile phone A establishes a wireless connection with the network access point R2, if the mobile phone A returns to the first position and the signal quality of the network access point W at the first position is not lower than that of the network access point R2, the mobile phone A will maintain the wireless connection with the network access point R2.
[0192] Corresponding to the method embodiments, the present application also provides a network access device. A schematic structural diagram of the network access device provided by the present application is as shown in Figure 8 and may include:
[0193] a scanning module 801, a first determination module 802, a second determination module 803, and a connection module 804;
[0194] The scanning module 801 is configured to obtain a network connection list including at least one network access point based on a first communication device if a network scanning condition is satisfied;
[0195] The first determination module 802 is configured to determine whether the network connection list includes a first-level network access point based on record information characterizing the first-level network access point;
[0196] The second determination module 803 is configured to determine a to-be-connected access point from the network connection list based on a first policy if the first-level network access point exists in the network connection list;
[0197] The connection module 804 is configured to establish a wireless connection between the first communication device and the to-be-connected access point.
[0198] For the network access device provided in the embodiments of the present application, the network access points are classified into levels. When at least one network access point is obtained through scanning, it can be determined whether there is a first-level network access point among the at least one scanned network access points. If there is a first-level network access point among the at least one scanned network access points, a to-be-connected access point is determined from the network connection list based on a first policy, and a wireless connection is established between the first communication device and the to-be-connected access point. That is to say, when the present application selects a to-be-connected access point, it considers the level of the network access point, provides a new network selection method, increases the diversity of network selection, and improves the intelligence of network access.
[0199] In an optional embodiment, the second determination module 803 is further configured to:
[0200] If the first-level network access point does not exist in the network connection list, determine a to-be-connected access point from the network connection list based on a second policy, where the second policy is different from the first policy.
[0201] In an optional embodiment, when the second determination module 803 determines a to-be-connected access point from the network connection list based on a first policy, it is configured to:
[0202] Determine the first-level network access point as the to-be-connected access point.
[0203] In an optional embodiment, when the second determination module 803 determines an access point to be connected from the network connection list based on the first policy, it is configured to:
[0204] If the signal quality of the first-level network access point is not less than the signal quality of the access point with the best signal among the non-first-level network access points in the network connection list, determine the first-level network access point as the access point to be connected.
[0205] In an optional embodiment, when the second determination module 803 determines an access point to be connected from the network connection list based on the first policy, it is configured to:
[0206] Obtain the connected access point;
[0207] If it is determined that the connected access point is a second-level network access point, determine the first-level network access point as the access point to be connected based on the signal quality of the first-level network access point not being less than the signal quality of the connected access point.
[0208] In an optional embodiment, when the second determination module 803 determines an access point to be connected from the network connection list based on the first policy, it is configured to:
[0209] Obtain the connected access point;
[0210] If it is determined that the connected access point is a first-level network access point, and there is another first-level network access point different from the connected access point among the first-level network access points existing in the network connection list, determine the other first-level network access point as the access point to be connected based on the difference between the signal quality of the other first-level network access point and the signal quality of the connected network access point being greater than the threshold.
[0211] In an optional embodiment, the satisfaction of the network scanning condition includes one of the following:
[0212] Satisfaction of the network switching condition;
[0213] The network switching condition is not satisfied, the terminal device to which the first communication device belongs is in a moving state, and it is detected that the signal quality of the connected access point of the terminal device has dropped to the first target signal quality.
[0214] In an optional embodiment, the satisfaction of the network switching condition includes:
[0215] It is detected that the signal quality of the connected access point of the terminal device has dropped to the second target signal quality; the second target signal quality is lower than the first target signal quality.
[0216] In an optional embodiment, the scanning module 801 is further configured to:
[0217] Periodically detect whether the network scanning condition is satisfied;
[0218] Among them, the detection period when the terminal device to which the first communication device belongs is in a static state is greater than the detection period when the terminal device is in a moving state.
[0219] In an optional embodiment, when the second determination module 803 determines the access point to be connected from the network connection list based on the first policy, it is used for:
[0220] At least input the level of each network access point in the network connection list and the target parameter representing the signal quality of each network access point into a pre-trained priority evaluation model to obtain the priority of each network access point;
[0221] Optionally, the network structure of the priority evaluation model may be the same as or different from the network structure of the foregoing scoring model. However, the network parameters of the priority evaluation model are different from those of the foregoing scoring model.
[0222] Determine the network access point with the highest priority as the access point to be connected.
[0223] The embodiment of the present application further provides an electronic device, where the electronic device includes a first communication device and at least one processor, and among them:
[0224] The first communication device is used to establish a wireless connection with a network access point; the first communication device and the processor may be independent components in the electronic device, or the first communication device is a component of the processor. For example, it is a functional module provided by the first communication device processor.
[0225] The processor is used for:
[0226] If the network scanning condition is satisfied, obtain a network connection list including at least one network access point based on the first communication device;
[0227] Determine whether the network connection list includes a first-level network access point based on the record information representing the first-level network access point;
[0228] If the first-level network access point exists in the network connection list, determine the access point to be connected from the network connection list based on the first policy;
[0229] Establish a wireless connection between the first communication device and the access point to be connected.
[0230] The embodiment of the present application also provides an electronic device. Refer to Figure 9As shown, it shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may be a terminal device (such as, a car machine, a large-screen device, a smart home, a mobile phone, a tablet computer, a laptop computer, a desktop computer, etc.). Figure 9 The electronic device shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0231] As Figure 9 shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 901, which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage device 908 into the random access memory (RAM) 903. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 903. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The input / output (I / O) interface 905 is also connected to the bus 904.
[0232] Generally, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a memory card, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 9 the electronic device with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.
[0233] The embodiments of the present application also provide a computer program product including computer-readable instructions, which, when running on an electronic device, cause the electronic device to implement the following steps:
[0234] If the network scanning condition is met, obtain a network connection list including at least one network access point based on the first communication device;
[0235] Determine whether the network connection list includes a first-level network access point based on the record information characterizing the first-level network access point;
[0236] If the first-level network access point exists in the network connection list, determine a connection-to-be-accessed point from the network connection list based on the first policy;
[0237] Establish a wireless connection between the first communication device and the connection-to-be-accessed point.
[0238] An embodiment of the present application also provides a computer-readable storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the following steps:
[0239] If the network scanning condition is satisfied, obtain a network connection list including at least one network access point based on the first communication device;
[0240] Determine whether the network connection list includes a first-level network access point based on the record information characterizing the first-level network access point;
[0241] If the first-level network access point exists in the network connection list, determine the access point to be connected from the network connection list based on the first policy;
[0242] Establish a wireless connection between the first communication device and the access point to be connected.
[0243] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines.
[0244] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits or dedicated circuits. However, for the present application, in more cases, software program implementation is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a readable storage medium, such as a floppy disk, a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disc of a computer, etc., and includes several instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in various embodiments of the present application.
[0245] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. Those skilled in the art can use different methods to implement the described functions for each specific solution, but such implementation should not be considered to exceed the scope of this application.
[0246] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, a computer, a training device, or a data center to another website, a computer, a training device, or a data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a training device or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0247] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other.
[0248] The above description of the disclosed embodiments enables those skilled in the art to implement or use this application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A network access method, the method comprising: If the network scanning condition is met, obtaining a network connection list including at least one network access point based on the first communication device; Determining whether the network connection list includes the first-level network access point based on the record information representing the first-level network access point; If the first-level network access point exists in the network connection list, determining an access point to be connected from the network connection list based on a first strategy; A wireless connection is established between the first communication device and the access point to be connected.
2. The method according to claim 1, if the first-level network access point does not exist in the network connection list, determining the access point to be connected from the network connection list based on a second strategy, wherein the second strategy is different from the first strategy.
3. The method according to claim 1, wherein determining the access point to be connected from the network connection list based on the first strategy comprises: The first-level network access point is determined as the access point to be connected.
4. The method according to claim 1, wherein determining the access point to be connected from the network connection list based on the first strategy comprises: If the signal quality of the first-level network access point is not less than the signal quality of the access point with the best signal among the non-first-level network access points in the network connection list, the first-level network access point is determined as the access point to be connected.
5. The method according to claim 1, wherein determining the access point to be connected from the network connection list based on the first strategy comprises: Get connected access points; If it is determined that the connected access point is a second-level network access point, the first-level network access point is determined as the access point to be connected based on that the signal quality of the first-level network access point is not less than the signal quality of the connected access point.
6. The method according to claim 1, wherein determining the access point to be connected from the network connection list based on the first strategy comprises: Get connected access points; If it is determined that the connected access point is a first-level network access point, and the first-level network access points in the network connection list include another first-level network access point different from the connected access point, based on the difference between a signal quality of the another first-level network access point and a signal quality of the connected network access point being greater than a threshold, the another first-level network access point is determined as the access point to be connected.
7. The method according to claim 1, wherein the network scanning condition is satisfied and includes one of the following: Meet the network switching conditions; The network switching condition is not met, the terminal device to which the first communication apparatus belongs is in a mobile state, and it is detected that the signal quality of the access point to which the terminal device is connected drops to a first target signal quality; in, The network switching condition is satisfied as follows: It is detected that the signal quality of the access point connected to the terminal device drops to a second target signal quality; the second target signal quality is lower than the first target signal quality.
8. The method according to claim 1, further comprising: Periodically check whether network scanning conditions are met; Among them, the detection period when the terminal equipment to which the first communication device belongs is in a static state is greater than the detection period when the terminal equipment is in a mobile state.
9. The method according to claim 1, wherein determining the access point to be connected from the network connection list based on the first strategy comprises: Inputting at least the level of each network access point in the network connection list and the target parameter representing the signal quality of each network access point into a pre-trained priority evaluation model to obtain the priority of each network access point; The network access point with the highest priority is determined as the access point to be connected.
10. An electronic device, comprising a first communication device and at least one processor, wherein: The first communication device is used to establish a wireless connection with a network access point; The processor is used to: If the network scanning condition is met, obtaining a network connection list including at least one network access point based on the first communication device; Determining whether the network connection list includes the first-level network access point based on the record information representing the first-level network access point; If the first-level network access point exists in the network connection list, determining an access point to be connected from the network connection list based on a first strategy; A wireless connection is established between the first communication device and the access point to be connected.