Wireless network connection method and device, terminal and program product
By determining the wireless network type and network usage preferences at the permanent location, formulating a wireless network connection policy, and applying this policy when entering the permanent location nearest neighbor fence, the problem that the terminal cannot preferentially connect to a wireless network that meets the usage needs is solved, and the network usage quality and timeliness of policy application are improved.
Patent Information
- Application Number
- CN202411936529.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
AI Technical Summary
The prior art is difficult to effectively manage wireless network connections at a permanent location, resulting in terminals being unable to prioritize connection to wireless networks that meet usage requirements.
By determining the wireless network type and network usage preferences of the permanent residence, formulate a corresponding wireless network connection policy, and apply this policy to connect to the wireless network when entering the permanent residence nearest fence.
It improves the network quality of terminals in their permanent locations, enables terminals to connect to wireless networks that meet usage needs in a timely manner, and enhances the timeliness of policy applications.
Smart Images

Figure CN119854961A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of network connection technology, and in particular to a wireless network connection method, device, terminal and program product. Background Art
[0002] With the continuous development of Internet technology, people's demand and dependence on the Internet are also increasing.
[0003] For terminals with wireless network connection function, the terminal will store the historical wireless network connection status and connect to the wireless network with priority when scanning a wireless network that has been connected to the past. When scanning multiple wireless networks that have been connected to the past at the same time, the terminal will choose to connect to the wireless network with the best signal quality. Summary of the invention
[0004] The embodiments of the present application provide a wireless network connection method, device, terminal and program product. The technical solution is as follows:
[0005] On the one hand, an embodiment of the present application provides a wireless network connection method, the method comprising:
[0006] determining at least one of a wireless network type and a network preference at a permanent location;
[0007] Determining a wireless network connection strategy for the permanent location based on at least one of the wireless network type and the network preference;
[0008] When entering the permanent location neighbor fence corresponding to the permanent location, wireless network connection is performed based on the wireless network connection strategy, and the permanent location neighbor fence is used to characterize the characteristics of the wireless network near the permanent location.
[0009] On the other hand, an embodiment of the present application provides a wireless network connection device, the device comprising:
[0010] A processing module, configured to determine at least one of a wireless network type and a network preference at a permanent location;
[0011] The processing module is used to determine the wireless network connection strategy of the permanent location based on at least one of the wireless network type and the network preference;
[0012] A connection module is used to perform wireless network connection based on the wireless network connection strategy when entering a permanent location neighbor fence corresponding to the permanent location, wherein the permanent location neighbor fence is used to characterize the characteristics of the wireless network near the permanent location.
[0013] On the other hand, an embodiment of the present application provides a terminal, which includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the wireless network connection method as described in the above aspects.
[0014] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer instruction, and the at least one computer instruction is used to be executed by a processor to implement the wireless network connection method as described in the above aspects.
[0015] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the wireless network connection method described in the above aspects.
[0016] In an embodiment of the present application, a corresponding wireless network connection strategy is set for the permanent residence with respect to the wireless network type of the wireless network at the permanent residence and at least one of the network preferences of the terminal at the permanent residence; subsequently, when it is identified that the terminal has entered a permanent residence neighbor fence corresponding to the permanent residence, a wireless network connection can be performed based on the wireless network connection strategy of the permanent residence, so that the terminal can connect to a wireless network that meets the usage requirements at the permanent residence, thereby improving the network quality of the terminal at the permanent residence; and, based on the characteristics of the wireless network near the permanent residence, a permanent residence neighbor fence is set for the permanent residence, so that the terminal can use the wireless network connection strategy when it is close to the permanent residence, thereby improving the timeliness of the policy application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic diagram of an implementation environment shown in an exemplary embodiment of the present application;
[0018] Figure 2 A flowchart of a wireless network connection method provided by an exemplary embodiment of the present application is shown;
[0019] Figure 3 is a flow chart of a network preference determination process shown in an exemplary embodiment of the present application;
[0020] Figure 4 is a flowchart of a process for determining a permanent wireless network according to an exemplary embodiment of the present application;
[0021] Figure 5 is a schematic diagram of the accumulated network connection time of a wireless network shown in an exemplary embodiment of the present application;
[0022] Figure 6is a schematic diagram of the accumulated connection duration of a wireless network at the same location shown in an exemplary embodiment of the present application;
[0023] Figure 7 is a flow chart of a process for determining a neighborhood fence of a resident area shown in an exemplary embodiment of the present application;
[0024] Figure 8 is a flow chart of a process for determining a neighborhood fence for entering a resident area, shown in an exemplary embodiment of the present application;
[0025] Fig. 9 is a flow chart of a wireless network connection process shown in an exemplary embodiment of the present application;
[0026] Fig.10 A structural block diagram of a wireless network connection device provided by another exemplary embodiment of the present application is shown;
[0027] Fig.11 A structural block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0029] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0030] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application.
[0031] In this implementation environment, the terminal 110 is an electronic device with a network connection function, which includes a wireless network (WiFi) connection function and a cellular network connection function. The electronic device can be a smart phone, a tablet computer, a wearable device, a personal computer, etc.
[0032] In the embodiment of the present application, the terminal 110 records the historical network connection scanning situation and the serving cell, and determines three levels of fences, namely, the permanent location fence 11, the permanent location neighbor fence 12, and the cell fence 13. The permanent location fence 11 is used to characterize the characteristics of the permanent location wireless network at the permanent location, the permanent location neighbor fence 12 is used to characterize the characteristics of the wireless network near the permanent location, and the cell fence 13 is used to characterize the serving cell at the permanent location.
[0033] Optionally, the permanent location is a place where the terminal 110 has a permanent behavior, and the permanent location may be a residence, a workplace, etc.
[0034] In some embodiments, the permanent location fence 11 is determined based on a wireless network 120 at the permanent location; the cell fence 13 is determined based on a historical service cell 140 at the permanent location; and the permanent location neighbor fence 12 is determined based on a wireless network 130 scanned when entering the cell fence 13.
[0035] In the embodiment of the present application, the terminal 110 determines the wireless network connection strategy of the permanent location based on the wireless network type of the wireless network 120 in the permanent location fence 11 and the network preference of the terminal 110 at the permanent location. When it is subsequently determined through wireless network scanning that the terminal 110 has entered the permanent location neighbor fence 12, the terminal 110 activates the wireless network connection strategy, so that when entering the permanent location, it connects to a wireless network that meets the user's usage requirements.
[0036] In some embodiments, fences and wireless network connection strategies at different levels may be determined by a network management application in the terminal 110. In the following embodiments, for convenience of description, the wireless network connection method is described as follows: Figure 1 The terminal 110 shown is used as an example for explanation.
[0037] Please refer to Figure 2 , which shows a flowchart of a wireless network connection method provided by an exemplary embodiment of the present application. This embodiment uses the method for Figure 1 Taking the terminal 110 as an example, the method may include the following steps:
[0038] Step 201: Determine at least one of a wireless network type and a network preference at a permanent location.
[0039] Optionally, the permanent location is determined based on a historical wireless network connection status of the terminal, or the permanent location is determined based on a positioning result of the terminal.
[0040] In some embodiments, the wireless network type is determined by characterizing the network characteristics of the wireless network at the permanent location, and the network characteristics may include at least one of the number of networks, the network frequency band, and the network identification of the wireless network.
[0041] In a possible implementation, the terminal is provided with a plurality of candidate wireless network types, and for each permanent location, the terminal determines the wireless network type corresponding to the current permanent location from the candidate wireless network types, wherein different candidate wireless network types are used to represent different network characteristics.
[0042] In some embodiments, the network usage preference is used to characterize the network usage preference of the terminal at the permanent location, wherein the network usage preference may include at least one of network usage type, network usage time period, network usage application, and network usage duration.
[0043] Step 202: Determine a wireless network connection strategy for a permanent location based on at least one of a wireless network type and a network preference.
[0044] In some embodiments, the terminal determines a first wireless network connection strategy for a permanent location based on the wireless network type, and the first wireless network connection strategy is used to improve the network quality at the permanent location; the terminal determines a second wireless network connection strategy for the permanent location based on the network preference, and the second wireless network connection strategy is used to enable the terminal to connect to a network that meets the user's usage requirements.
[0045] In some embodiments, when the wireless network connection strategy of the permanent location is determined based on both the wireless network type and the network usage preference, the wireless network connection strategy can take into account both the user usage requirements and the network usage quality.
[0046] In a possible implementation, the terminal is provided with a plurality of candidate wireless network connection strategies, and for each permanent point, the terminal determines the wireless network connection strategy corresponding to the current permanent location from the candidate wireless network connection strategies based on at least one of the wireless network type and the network preference. Different candidate wireless network connection strategies are used to improve the network quality in different ways and / or meet the user's network usage requirements.
[0047] Step 203: When entering a permanent location neighbor fence corresponding to the permanent location, wireless network connection is performed based on a wireless network connection strategy. The permanent location neighbor fence is used to characterize the characteristics of the wireless network near the permanent location.
[0048] In order to improve the timeliness of using the wireless network connection strategy, the terminal pre-generates a permanent location neighbor fence corresponding to the permanent location. Among them, different permanent locations correspond to their own permanent location neighbor fences. For example, the residence corresponds to the residence neighbor fence, and the work place corresponds to the work place neighbor fence.
[0049] Since the resident neighborhood fence can characterize the characteristics of the wireless network near the resident, the terminal matches the network characteristics of the scanned wireless network with the resident neighborhood fence to determine whether it has entered the resident neighborhood fence, and further determine whether it is close to the resident.
[0050] When the terminal recognizes that it has entered the neighborhood fence of the permanent location, it can apply the wireless network connection policy of the permanent location to connect to the wireless network. Compared with applying the wireless network connection policy only when it is recognized that it is in the permanent location, applying the wireless network connection policy in advance when approaching or about to enter the permanent location can improve the accuracy of network connection and avoid network switching caused by the current connection network not meeting the wireless network connection policy.
[0051] To summarize, in an embodiment of the present application, a corresponding wireless network connection strategy is set for the permanent residence with respect to the wireless network type of the wireless network at the permanent residence and at least one of the network preferences of the terminal at the permanent residence; subsequently, when it is identified that the terminal has entered a permanent residence neighbor fence corresponding to the permanent residence, a wireless network connection can be performed based on the wireless network connection strategy of the permanent residence, so that the terminal can be connected to a wireless network that meets the usage requirements at the permanent residence, thereby improving the network quality of the terminal at the permanent residence; and, based on the characteristics of the wireless network near the permanent residence, a permanent residence neighbor fence is set for the permanent residence, so that the terminal can use the wireless network connection strategy when it is close to the permanent residence, thereby improving the timeliness of the policy application.
[0052] Determining wireless network types & wireless network connection strategies
[0053] In a possible implementation, the terminal determines the type of wireless network at the permanent location based on network information of the wireless network at the permanent location, where the network information includes network SSID (Service Set Identifier), network BSSID (Basic Service Set Identifier) and network frequency band.
[0054] The network information of the wireless network at the permanent location is obtained by scanning the terminal at the permanent location. Optionally, the wireless network includes a wireless network that the terminal scans and connects to, and a wireless network that the terminal scans but does not connect to.
[0055] In some embodiments, based on the network SSID and BSSID, the terminal can determine the number of wireless networks set up at the permanent 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 the permanent residence supports multiple frequency bands.
[0056] In one possible design, the terminal presets two wireless network types, namely, the first type and the second type. The first type is used to characterize that the wireless network uses multiple frequency bands and is not networked, and the second type is used to characterize that the wireless network does not use multiple frequency bands and is not networked. Accordingly, determining the wireless network type based on network information may include the following two situations:
[0057] Case 1: When the number of network SSIDs of the wireless network at the permanent residence is 1, the number of network BSSIDs corresponding to the network SSID is less than or equal to the quantity threshold, and the network SSID corresponds to multiple network frequency bands, the wireless network type of the permanent residence is determined to be the first type.
[0058] Among them, when the number of network SSIDs (different wireless networks can have the same network SSID) of the wireless network at the permanent location is 1, and the number of network BSSIDs (different wireless networks have different BSSIDs) corresponding to the network SSID is less than or equal to the quantity threshold, it indicates that the wireless network does not adopt networking. Furthermore, when the network SSID corresponds to multiple network frequency bands, it indicates that the wireless network supports multiple frequency bands.
[0059] In some embodiments, for multiple wireless networks, if the network ssids of the multiple wireless networks are completely consistent, or the network ssids of the multiple wireless networks are completely consistent 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.
[0060] In some embodiments, when the network SSID corresponds to 2.4 GHz and 5 GHz, the terminal determines that the wireless network supports dual band.
[0061] Optionally, when the number of network SSIDs of the wireless network at the permanent residence is 1, and the number of network BSSIDs corresponding to the network SSIDs is less than or equal to 2, and the network SSIDs correspond to 2.4GHz and 5Ghz frequency bands, the terminal determines that the wireless network type at the permanent residence is the first type, which is dual-band non-networking.
[0062] In an illustrative example, when the network information of the wireless network at the permanent location is as shown in Table 1, the terminal determines that the type of the wireless network at the permanent location is the first type.
[0063] Table 1
[0064] ssid bssid frequency A-home 8e:2a:a8:88:1a:40 2462 A-home_5G 50:2b:73:bb:c5:c6 5825
[0065] Correspondingly, for the first type of wireless network, the terminal determines that the wireless network connection strategy is frequency band priority, that is, when selecting a wireless network to connect to, wireless networks in different network frequency bands have different connection priorities.
[0066] In a possible implementation, when the wireless network type is the first type, the terminal determines that the wireless network connection strategy of the permanent location is the first connection strategy, wherein under the first connection strategy, the connection priority of the high-frequency band wireless network is higher than the connection priority of the low-frequency band wireless network.
[0067] Since wireless signals in high-frequency bands have more channels, which means less interference and higher data transmission rates, when the frequency band is optimized, it is preferred to connect to wireless networks in high-frequency bands.
[0068] Illustratively, when the wireless network supports two network frequency bands, 2.4 GHz and 5 GHz, the terminal preferentially connects to the 5 GHz wireless network based on the first connection strategy.
[0069] Case 2: When 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 a quantity threshold, and / or the network SSID corresponds to a single network frequency band, the wireless network type at the permanent residence is determined to be the second type.
[0070] Among them, when the number of network SSIDs of the wireless network at the permanent residence (different wireless networks can have the same network SSID) is greater than 1, it indicates that there are multiple wireless network access points near the permanent residence; when the number of network BSSIDs corresponding to the same network SSID is greater than the quantity threshold, it means that the network SSID is a wireless network using networking; when the network SSID corresponds to a single network frequency band, it indicates that the wireless network does not support multiple frequency bands.
[0071] In some embodiments, for multiple wireless networks, if the network SSIDs of the multiple wireless networks are inconsistent after removing the frequency band information, the terminal determines that the multiple wireless networks have different network SSIDs.
[0072] Optionally, when 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 that the wireless network type at the permanent residence is the second type, and the second type indicates that the wireless network does not belong to dual-band non-networking.
[0073] In an illustrative example, when the network information of the wireless network at the permanent location is as shown in Table 2, the terminal determines that the type of the wireless network at the permanent location is the second type.
[0074] Table 2
[0075] ssid bssid frequency B-company 06:69:6c:99:0d:3b 2452 B-company 06:69:6c:99:27:f3 2437 B-company 0a:69:6c:99:22:e8 5200 B-company 0a:69:6c:99:22:e8 5280
[0076] Correspondingly, for the second type of wireless network, the terminal does not perform frequency band optimization, but increases the wireless network scanning frequency to improve the timeliness of wireless network switching.
[0077] In a possible implementation, when the wireless network type is the second type, the terminal determines that the wireless network connection strategy of the permanent location is the second connection strategy, and the second connection strategy is used to increase the wireless network scanning frequency.
[0078] In the second type of wireless network environment, since the wireless network environment is more complex (there are a large number of connectable wireless networks), in order to enable the terminal to switch wireless networks in a timely manner, the terminal increases the wireless network scanning frequency at the permanent location, so as to promptly discover a wireless network with better quality and switch to it, or, if the quality of all wireless networks is poor, switch to a cellular network.
[0079] In this embodiment, when the terminal identifies that the wireless network at the permanent residence is multi-band and non-networked, it determines a wireless network connection strategy of preferentially connecting to the high-band wireless network, thereby improving the communication quality of the terminal after connecting to the high-band wireless network; when it identifies that the wireless network at the permanent residence is not multi-band and non-networked, it increases the network scanning frequency at the permanent residence, so that the terminal can perform network switching in time at the permanent residence, thereby ensuring the network quality of the terminal.
[0080] Determination of network preference & wireless network connection strategy
[0081] In a possible implementation, the terminal determines the network usage preference of the permanent location based on the historical network usage record at the permanent location, where the historical network usage record includes a network usage period, a network usage duration, and a network usage application type.
[0082] The historical network usage record is recorded and stored by the terminal when it is identified as being in the permanent location. The historical network usage record can be recorded by a single terminal, or by multiple terminals logged into the same account. For example, a smartphone and a tablet computer under the same account jointly collect historical network usage records at the permanent location.
[0083] Optionally, the network usage time period belongs to several candidate time periods divided according to the division rule. For example, the terminal divides every two hours of a day into a candidate time period, or divides Monday to Friday of a week into a candidate time period, and divides Saturday and Sunday into a candidate time period. The embodiment of the present application does not limit the division method of the time period.
[0084] Optionally, the network application type refers to the type of application running (foreground or background) when using the network. In some embodiments, the type of application running for a longer time than a time threshold and / or consuming more traffic than a traffic threshold during the use of the network by the terminal determines the type of network application during the use of the network. The network application type may include games, videos, music, news, etc., which is not limited in this embodiment.
[0085] In a possible implementation, Figure 3 As shown, the terminal may determine the network usage preference based on the above historical network usage records, including the following steps:
[0086] Step 301, based on the network usage time periods and network usage durations corresponding to different networks at the permanent location, determine the network usage time period preference at the permanent location, where the network usage time period preference is used to characterize the correspondence between the network usage time period and the network.
[0087] Although there are many wireless networks that can be connected at the permanent residence, users usually have fixed usage preferences, and the usage preferences may be related to the network usage period. Therefore, the terminal can count the network usage time of the terminal in different networks and different network usage period, so as to determine the network usage period preference at the permanent residence, that is, the network that the terminal prefers to connect to in different network usage period.
[0088] Optionally, the terminal determines the proportion of network usage time of different networks in different network usage time periods based on historical network usage records, and thus determines the network with the highest proportion as the preferred network corresponding to the network usage time period.
[0089] Indicatively, when there are dormitory WiFi and campus network at the permanent location, the terminal counts the proportion of time connected to dormitory WiFi during the network usage period, p1, and the proportion of time connected to campus network, p2. If p1>p2, and p1 is greater than the proportion threshold (the proportion threshold is greater than or equal to 0.5), the terminal determines that the preferred network corresponding to the network usage period is dormitory WiFi.
[0090] Step 302: determine a network application preference at the permanent location based on the network application types and network usage durations corresponding to different networks at the permanent location, where the network application preference is used to characterize the correspondence between the network application type and the network.
[0091] Although there are many wireless networks that can be connected at the permanent location, users usually have fixed usage preferences, and the usage preferences may be related to network applications. For example, when using applications that require high network stability, they will choose a network with less fluctuation. Therefore, the terminal can count the network application types of applications used by the terminal under different networks to determine the network application preference at the permanent location, that is, the network that the terminal prefers to connect to when using different types of network applications.
[0092] Optionally, the terminal determines the network usage time proportions of different networks under different network application types based on historical network usage records, and thereby determines the network with the highest proportion as the preferred network corresponding to the network application type.
[0093] In an exemplary manner, when there are dormitory WiFi and cellular networks at the permanent location, the terminal counts the proportion of time connected to dormitory WiFi when using the game application, p1, and the proportion of time connected to the cellular network, p2. If p2>p1, and p2 is greater than the proportion threshold (the proportion threshold is greater than or equal to 0.5), the terminal determines that the preferred network corresponding to the game application is the cellular network.
[0094] Optionally, since network preference may be related to both network usage time period and network application, the terminal may determine the correspondence between network usage time period, network application type and preferred network based on historical network usage records, which is not described in detail in this embodiment.
[0095] Step 303: determine at least one of the network usage time period preference and the network usage application preference as the network usage preference of the permanent location.
[0096] The terminal determines the network usage preference of the permanent location based on at least one of the network usage time period preference and the network usage application preference.
[0097] When subsequently determining the wireless network connection strategy of the permanent location based on the network usage preference, if there is a network usage time period preference, the terminal determines the wireless network connection strategy of the permanent location based on the network usage time period preference and the current time period.
[0098] Optionally, the terminal determines, based on the correspondence between the network usage time period represented by the network usage time period preference and the preferred network, to preferentially connect to the preferred network corresponding to the current time period as the wireless network connection strategy of the permanent location.
[0099] In the case where there is a network application preference, the terminal determines a wireless network connection strategy at the permanent location based on the network application preference and the current network application.
[0100] Optionally, based on the correspondence between the network application type represented by the network application preference and the preferred network, the terminal determines as the wireless network connection strategy of the permanent location to preferentially connect to the preferred network corresponding to the application type to which the current network application belongs.
[0101] In other possible implementations, when there are network usage time periods and network application preferences, the terminal can, based on the current time period and the application type of the current network application, connect to the preferred network corresponding to the application type of the current network application and the current time period from the correspondence between the network usage time periods, network application types and preferred networks, and determine the wireless network connection strategy for the permanent location.
[0102] In an illustrative example, based on the network preference of the permanent location, the terminal determines that the wireless network connection strategy to be adopted when using a news application on weekdays is to connect to a WiFi network, and determines that the wireless network connection strategy to be adopted when using a game application on holidays is to connect to a cellular network.
[0103] In this embodiment, the network usage time period and network application preference of the permanent location are determined based on the two dimensions of the terminal's network usage time period and network usage application, so that the terminal can be connected to the preferred network corresponding to the specific time period during the specific time period, and can be connected to the preferred network corresponding to the specific application type when using a specific type of application, so that the network connected by the terminal meets the user's usage preferences.
[0104] Permanent fence
[0105] In order to improve the accuracy of the determined network preference of the permanent location, the terminal needs to accurately obtain the network information and / or historical network usage records at the permanent location. Since the connection frequency of the wireless network at the permanent location is usually high and the change of the wireless network is usually small, in a possible implementation, the terminal determines the permanent location fence corresponding to the permanent location based on the wireless network historical connection information and the wireless network historical scanning information, and the permanent location fence is used to characterize the permanent wireless network at the permanent location.
[0106] Further, the terminal determines the type of wireless network in the permanent location based on the network information of the wireless network in the permanent location fence, and / or determines the network usage preference in the permanent location based on the historical network usage records in the permanent location fence.
[0107] In some embodiments, a piece of wireless network history connection information may include the network BSSID, access time (start time, ST) and exit time (end time, ET) of the wireless network.
[0108] Table 3
[0109]
[0110]
[0111] In some embodiments, a piece of wireless network history scanning information includes a scanning timestamp, a network BSSID and a signal strength (RSSI) of the scanned wireless network. Schematically, the wireless network history scanning information is shown in Table 4.
[0112] Table 4
[0113]
[0114] In a possible implementation, for each piece of 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, thereby obtaining the cumulative connection duration of the historical wireless network.
[0115] Optionally, the terminal determines the cumulative connection time of the wireless network within the unit time based on the historical wireless network connection information within the unit time, and then determines the average of the cumulative connection time within multiple unit time as the cumulative connection time of the wireless network.
[0116] Since there may be multiple wireless networks 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 historical scanning information of the wireless network, and then accumulates the cumulative connection time of the wireless networks at the same location to obtain the cumulative connection time of the wireless network at the location.
[0117] Usually, the wireless network connection duration at the permanent location is usually longer, so the terminal can further determine the permanent location based on the accumulated connection duration of the wireless networks at various locations, and then determine the permanent wireless network at the permanent location.
[0118] Since the wireless network to which the terminal connects may be provided by a mobile wireless access point in addition to a fixed wireless access point, in order to avoid identifying the wireless network provided by the mobile wireless access point as a wireless network at a permanent point, the terminal also needs to distinguish between mobile wireless networks and non-mobile wireless networks.
[0119] In a possible implementation, Figure 4 As shown, the terminal may determine the resident location fence by the following steps:
[0120] Step 401: determine a non-mobile wireless network based on historical wireless network scanning information.
[0121] For mobile wireless networks, since the device providing the network will move, each time a mobile wireless network is scanned, the wireless networks scanned at the same time will be greatly different (i.e., the wireless network environment differences are large); while for non-mobile wireless networks, since the device providing the network usually does not move, each time a non-mobile wireless network is scanned, the wireless networks scanned at the same time are usually relatively similar (i.e., the wireless network environment differences are small).
[0122] Since the wireless network scanning information can represent the wireless network environment in which the terminal is located, the terminal can distinguish between mobile wireless networks and non-mobile wireless networks based on the wireless network historical scanning information. Optionally, the process may include the following sub-steps:
[0123] Sub-step 1: obtaining multiple wireless network historical scanning information at different scanning times, wherein the wireless network historical scanning information includes network BSSIDs and signal strengths of different wireless networks scanned.
[0124] In some embodiments, when the terminal starts wireless network scanning, the terminal performs real-time wireless network scanning to obtain multiple wireless network historical scanning information at different scanning times, wherein each piece of wireless network historical scanning information may be as shown in Table 4.
[0125] Sub-step 2: Delete the network BSSID and signal strength of the candidate wireless network from each piece of wireless network history scanning information to obtain multiple pieces of updated wireless network history scanning information.
[0126] The candidate wireless network is a wireless network that has been connected in the past, and the candidate wireless network can be determined based on historical connection information of the wireless network.
[0127] For each candidate wireless network, the terminal determines the wireless network history scanning information including the network BSSID of the candidate wireless network, and deletes the network SSID and its corresponding signal strength from the wireless network history scanning information to obtain updated wireless network history scanning information.
[0128] In an illustrative manner, when the network BSSID of the candidate wireless network is ae:50:de:71:96:6a, and the wireless network history scan information is as shown in Table 4, the terminal deletes the network BSSID "ae:50:de:71:96:6a" and its corresponding signal strength -81 in Table 4, and obtains the updated wireless network history scan information as shown in Table 5.
[0129] Table 5
[0130]
[0131] Sub-step 3: calculating the information similarity between the multiple wireless network historical scanning information after different updates to obtain an information similarity sequence.
[0132] Furthermore, for each updated wireless network history scan information (including candidate wireless networks before updating and excluding candidate wireless networks after updating), the terminal calculates the information similarity between each updated wireless network history scan information to obtain an information similarity sequence including multiple information similarities.
[0133] In some embodiments, the terminal may calculate the information similarity by selecting Jaccard similarity coefficient, Pearson similarity coefficient, Euclidean distance, cosine similarity, etc., which is not limited in this embodiment.
[0134] In an exemplary manner, when the updated plurality of wireless network history scanning information includes wireless network history scanning information A, wireless network history scanning information B, wireless network history scanning information C and wireless network history scanning information D, the information similarity sequence calculated by the terminal includes S AB (represents the information similarity between wireless network history scanning information A and wireless network history scanning information B), S AC , S AD , S BC , S BD , S CD .
[0135] Furthermore, the terminal calculates the mean and variance of each information similarity in the information similarity sequence.
[0136] For non-mobile wireless networks, since the wireless network environment in which the non-mobile wireless network is located is usually relatively stable, the similarity between the wireless network history scanning information including the non-mobile wireless network is usually relatively high, and the change of the wireless network history scanning information is usually small; while for mobile wireless networks, since the wireless network environment in which the mobile wireless network is located is usually relatively large, the similarity between the wireless network history scanning information including the mobile wireless network is usually relatively low, and the change of the wireless network history scanning information is usually large. Based on the above principle, the terminal can distinguish between non-mobile wireless networks and mobile wireless networks by comparing the size relationship between the mean and the mean threshold, and the size relationship between the variance and the variance threshold.
[0137] Sub-step 4: when 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, it is determined that the candidate wireless network belongs to a non-mobile wireless network.
[0138] When 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.
[0139] Optionally, when 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 a mobile wireless network.
[0140] The mean threshold and the variance threshold may be determined based on sample wireless network scanning information including non-mobile wireless networks and mobile wireless networks, which is not limited in this embodiment.
[0141] In addition to the above-mentioned distinction between mobile wireless networks and non-mobile wireless networks based on wireless network history scanning information, in other possible implementations, the terminal can also make distinctions based on other information, such as whether the network SSID of the wireless network contains keywords (such as xxx's mobile phone), to distinguish between mobile wireless networks and non-mobile wireless networks. This embodiment is not limited to this.
[0142] Step 402: Based on the wireless network history scanning information, historical wireless networks belonging to non-mobile networks are aggregated to obtain historical wireless networks belonging to the same location.
[0143] Since the terminal can scan wireless networks within a certain range when performing wireless network scanning, the terminal can aggregate historical wireless networks belonging to non-mobile networks based on the wireless network historical scanning information to obtain historical wireless networks belonging to the same location. The historical wireless network is the wireless network included in the wireless network historical scanning information, that is, the wireless network scanned historically.
[0144] In a possible implementation manner, the terminal aggregates historical wireless networks belonging to non-mobile networks in the same wireless network historical scanning information to obtain historical wireless networks belonging to the same location.
[0145] Illustratively, when wireless network history scan information A includes bssid1 and bssid2, wireless network history scan information B includes bssid1 and bssid3, and wireless network history scan information C includes bssid2 and bssid4, the terminal determines that bssid1, 2, 3, and 4 are historical wireless networks belonging to the same location.
[0146] Step 403: Determine the accumulated connection duration of the historical wireless network at the same location based on the wireless network connection information.
[0147] In a possible implementation, the terminal determines the cumulative network connection duration of each wireless network based on the wireless network connection information, and then accumulates the cumulative network connection duration of each historical wireless network at the same location to obtain the cumulative connection duration of the historical wireless network at the location.
[0148] In some embodiments, when the wireless network connection information is as shown in Table 3, the network connection duration represented by each piece of wireless network connection information is et-st.
[0149] For example, when the acquired 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).
[0150] In an exemplary manner, in the case of seven historically connected wireless networks, the cumulative network connection time of each historical wireless network obtained by the terminal is as follows: Figure 5 Further, 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 network at the same location is as follows: Figure 6 shown.
[0151] Step 404 , when the accumulated connection duration of the historical wireless network at the same location is greater than the duration threshold, determine the permanent location fence corresponding to the permanent location based on the historical wireless network, wherein the historical wireless network is the permanent location wireless network of the permanent location.
[0152] When the accumulated connection time of the historical wireless network at the same location is greater than the time threshold, the terminal determines that the location is a permanent location, and accordingly, the historical wireless network corresponding to the location is the permanent location wireless network.
[0153] Since a user may have multiple permanent locations, such as a residence and an office, the terminal may determine multiple permanent location fences based on the accumulated connection duration.
[0154] Combination Figure 6 As shown, the terminal determines the location with a cumulative connection time greater than 3 hours as a permanent location, thereby determining bssid2, 3, and 7 as the permanent location wireless network of the first permanent location, and determining bssis1 and 4 as the permanent location wireless network of the second permanent location.
[0155] In this embodiment, the terminal distinguishes between mobile wireless networks and non-mobile wireless networks based on wireless network history scanning information, and determines the permanent wireless network of the permanent location from the non-mobile wireless networks, thereby avoiding the influence of the mobile hotspot accessed by the terminal on the identification of the permanent location, and improving the accuracy of the determined permanent location and the permanent location fence.
[0156] Community fence
[0157] Since it is difficult and inaccurate to directly determine the resident neighbor fence, after determining the resident fence, the terminal further determines the cell fence corresponding to the resident fence, and then determines the resident neighbor fence (with a range smaller than the cell fence) based on the cell fence.
[0158] The cell fence is used to represent the serving cell at the permanent location. In some embodiments, the cell fence includes the cell ID of the serving cell at the permanent location.
[0159] In a possible implementation, the terminal may record the change of the serving cell, for example, the timestamp and the serving cell ID of the serving cell switched to. Schematically, the change of the serving cell recorded by the terminal is shown in Table 6.
[0160] Table 6
[0161]
[0162] In a possible implementation manner, the terminal determines a connection period of a historical wireless network represented by the permanent location fence, and thereby determines a cell fence corresponding to the permanent location fence based on a serving cell in the connection period.
[0163] In an illustrative example, when the permanent location includes multiple historical wireless networks, the terminal determines the connection period of each historical wireless network, determines the service cell ID of the permanent location with the service cell ID whose timestamp is in the connection period, and then determines the union of the service cell IDs at the permanent location as the cell fence corresponding to the permanent location.
[0164] Residential Neighborhood Fence
[0165] After determining the cell fence, in order to further determine the resident neighbor fence located between the cell fence and the resident fence, when entering the cell fence, the terminal determines the resident neighbor fence corresponding to the resident based on the wireless network scanning information within the cell fence.
[0166] Optionally, when it is recognized that the terminal has entered the cell fence (ie, it is recognized that the current serving cell ID belongs to the serving cell ID set represented by the cell fence), the terminal performs a wireless network scan to obtain wireless network scan information.
[0167] Optionally, the terminal determines a resident neighbor fence within a certain range near the resident location based on the correlation between the wireless network scan information and the resident wireless network represented by the resident fence.
[0168] In a possible implementation, Figure 7 As shown, determining the resident neighborhood fence based on the wireless network scanning information may include the following steps:
[0169] Step 701: for each piece of 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 network. The scanning sample includes the scanning time of the wireless network scanning information and the average signal strength.
[0170] The wireless network scanning information is shown in Table 4. Optionally, the scanning timestamp in the wireless network scanning information is an average value of the timestamps of each bssid scanned.
[0171] When the terminal is close to the permanent residence, the wireless network scanning information obtained by scanning will not include the network BSSID of the permanent wireless network; and when the terminal is far away from the permanent residence, the wireless network scanning information obtained by scanning will include one or more network BSSIDs of the permanent wireless network.
[0172] In a possible implementation, the terminal may construct a scanning sample based on the signal strength of the wireless network in the wireless network scanning information. The scanning sample may characterize the distance between the location at which the wireless network scanning information is obtained and the permanent residence through the included signal strength mean.
[0173] Optionally, this step may include the following sub-steps:
[0174] Sub-step 1: when the wireless network scanning information includes a permanent wireless network, determine a signal strength average of the signal strengths of the permanent wireless network.
[0175] In the case where the wireless network scanning information includes the network BSSID of the wireless network of the permanent residence, the terminal determines the signal strength mean of the signal strength of the wireless network of the permanent residence in the wireless network scanning information. The smaller the signal strength mean, the closer the location where the wireless network scanning information is scanned is to the permanent residence; conversely, the larger the signal strength mean, the farther the location where the wireless network scanning information is scanned is from the permanent residence.
[0176] Indicative, combined Figure 6 As shown, when the wireless network scanning information includes bssid2, bssid7, bssid8, bssid9 and bssid10, since the permanent wireless network includes bssid2, 3, and 7, the terminal determines that the average signal strength is -75 based on the signal strengths -80 and -70 corresponding to bssid2 and bssid7 contained in the wireless network scanning information.
[0177] Sub-step 2: when the wireless network scanning information does not include the resident wireless network, determine the preset signal strength as the signal strength average.
[0178] In the case where the wireless network scanning information does not include the network BSSID of the permanent wireless network, in order to be able to distinguish the scanning samples corresponding to the wireless network scanning information including the permanent wireless network, the terminal determines the preset signal strength as the signal strength average. The preset signal strength is set to a smaller value, usually less than the minimum signal strength of the wireless network scan, for example, the preset signal strength is -100.
[0179] Indicative, combined Figure 6 As shown, when the wireless network scanning information includes bssid4, bssid11 and bssid12, since the permanent wireless network includes bssid2, 3, and 7, the terminal determines that the average signal strength is -100.
[0180] Sub-step 3: constructing a scan sample based on the signal strength mean and the scan time of the wireless network scan information.
[0181] Furthermore, the terminal constructs a scanning sample including a signal strength mean and a scanning time. Each scanning sample can be expressed as (T, RSSI). Where T is the scanning time of the wireless network scanning information, and RSSI is the signal strength mean.
[0182] Step 702, based on the continuous scanning samples, determine a reference time point, where the reference time point is a time point at the permanent location.
[0183] Based on the scanning time and signal strength average contained in the continuous scanning samples, the terminal can determine the movement trend of the terminal relative to the permanent residence. For example, when the terminal moves toward the permanent residence, the signal strength average contained in the continuous scanning samples will show an increasing trend; and when the terminal moves away from the permanent residence, the signal strength average contained in the continuous scanning samples will show a decreasing trend.
[0184] Since when the terminal is located at the permanent point, the signal strength of the scanned permanent point wireless network will be within a certain signal strength range, therefore, based on the movement trend of the terminal, the scanning time of each scanning sample and the average reference signal strength when located at the permanent point, the terminal can determine the time point at which it is located at the permanent point.
[0185] In order 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:
[0186] Sub-step 1: Divide the scanning time range of the continuous scanning samples into multiple time windows.
[0187] In a possible implementation manner, the terminal divides the scanning time range (the earliest scanning time and the latest scanning time of the continuous scanning samples) into multiple time windows according to a preset time window size.
[0188] For example, the terminal may use 5 seconds as the preset time window size and divide the scanning time range into multiple time windows.
[0189] In schematic form, when the earliest scanning time is Tmin, the latest scanning time is Tmax, and the preset time window size is s, the n+1 time windows obtained by division can be expressed as: [Tmin~Tmin+s, Tmin+s~Tmin+2s,…, Tmin+n*s~Tmin+(n+1)*s], where Tmin+n*s≤Tmax≤Tmin+(n+1)*s.
[0190] Sub-step 2: for each time window, based on the scanning time and the mean signal strength of the scanning samples in the time window, determine the window scanning time and the mean window signal strength corresponding to the time window.
[0191] For each time window, the terminal determines the average of the scanning moments of each scanning sample in the time window as the window scanning moment of the time window; and determines the average of the signal strength means of each scanning sample in the time window as the window signal strength mean of the time window.
[0192] It should be noted that if there is no scan sample in the time window, the window scan time and the window signal strength mean of the time window are both set to 0.
[0193] Indicatively, the terminal determines that the mean window signal strength of each time window is: [-100, -100, 0, -100, -100, -80, -76, -73, -50, -45, -44], and the i-th value in the sequence represents the mean window signal strength of the i-th time window (Tmin+(i-1)*s~Tmin+i*s). Among them, since the third time window does not contain a scan sample, the mean window signal strength of the third time window is 0.
[0194] Sub-step 3, when the signal strength threshold is between the window signal strength means corresponding to adjacent time windows, determine the reference time point based on the window signal strength means corresponding to the adjacent time windows and the window scanning time, and the reference time point is between the window scanning times corresponding to the adjacent time windows.
[0195] The signal strength threshold is the reference window signal strength mean of the time window when the signal is at the stationary point. The signal strength threshold can be set based on experience or obtained by fine-tuning. For example, the signal strength threshold is a value between -50 and -100.
[0196] When the signal strength threshold is between the window signal strength means corresponding to adjacent time windows, it is apparent that the terminal may enter or leave the permanent location between adjacent time windows. Therefore, the terminal can determine the reference time point when the terminal is located at the permanent location based on the change in the window signal strength means within the two adjacent time windows and the change duration of the change. The reference time point is a time point between the window scanning moments corresponding to the adjacent time windows.
[0197] In some embodiments, for the i-th time window and the i+1-th time window, when r i ≤thred≤r i+1 or i+1 ≤thred≤r i When r , the terminal determines that between the i-th time window and the i+1-th time window, the terminal enters the permanent location or leaves the permanent location. i is the mean signal strength of the i-th time window, r i+1 is the mean signal strength of the i+1th time window, and thred is the signal strength threshold.
[0198] Furthermore, the terminal may determine the reference time point according to the following formula:
[0199] T label = abs(t i -t i+1 ) / abs(r i -r i+1 )*abs(r i -thred)+t i
[0200] Among them, T label is the reference time point, abs is the absolute value operation, t i is the window scanning time of the i-th time window, t i+1 is the window scanning time of the i+1th time window. abs(t i -t i+1 ) / abs(r i -r i+1 ) can indicate the change of signal strength within a unit time.
[0201] Step 703: determine neighboring wireless network scanning information in the wireless network scanning information based on the reference time point, where the neighboring wireless network scanning information is wireless network scanning information obtained by scanning near the permanent point.
[0202] In a possible implementation, the terminal determines, based on the reference time point, wireless network scanning information within a period of time before and after the reference time point as the neighboring wireless network scanning information.
[0203] Optionally, the terminal determines a reference time period based on a reference time point, and the reference time point is within the range of the reference time period, thereby determining the wireless network scanning information whose scanning time is within the reference time period as the neighboring wireless network scanning information.
[0204] The reference time period may be (reference time point-preset duration, reference time point+preset duration), for example, the preset duration may be a value within the range of 0-100s.
[0205] Step 704: Determine a permanent location neighbor fence corresponding to the permanent location based on the neighbor wireless network scan information.
[0206] In a possible implementation manner, the terminal determines each piece of neighboring wireless network scanning information as a permanent location neighbor fence corresponding to the permanent location, and the permanent location neighbor fence can represent the neighbor situation in each direction of the permanent location.
[0207] In this embodiment, the terminal estimates the time point when the terminal enters or leaves the permanent residence based on the signal strength of the wireless network included in the wireless network scanning information, and further obtains the network characteristics of the wireless network in the vicinity of the permanent residence based on the estimated time point. The accuracy of the reference time point obtained by mining the wireless network scanning information is high, and accordingly, the accuracy of the permanent residence neighborhood fence determined based on the reference time point is also high.
[0208] Regarding the use of the resident neighborhood fence, in a possible implementation, as follows: Figure 8 As shown, the terminal may include the following steps to determine that it has entered a neighbor fence of a long land.
[0209] Step 801, when entering a cell fence, obtain current wireless network scanning information within the cell fence.
[0210] When entering the cell fence, the terminal performs wireless network scanning to obtain current wireless network scanning information, which includes the network BSSID and signal strength of the wireless network.
[0211] Step 802: When the similarity between the neighboring wireless network scan information and the current wireless network scan information is greater than the similarity threshold and the permanent wireless network is not connected within a preset time period, it is determined to enter the permanent neighbor fence corresponding to the permanent location.
[0212] In a possible implementation, the terminal calculates the similarity between the current wireless network scanning information and each piece of neighboring wireless network scanning information represented by the resident neighbor fence. If the similarity between the neighboring wireless network scanning information and the current wireless network scanning information is greater than the similarity threshold, the terminal further determines whether it is connected to the resident wireless network within a preset time period between the current moment.
[0213] If the terminal fails to connect to the permanent wireless network within a preset time period, the terminal determines that it has entered the permanent neighborhood fence.
[0214] Optionally, if the terminal has been connected to the permanent wireless network within a preset time period, the terminal determines that it has left the permanent neighborhood fence.
[0215] The preset duration may be 5 minutes, 10 minutes, etc.
[0216] Optionally, if there is no neighboring wireless network scan information whose similarity with the current wireless network scan information is greater than a similarity threshold, the terminal determines that it has not entered the resident neighbor fence.
[0217] Regarding the manner of determining the similarity threshold, in a possible implementation manner, after determining the neighboring wireless network scanning information, the terminal determines the sample similarity between different neighboring wireless network scanning information.
[0218] Further, the terminal sorts the sample similarities and determines the sample similarities at the target percentage position after sorting as the similarity threshold, wherein the target percentage is a value between 0 and 1. For example, the terminal determines the sample similarity at the 80% position as the similarity threshold.
[0219] In an exemplary application scenario, the process of a terminal connecting to a wireless network is as follows: Fig. 9 shown.
[0220] Step 901, obtaining the current WiFi connection status information of the terminal.
[0221] Step 902, detecting whether the WiFi is connected and the connected WiFi is the permanent WiFi.
[0222] If yes, execute step 912, if no, execute step 903.
[0223] Step 903: Whether the WiFi is not connected.
[0224] If yes, execute step 904, if no, execute step 915.
[0225] Step 904, obtaining the serving cell ID of the current serving cell.
[0226] Step 905, checking whether it is within the community fence.
[0227] In a possible implementation manner, the terminal detects whether the current serving cell ID belongs to a serving cell ID set corresponding to the cell fence.
[0228] If yes, execute step 906 , if no, execute step 915 .
[0229] Step 906, obtaining the resident neighbor fence corresponding to the cell fence.
[0230] Step 907, obtaining the current WiFi scan result.
[0231] Step 908: Check whether the current WiFi scan result matches the resident neighborhood fence.
[0232] In a possible implementation, whether there is a WiFi scan result in the terminal's permanent neighbor fence whose similarity with the current WiFi scan result is higher than a similarity threshold. If so, it is determined that the current WiFi scan result matches the permanent neighbor fence, and step 909 is executed; if not, it is determined that the current WiFi scan result does not match the permanent neighbor fence, and step 915 is executed.
[0233] Step 909: Whether the WiFi connection to the permanent location was established within 5 minutes before the current time.
[0234] If yes, execute step 911 , if no, execute step 910 .
[0235] Step 910, determine whether to enter the resident neighborhood fence.
[0236] In some embodiments, after entering the neighborhood fence of the permanent location, the terminal performs a WiFi connection based on the WiFi connection policy of the permanent location.
[0237] Step 911, determine to leave the neighborhood fence of the permanent location.
[0238] Step 912, determine that it is within the resident area fence.
[0239] Step 913, determine the wireless network type and network preference at the permanent location.
[0240] Step 914, determine the WiFi connection strategy.
[0241] Step 915, determine to be outside the fence.
[0242] In order to ensure the timeliness of the above fences, the terminal will update the resident fence, resident neighbor fence and cell fence corresponding to the resident location according to the latest scan and connection information when the terminal senses the fence normally. For example, the terminal updates the resident fence, resident neighbor fence and cell fence according to the latest n scan and connection information.
[0243] Furthermore, in order to save storage space of the terminal, the terminal will delete the fence that has not been sensed for a long time. In a possible implementation, for each fence, the terminal determines the most recent sensing time of the fence, and the fence includes at least one of a permanent location fence, a permanent location neighbor fence, and a cell fence.
[0244] When the time interval between the most recent sensing moment and the current moment is greater than the time interval threshold, the terminal deletes the fence. For example, when the time interval is greater than 30 days, the terminal deletes the fence.
[0245] In some embodiments, when deleting an upper fence, the terminal will delete the lower fence corresponding to the upper fence. For example, when deleting a cell fence, the terminal will delete the resident neighbor fence and the resident fence corresponding to the cell fence (both corresponding to the same resident); when deleting the resident neighbor fence, the terminal will delete the resident fence together.
[0246] Please refer to Fig.10 , which shows a structural block diagram of a wireless network connection device provided by an exemplary embodiment of the present application. The device includes:
[0247] The processing module 1001 is used to determine at least one of a wireless network type and a network preference at a permanent location;
[0248] The processing module 1001 is used to determine the wireless network connection strategy of the permanent location based on at least one of the wireless network type and the network preference;
[0249] The connection module 1002 is used to perform wireless network connection based on the wireless network connection strategy when entering the permanent location neighbor fence corresponding to the permanent location, and the permanent location neighbor fence is used to characterize the characteristics of the wireless network near the permanent location.
[0250] Optionally, the processing module 1001 is used to:
[0251] Determine the type of the wireless network at the permanent residence based on network information of the wireless network at the permanent residence, the network information including network SSID, network BSSID and network frequency band;
[0252] The network usage preference of the permanent location is determined based on the historical network usage records at the permanent location, wherein the historical network usage records include network usage time period, network usage duration, and network usage application type.
[0253] Optionally, the processing module 1001 is used to:
[0254] When the number of the network SSIDs of the wireless network at the permanent residence is 1, the number of the network BSSIDs corresponding to the network SSIDs is less than or equal to the quantity threshold, and the network SSIDs correspond to multiple network frequency bands, determining that the type of the wireless network at the permanent residence is the first type;
[0255] When 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 the quantity threshold, and / or the network SSID corresponds to a single network frequency band, the wireless network type at the permanent residence is determined to be the second type.
[0256] Optionally, the processing module 1001 is used to:
[0257] In the case where the wireless network type is the first type, determining that the wireless network connection strategy of the permanent location is a first connection strategy, wherein under the first connection strategy, the connection priority of a high-frequency band wireless network is higher than the connection priority of a low-frequency band wireless network;
[0258] In the case that the wireless network type is the second type, the wireless network connection strategy of the permanent location is determined to be a second connection strategy, and the second connection strategy is used to increase a wireless network scanning frequency.
[0259] Optionally, the processing module 1001 is used to:
[0260] Determine the network usage time period preference at the permanent residence based on the network usage time periods and network usage durations corresponding to different networks at the permanent residence, wherein the network usage time period preference is used to characterize the correspondence between the network usage time period and the network;
[0261] Determine the network application preference at the permanent location based on the network application types and network usage durations corresponding to the different networks at the permanent location, wherein the network application preference is used to characterize the correspondence between the network application types and the networks;
[0262] At least one of the network usage time period preference and the network usage application preference is determined as the network usage preference of the permanent location.
[0263] Optionally, the processing module 1001 is used to:
[0264] Determining the wireless network connection strategy of the permanent location based on the network usage time period preference and the current time period;
[0265] The wireless network connection strategy of the permanent location is determined based on the network application preference and the current network application.
[0266] Optionally, the processing module 1001 is further configured to:
[0267] Determine a permanent location fence corresponding to the permanent location based on the wireless network historical connection information and the wireless network historical scanning information, wherein the permanent location fence is used to characterize the permanent location wireless network at the permanent location;
[0268] Determining the type of the wireless network in the permanent location based on the network information of the wireless network in the permanent location fence;
[0269] The network usage preference of the permanent location is determined based on historical network usage records within the permanent location fence.
[0270] Optionally, the processing module 1001 is used to:
[0271] Determining a non-mobile wireless network based on the wireless network history scanning information;
[0272] Aggregating historical wireless networks belonging to the non-mobile network based on the wireless network history scanning information to obtain the historical wireless networks belonging to the same location;
[0273] Determine, based on the wireless network connection information, the accumulated connection duration of the historical wireless network at the same location;
[0274] When the accumulated connection duration of the historical wireless network at the same location is greater than a duration threshold, the permanent location fence corresponding to the permanent location is determined based on the historical wireless network, wherein the historical wireless network is the permanent location wireless network of the permanent location.
[0275] Optionally, the processing module 1001 is used to:
[0276] Acquire multiple wireless network historical scanning information at different scanning times, wherein the wireless network historical scanning information includes network BSSIDs and signal strengths of different wireless networks scanned;
[0277] Deleting the network BSSID and the signal strength of the candidate wireless network from each piece of the wireless network history scanning information to obtain multiple pieces of updated wireless network history scanning information;
[0278] Calculate the information similarity between the multiple wireless network historical scanning information after different updates to obtain an information similarity sequence;
[0279] When the mean of each of the information similarities in the information similarity sequence is greater than a mean threshold and the variance is less than a variance threshold, it is determined that the candidate wireless network belongs to the non-mobile wireless network.
[0280] Optionally, the processing module 1001 is used to:
[0281] The historical wireless networks belonging to the non-mobile network and located in the same piece of the wireless network historical scanning information are aggregated to obtain the historical wireless networks belonging to the same location.
[0282] Optionally, the processing module 1001 is further configured to:
[0283] Determine a cell fence corresponding to the permanent location fence, where the cell fence is used to represent a serving cell at the permanent location;
[0284] In case of entering the cell fence, the permanent location neighbor fence corresponding to the permanent location is determined based on the wireless network scanning information within the cell fence.
[0285] Optionally, the processing module 1001 is used to:
[0286] Determining a connection period of the historical wireless network represented by the permanent location fence;
[0287] The cell fence corresponding to the permanent location fence is determined based on the serving cell within the connection period.
[0288] Optionally, the processing module 1001 is used to:
[0289] For each piece of the wireless network scanning information within the cell fence, construct a scanning sample based on the scanning time of the wireless network scanning information and the signal strength of the included wireless network, wherein the scanning sample includes the scanning time of the wireless network scanning information and the average value of the signal strength;
[0290] Determine a reference time point based on the continuous scan samples, wherein the reference time point is a time point at the permanent location;
[0291] Based on the reference time point, determine the neighboring wireless network scanning information in the wireless network scanning information, where the neighboring wireless network scanning information is the wireless network scanning information obtained by scanning near the permanent point;
[0292] The permanent location neighbor fence corresponding to the permanent location is determined based on the neighbor wireless network scan information.
[0293] Optionally, the processing module 1001 is used to:
[0294] In a case where the wireless network scanning information includes the resident wireless network, determining the signal strength mean value of the signal strength of the resident wireless network;
[0295] In a case where the wireless network scanning information does not include the resident wireless network, determining a preset signal strength as the signal strength mean value;
[0296] The scanning sample is constructed based on the signal strength mean and the scanning time of the wireless network scanning information.
[0297] Optionally, the processing module 1001 is used to:
[0298] Dividing the scanning time range of the continuous scanning samples into a plurality of time windows;
[0299] For each of the time windows, based on the scanning time and the signal strength mean of the scanning samples in the time window, determine the window scanning time and the window signal strength mean corresponding to the time window;
[0300] When the signal strength threshold is between the window signal strength means corresponding to adjacent time windows, the reference time point is determined based on the window signal strength means corresponding to the adjacent time windows and the window scanning time, and the reference time point is between the window scanning time corresponding to the adjacent time windows.
[0301] Optionally, the processing module 1001 is used to:
[0302] Determine a reference time period based on the reference time point, wherein the reference time point is within the range of the reference time period;
[0303] The wireless network scanning information at the scanning time within the reference time period is determined as the neighboring wireless network scanning information.
[0304] Optionally, the connection module 1002 is used to:
[0305] When entering the cell fence, obtaining current wireless network scanning information within the cell fence;
[0306] When the similarity between the neighboring wireless network scan information and the current wireless network scan information is greater than a similarity threshold, and the wireless network near the permanent location is not connected within a preset time period, it is determined to enter the permanent location neighbor fence corresponding to the permanent location.
[0307] Optionally, the processing module 1001 is used to:
[0308] Determine sample similarity between different neighboring wireless network scan information;
[0309] The sample similarities are sorted, and the sample similarities at the target percentage position after sorting are determined as the similarity threshold.
[0310] Optionally, the processing module 1001 is further configured to:
[0311] Determine a most recent sensing time of a fence, wherein the fence includes at least one of the permanent location fence, the permanent neighbor fence, and the cell fence;
[0312] When the time interval between the most recent perception moment and the current moment is greater than a time interval threshold, the fence is deleted.
[0313] To summarize, in an embodiment of the present application, a corresponding wireless network connection strategy is set for the permanent residence with respect to the wireless network type of the wireless network at the permanent residence and at least one of the network preferences of the terminal at the permanent residence; subsequently, when it is identified that the terminal has entered a permanent residence neighbor fence corresponding to the permanent residence, a wireless network connection can be performed based on the wireless network connection strategy of the permanent residence, so that the terminal can be connected to a wireless network that meets the usage requirements at the permanent residence, thereby improving the network quality of the terminal at the permanent residence; and, based on the characteristics of the wireless network near the permanent residence, a permanent residence neighbor fence is set for the permanent residence, so that the terminal can use the wireless network connection strategy when it is close to the permanent residence, thereby improving the timeliness of the policy application.
[0314] It should be noted that: the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0315] See also Fig.11 , Fig.11 11 is a schematic diagram of a terminal structure provided by an exemplary embodiment of the present application. The terminal may also include one or more of the following components: a processor 1110 and a memory 1120.
[0316] Optionally, the processor 1110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1120, and calling data stored in the memory 1120. Optionally, the processor 1110 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA).
[0317] The processor 1110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a baseband chip. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch screen; the NPU is used to implement artificial intelligence (AI) functions; and the baseband chip is used to process wireless communications. It is understandable that the above-mentioned baseband chip may not be integrated into the processor 1110, but may be implemented by a single chip.
[0318] The memory 1120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1120 includes a non-transitory computer-readable storage medium. The memory 1120 may be used to store instructions, programs, codes, 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 above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the electronic device, etc.
[0319] 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, and the terminal may include more (such as a power supply component, a display component, a sensor component) or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0320] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer instruction, and the at least one computer instruction is used to be executed by a processor to implement the wireless network connection method as described in the above embodiment.
[0321] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the wireless network connection method described in the above embodiment.
[0322] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with 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 codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0323] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A wireless network connection method, characterized in that: The method comprises: determining at least one of a wireless network type and a network preference at a permanent location; Determining a wireless network connection strategy for the permanent location based on at least one of the wireless network type and the network preference; When entering the permanent location neighbor fence corresponding to the permanent location, wireless network connection is performed based on the wireless network connection strategy, and the permanent location neighbor fence is used to characterize the characteristics of the wireless network near the permanent location.
2. The method according to claim 1, characterized in that The determining of at least one of the wireless network type and network preference of the permanent location includes at least one of the following: Determine the type of the wireless network at the permanent residence based on network information of the wireless network at the permanent residence, the network information including network SSID, network BSSID and network frequency band; The network usage preference of the permanent location is determined based on the historical network usage records at the permanent location, wherein the historical network usage records include network usage time period, network usage duration, and network usage application type.
3. The method according to claim 2, characterized in that The determining the type of the wireless network at the permanent location based on the network information of the wireless network at the permanent location includes: When the number of the network SSIDs of the wireless network at the permanent residence is 1, the number of the network BSSIDs corresponding to the network SSIDs is less than or equal to the quantity threshold, and the network SSIDs correspond to multiple network frequency bands, determining that the type of the wireless network at the permanent residence is the first type; When 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 the quantity threshold, and / or the network SSID corresponds to a single network frequency band, the wireless network type at the permanent residence is determined to be the second type.
4. The method according to claim 3, characterized in that The determining of the wireless network connection strategy of the permanent location based on the wireless network type includes: In the case where the wireless network type is the first type, determining that the wireless network connection strategy of the permanent location is a first connection strategy, wherein under the first connection strategy, the connection priority of a high-frequency band wireless network is higher than the connection priority of a low-frequency band wireless network; In the case that the wireless network type is the second type, the wireless network connection strategy of the permanent location is determined to be a second connection strategy, and the second connection strategy is used to increase a wireless network scanning frequency.
5. The method according to claim 2, characterized in that: The determining the network usage preference of the permanent location based on the historical network usage record at the permanent location includes: Determine the network usage time period preference at the permanent residence based on the network usage time periods and network usage durations corresponding to different networks at the permanent residence, wherein the network usage time period preference is used to characterize the correspondence between the network usage time period and the network; Determine the network application preference at the permanent location based on the network application types and network usage durations corresponding to the different networks at the permanent location, wherein the network application preference is used to characterize the correspondence between the network application types and the networks; At least one of the network usage time period preference and the network usage application preference is determined as the network usage preference of the permanent location.
6. The method according to claim 5, characterized in that The determining of the wireless network connection strategy of the permanent location based on the network preference includes at least one of the following: Determining the wireless network connection strategy of the permanent location based on the network usage time period preference and the current time period; The wireless network connection strategy of the permanent location is determined based on the network application preference and the current network application.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Determine a permanent location fence corresponding to the permanent location based on the wireless network historical connection information and the wireless network historical scanning information, wherein the permanent location fence is used to characterize the permanent location wireless network at the permanent location; The determining of at least one of the wireless network type and network preference of the permanent location includes at least one of the following: Determining the type of the wireless network in the permanent location based on the network information of the wireless network in the permanent location fence; The network usage preference of the permanent location is determined based on historical network usage records within the permanent location fence.
8. The method according to claim 7, characterized in that The determining the permanent location fence corresponding to the permanent location based on the wireless network historical connection information and the wireless network historical scanning information includes: Determining a non-mobile wireless network based on the wireless network history scanning information; Aggregating historical wireless networks belonging to the non-mobile network based on the wireless network history scanning information to obtain the historical wireless networks belonging to the same location; Determine, based on the wireless network connection information, the accumulated connection duration of the historical wireless network at the same location; When the accumulated connection duration of the historical wireless network at the same location is greater than a duration threshold, the permanent location fence corresponding to the permanent location is determined based on the historical wireless network, wherein the historical wireless network is the permanent location wireless network of the permanent location.
9. The method according to claim 8, characterized in that The determining of the non-mobile wireless network based on the wireless network history scanning information includes: Acquire multiple wireless network historical scanning information at different scanning times, wherein the wireless network historical scanning information includes network BSSIDs and signal strengths of different wireless networks scanned; Deleting the network BSSID and the signal strength of the candidate wireless network from each piece of the wireless network history scanning information to obtain multiple pieces of updated wireless network history scanning information; Calculate the information similarity between the multiple wireless network historical scanning information after different updates to obtain an information similarity sequence; When the mean of each of the information similarities in the information similarity sequence is greater than a mean threshold and the variance is less than a variance threshold, it is determined that the candidate wireless network belongs to the non-mobile wireless network.
10. The method according to claim 8, characterized in that The aggregating the historical wireless networks belonging to the non-mobile network based on the wireless network history scanning information to obtain the historical wireless networks belonging to the same location includes: The historical wireless networks belonging to the non-mobile network and located in the same piece of the wireless network historical scanning information are aggregated to obtain the historical wireless networks belonging to the same location.
11. The method according to claim 7, characterized in that The method further comprises: Determine a cell fence corresponding to the permanent location fence, where the cell fence is used to represent a serving cell at the permanent location; In case of entering the cell fence, the permanent location neighbor fence corresponding to the permanent location is determined based on the wireless network scanning information within the cell fence.
12. The method according to claim 11, characterized in that The determining the cell fence corresponding to the permanent location fence includes: Determining a connection period of the historical wireless network represented by the permanent location fence; The cell fence corresponding to the permanent location fence is determined based on the serving cell within the connection period.
13. The method according to claim 11, characterized in that The determining the resident location neighbor fence corresponding to the resident location based on the wireless network scanning information within the cell fence includes: For each piece of the wireless network scanning information within the cell fence, construct a scanning sample based on the scanning time of the wireless network scanning information and the signal strength of the included wireless network, wherein the scanning sample includes the scanning time of the wireless network scanning information and the average value of the signal strength; Determine a reference time point based on the continuous scan samples, wherein the reference time point is a time point at the permanent location; Based on the reference time point, determine the neighboring wireless network scanning information in the wireless network scanning information, where the neighboring wireless network scanning information is the wireless network scanning information obtained by scanning near the permanent point; The permanent location neighbor fence corresponding to the permanent location is determined based on the neighbor wireless network scan information.
14. The method according to claim 13, characterized in that The step of constructing a scan sample based on the scan time of the wireless network scan information and the signal strength of the included wireless network includes: In a case where the wireless network scanning information includes the resident wireless network, determining the signal strength mean value of the signal strength of the resident wireless network; In a case where the wireless network scanning information does not include the resident wireless network, determining a preset signal strength as the signal strength mean value; The scanning sample is constructed based on the signal strength mean and the scanning time of the wireless network scanning information.
15. The method according to claim 13, characterized in that The determining of the reference time point based on the continuous scanning samples comprises: Dividing the scanning time range of the continuous scanning samples into a plurality of time windows; For each of the time windows, based on the scanning time and the signal strength mean of the scanning samples in the time window, determine the window scanning time and the window signal strength mean corresponding to the time window; When the signal strength threshold is between the window signal strength means corresponding to adjacent time windows, the reference time point is determined based on the window signal strength means corresponding to the adjacent time windows and the window scanning time, and the reference time point is between the window scanning time corresponding to the adjacent time windows.
16. The method according to claim 13, characterized in that The determining, based on the reference time point, the neighboring wireless network scanning information in the wireless network scanning information includes: Determine a reference time period 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 at the scanning time within the reference time period is determined as the neighboring wireless network scanning information.
17. The method according to claim 13, characterized in that The method further comprises: When entering the cell fence, obtaining current wireless network scanning information within the cell fence; When the similarity between the neighboring wireless network scan information and the current wireless network scan information is greater than a similarity threshold, and the wireless network near the permanent location is not connected within a preset time period, it is determined to enter the permanent location neighbor fence corresponding to the permanent location.
18. The method according to claim 17, characterized in that The method further comprises: Determine sample similarity between different neighboring wireless network scan information; The sample similarities are sorted, and the sample similarities at the target percentage position after sorting are determined as the similarity threshold.
19. The method according to claim 13, characterized in that The method further comprises: Determine a most recent sensing time of a fence, wherein the fence includes at least one of the permanent location fence, the permanent neighbor fence, and the cell fence; When the time interval between the most recent perception moment and the current moment is greater than a time interval threshold, the fence is deleted.
20. A wireless network connection device, characterized in that: The device comprises: A processing module, configured to determine at least one of a wireless network type and a network preference at a permanent location; The processing module is used to determine the wireless network connection strategy of the permanent location based on at least one of the wireless network type and the network preference; A connection module is used to perform wireless network connection based on the wireless network connection strategy when entering a permanent location neighbor fence corresponding to the permanent location, wherein the permanent location neighbor fence is used to characterize the characteristics of the wireless network near the permanent location.
21. A terminal, characterized in that: The terminal includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the wireless network connection method according to any one of claims 1 to 19.
22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer instruction, and the at least one computer instruction is used to be executed by a processor to implement the wireless network connection method according to any one of claims 1 to 19.
23. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the wireless network connection method as described in any one of claims 1 to 19.
Citation Information
Cited By
Wireless network connection method and apparatus, and terminal and program product
WO2026138058A1