Wireless network connection method and apparatus, and terminal and program product

By determining the wireless network type and network usage preferences of the user's residence in the terminal device, generating and applying wireless network connection policies, the inefficiency of selecting the wireless network with the best signal quality is solved, and more efficient network connections are achieved.

WO2026138058A1PCT designated stage Publication Date: 2026-07-02SHANGHAI JINSHENG COMM TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHANGHAI JINSHENG COMM TECH CO LTD
Filing Date
2025-09-29
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

In terminal devices, existing technologies struggle to effectively utilize historical connection information to optimize wireless network connection strategies, resulting in inefficiency when selecting the network with the best signal quality from multiple historically connected wireless networks.

Method used

By determining the wireless network type and usage preferences of the residence, a wireless network connection policy is generated and applied when entering the residence's neighboring fence, thereby improving the accuracy and timeliness of network connection.

Benefits of technology

It improves the network connection quality of the terminal at its permanent location, ensures connection to a wireless network that meets the user's needs, and enhances the accuracy and timeliness of network connection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025125481_02072026_PF_FP_ABST
    Figure CN2025125481_02072026_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of network connection. Disclosed are a wireless network connection method and apparatus, and a terminal and a program product. The method comprises: determining at least one of a wireless network type and a network usage preference of a place of residence; on the basis of at least one of the wireless network type and the network usage preference, determining a wireless network connection policy for the place of residence; and when entering a place-of-residence neighborhood fence corresponding to the place of residence, performing a wireless network connection on the basis of the wireless network connection policy, wherein the place-of-residence neighborhood fence is used for representing features of a wireless network in the vicinity of the place of residence.
Need to check novelty before this filing date? Find Prior Art

Description

Wireless network connection methods, devices, terminals and software products

[0001] This application claims priority to Chinese Patent Application No. 202411936529.4, filed on December 25, 2024, entitled "Wireless Network Connection Method, Apparatus, Terminal and Program Product", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of network connectivity technology, and in particular to a wireless network connectivity method, device, terminal, and program product. Background Technology

[0003] With the continuous development of internet technology, people's demand for and dependence on the internet are also increasing.

[0004] For terminals with wireless network connectivity, the terminal stores historical wireless network connection information and prioritizes connecting to previously connected wireless networks when scanning for them. When multiple previously connected wireless networks are detected simultaneously, the terminal will select the wireless network with the best signal quality. Summary of the Invention

[0005] This application provides a wireless network connection method, apparatus, terminal, and application product. The technical solution is as follows:

[0006] On one hand, embodiments of this application provide a wireless network connection method, the method being used for a terminal, the method comprising:

[0007] Determine at least one of the following: the type of wireless network at your residence and your network usage preferences;

[0008] Based on at least one of the wireless network type and the network usage preference, determine the wireless network connection strategy for the permanent residence.

[0009] Upon entering the permanent residence neighbor fence corresponding to the permanent residence location, a wireless network connection is established based on the wireless network connection strategy, wherein the permanent residence neighbor fence is used to characterize the features of the wireless network near the permanent residence location.

[0010] On the other hand, embodiments of this application provide a wireless network connection device, the device comprising:

[0011] A processing module for determining at least one of the wireless network type and network usage preferences of the residence location;

[0012] The processing module is used to determine the wireless network connection strategy for the permanent residence based on at least one of the wireless network type and the network usage preference.

[0013] The connection module is used to establish a wireless network connection based on the wireless network connection strategy when entering the permanent residence neighbor fence corresponding to the permanent residence, wherein the permanent residence neighbor fence is used to characterize the features of the wireless network near the permanent residence.

[0014] On the other hand, embodiments of this application provide a terminal, the terminal including a processor and a memory, the memory storing at least one computer instruction, the at least one computer instruction being loaded and executed by the processor to implement the wireless network connection method as described above.

[0015] On the other hand, embodiments of this application provide a computer-readable storage medium storing at least one computer instruction, which is executed by a processor to implement the wireless network connection method as described above.

[0016] On the other hand, embodiments of this application provide a computer program product, which includes computer instructions, and a processor executes the computer instructions to implement the wireless network connection method as described above. Attached Figure Description

[0017] Figure 1 is a schematic diagram illustrating an implementation environment of an exemplary embodiment of this application;

[0018] Figure 2 shows a flowchart of a wireless network connection method provided in an exemplary embodiment of this application;

[0019] Figure 3 is a flowchart illustrating a network preference determination process in an exemplary embodiment of this application;

[0020] Figure 4 is a flowchart illustrating the process of determining a permanent wireless network location according to an exemplary embodiment of this application;

[0021] Figure 5 is a schematic diagram illustrating the cumulative network connection time of a wireless network in an exemplary embodiment of this application;

[0022] Figure 6 is a schematic diagram illustrating the cumulative connection time of a wireless network at the same location in an exemplary embodiment of this application;

[0023] Figure 7 is a flowchart illustrating the process of determining the nearest fence of a permanent residence, as shown in an exemplary embodiment of this application;

[0024] Figure 8 is a flowchart illustrating the process of determining the nearest fence to a permanent residence, as shown in an exemplary embodiment of this application.

[0025] Figure 9 is a flowchart illustrating a wireless network connection process in an exemplary embodiment of this application;

[0026] Figure 10 shows a structural block diagram of a wireless network connection device provided in another exemplary embodiment of this application;

[0027] Figure 11 shows a structural block diagram of a terminal provided in an exemplary embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0029] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0030] Please refer to Figure 1, which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of this application.

[0031] In this implementation environment, terminal 110 is an electronic device with network connectivity, including wireless network (WiFi) connectivity and cellular network connectivity. The electronic device can be a smartphone, tablet, wearable device, personal computer, etc.

[0032] In this embodiment, terminal 110 records historical network connection scans and serving cells, identifying three levels of fencing: a permanent location fencing 11, a permanent location neighbor fencing 12, and a cell fencing 13. The permanent location fencing 11 characterizes the features of the wireless network at the permanent location, the permanent location neighbor fencing 12 characterizes the features of the wireless networks near the permanent location, and the cell fencing 13 characterizes the serving cell at the permanent location.

[0033] Optionally, the permanent residence is the location where the terminal 110 has a permanent residence behavior, which can be a place of residence, workplace, etc.

[0034] In some embodiments, the permanent residence fence 11 is determined based on the wireless network 120 at the permanent residence; the cell fence 13 is determined based on the historical serving cell 140 at the permanent residence; and the permanent residence neighbor fence 12 is determined based on the wireless network 130 scanned when entering the cell fence 13.

[0035] In this embodiment, terminal 110 determines the wireless network connection strategy for its permanent residence based on the wireless network type of the wireless network 120 within the permanent residence fence 11 and the terminal 110's network usage preferences at the permanent residence. Subsequently, when the terminal 110 determines to enter the neighboring fence 12 of the permanent residence through wireless network scanning, it activates the wireless network connection strategy, thereby connecting to a wireless network that meets the user's usage needs when entering the permanent residence.

[0036] In some embodiments, different levels of fencing and wireless network connection policies can be determined by the network management application in terminal 110. In the following embodiments, for ease of description, the wireless network connection method is illustrated using the terminal 110 shown in FIG1 as an example.

[0037] Please refer to Figure 2, which shows a flowchart of a wireless network connection method provided in an exemplary embodiment of this application. This embodiment uses the method applied to the terminal 110 shown in Figure 1 as an example for illustration. The method may include the following steps:

[0038] Step 201: Determine at least one of the wireless network type and network usage preferences of the residence.

[0039] Optionally, the permanent residence location can be determined based on the terminal's historical wireless network connection information, or the permanent residence location can be determined based on the terminal's location results.

[0040] In some embodiments, the wireless network type is used to characterize the network characteristics of the wireless network where the user resides. These network characteristics may include at least one of the following: the number of wireless networks, the network frequency band, and the network identifier.

[0041] In one possible implementation, the terminal is configured with multiple candidate wireless network types. For each permanent location, the terminal determines the wireless network type corresponding to its current permanent location from the candidate wireless network types. Different candidate wireless network types are used to characterize different network features.

[0042] In some embodiments, network usage preferences are used to characterize the network usage preferences of a terminal at its usual location. These preferences may include at least one of network usage type, network usage time period, network usage application, and network usage duration.

[0043] Step 202: Determine the wireless network connection strategy for the permanent residence based on at least one of the wireless network type and network usage preferences.

[0044] In some embodiments, the terminal determines a first wireless network connection policy for its permanent residence based on the wireless network type. The first wireless network connection policy is used to improve the network quality at the permanent residence. The terminal determines a second wireless network connection policy for its permanent residence based on its network preferences. The second wireless network connection policy is used to enable the terminal to connect to a network that meets the user's usage needs.

[0045] In some embodiments, when a wireless network connection policy for a permanent residence is determined based on both the wireless network type and network usage preferences, the wireless network connection policy can simultaneously take into account both user needs and network quality.

[0046] In one possible implementation, the terminal is configured with multiple candidate wireless network connection strategies. For each permanent location, the terminal determines the wireless network connection strategy corresponding to the current permanent location from the candidate strategies based on at least one of the wireless network type and network usage preferences. Different candidate wireless network connection strategies are used to improve network quality and / or meet the user's network usage needs in different ways.

[0047] Step 203: Upon entering the permanent residence neighbor fence corresponding to the permanent residence location, a wireless network connection is established based on the wireless network connection strategy. The permanent residence neighbor fence is used to characterize the features of the wireless network near the permanent residence location.

[0048] To improve the timeliness of using wireless network connection policies, terminals pre-generate neighborhood fences corresponding to their permanent residence locations. Different permanent residence locations correspond to their own neighborhood fences. For example, a residential location corresponds to a residential neighborhood fence, and a workplace corresponds to a workplace neighborhood fence.

[0049] Since the permanent residence neighbor fence can characterize the features of wireless networks near the permanent residence, the terminal can match the network features of the scanned wireless network with the permanent residence neighbor fence to determine whether to enter the permanent residence neighbor fence and thus determine whether to approach the permanent residence.

[0050] When a terminal detects that it has entered a nearby fence of a permanent residence, it can apply the wireless network connection policy of that permanent residence to establish a wireless network connection. Compared to applying the wireless network connection policy only when the terminal is detected as being in a permanent residence, applying the wireless network connection policy in advance when approaching or about to enter a permanent residence can improve the accuracy of network connection and avoid network switching due to the current network not conforming to the wireless network connection policy.

[0051] In summary, in this embodiment, a corresponding wireless network connection policy is set for the permanent residence based on at least one of the wireless network type at the permanent residence and the network usage preferences of the terminal at the permanent residence. Subsequently, when the terminal is detected entering the permanent residence's neighbor fence, a wireless network connection can be established based on the permanent residence's wireless network connection policy, enabling the terminal to connect to a wireless network that meets its usage requirements at the permanent residence, thereby improving the network usage quality of the terminal at the permanent residence. Furthermore, based on the characteristics of the wireless networks near the permanent residence, a permanent residence neighbor fence is set for the permanent residence, allowing the terminal to use the wireless network connection policy when it is near the permanent residence, thereby improving the timeliness of policy application.

[0052] In some embodiments, determining at least one of the wireless network type and network usage preferences for the place of residence includes at least one of the following:

[0053] Based on the network information of the wireless network at the permanent residence location, the type of the wireless network at the permanent residence location is determined, and the network information includes the network SSID, network BSSID, and network frequency band.

[0054] Based on the historical internet usage records of the permanent residence location, the internet usage preferences of the permanent residence location are determined. The historical internet usage records include internet usage time periods, internet usage durations, and internet application types.

[0055] In some embodiments, determining the type of wireless network at the permanent residence location based on network information of the wireless network at the permanent residence location includes:

[0056] If the number of network SSIDs in the wireless network at the permanent residence is 1, and the number of network BSSIDs corresponding to the network SSID is less than or equal to a number threshold, and the network SSID corresponds to multiple network frequency bands, then the wireless network type at the permanent residence is determined to be the first type.

[0057] If the number of network SSIDs in the wireless network at the permanent residence is greater than 1, and / or the number of network BSSIDs corresponding to the same network SSID is greater than the number threshold, and / or the network SSID corresponds to a single network frequency band, then the wireless network type of the permanent residence is determined to be the second type.

[0058] In some embodiments, determining the wireless network connection policy for the permanent residence based on the wireless network type includes:

[0059] When the wireless network type is the first type, the wireless network connection policy of the permanent residence is determined to be the first connection policy, wherein, under the first connection policy, the connection priority of the high-frequency wireless network is higher than the connection priority of the low-frequency wireless network.

[0060] If the wireless network type is the second type, the wireless network connection policy of the permanent residence is determined to be the second connection policy, which is used to increase the wireless network scanning frequency.

[0061] In some embodiments, determining the network usage preference of the permanent residence based on historical network usage records at the permanent residence includes:

[0062] Based on the network usage time periods and network usage durations corresponding to different networks at the permanent residence location, the network usage time period preference at the permanent residence location is determined, and the network usage time period preference is used to characterize the correspondence between the network usage time periods and the networks;

[0063] Based on the network application type and network usage duration corresponding to different networks at the permanent residence location, the network application preference at the permanent residence location is determined, and the network application preference is used to characterize the correspondence between the network application type and the network.

[0064] At least one of the network usage time preference and the network usage application preference is determined as the network usage preference of the permanent residence.

[0065] In some embodiments, determining the wireless network connection policy for the permanent residence based on the network usage preference includes at least one of the following:

[0066] Based on the network usage time preferences and the current time period, determine the wireless network connection strategy for the permanent residence;

[0067] Based on the network application preferences and current network applications, the wireless network connection strategy for the permanent residence is determined.

[0068] In some embodiments, the method further includes:

[0069] Based on the historical connection information and historical scanning information of the wireless network, the permanent residence fence corresponding to the permanent residence is determined. The permanent residence fence is used to characterize the permanent wireless network at the permanent residence location.

[0070] The determination of at least one of the wireless network type and network usage preferences for the permanent residence location includes at least one of the following:

[0071] Based on the network information of the wireless network in the permanent residence fence, the type of the wireless network in the permanent residence is determined;

[0072] Based on historical netting records within the fenced area of ​​the permanent residence, the netting preference of the permanent residence is determined.

[0073] In some embodiments, determining the permanent residence fence corresponding to the permanent residence based on historical wireless network connection information and historical wireless network scanning information includes:

[0074] Based on the historical scanning information of the wireless network, a non-mobile wireless network is identified;

[0075] Based on the historical scanning information of the wireless network, the historical wireless networks belonging to the non-mobile network are aggregated to obtain the historical wireless networks belonging to the same location;

[0076] Based on the wireless network connection information, determine the cumulative connection duration of the historical wireless networks at the same location;

[0077] If the cumulative connection duration of the historical wireless network at the same location exceeds a duration threshold, the permanent residence fence corresponding to the permanent residence is determined based on the historical wireless network, wherein the historical wireless network is the permanent residence wireless network of the permanent residence.

[0078] In some embodiments, determining the non-mobile wireless network based on the wireless network historical scan information includes:

[0079] Acquire multiple historical scanning information of wireless networks at different scanning times. The historical scanning information of wireless networks includes the network BSSID and signal strength of the different wireless networks scanned.

[0080] From each of the aforementioned wireless network historical scan information, the network bssid and signal strength of the candidate wireless network are deleted to obtain updated wireless network historical scan information;

[0081] Calculate the information similarity among multiple updated historical scan information of wireless networks to obtain an information similarity sequence;

[0082] If the mean of each information similarity in the information similarity sequence is greater than the mean threshold and the variance is less than the variance threshold, then the candidate wireless network is determined to belong to the non-mobile wireless network.

[0083] In some embodiments, the step of aggregating historical wireless networks belonging to the non-mobility network based on the historical scan information of the wireless network to obtain historical wireless networks belonging to the same location includes:

[0084] The historical wireless networks belonging to the non-mobile network that are located in the same historical scan information of the wireless network are aggregated to obtain the historical wireless networks belonging to the same location.

[0085] In some embodiments, the method further includes:

[0086] Determine the community fence corresponding to the permanent residence fence, whereby the community fence is used to characterize the service community where the permanent residence is located;

[0087] Upon entering the community fence, the neighboring fences of the permanent residence are determined based on the wireless network scanning information within the community fence.

[0088] In some embodiments, determining the community fence corresponding to the permanent residence fence includes:

[0089] Determine the connection period of the historical wireless network represented by the permanent residence fence;

[0090] Based on the service cell within the connection period, determine the cell fence corresponding to the permanent residence fence.

[0091] In some embodiments, determining the neighboring fences of the permanent residence corresponding to the permanent residence based on wireless network scanning information within the cell fence includes:

[0092] For each wireless network scanning information within the cell fence, a scanning sample is constructed based on the scanning time of the wireless network scanning information and the signal strength of the included wireless networks. The scanning sample includes the scanning time and the average signal strength of the wireless network scanning information.

[0093] Based on the continuous scanned samples, a reference time point is determined, which is the time point located at the permanent residence.

[0094] Based on a reference time point, the nearest wireless network scanning information in the wireless network scanning information is determined. The nearest wireless network scanning information is the wireless network scanning information obtained by scanning near the permanent location.

[0095] The nearest fence to the permanent residence is determined based on the nearby wireless network scanning information.

[0096] In some embodiments, constructing a scan sample based on the scan time and the signal strength of the included wireless network scan information includes:

[0097] If the wireless network scan information includes the permanent wireless network, determine the average signal strength of the permanent wireless network.

[0098] If the wireless network scanning information does not include the permanent wireless network, the preset signal strength is determined as the average signal strength.

[0099] The scan sample is constructed based on the average signal strength and the scan time of the wireless network scan information.

[0100] In some embodiments, determining a reference time point based on consecutive scanned samples includes:

[0101] The scanning time range of the continuous scan samples is divided into multiple time windows;

[0102] For each time window, the window scanning time and the average signal intensity of the scanned samples within the time window are determined.

[0103] When the signal strength threshold is between the average signal strength values ​​of the windows corresponding to adjacent time windows, the reference time point is determined based on the average signal strength values ​​of the windows corresponding to adjacent time windows and the window scanning time. The reference time point is between the window scanning times corresponding to the adjacent time windows.

[0104] In some embodiments, determining the neighboring wireless network scanning information in the wireless network scanning information based on a reference time point includes:

[0105] A reference time period is determined based on the reference time point, wherein the reference time point is within the range of the reference time period;

[0106] The wireless network scanning information whose scanning time falls within the reference time period is determined as the neighboring wireless network scanning information.

[0107] In some embodiments, the method further includes:

[0108] Upon entering the cell fence, obtain the current wireless network scanning information within the cell fence;

[0109] If the similarity between the scanning information of the nearby wireless network and the scanning information of the current wireless network is greater than a similarity threshold, and the wireless network near the permanent residence has not been connected within a preset time period, it is determined to enter the nearby fence of the permanent residence corresponding to the permanent residence.

[0110] In some embodiments, the method further includes:

[0111] Determine the sample similarity between scanning information from different neighboring wireless networks;

[0112] The sample similarities are sorted, and the sample similarities that are located at the target percentage position after sorting are determined as the similarity threshold.

[0113] In some embodiments, the method further includes:

[0114] Determine the most recent sensing time of the fence, which includes at least one of the permanent residence fence, the permanent residence neighbor fence, and the community fence;

[0115] If the time interval between the most recent perceived moment and the current moment is greater than the time interval threshold, the fence is deleted.

[0116] Determining the Wireless Network Type & Wireless Network Connection Strategy

[0117] In one possible implementation, the terminal determines the wireless network type of its permanent location based on the network information of the wireless network where it is located. The network information includes the network SSID (Service Set Identifier), the network BSSID (Basic Service Set Identifier), and the network frequency band.

[0118] The network information of the wireless network at the user's residence is obtained by the terminal scanning at its residence. Optionally, the wireless network includes wireless networks that the terminal scans and connects to, as well as wireless networks that the terminal scans but does not connect to.

[0119] In some embodiments, based on the network SSID and BSSID, the terminal can determine the number of wireless networks set up at its residence and whether the wireless networks form a network; based on the network SSID and network frequency band, the terminal can determine whether the same wireless network at its residence supports multiple frequency bands.

[0120] In one possible design, the terminal has two preset wireless network types: Type 1 and Type 2. Type 1 indicates that the wireless network uses multiple frequency bands and is not networked, while Type 2 indicates that the wireless network does not use multiple frequency bands and is not networked. Accordingly, determining the wireless network type based on network information can include the following two cases:

[0121] Case 1: If the number of network SSIDs in the permanent residence is 1, and the number of network BSSIDs corresponding to the network SSID is less than or equal to the number threshold, and the network SSID corresponds to multiple network frequency bands, then the wireless network type of the permanent residence is determined to be Type 1.

[0122] Specifically, if the number of network SSIDs (different wireless networks can have the same network SSID) in the permanent location is 1, and the number of network BSSIDs (different wireless networks have different BSSIDs) corresponding to that network SSID is less than or equal to a certain threshold, it indicates that the wireless network is not using a network topology. Furthermore, if the network SSID corresponds to multiple network frequency bands, it indicates that the wireless network supports multiple frequency bands.

[0123] In some embodiments, for multiple wireless networks, if the network SSIDs of the multiple wireless networks are completely identical, or if the network SSIDs of the multiple wireless networks are completely identical after removing the frequency band information, the terminal determines that the multiple wireless networks have the same network SSID. For example, when the network BSSID of wireless network A is A-home and the network BSSID of wireless network B is A-home_5G (5G indicates the network frequency band), the terminal determines that wireless network A and wireless network B have the same network BSSID.

[0124] In some embodiments, when the network SSID corresponds to 2.4GHz and 5GHz, the terminal determines that the wireless network supports dual-band.

[0125] Optionally, if the number of network SSIDs in the permanent residence is 1, and the number of network BSSIDs corresponding to the network SSID is less than or equal to 2, and the network SSIDs correspond to the 2.4GHz and 5GHz frequency bands, the terminal determines the wireless network type of the permanent residence as the first type, which is the dual-band non-network.

[0126] In an illustrative example, when the network information of the wireless network at the permanent residence is as shown in Table 1, the terminal determines that the wireless network type at the permanent residence is the first type.

[0127] Table 1

[0128] Accordingly, for the first type of wireless network, the terminal determines the wireless network connection strategy as frequency band preference, that is, when selecting the wireless network to connect to, wireless networks of different frequency bands have different connection priorities.

[0129] In one possible implementation, when the wireless network type is a first type, the terminal determines the wireless network connection policy of its permanent residence as a first connection policy, wherein, under the first connection policy, the connection priority of the high-frequency wireless network is higher than the connection priority of the low-frequency wireless network.

[0130] Because higher frequency wireless signals have more channels, which means less interference and higher data transmission rates, frequency bands are preferred when connecting to higher frequency wireless networks.

[0131] As an illustration, when the wireless network supports both 2.4GHz and 5GHz frequency bands, the terminal prioritizes connecting to the 5GHz wireless network based on the first connection strategy.

[0132] Case 2: If the number of network SSIDs in the permanent residence is greater than 1, and / or the number of network BSSIDs corresponding to the same network SSID is greater than the number threshold, and / or the network SSID corresponds to a single network frequency band, the wireless network type of the permanent residence is determined to be Type II.

[0133] Among them, if the number of network SSIDs (different wireless networks can have the same network SSID) in the permanent residence is greater than 1, it indicates that there are multiple wireless network access points near the permanent residence; if the number of network BSSIDs corresponding to the same network SSID is greater than the number threshold, it indicates that the network SSID is a wireless network using a network topology; if the network SSID corresponds to a single network frequency band, it indicates that the wireless network does not support multiple frequency bands.

[0134] In some embodiments, if the network SSIDs of multiple wireless networks are inconsistent after removing the frequency band information, the terminal determines that the multiple wireless networks have different network SSIDs.

[0135] Optionally, if the number of network SSIDs of the wireless network at the permanent residence is greater than 1, and / or the number of network BSSIDs corresponding to the same network SSID is greater than 2, and / or the network SSID corresponds to a single network frequency band, the terminal determines the wireless network type of the permanent residence as the second type, which indicates that the wireless network does not belong to dual-band non-networking.

[0136] In an illustrative example, when the network information of the wireless network at the permanent residence is shown in Table 2, the terminal determines that the wireless network type at the permanent residence is the second type.

[0137] Table 2

[0138] Correspondingly, for the second type of wireless network, the terminal does not perform frequency band optimization, but instead increases the wireless network scanning frequency to improve the timeliness of wireless network switching.

[0139] In one possible implementation, when the wireless network type is the second type, the terminal determines that the wireless network connection policy of the permanent residence is the second connection policy, which is used to increase the wireless network scanning frequency.

[0140] In the second type of wireless network environment, due to the complexity of the wireless network environment (a large number of wireless networks that can be connected), in order for the terminal to switch wireless networks in a timely manner, the terminal increases the wireless network scanning frequency at its permanent residence, so as to discover and switch to a wireless network with better quality in a timely manner, or, if the quality of wireless networks is poor, switch to a cellular network.

[0141] In this embodiment, when the terminal identifies that the wireless network at its permanent residence is multi-band and not networked, it determines a wireless network connection strategy that prioritizes connecting to the high-frequency wireless network to improve the communication quality after the terminal connects to the high-frequency wireless network. When the terminal identifies that the wireless network at its permanent residence is not multi-band and not networked, it increases the network scanning frequency at its permanent residence so that the terminal can switch networks in a timely manner at that permanent residence, ensuring the quality of network use for the terminal.

[0142] Determining network preferences & wireless network connection strategies

[0143] In one possible implementation, the terminal determines the network usage preference of the permanent residence location based on the historical network usage records of the permanent residence location. The historical network usage records include the network usage time period, network usage duration, and network application type.

[0144] This historical internet usage record is recorded and stored by the terminal when it is identified as being in its usual location. This historical internet usage record can be recorded by a single terminal, or by multiple terminals logged into the same account. For example, smartphones and tablets under the same account can jointly collect historical internet usage records in their usual location.

[0145] Optionally, the network usage time period belongs to several candidate time periods obtained according to the division rules. For example, the terminal divides every two hours of the day into a candidate time period, or divides Monday to Friday of the week into a candidate time period, and Saturday and Sunday into a candidate time period. The embodiments of this application do not limit the method of dividing the time period.

[0146] Optionally, the network application type refers to the type of application running (foreground or background) while using the network. In some embodiments, the network application type is determined by the type of application whose runtime exceeds a duration threshold and / or whose traffic consumption exceeds a traffic threshold during network usage. This network application type may include games, videos, music, news, etc., but this embodiment does not limit this.

[0147] In one possible implementation, as shown in Figure 3, the terminal determining network usage preferences based on the aforementioned historical network usage records may include the following steps:

[0148] Step 301: Based on the network usage time periods and durations corresponding to different networks at the permanent residence location, determine the network usage time period preference at the permanent residence location. The network usage time period preference is used to characterize the correspondence between network usage time periods and networks.

[0149] Although there are many wireless networks available at a user's residence, users usually have fixed usage preferences, which may be related to the time of day they use the network. Therefore, the terminal can count the duration of its network usage on different networks at different times of day to determine its preferred network usage time at its residence, that is, the network that the terminal prefers to connect to at different times of day.

[0150] Optionally, the terminal determines the percentage of network usage time for different networks during different network usage periods based on historical network usage records, and then identifies the network with the highest percentage as the preferred network for that network usage period.

[0151] As an illustration, when both dormitory WiFi and campus network are available at the user's residence, the terminal counts the percentage of time spent connected to dormitory WiFi (p1) and the percentage of time spent connected to the campus network (p2) during the network usage period. If p1 > p2, and p1 is greater than the percentage threshold (the percentage threshold is greater than or equal to 0.5), the terminal determines that the preferred network for that network usage period is dormitory WiFi.

[0152] Step 302: Based on the network application types and network usage durations corresponding to different networks at the permanent residence location, determine the network application preferences at the permanent residence location. The network application preferences are used to characterize the correspondence between network application types and networks.

[0153] Although there are many wireless networks available at a user's usual residence, users typically have fixed usage preferences, which may be related to the network applications they use. For example, when using applications that require high network stability, users may choose networks with less fluctuation. Therefore, the terminal can statistically analyze the types of network applications used by the terminal on different networks to determine its network application preferences at its usual residence, that is, the networks that the terminal prefers to connect to when using different types of network applications.

[0154] Optionally, the terminal determines the proportion of network usage time for different networks under different network usage application types based on historical network usage records, and then identifies the network with the highest proportion as the preferred network corresponding to that network usage application type.

[0155] To illustrate, when both dormitory WiFi and cellular networks are available at the user's residence, the terminal counts the percentage of time spent connected to dormitory WiFi (p1) and the percentage of time spent connected to cellular networks (p2) when using game applications. If p2 > p1, and p2 is greater than the percentage threshold (the percentage threshold is greater than or equal to 0.5), the terminal determines that the preferred network for the game application is the cellular network.

[0156] Optionally, since network preference may be related to both the time of network use and the application used, the terminal can determine the correspondence between the time of network use, the type of application used, and the preferred network based on historical network usage records. This will not be elaborated on in this embodiment.

[0157] Step 303: Determine at least one of the network usage time preference and network usage application preference as the network usage preference of the permanent residence.

[0158] The terminal determines its network usage preference based on at least one of its network usage time preference and network usage application preference.

[0159] When determining the wireless network connection strategy for the permanent residence location based on network usage preferences, if there are network usage time preferences, the terminal determines the wireless network connection strategy for the permanent residence location based on the network usage time preferences and the current time period.

[0160] Optionally, based on the correspondence between the network usage time period represented by the network usage time period preference and the preferred network, the terminal determines the wireless network connection strategy of prioritizing connection to the preferred network corresponding to the current time period as the permanent residence.

[0161] When network application preferences exist, the terminal determines the wireless network connection strategy for its permanent location based on these preferences and the current network application being used.

[0162] Optionally, based on the correspondence between the network application type represented by the network application preference and the preferred network, the terminal determines the wireless network connection strategy of prioritizing connection to the preferred network corresponding to the application type of the current network application as the permanent location.

[0163] In other possible implementations, when there are network usage periods and network application preferences, the terminal can determine the wireless network connection policy for its permanent location based on the correspondence between the current time period, the application type of the current network usage application, and the preferred network, from the correspondence between the network usage period, the application type of the current network usage application, and the preferred network.

[0164] In an illustrative example, based on the network usage preferences of the user's place of residence, the terminal determines that the wireless network connection strategy used when using a news application on a weekday is to connect to a WiFi network, and determines that the wireless network connection strategy used when using a game application on a holiday is to connect to a cellular network.

[0165] In this embodiment, the network usage time and network application preferences of the permanent residence are determined from two dimensions: the network usage time period and the network application. This enables the terminal to connect to the preferred network corresponding to the specific time period and to connect to the preferred network corresponding to the specific application type when using a specific type of application, so that the network connected to the terminal conforms to the user's usage preferences.

[0166] Permanent residence fence

[0167] To improve the accuracy of determining network usage preferences for a permanent residence location, the terminal needs to accurately obtain network information and / or historical network usage records for that location. Since the connection frequency of wireless networks at a permanent residence location is typically high, and the changes in wireless networks are usually minimal, in one possible implementation, the terminal determines the permanent residence location's fence based on historical wireless network connection information and historical wireless network scan information. This fence is used to characterize the permanent wireless network at the permanent residence location.

[0168] Furthermore, the terminal determines the wireless network type of the permanent residence based on the network information of the wireless network within the permanent residence fence, and / or determines the network usage preference of the permanent residence based on the historical network usage records within the permanent residence fence.

[0169] In some embodiments, a wireless network historical connection information may include the wireless network's BSSID, start time (st), and end time (et). Table 3 illustrates an example of wireless network historical connection information.

[0170] Table 3

[0171] In some embodiments, a wireless network historical scan information includes a scan timestamp, the network BSSID of the scanned wireless network, and the signal strength (RSSI). Illustratively, wireless network historical scan information is shown in Table 4.

[0172] Table 4

[0173] In one possible implementation, for each wireless network historical connection information, the terminal accumulates multiple single connection durations of the same historical wireless network based on the departure time and access time in the wireless network historical connection information, and the single connection duration of the historical wireless network indicated by the information, to obtain the cumulative connection duration of the historical wireless network.

[0174] Optionally, the terminal determines the cumulative connection duration of the wireless network within a unit of time based on the historical connection information of the wireless network within the unit of time, and then determines the average of the cumulative connection durations within multiple unit of time as the cumulative connection duration of the wireless network.

[0175] Since multiple wireless networks may exist at the same location, and the terminal may switch between multiple wireless networks, in one possible implementation, the terminal determines the wireless network located at the same location based on the wireless network historical scan information, and then accumulates the cumulative connection time of the wireless network at the same location to obtain the cumulative connection time of the wireless network at that location.

[0176] Typically, the wireless network connection time at the permanent residence location is usually longer. Therefore, the terminal can determine the permanent residence location by further calculating the cumulative connection time of wireless networks at various locations, and then determine the permanent wireless network at the permanent residence location.

[0177] Since the wireless network connected to the terminal may be provided by mobile wireless access points in addition to fixed wireless access points, the terminal also needs to distinguish between mobile wireless networks and non-mobile wireless networks in order to avoid recognizing the wireless network provided by the mobile wireless access point as the wireless network at the permanent location.

[0178] In one possible implementation, as shown in Figure 4, the terminal determining the permanent location fence may include the following steps:

[0179] Step 401: Determine the non-mobile wireless network based on the historical scanning information of the wireless network.

[0180] For mobile wireless networks, because the devices providing the network move, the wireless networks detected each time a mobile wireless network is scanned will be quite different (i.e., the wireless network environment will vary greatly); while for non-mobile wireless networks, because the devices providing the network usually do not move, the wireless networks detected each time a non-mobile wireless network is scanned are usually quite similar (i.e., the wireless network environment will vary less).

[0181] Since wireless network scanning information can characterize the surrounding wireless network environment, a terminal can distinguish between mobile and non-mobile wireless networks based on historical scanning information. Optionally, this process may include the following sub-steps:

[0182] Sub-step 1: Obtain multiple historical scanning information of wireless networks at different scanning times. The historical scanning information of wireless networks includes the network BSSID and signal strength of different wireless networks scanned.

[0183] In some embodiments, when the terminal enables wireless network scanning, the terminal performs real-time wireless network scanning to obtain multiple historical wireless network scanning information at different scanning times. The historical scanning information for each wireless network can be shown in Table 4.

[0184] Sub-step 2 involves deleting the network BSSID and signal strength of candidate wireless networks from the historical scan information of each wireless network to obtain updated historical scan information of multiple wireless networks.

[0185] The candidate wireless network is a wireless network that has been historically connected to, and the candidate wireless network can be determined based on the historical connection information of the wireless network.

[0186] For each candidate wireless network, the terminal determines the wireless network historical scan information containing the network bssid of the candidate wireless network, and deletes the network bssid and its corresponding signal strength from the wireless network historical scan information to obtain the updated wireless network historical scan information.

[0187] As an illustration, when the network bssid of the candidate wireless network is ae:50:de:71:96:6a, and the historical scanning information of the wireless network is shown in Table 4, the terminal deletes the network bssid "ae:50:de:71:96:6a" and its corresponding signal strength -81 from Table 4, and obtains the updated historical scanning information of the wireless network as shown in Table 5.

[0188] Table 5

[0189] Sub-step 3: Calculate the information similarity between multiple updated historical scan information of wireless networks to obtain an information similarity sequence.

[0190] Furthermore, for each updated historical scan information of wireless networks (which includes candidate wireless networks before the update and does not include candidate wireless networks after the update), the terminal calculates the information similarity between each updated historical scan information of wireless networks to obtain an information similarity sequence containing multiple information similarities.

[0191] In some embodiments, the terminal may use methods such as Jaccard similarity coefficient, Pearson similarity coefficient, Euclidean distance, cosine similarity to calculate information similarity, but this embodiment does not limit this.

[0192] As an illustration, when the updated historical scan information of multiple wireless networks includes historical scan information A, historical scan information B, historical scan information C, and historical scan information D, the information similarity sequence calculated by the terminal includes S. AB (representing the information similarity between wireless network historical scan information A and wireless network historical scan information B), S AC S AD S BC S BD S CD .

[0193] Furthermore, the terminal calculates the mean and variance of the similarity of each piece of information in the information similarity sequence.

[0194] For non-mobile wireless networks, the wireless network environment is usually relatively stable, so the similarity between historical scan information of wireless networks containing non-mobile wireless networks is usually high, and the changes in historical scan information are usually small. For mobile wireless networks, the wireless network environment is usually more variable, so the similarity between historical scan information of wireless networks containing mobile wireless networks is usually low, and the changes in historical scan information are usually larger. Based on these principles, terminals can distinguish between non-mobile and mobile wireless networks by comparing the relationship between the mean and the mean threshold, and the relationship between the variance and the variance threshold.

[0195] Sub-step 4: If the mean of each information similarity in the information similarity sequence is greater than the mean threshold and the variance is less than the variance threshold, then the candidate wireless network is determined to be a non-mobile wireless network.

[0196] If the mean of each information similarity in the information similarity sequence is greater than the mean threshold and the variance is less than the variance threshold, the terminal determines that the candidate wireless network belongs to a non-mobile wireless network.

[0197] Optionally, if the mean of each information similarity in the information similarity sequence is less than or equal to the mean threshold, and / or the variance is greater than or equal to the variance threshold, the terminal determines that the candidate wireless network belongs to the mobile wireless network.

[0198] The mean threshold and variance threshold can be determined based on sample wireless network scanning information that includes non-mobile wireless networks and mobile wireless networks, and this embodiment does not limit this.

[0199] In addition to distinguishing between mobile and non-mobile wireless networks based on historical scanning information of wireless networks, in other possible implementations, the terminal can also distinguish them based on other information, such as whether the network SSID of the wireless network contains keywords (e.g., xxx's mobile phone). This embodiment does not limit this.

[0200] Step 402: Based on the historical scanning information of wireless networks, aggregate the historical wireless networks that belong to non-mobile networks to obtain historical wireless networks belonging to the same location.

[0201] Since a terminal can scan for wireless networks within a certain range, it can aggregate historical wireless networks belonging to non-mobile networks based on historical wireless network scanning information to obtain historical wireless networks belonging to the same location. These historical wireless networks are those included in the historical wireless network scanning information, i.e., the wireless networks scanned in the past.

[0202] In one possible implementation, the terminal aggregates historical wireless networks belonging to non-mobile networks that are located on the same wireless network historical scan information to obtain historical wireless networks belonging to the same location.

[0203] As an illustration, when wireless network historical scan information A contains bssid1 and bssid2, wireless network historical scan information B contains bssid1 and bssid3, and wireless network historical scan information C contains bssid2 and bssid4, the terminal determines that bssid1, 2, 3, and 4 belong to the same historical wireless network.

[0204] Step 403: Based on the wireless network connection information, determine the cumulative connection duration of the historical wireless networks at the same location.

[0205] In one possible implementation, the terminal determines the cumulative connection time of each wireless network based on the wireless network connection information, and then adds up the cumulative connection time of each historical wireless network at the same location to obtain the cumulative connection time of the historical wireless network at that location.

[0206] In some embodiments, when the wireless network connection information is as shown in Table 3, the network connection duration represented by each wireless network connection information is et-st.

[0207] For example, when the obtained wireless network connection information includes: [{st1,et1,bssid1}, {st2,et2,bssid2}, {st3,et3,bssid3}, {st4,et4,bssid1}, {st5,et5,bssid3}, {st6,et6,bssid1}], the cumulative network connection time of bssid1 is (et1-st1)+(et4-st4)+(et6-st6), the cumulative network connection time of bssid2 is (et2-st2), and the cumulative network connection time of bssid3 is (et3-st3)+(et5-st5).

[0208] As an illustration, Figure 5 shows the cumulative connection time of each historical wireless network obtained by the terminal when there are 7 historical wireless networks. Furthermore, when it is determined that bssid2, 3, and 7 belong to the same location, and bssid1 and 4 belong to the same location, the cumulative connection time of the historical wireless networks at the same location is shown in Figure 6.

[0209] Step 404: If the cumulative connection duration of the historical wireless network at the same location exceeds the duration threshold, determine the permanent residence fence corresponding to the permanent residence based on the historical wireless network, where the historical wireless network is the permanent residence wireless network of the permanent residence.

[0210] When the cumulative connection duration of the historical wireless networks at the same location exceeds the duration threshold, the terminal determines that the location as its permanent residence, and the corresponding historical wireless network at that location is the permanent residence wireless network.

[0211] Since users may have multiple permanent locations, such as their residence and workplace, the terminal may determine multiple permanent location fences based on the cumulative connection time.

[0212] As shown in Figure 6, the terminal identifies locations with a cumulative connection time of more than 3 hours as permanent residences, thereby identifying bssid2, 3, and 7 as permanent wireless networks of the first permanent residence, and bssis1 and 4 as permanent wireless networks of the second permanent residence.

[0213] In this embodiment, the terminal distinguishes between mobile wireless networks and non-mobile wireless networks based on historical scanning information of wireless networks, and determines the permanent wireless network of the permanent residence from the non-mobile wireless networks. This avoids the impact of mobile hotspots accessed by the terminal on the identification of the permanent residence, and improves the accuracy of the determined permanent residence and the permanent residence fence.

[0214] Community fence

[0215] Because directly determining the nearest fence to the permanent residence is difficult and has low accuracy, after determining the permanent residence fence, the terminal further determines the community fence corresponding to the permanent residence fence, and then determines the nearest fence to the permanent residence (with a range smaller than the community fence) based on the community fence.

[0216] The cell fence is used to represent the serving cell where the residence is located. In some embodiments, the cell fence includes the cell ID of the serving cell where the residence is located.

[0217] In one possible implementation, the terminal can record changes in the serving cell. For example, it can record the timestamp and serving cell ID of the cell to which the terminal switched. Table 6 illustrates the serving cell changes recorded by the terminal.

[0218] Table 6

[0219] In one possible implementation, the terminal determines the connection period of the historical wireless network represented by the permanent location fence, and then determines the cell fence corresponding to the permanent location fence based on the serving cell within the connection period.

[0220] In an illustrative example, when a permanent residence contains multiple historical wireless networks, the terminal determines the connection period of each historical wireless network, uses the serving cell ID whose timestamp is located in that connection period to determine the serving cell ID of the permanent residence, and then determines the union of the serving cell IDs of the permanent residence as the cell fence corresponding to the permanent residence.

[0221] Permanent residence near fence

[0222] After identifying the community fence, in order to further identify the neighboring fences of the permanent residence located between the community fence and the permanent residence fence, the terminal, upon entering the community fence, determines the neighboring fences of the permanent residence based on the wireless network scanning information within the community fence.

[0223] Optionally, if the terminal detects that it has entered a cell fence (i.e., it detects that the current serving cell ID belongs to the set of serving cell IDs represented by the cell fence), the terminal performs a wireless network scan to obtain wireless network scan information.

[0224] Optionally, the terminal determines the neighboring fences of the permanent residence within a certain range near the permanent residence based on the correlation between the wireless network scanning information and the wireless network of the permanent residence represented by the permanent residence fence.

[0225] In one possible implementation, as shown in Figure 7, determining the nearest fence of a permanent residence based on wireless network scanning information may include the following steps:

[0226] Step 701: For each wireless network scanning information within the community fence, construct a scanning sample based on the scanning time of the wireless network scanning information and the signal strength of the included wireless networks. The scanning sample includes the scanning time of the wireless network scanning information and the average signal strength.

[0227] The wireless network scanning information is shown in Table 4. Optionally, the scanning timestamps in the wireless network scanning information are the average of the timestamps of each BSSID scanned.

[0228] When the terminal is relatively close to its permanent residence but far away, the wireless network scan information obtained will not include the network BSSID of the permanent residence wireless network; while when the terminal is far away from its permanent residence, the wireless network scan information obtained will include one or more network BSSIDs of the permanent residence wireless network.

[0229] In one possible implementation, the terminal can construct a scanning sample based on the signal strength of the wireless network in the wireless network scanning information. This scanning sample can characterize the distance between the location where the wireless network scanning information was obtained and the user's usual residence by including the average signal strength.

[0230] Optionally, this step may include the following sub-steps:

[0231] Sub-step 1: If the wireless network scan information includes the permanent wireless network, determine the average signal strength of the permanent wireless network.

[0232] When the wireless network scan information includes the network BSSID of the permanent wireless network, the terminal determines the average signal strength of the permanent wireless network in the wireless network scan information. A smaller average signal strength indicates that the location where the wireless network scan information was obtained is closer to the permanent residence; conversely, a larger average signal strength indicates that the location where the wireless network scan information was obtained is farther from the permanent residence.

[0233] As illustrated in Figure 6, when the wireless network scan information includes bssid2, bssid7, bssid8, bssid9, and bssid10, since the permanent wireless network includes bssid2, 3, and 7, the terminal determines the average signal strength to be -75 based on the signal strengths of -80 and -70 corresponding to bssid2 and bssid7 in the wireless network scan information.

[0234] Sub-step 2: If the wireless network scan information does not include the local wireless network, the preset signal strength is determined as the average signal strength.

[0235] In cases where the wireless network scan information does not include the network BSSID of the permanent wireless network, the terminal sets a preset signal strength as the average signal strength in order to distinguish it from scan samples corresponding to wireless network scan information that includes the permanent wireless network. This preset signal strength is set to a small value, typically less than the minimum signal strength of the wireless network scan; for example, the preset signal strength is -100.

[0236] As illustrated in Figure 6, when the wireless network scan information includes bssid4, bssid11, and bssid12, the terminal determines the average signal strength to be -100 because the permanent wireless network includes bssid2, 3, and 7.

[0237] Sub-step 3: Construct scanning samples based on the average signal strength and the scanning time of the wireless network scanning information.

[0238] Furthermore, the terminal constructs scan samples that include the average signal strength and the scan time. Each scan sample can be represented as (T, RSSI), where T is the scan time of the wireless network scan information, and RSSI is the average signal strength.

[0239] Step 702: Based on the continuous scan samples, determine the reference time point, which is the time point located at the permanent residence.

[0240] Based on the scanning times and average signal strength contained in the continuous scan samples, the terminal can determine its movement trend relative to its home location. For example, when the terminal moves towards its home location, the average signal strength contained in the continuous scan samples will show an increasing trend; while when the terminal moves away from its home location, the average signal strength contained in the continuous scan samples will show a decreasing trend.

[0241] Since the signal strength of the wireless network at the permanent location will be within a certain range when the terminal is at the permanent location, the terminal can determine the time point when it is at the permanent location based on the terminal's movement trend, the scanning time of each scan sample, and the average reference signal strength when it is at the permanent location.

[0242] To improve the accuracy of the determined reference time point, the terminal can further divide different scan samples into different time windows, thereby determining the reference time point based on each time window and reducing the impact of signal strength fluctuations during single-point scanning. Optionally, this step may include the following sub-steps:

[0243] Sub-step 1: Divide the scanning time range of continuous scan samples into multiple time windows.

[0244] In one possible implementation, the terminal divides the scanning time range (the earliest and latest scanning times of continuously scanned samples) into multiple time windows according to a preset time window size.

[0245] For example, the terminal can divide the scanning time range into multiple time windows with a preset time window size of 5 seconds.

[0246] Indicatively, when the earliest scan time is Tmin, the latest scan time is Tmax, and the preset time window size is s, the resulting n+1 time windows can be represented as: [Tmin~Tmin+s, Tmin+s~Tmin+2s, …, Tmin+n*s~Tmin+(n+1)*s], where Tmin+n*s≤Tmax≤Tmin+(n+1)*s.

[0247] Sub-step 2: For each time window, based on the scanning time and average signal intensity of the scanned samples within the time window, determine the window scanning time and average signal intensity corresponding to the time window.

[0248] For each time window, the terminal determines the average of the scanning times of each scanned sample within that time window as the window scanning time; and determines the average of the average signal strengths of each scanned sample within that time window as the window signal strength average.

[0249] It should be noted that if there are no scanned samples within the time window, the window scan time and the average window signal strength of that time window are both set to 0.

[0250] Schematic, the terminal determines the mean window signal intensity for each time window as: [-100, -100, 0, -100, -100, -80, -76, -73, -50, -45, -44], where the i-th value in this sequence represents the mean window signal intensity for the i-th time window (Tmin+(i-1)*s~Tmin+i*s). Since the third time window does not contain any scanned samples, its mean window signal intensity is 0.

[0251] Sub-step 3: When the signal strength threshold is between the average window signal strength values ​​corresponding to adjacent time windows, a reference time point is determined based on the average window signal strength values ​​corresponding to adjacent time windows and the window scanning time. The reference time point is between the window scanning times corresponding to adjacent time windows.

[0252] The signal strength threshold is the average signal strength of a reference window within the time window when the signal is at a stationary point. This signal strength threshold can be set empirically or fine-tuned. For example, the signal strength threshold can be a value between -50 and -100.

[0253] When the signal strength threshold is between the average signal strength values ​​of adjacent time windows, the surface terminal may enter or leave its permanent location between adjacent time windows. Therefore, the terminal can determine the reference time point at its permanent location based on the change in the average signal strength value within these two adjacent time windows and the duration of this change. This reference time point is a time point located between the window scan times corresponding to adjacent time windows.

[0254] In some embodiments, for the i-th time window and the (i+1)-th time window, when r i ≤thred≤r i+1 or r i+1 ≤thred≤r iWhen the terminal determines that it is between the i-th and i+1-th time windows, it either enters or leaves its permanent location. Where r... i Let r be the mean signal strength of the i-th time window. i+1 is the mean signal strength of the window in the (i+1)th time window, and thred is the signal strength threshold.

[0255] Furthermore, the terminal can determine the reference time point according to the following formula:

[0256] T label =abs(t i -t i+1 ) / abs(r i -r i+1 )*abs(r i -thred)+t i

[0257] Among them, T label For the reference time point, abs is used for absolute value operations, t i Let t be the window scan time of the i-th time window. i+1 Let be the window scan time of the (i+1)th time window. abs(t) i -t i+1 ) / abs(r i -r i+1 It can represent the change in signal strength within a unit of time.

[0258] Step 703: Based on the reference time point, determine the neighboring wireless network scanning information in the wireless network scanning information. The neighboring wireless network scanning information is the wireless network scanning information obtained by scanning near the permanent location.

[0259] In one possible implementation, the terminal determines the wireless network scanning information within a certain period before and after the reference time point as the neighboring wireless network scanning information based on the reference time point.

[0260] Optionally, the terminal determines a reference time period based on a reference time point, which is within the range of the reference time period, thereby identifying wireless network scanning information whose scanning time is within the reference time period as neighboring wireless network scanning information.

[0261] The reference time period can be (reference time point - preset duration, reference time point + preset duration). For example, the preset duration can be a value within 0-100 seconds.

[0262] Step 704: Determine the neighboring fence of the permanent residence based on the neighboring wireless network scanning information.

[0263] In one possible implementation, the terminal determines the scanning information of each neighboring wireless network as the neighbor fence corresponding to the permanent residence, and the neighbor fence can characterize the neighbor situation in each direction of the permanent residence.

[0264] In this embodiment, the terminal estimates the time when it enters or leaves its permanent residence based on the signal strength of the wireless network contained in the wireless network scanning information. Based on the estimated time, it further obtains the network characteristics of the wireless networks in the vicinity of the permanent residence. The accuracy of the reference time point obtained by mining the wireless network scanning information is high, and correspondingly, the accuracy of the nearby fence determined based on this reference time point is also high.

[0265] Regarding the use of the permanent residence neighbor fence, in one possible implementation, as shown in Figure 8, the terminal determining entry into the permanent residence neighbor fence may include the following steps.

[0266] Step 801: When entering the community fence, obtain the current wireless network scanning information within the community fence.

[0267] Upon entering a residential area, the terminal performs a wireless network scan to obtain current wireless network information. This information includes the network BSSID and signal strength of the wireless network.

[0268] Step 802: When the similarity between the scanning information of a nearby wireless network and the scanning information of the current wireless network is greater than the similarity threshold, and the permanent residence wireless network has not been connected within a preset time period, determine to enter the permanent residence neighbor fence corresponding to the permanent residence.

[0269] In one possible implementation, the terminal calculates the similarity between the current wireless network scan information and the scan information of each neighboring wireless network represented by the neighborhood fence of the permanent residence. If the similarity between the scan information of a neighboring wireless network and the current wireless network scan information is greater than a similarity threshold, the terminal further determines whether to connect to the permanent wireless network within a preset time period between the current time and the present moment.

[0270] If the terminal fails to connect to the local wireless network within a preset time period, it will enter the local neighbor fence.

[0271] Optionally, if the terminal has connected to the local wireless network within a preset time period, it will determine that it has left the local neighbor fence.

[0272] The preset duration can be 5 minutes, 10 minutes, etc.

[0273] Optionally, if there is no neighboring wireless network scan information and the current wireless network scan information with a similarity greater than the similarity threshold, the terminal determines that it has not entered the neighboring fence of its permanent residence.

[0274] Regarding the method for determining the similarity threshold, in one possible implementation, after the terminal determines the scanning information of the nearest wireless network, it determines the sample similarity between different scanning information of the nearest wireless network.

[0275] Furthermore, the terminal sorts the samples by similarity and determines the similarity threshold of samples located at a target percentage position after sorting. The target percentage is a value between 0 and 1. For example, the terminal determines the similarity threshold as the sample similarity at the 80% position.

[0276] Figure 9 illustrates the process of a terminal establishing a wireless network connection in an illustrative application scenario.

[0277] Step 901: Obtain the current WiFi connection status information of the terminal.

[0278] Step 902: Check if the WiFi is connected and if the connected WiFi is the local WiFi.

[0279] If yes, proceed to step 912; otherwise, proceed to step 903.

[0280] Step 903: Is the device in a WiFi disconnected state?

[0281] If yes, proceed to step 904; otherwise, proceed to step 915.

[0282] Step 904: Obtain the service cell ID of the currently serving cell.

[0283] Step 905: Check if the area is within the community fence.

[0284] In one possible implementation, the terminal detects whether the current serving cell ID belongs to the set of serving cell IDs corresponding to the cell fence.

[0285] If yes, proceed to step 906; otherwise, proceed to step 915.

[0286] Step 906: Obtain the neighboring fences of the permanent residence corresponding to the fence of the community.

[0287] Step 907: Obtain the current WiFi scan results.

[0288] Step 908: Check if the current WiFi scan results match the fence of the nearest residence.

[0289] In one possible implementation, it checks whether there exists a WiFi scan result in the neighborhood fence of the terminal's permanent residence that has a similarity higher than the similarity threshold with the current WiFi scan result. If it exists, it is determined that the current WiFi scan result matches the neighborhood fence of the permanent residence, and step 909 is executed; if it does not exist, it is determined that the current WiFi scan result does not match the neighborhood fence of the permanent residence, and step 915 is executed.

[0290] Step 909: Whether to connect to the permanent WiFi in the 5 minutes prior to the current moment.

[0291] If yes, proceed to step 911; otherwise, proceed to step 910.

[0292] Step 910: Determine the fence surrounding the permanent residence.

[0293] In some embodiments, after a terminal enters the vicinity fence of its permanent residence, it establishes a WiFi connection based on the WiFi connection policy of that permanent residence.

[0294] Step 911: Determine the fence surrounding the permanent residence.

[0295] Step 912: Confirm that you are inside the permanent residence fence.

[0296] Step 913: Determine the wireless network type and network usage preferences for your residence.

[0297] Step 914: Determine the WiFi connection policy.

[0298] Step 915: Confirm that you are outside the fence.

[0299] To ensure the timeliness of the aforementioned fences, the terminal, under normal fence detection conditions, will update the permanent residence fence, the permanent residence neighbor fence, and the community fence corresponding to the permanent residence location based on the most recent scan and connection information. For example, the terminal updates the permanent residence fence, the permanent residence neighbor fence, and the community fence based on the most recent n scan and connection information entries.

[0300] Furthermore, to save terminal storage space, the terminal will delete fences that have not been detected for a long time. In one possible implementation, for each fence, the terminal determines the most recent detection time of the fence, which includes at least one of a permanent residence fence, a permanent residence neighbor fence, and a community fence.

[0301] If the time interval between the most recent perceived moment and the current moment is greater than a time interval threshold, the terminal deletes the fence. For example, if the time interval is greater than 30 days, the terminal deletes the fence.

[0302] In some embodiments, when deleting a parent fence, the terminal will also delete the corresponding child fences. For example, when deleting a community fence, the terminal will delete the neighborhood fences and the community fence (both corresponding to the same community) together; when deleting the neighborhood fences, the terminal will delete the community fence together.

[0303] Please refer to Figure 10, which shows a structural block diagram of a wireless network connection device provided in an exemplary embodiment of this application. The device includes:

[0304] Processing module 1001 is used to determine at least one of the wireless network type and network usage preferences of the permanent residence;

[0305] The processing module 1001 is used to determine the wireless network connection strategy of the permanent residence based on at least one of the wireless network type and the network usage preference.

[0306] The connection module 1002 is used to establish a wireless network connection based on the wireless network connection strategy when entering the permanent residence neighbor fence corresponding to the permanent residence, wherein the permanent residence neighbor fence is used to characterize the features of the wireless network near the permanent residence.

[0307] Optionally, processing module 1001 is used for:

[0308] Based on the network information of the wireless network at the permanent residence location, the type of the wireless network at the permanent residence location is determined, and the network information includes the network SSID, network BSSID, and network frequency band.

[0309] Based on the historical internet usage records of the permanent residence location, the internet usage preferences of the permanent residence location are determined. The historical internet usage records include internet usage time periods, internet usage durations, and internet application types.

[0310] Optionally, processing module 1001 is used for:

[0311] If the number of network SSIDs in the wireless network at the permanent residence is 1, and the number of network BSSIDs corresponding to the network SSID is less than or equal to a number threshold, and the network SSID corresponds to multiple network frequency bands, then the wireless network type at the permanent residence is determined to be the first type.

[0312] If the number of network SSIDs in the wireless network at the permanent residence is greater than 1, and / or the number of network BSSIDs corresponding to the same network SSID is greater than the number threshold, and / or the network SSID corresponds to a single network frequency band, then the wireless network type of the permanent residence is determined to be the second type.

[0313] Optionally, processing module 1001 is used for:

[0314] When the wireless network type is the first type, the wireless network connection policy of the permanent residence is determined to be the first connection policy, wherein, under the first connection policy, the connection priority of the high-frequency wireless network is higher than the connection priority of the low-frequency wireless network.

[0315] If the wireless network type is the second type, the wireless network connection policy of the permanent residence is determined to be the second connection policy, which is used to increase the wireless network scanning frequency.

[0316] Optionally, processing module 1001 is used for:

[0317] Based on the network usage time periods and network usage durations corresponding to different networks at the permanent residence location, the network usage time period preference at the permanent residence location is determined, and the network usage time period preference is used to characterize the correspondence between the network usage time periods and the networks;

[0318] Based on the network application type and network usage duration corresponding to different networks at the permanent residence location, the network application preference at the permanent residence location is determined, and the network application preference is used to characterize the correspondence between the network application type and the network.

[0319] At least one of the network usage time preference and the network usage application preference is determined as the network usage preference of the permanent residence.

[0320] Optionally, processing module 1001 is used for:

[0321] Based on the network usage time preferences and the current time period, determine the wireless network connection strategy for the permanent residence;

[0322] Based on the network application preferences and current network applications, the wireless network connection strategy for the permanent residence is determined.

[0323] Optionally, the processing module 1001 is also used for:

[0324] Based on the historical connection information and historical scanning information of the wireless network, the permanent residence fence corresponding to the permanent residence is determined. The permanent residence fence is used to characterize the permanent wireless network at the permanent residence location.

[0325] Based on the network information of the wireless network in the permanent residence fence, the type of the wireless network in the permanent residence is determined;

[0326] Based on historical netting records within the fenced area of ​​the permanent residence, the netting preference of the permanent residence is determined.

[0327] Optionally, processing module 1001 is used for:

[0328] Based on the historical scanning information of the wireless network, a non-mobile wireless network is identified;

[0329] Based on the historical scanning information of the wireless network, the historical wireless networks belonging to the non-mobile network are aggregated to obtain the historical wireless networks belonging to the same location;

[0330] Based on the wireless network connection information, determine the cumulative connection duration of the historical wireless networks at the same location;

[0331] If the cumulative connection duration of the historical wireless network at the same location exceeds a duration threshold, the permanent residence fence corresponding to the permanent residence is determined based on the historical wireless network, wherein the historical wireless network is the permanent residence wireless network of the permanent residence.

[0332] Optionally, processing module 1001 is used for:

[0333] Acquire multiple historical scanning information of wireless networks at different scanning times. The historical scanning information of wireless networks includes the network BSSID and signal strength of the different wireless networks scanned.

[0334] From each of the aforementioned wireless network historical scan information, the network bssid and signal strength of the candidate wireless network are deleted to obtain updated wireless network historical scan information;

[0335] Calculate the information similarity among multiple updated historical scan information of wireless networks to obtain an information similarity sequence;

[0336] If the mean of each information similarity in the information similarity sequence is greater than the mean threshold and the variance is less than the variance threshold, then the candidate wireless network is determined to belong to the non-mobile wireless network.

[0337] Optionally, processing module 1001 is used for:

[0338] The historical wireless networks belonging to the non-mobile network that are located in the same historical scan information of the wireless network are aggregated to obtain the historical wireless networks belonging to the same location.

[0339] Optionally, the processing module 1001 is also used for:

[0340] Determine the community fence corresponding to the permanent residence fence, whereby the community fence is used to characterize the service community where the permanent residence is located;

[0341] Upon entering the community fence, the neighboring fences of the permanent residence are determined based on the wireless network scanning information within the community fence.

[0342] Optionally, processing module 1001 is used for:

[0343] Determine the connection period of the historical wireless network represented by the permanent residence fence;

[0344] Based on the service cell within the connection period, determine the cell fence corresponding to the permanent residence fence.

[0345] Optionally, processing module 1001 is used for:

[0346] For each wireless network scanning information within the cell fence, a scanning sample is constructed based on the scanning time of the wireless network scanning information and the signal strength of the included wireless networks. The scanning sample includes the scanning time and the average signal strength of the wireless network scanning information.

[0347] Based on the continuous scanned samples, a reference time point is determined, which is the time point located at the permanent residence.

[0348] Based on a reference time point, the nearest wireless network scanning information in the wireless network scanning information is determined. The nearest wireless network scanning information is the wireless network scanning information obtained by scanning near the permanent location.

[0349] The nearest fence to the permanent residence is determined based on the nearby wireless network scanning information.

[0350] Optionally, processing module 1001 is used for:

[0351] If the wireless network scan information includes the permanent wireless network, determine the average signal strength of the permanent wireless network.

[0352] If the wireless network scanning information does not include the permanent wireless network, the preset signal strength is determined as the average signal strength.

[0353] The scan sample is constructed based on the average signal strength and the scan time of the wireless network scan information.

[0354] Optionally, processing module 1001 is used for:

[0355] The scanning time range of the continuous scan samples is divided into multiple time windows;

[0356] For each time window, the window scanning time and the average signal intensity of the scanned samples within the time window are determined.

[0357] When the signal strength threshold is between the average signal strength values ​​of the windows corresponding to adjacent time windows, the reference time point is determined based on the average signal strength values ​​of the windows corresponding to adjacent time windows and the window scanning time. The reference time point is between the window scanning times corresponding to the adjacent time windows.

[0358] Optionally, processing module 1001 is used for:

[0359] A reference time period is determined based on the reference time point, wherein the reference time point is within the range of the reference time period;

[0360] The wireless network scanning information whose scanning time falls within the reference time period is determined as the neighboring wireless network scanning information.

[0361] Optionally, the connection module 1002 is used for:

[0362] Upon entering the cell fence, obtain the current wireless network scanning information within the cell fence;

[0363] If the similarity between the scanning information of the nearby wireless network and the scanning information of the current wireless network is greater than a similarity threshold, and the wireless network near the permanent residence has not been connected within a preset time period, it is determined to enter the nearby fence of the permanent residence corresponding to the permanent residence.

[0364] Optionally, processing module 1001 is used for:

[0365] Determine the sample similarity between scanning information from different neighboring wireless networks;

[0366] The sample similarities are sorted, and the sample similarities that are located at the target percentage position after sorting are determined as the similarity threshold.

[0367] Optionally, the processing module 1001 is also used for:

[0368] Determine the most recent sensing time of the fence, which includes at least one of the permanent residence fence, the permanent residence neighbor fence, and the community fence;

[0369] If the time interval between the most recent perceived moment and the current moment is greater than the time interval threshold, the fence is deleted.

[0370] In summary, in this embodiment, a corresponding wireless network connection policy is set for the permanent residence based on at least one of the wireless network type at the permanent residence and the network usage preferences of the terminal at the permanent residence. Subsequently, when the terminal is detected entering the permanent residence's neighbor fence, a wireless network connection can be established based on the permanent residence's wireless network connection policy, enabling the terminal to connect to a wireless network that meets its usage requirements at the permanent residence, thereby improving the network usage quality of the terminal at the permanent residence. Furthermore, based on the characteristics of the wireless networks near the permanent residence, a permanent residence neighbor fence is set for the permanent residence, allowing the terminal to use the wireless network connection policy when it is near the permanent residence, thereby improving the timeliness of policy application.

[0371] It should be noted that the apparatus provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and their implementation process can be found in the method embodiments, which will not be repeated here.

[0372] Referring to Figure 11, which is a schematic diagram of the structure of a terminal provided in an exemplary embodiment of this application, the terminal may further include one or more of the following components: a processor 1110 and a memory 1120.

[0373] Optionally, the processor 1110 connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1120, and by calling data stored in the memory 1120. Optionally, the processor 1110 can be implemented in at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA).

[0374] The processor 1110 can integrate one or more of the following: a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), and a baseband chip. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content displayed on the touchscreen; the NPU implements artificial intelligence (AI) functions; and the baseband chip handles wireless communication. It is understood that the baseband chip can also be implemented as a separate chip without being integrated into the processor 1110.

[0375] The memory 1120 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 1120 may include a non-transitory computer-readable storage medium. The memory 1120 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 1120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, etc.; the data storage area may store data created according to the use of the electronic device, etc.

[0376] In addition, those skilled in the art will understand that the structure of the terminal shown in the above figures does not constitute a limitation on the terminal. The terminal may include more (e.g., power supply components, display components, sensor components) or fewer components than shown, or combine certain components, or have different component arrangements.

[0377] This application provides a computer-readable storage medium storing at least one computer instruction, which is executed by a processor to implement the wireless network connection method as described in the above embodiments.

[0378] On the other hand, embodiments of this application provide a computer program product, the computer program product including computer instructions stored in a computer-readable storage medium; a processor reads the computer instructions from the computer-readable storage medium and executes the computer instructions to implement the wireless network connection method as described in the above embodiments.

[0379] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0380] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A wireless network connection method, the method being used for a terminal, the method comprising: Determine at least one of the following: the type of wireless network at your residence and your network usage preferences; Based on at least one of the wireless network type and the network usage preference, determine the wireless network connection strategy for the permanent residence. Upon entering the permanent residence neighbor fence corresponding to the permanent residence location, a wireless network connection is established based on the wireless network connection strategy, wherein the permanent residence neighbor fence is used to characterize the features of the wireless network near the permanent residence location.

2. The method according to claim 1, wherein, The determination of at least one of the wireless network type and network usage preferences for the permanent residence location includes at least one of the following: Based on the network information of the wireless network at the permanent residence location, the type of the wireless network at the permanent residence location is determined, and the network information includes the network SSID, network BSSID, and network frequency band. Based on the historical internet usage records of the permanent residence location, the internet usage preferences of the permanent residence location are determined. The historical internet usage records include internet usage time periods, internet usage durations, and internet application types.

3. The method according to claim 2, wherein, Determining the type of wireless network at the permanent residence location based on the network information of the wireless network at the permanent residence location includes: If the number of network SSIDs in the wireless network at the permanent residence is 1, and the number of network BSSIDs corresponding to the network SSID is less than or equal to a number threshold, and the network SSID corresponds to multiple network frequency bands, then the wireless network type at the permanent residence is determined to be the first type. If the number of network SSIDs in the wireless network at the permanent residence is greater than 1, and / or the number of network BSSIDs corresponding to the same network SSID is greater than the number threshold, and / or the network SSID corresponds to a single network frequency band, then the wireless network type of the permanent residence is determined to be the second type.

4. The method according to claim 3, wherein, The step of determining the wireless network connection policy for the permanent residence based on the wireless network type includes: When the wireless network type is the first type, the wireless network connection policy of the permanent residence is determined to be the first connection policy, wherein, under the first connection policy, the connection priority of the high-frequency wireless network is higher than the connection priority of the low-frequency wireless network. If the wireless network type is the second type, the wireless network connection policy of the permanent residence is determined to be the second connection policy, which is used to increase the wireless network scanning frequency.

5. The method according to claim 2, wherein, The process of determining the network usage preferences of the permanent residence based on historical network usage records at the permanent residence includes: Based on the network usage time periods and network usage durations corresponding to different networks at the permanent residence location, the network usage time period preference at the permanent residence location is determined, and the network usage time period preference is used to characterize the correspondence between the network usage time periods and the networks; Based on the network application type and network usage duration corresponding to different networks at the permanent residence location, the network application preference at the permanent residence location is determined, and the network application preference is used to characterize the correspondence between the network application type and the network. At least one of the network usage time preference and the network usage application preference is determined as the network usage preference of the permanent residence.

6. The method according to claim 5, wherein, The step of determining the wireless network connection policy for the permanent residence based on the network usage preferences includes at least one of the following: Based on the network usage time preferences and the current time period, determine the wireless network connection strategy for the permanent residence; Based on the network application preferences and current network applications, the wireless network connection strategy for the permanent residence is determined.

7. The method according to any one of claims 1 to 6, wherein, The method further includes: Based on the historical connection information and historical scanning information of the wireless network, the permanent residence fence corresponding to the permanent residence is determined. The permanent residence fence is used to characterize the permanent wireless network at the permanent residence location. The determination of at least one of the wireless network type and network usage preferences for the permanent residence location includes at least one of the following: Based on the network information of the wireless network in the permanent residence fence, the type of the wireless network in the permanent residence is determined; Based on historical netting records within the fenced area of ​​the permanent residence, the netting preference of the permanent residence is determined.

8. The method according to claim 7, wherein, The process of determining the permanent residence fence corresponding to the permanent residence location based on historical wireless network connection information and historical wireless network scanning information includes: Based on the historical scanning information of the wireless network, a non-mobile wireless network is identified; Based on the historical scanning information of the wireless network, the historical wireless networks belonging to the non-mobile network are aggregated to obtain the historical wireless networks belonging to the same location; Based on the wireless network connection information, determine the cumulative connection duration of the historical wireless networks at the same location; If the cumulative connection duration of the historical wireless network at the same location exceeds a duration threshold, the permanent residence fence corresponding to the permanent residence is determined based on the historical wireless network, wherein the historical wireless network is the permanent residence wireless network of the permanent residence.

9. The method according to claim 8, wherein, The step of determining the non-mobile wireless network based on the historical scanning information of the wireless network includes: Acquire multiple historical scanning information of wireless networks at different scanning times. The historical scanning information of wireless networks includes the network BSSID and signal strength of the different wireless networks scanned. From each of the aforementioned wireless network historical scan information, the network bssid and signal strength of the candidate wireless network are deleted to obtain updated wireless network historical scan information; Calculate the information similarity among multiple updated historical scan information of wireless networks to obtain an information similarity sequence; If the mean of each information similarity in the information similarity sequence is greater than the mean threshold and the variance is less than the variance threshold, then the candidate wireless network is determined to belong to the non-mobile wireless network.

10. The method according to claim 8, wherein, The step of aggregating historical wireless networks belonging to the non-mobile network based on the historical scan information of the wireless network to obtain historical wireless networks belonging to the same location includes: The historical wireless networks belonging to the non-mobile network that are located in the same historical scan information of the wireless network are aggregated to obtain the historical wireless networks belonging to the same location.

11. The method according to claim 7, wherein, The method further includes: Determine the community fence corresponding to the permanent residence fence, whereby the community fence is used to characterize the service community where the permanent residence is located; Upon entering the community fence, the neighboring fences of the permanent residence are determined based on the wireless network scanning information within the community fence.

12. The method according to claim 11, wherein, The process of determining the community fence corresponding to the permanent residence fence includes: Determine the connection period of the historical wireless network represented by the permanent residence fence; Based on the service cell within the connection period, determine the cell fence corresponding to the permanent residence fence.

13. The method according to claim 11, wherein, The step of determining the neighboring fences of the permanent residence based on the wireless network scanning information within the community fence includes: For each wireless network scanning information within the cell fence, a scanning sample is constructed based on the scanning time of the wireless network scanning information and the signal strength of the included wireless networks. The scanning sample includes the scanning time and the average signal strength of the wireless network scanning information. Based on the continuous scanned samples, a reference time point is determined, which is the time point located at the permanent residence. Based on a reference time point, the nearest wireless network scanning information in the wireless network scanning information is determined. The nearest wireless network scanning information is the wireless network scanning information obtained by scanning near the permanent location. The nearest fence to the permanent residence is determined based on the nearby wireless network scanning information.

14. The method according to claim 13, wherein, The construction of a scanning sample based on the scanning time and the signal strength of the included wireless network scanning information includes: If the wireless network scan information includes the permanent wireless network, determine the average signal strength of the permanent wireless network. If the wireless network scanning information does not include the permanent wireless network, the preset signal strength is determined as the average signal strength. The scan sample is constructed based on the average signal strength and the scan time of the wireless network scan information.

15. The method according to claim 13, wherein, Determining the reference time point based on the continuous scanned samples includes: The scanning time range of the continuous scan samples is divided into multiple time windows; For each time window, the window scanning time and the average signal intensity of the scanned samples within the time window are determined. When the signal strength threshold is between the average signal strength values ​​of the windows corresponding to adjacent time windows, the reference time point is determined based on the average signal strength values ​​of the windows corresponding to adjacent time windows and the window scanning time. The reference time point is between the window scanning times corresponding to the adjacent time windows.

16. The method according to claim 13, wherein, The step of determining the neighboring wireless network scanning information in the wireless network scanning information based on a reference time point includes: A reference time period is determined based on the reference time point, wherein the reference time point is within the range of the reference time period; The wireless network scanning information whose scanning time falls within the reference time period is determined as the neighboring wireless network scanning information.

17. The method according to claim 13, wherein, The method further includes: Upon entering the cell fence, obtain the current wireless network scanning information within the cell fence; If the similarity between the scanning information of the nearby wireless network and the scanning information of the current wireless network is greater than a similarity threshold, and the wireless network near the permanent residence has not been connected within a preset time period, it is determined to enter the nearby fence of the permanent residence corresponding to the permanent residence.

18. The method according to claim 17, wherein, The method further includes: Determine the sample similarity between scanning information from different neighboring wireless networks; The sample similarities are sorted, and the sample similarities that are located at the target percentage position after sorting are determined as the similarity threshold.

19. The method according to claim 13, wherein, The method further includes: Determine the most recent sensing time of the fence, which includes at least one of the permanent residence fence, the permanent residence neighbor fence, and the community fence; If the time interval between the most recent perceived moment and the current moment is greater than the time interval threshold, the fence is deleted.

20. A wireless network connection device, the device comprising: A processing module for determining at least one of the wireless network type and network usage preferences of the residence location; The processing module is used to determine the wireless network connection strategy for the permanent residence based on at least one of the wireless network type and the network usage preference. The connection module is used to establish a wireless network connection based on the wireless network connection strategy when entering the permanent residence neighbor fence corresponding to the permanent residence, wherein the permanent residence neighbor fence is used to characterize the features of the wireless network near the permanent residence.

21. A terminal comprising a processor and a memory, the memory storing at least one computer instruction, the at least one computer instruction being loaded and executed by the processor to implement the wireless network connection method as described in any one of claims 1 to 19.

22. A computer-readable storage medium storing at least one computer instruction, the at least one computer instruction being executed by a processor to implement the wireless network connection method as described in any one of claims 1 to 19.

23. A computer program product, characterized in that, The computer program product includes computer instructions, which a processor executes to implement the wireless network connection method as described in any one of claims 1 to 19.