A method and related apparatus for locating terminal devices
By automatically activating the location application when the wireless module of the terminal device is turned on, and obtaining and reporting location information, the problem of inaccurate positioning of the terminal device is solved, and the recovery rate of lost devices and information security are improved.
Patent Information
- Application Number
- CN202111166683.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2041-09-30
AI Technical Summary
Existing technologies for locating terminal devices are immature and difficult to locate accurately, making it difficult to recover lost terminal devices and increasing the risk of personal information leakage.
When the wireless module of the terminal device is turned on, the application used for positioning is automatically activated by scanning wireless networks to obtain and report location information, and the application can even be activated in the background to improve the accuracy of positioning.
It increases the likelihood of obtaining the real-time location of terminal devices, increases the probability of recovering lost terminal devices, and reduces the risk of user information leakage.
Smart Images

Figure CN115914987B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and in particular to a method and apparatus for locating a terminal device. Background Technology
[0002] Some terminal devices, such as mobile phones, are small in size and easy for users to carry. Users can carry them with them and operate the terminal devices when needed to obtain various services provided by the terminal devices.
[0003] Due to the portability of mobile devices, it's inevitable that some users will lose them. Users who discover their devices are lost hope that they can be located as soon as possible to potentially recover them and prevent the leakage of personal information stored on them.
[0004] The positioning methods for terminal devices provided in related technologies are not mature, have great limitations, and are difficult to achieve accurate positioning. Summary of the Invention
[0005] To address the aforementioned technical problems, this application provides a terminal device positioning method and related apparatus, which increases the likelihood of obtaining real-time location information and improves the probability of the terminal device being recovered due to more accurate positioning.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] On one hand, embodiments of this application provide a terminal device positioning method, the method comprising:
[0008] Wireless network scanning is performed using the wireless module of a terminal device, which is equipped with an application for location services.
[0009] If a wireless network is detected, the inactive application will be activated in the background of the terminal device.
[0010] The application obtains the location information of the terminal device, which includes the terminal's location or the network parameters of the wireless network.
[0011] The application reports the location information to the server for the terminal device.
[0012] On the other hand, embodiments of this application provide a terminal device positioning method, the method comprising:
[0013] Obtain a device lookup request from a first terminal device, wherein the device lookup request includes a user identifier;
[0014] The location information of the second terminal device bound to the user identifier is determined. The location information is reported by the second terminal device after activating an inactive application when it scans for a wireless network. The location information is used to identify the location of the device that establishes the wireless network. The application used for location is configured in the second terminal device.
[0015] The terminal location parameters of the second terminal device corresponding to the device search request are determined based on the location information;
[0016] The terminal location parameters are returned to the first terminal device.
[0017] On the other hand, embodiments of this application provide a terminal device positioning apparatus, the apparatus including a scanning unit, an activation unit, an acquisition unit, and a reporting unit:
[0018] The scanning unit is used to scan for wireless networks through the wireless module of the terminal device, and the terminal device is configured with an application for positioning.
[0019] The activation unit is used to activate the inactive application in the background of the terminal device if a wireless network is detected.
[0020] The acquisition unit is used to acquire the location information of the terminal device through the application, the location information including the terminal's location or the network parameters of the wireless network.
[0021] The reporting unit is used to report the location information from the terminal device to the server through the application.
[0022] On the other hand, embodiments of this application provide a terminal device positioning apparatus, the apparatus comprising an acquisition unit, a determination unit, and a return unit:
[0023] The acquisition unit is used to acquire a device lookup request from the first terminal device, the device lookup request including a user identifier;
[0024] The determining unit is used to determine the second terminal device bound to the user identifier and the location information corresponding to the second terminal device. The location information is reported by the second terminal device after activating an inactive application when it scans for a wireless network. The location information is used to identify the location of the device that establishes the wireless network. The application used for location is configured in the second terminal device.
[0025] The determining unit is further configured to determine the terminal location parameters of the second terminal device corresponding to the device search request based on the location information;
[0026] The return unit is used to return the terminal location parameters to the first terminal device.
[0027] On the other hand, embodiments of this application provide a terminal device positioning system, the system including a terminal device and a server:
[0028] The terminal device is used to perform the terminal device positioning method described above.
[0029] The server is used to execute the terminal device positioning method described above.
[0030] In another aspect, embodiments of this application provide a computer device, the computer device including a processor and a memory:
[0031] The memory is used to store program code and transmit the program code to the processor;
[0032] The processor is used to execute the terminal device positioning method described above according to the instructions in the program code.
[0033] In another aspect, embodiments of this application provide a computer-readable storage medium for storing a computer program for executing the terminal device positioning method described above.
[0034] In another aspect, embodiments of this application provide a computer program product including instructions that, when run on a computer, cause the computer to execute the terminal device positioning method described above.
[0035] As can be seen from the above technical solution, the terminal device is equipped with an application for location services. The terminal device can detect the on / off status of its own wireless module and scan for wireless networks when the wireless module is detected to be on. When the terminal device scans for a wireless network, even if the application is not active at this time, it can be activated in the background of the terminal device. This allows the application to obtain the terminal device's location information and report it to the server. Since the terminal device scans for surrounding wireless networks continuously when the wireless module is on, activating the location application based on the detection of a wireless network effectively increases the frequency of the application's activation in the background. Even if the application is not activated or closed by the terminal device, it can still report the terminal device's location information when a wireless network is detected. This increases the likelihood of obtaining real-time location information when the terminal device is lost, and more accurate location tracking increases the probability of the terminal device being recovered. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a schematic diagram of a terminal device positioning scenario provided in an embodiment of this application;
[0038] Figure 2 A flowchart illustrating a terminal device positioning method provided in this application embodiment;
[0039] Figure 3 A schematic diagram of a mobile phone retrieval interface provided in an embodiment of this application;
[0040] Figure 4 A flowchart illustrating another terminal device positioning method provided in this application embodiment;
[0041] Figure 5 A signaling interaction diagram for a terminal device retrieval scenario provided in an embodiment of this application;
[0042] Figure 6 This application provides a schematic diagram of a process for reporting location information through a positioning application.
[0043] Figure 7 A structural diagram of a terminal device positioning device provided in an embodiment of this application;
[0044] Figure 8 A structural diagram of another terminal device positioning device provided in the embodiments of this application;
[0045] Figure 9 A system structure diagram of a terminal device positioning system provided in this application embodiment;
[0046] Figure 10 A structural diagram of a terminal device provided in an embodiment of this application;
[0047] Figure 11 A structural diagram of a server provided in an embodiment of this application;
[0048] Figure 12 A flowchart illustrating another terminal device positioning method provided in this application embodiment. Detailed Implementation
[0049] The embodiments of this application will now be described with reference to the accompanying drawings.
[0050] When a terminal device is lost, the terminal device positioning methods in related technologies are difficult to accurately locate. For example, the application used for positioning will not report the location of the terminal device when it is inactive, making it difficult to accurately locate the lost terminal device and reducing the possibility of the terminal device being found.
[0051] Therefore, this application provides a terminal device positioning method, which can increase the possibility of obtaining the real-time location of the terminal device, and the more accurate positioning increases the probability of the terminal device being found.
[0052] The terminal device positioning method provided in this application can be executed by a terminal device, and the relevant embodiments can be applied to various scenarios such as cloud technology, cloud security, and smart transportation. The terminal device includes, but is not limited to, mobile phones, portable computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, etc.
[0053] Figure 1 This is a schematic diagram of a terminal device positioning scenario provided in an embodiment of this application, including a terminal device 100, a wireless device 200, and a server 300.
[0054] The street area where terminal device 100 is located includes wireless device 200, which can be a fixedly installed wireless router. Terminal device 100 has an application installed or configured that can be used for location services or can provide or invoke location functions, such as an application (APP). This application can report the location information of terminal device 100 to server 300, for example, through periodic reporting or reporting upon activation.
[0055] Because the aforementioned applications cannot remain active on the terminal device indefinitely—for example, some operating systems periodically close the application running in the background, or sometimes the user actively closes the application (e.g., the user who finds the lost terminal device closes it)—in either case, the terminal device will stop reporting location information. If the terminal device is lost at this time, its real-time location cannot be determined through the retrieval function.
[0056] In this embodiment, when a terminal device scans for a wireless network, even if the application is not currently active, it can be activated in the background of the terminal device. This allows the application to obtain the terminal device's location information and report it to the server. For example, when terminal device 100 moves near wireless device 200, its wireless module scans for the wireless network established by wireless device 200. This allows it to activate a location-based application (e.g., a location app) in the background of terminal device 100, enabling it to report its current location information to the server 300.
[0057] Since the terminal device scans for nearby wireless networks at any time when the wireless module is turned on, the method of activating the application used for positioning based on the scan of a wireless network can effectively increase the number of times the application is activated in the background. Even if the application is not turned on or closed by the terminal device, it can still report the location information of the terminal device when the terminal device scans for a wireless network. Therefore, when the terminal device is lost, the possibility of obtaining real-time location can be increased. More accurate positioning increases the probability of the terminal device being found.
[0058] Figure 2 A flowchart of a terminal device positioning method provided in this application embodiment, the method comprising:
[0059] S200: Detects the on / off status of the wireless module of the terminal device.
[0060] The terminal device is equipped with a wireless module that can be turned on or off by the user, or the terminal device can automatically change the on / off state of the wireless module based on changes in the surrounding environment, or the terminal device can turn the wireless module on or off based on preset time nodes or time intervals.
[0061] Regardless of the above situations, in the embodiments of this application, the terminal device can detect the current on / off state of the wireless module through an interface or other means, such as the on state or the off state.
[0062] S201: In response to detecting that the wireless module is turned on, a wireless network scan is performed through the wireless module.
[0063] The terminal device is equipped with an application for positioning. When the wireless (WiFi) module of the terminal device is turned on, it can scan for wireless networks around the terminal device. If the terminal device enters the signal coverage area of a wireless network, the wireless module can enable the terminal device to discover the wireless network.
[0064] S202: If a wireless network is detected, the inactive application will be activated in the background of the terminal device.
[0065] The state of an application can include an active state in the foreground, an inactive state in the background, and an inactive state.
[0066] The foreground active state refers to the period when an application is opened and displayed on a terminal device, during which the user opens and uses the application. For example, when a user opens a social media app on their phone to engage in a social conversation with other users, that social media app is in the foreground. Similarly, when a user opens a location-based application on their phone, that application is in the foreground.
[0067] Background inactive state refers to the situation where the user switches the application to the background. At this time, the application is inactive. For example, when a new application is opened, the previously displayed application is switched to the background state. For example, when the previously displayed application is pushed to the background and the desktop is displayed, the application is in the background state. In this state, the application can still perform some basic functions, such as reporting location information.
[0068] An inactive state refers to an application that is neither in the foreground nor in the background, and is therefore unable to provide normal service. This could be due to the application never being opened after the device is powered on, or it could be because the application has been closed by the user or the operating system.
[0069] Correspondingly, both the active state in the foreground and the inactive state in the background can be understood as an active state.
[0070] Terminal devices can detect the current state of an application. That is, the terminal device can use various detection methods to determine whether the application is currently in the foreground or background, and whether it is active or inactive in the background.
[0071] When a wireless network is detected, the aforementioned application on the terminal device may be in an inactive state. In this state, the application lacks the function of obtaining and reporting the terminal device's location information. Since the terminal device constantly scans for surrounding wireless networks when its wireless module is activated, and wireless networks are virtually ubiquitous in current human activity environments, this application proposes an application activation method based on wireless network scanning. When the terminal device detects a wireless network, the application used for location services can be activated in the background. Because wireless networks have high signal coverage, the terminal device's wireless module can frequently or even continuously scan for wireless networks, thus significantly increasing the time the application remains active. This allows the server to obtain the terminal device's location information as real-time as possible. Furthermore, activating the application in the background does not cause any user-level disturbance, reducing the user's awareness of the application's activation.
[0072] In some operating systems of terminal devices, in order to activate an application in the background, in addition to scanning for a wireless network, the terminal device also needs to connect to the wireless network based on a wireless module. Therefore, in one possible implementation, S202 includes: if a wireless network is scanned and connected to the wireless network, the inactive application is activated in the background of the terminal device.
[0073] For example, some operating systems utilize the feature of the NETHOTSpotConfiguration component, which can remain active while connected to a wireless network. When a terminal device connects to a wireless network, the NETHOTSpotConfiguration component activates a location-related application in the background, allowing the activated application to obtain the terminal device's location information in the background. The terminal device can connect to previously connected wireless networks by remembering passwords, directly connecting to password-free wireless networks, or connecting manually by the user; this application does not limit the scope of these possibilities.
[0074] S203: Obtain the location information of the terminal device through the application.
[0075] When the application used for location services is activated in the background, it acquires location information, including the terminal device's location or network parameters of the wireless network. The specific type of location information acquired may depend on the application's permissions or the application scenario; this application does not limit this.
[0076] In one possible implementation, in response to the application having location data acquisition permission, the terminal location of the terminal device is obtained through the application; or...
[0077] In one possible implementation, in response to the application not having permission to obtain location data, the network parameters of the wireless network are obtained through the application.
[0078] When initializing a location-based application on a terminal device, the user can choose whether to grant the application location data access permissions. For example, the user can choose to allow it once, allow it for the duration of use, always allow it, or deny it. The user can also adjust the application's location data access permissions based on needs during subsequent use.
[0079] Based on the permissions granted, the application can determine which method to use to obtain location information that can identify the location of the terminal device.
[0080] When the application has permission to obtain location data, it can obtain the coordinates of the terminal device in the WGS-84 coordinate system (World Geodetic System-1984 Coordinate System, an internationally adopted geocentric coordinate system) through callbacks, such as through the CLLocationManagerDelegate callback. Then, through the GPS correction algorithm, the WGS-84 coordinate system is converted to the more universal GCJ-02 coordinate system (the coordinate system of the Geographic Information System formulated by the State Bureau of Surveying and Mapping of China, where G represents China, C represents China Surveying and Mapping, and J represents the State Bureau of Surveying and Mapping). The coordinates converted to the GCJ-02 coordinate system are used as the terminal positioning location of the terminal device.
[0081] Even without permission to obtain location data, an application can obtain network parameters of a wireless network, which may include information such as signal strength, wireless device identifier, and wireless network identifier. Based on this information, the approximate location of the terminal device can be determined through the server.
[0082] S204: The application reports the location information to the server for the terminal device.
[0083] By activating the location application in the background of the terminal device when a wireless network is detected, the application can report the location information of the terminal device after activation. This increases the frequency or number of times the terminal device reports location information, so that the location information collected by the server from the terminal device can be as consistent as possible with the real-time location of the terminal device.
[0084] Furthermore, the location information can include network parameters of the wireless networks scanned by the terminal device, enabling the server to collect a large number of network parameters of wireless networks. Through the wireless device identifiers and determined wireless device locations carried by these network parameters, a wireless device database can be built. This wireless device database includes the collected wireless device identifiers and corresponding device locations, which can be used for subsequent terminal device positioning to improve positioning accuracy.
[0085] Furthermore, in order to increase the reporting frequency of location information by the terminal device, in one possible implementation, the method further includes:
[0086] Obtain the state switching operation for the application, and through the application, report the location information of the terminal device before switching to the background inactive state to the server.
[0087] The state switching operation is used to switch the application from an active foreground state to an inactive background state on the terminal device. When the application is switched to the inactive background state, its functionality is limited to a certain extent, such as the frequency of reporting location information. Therefore, before the application is switched from an active foreground state to an inactive background state, the terminal device can immediately report its current location information through the application, without being subject to the requirement that the application report location information when it is active in the foreground state. For example, it can report location information even before the reporting time has arrived, thereby increasing the amount of location information obtained by the server and helping to improve the accuracy of the location of wireless devices in the wireless device library maintained by the server.
[0088] Moreover, when a terminal device is lost, this state switching operation is very likely to be performed by another user who has obtained the terminal device. In this case, the reported location information can also play a role in accurately locating the lost terminal device as soon as possible.
[0089] Next, based on the scenario of recovering a lost terminal device, combined with... Figure 3 The following explanation is provided. Both the aforementioned terminal device and the target device are terminal devices of the target user. The target device has been lost, and the user initiates the terminal device retrieval function through the undisturbed terminal device.
[0090] When the retrieval function is triggered, the terminal device sends a device lookup request to the server, which includes the target user's identifier. For example... Figure 3 In Section 301, the user opens the phone retrieval interface on a terminal device (e.g., mobile phone A) and clicks "Remotely Retrieve Phone" to send a device retrieval request to the server. This interface can be a display of an application used for location services. In addition to "Remotely Retrieve Phone," it can also include other interactive options, such as a "Phone Emergency Center" option. This option allows users to report the loss of their phone's SIM card number, preventing other users who find the lost phone from making phone or text message scams.
[0091] This option also allows users to report lost or stolen accounts on their phones, such as highly private accounts for electronic payments and social media. This prevents other users from logging into electronic payment or social media apps to steal user privacy or transfer user assets when they obtain the lost phone, thus effectively reducing the various high-risk problems that may be caused by a lost phone.
[0092] Correspondingly, before the target device is lost, users can enable "Remotely Find My Phone" in the function list to configure an application for location on the target device. For more accurate location information, the application will request the user's permission to obtain location data on the first use, such as when the target device first enables the application, in order to obtain the target device's geographical location.
[0093] Since the terminal device used for retrieval and the target device are both bound to the same user identifier, the terminal device can obtain the terminal location parameters for the target device from the server.
[0094] In one possible implementation, a user can bind themselves to both the terminal device and the target device using the same user identifier. The user can install a location-specific application, such as a location app, on both the terminal and target devices. Then, they can log in to the app on both devices using the same user identifier, for example, through a social media account. Through this installation and login process, the server can obtain the identification information reported by the location app from both the terminal and target devices for establishing the binding relationship. For example, the identification information reported by the terminal device might include a user identifier identifying the social media account and the device identifier of the terminal device; similarly, the identification information reported by the target device might include a user identifier identifying the social media account and the device identifier of the target device. The server can then establish a binding relationship between the terminal device, the target device, and the user identifier based on this identification information.
[0095] The terminal location parameter is determined by the location information reported by the application configured on the target device. That is, the application configured on the target device for positioning can send the target device's location information to the server in the manner of S201-S204.
[0096] Correspondingly, when a user logs into a location app on either the terminal device or the target device, the server can identify the user's identifier that is bound to multiple devices and that the location app is logged into on one of those devices through this login behavior. After the server determines the other device, such as the target device, through this binding relationship, it can send the target device's terminal location parameters to the terminal device for display. Thus, the user can view the recent location of their other device through the location app on the terminal device.
[0097] It should be noted that this application does not limit the terminal device sending the device search request to necessarily being bound to the same user identifier as the target device. The above is only one possible scenario for finding a lost terminal device. The terminal device may also not be bound to a user identifier. For example, a user who has lost the target terminal can find the terminal device through another user's terminal device. For instance, a user can enter their own user identifier through another user's terminal device and then initiate a device location request for the target terminal.
[0098] After obtaining the terminal location parameters sent by the server, the location of the target device can be displayed on the terminal device. For example... Figure 3 In section 302, based on the location information reported by the location-based application in the target device (e.g., mobile phone B), mobile phone A can obtain multiple pieces of information from mobile phone B, including its geographical location, such as "device name," "device geographical location," and "time of the device's last reported location." For example, it can determine that the target device is located in building A and display it on an electronic map. It can also display the time when the location information used to determine building A was reported. Figure 3 The time shown is 8:59 AM on September 14th. Simultaneously, it can provide users with a one-click navigation control. By triggering this control, a reference route from the user's current location to Building A can be directly planned. For example, based on the current location of phone A when the user triggers the control, and the location of phone B in Building A, phone A can use a location-based app to access an electronic map for route planning, quickly determining a reference route from its current location to Building A and displaying it on the electronic map to guide the user. It can also provide reference routes for different modes of transportation (driving, cycling, walking) for the user to choose from.
[0099] Therefore, it is evident that the terminal device is equipped with a location-based application. When the terminal device scans for a wireless network, even if the application is not currently active, it can be activated in the background. This allows the application to obtain the terminal device's location information and report it to the server. Since the terminal device continuously scans for nearby wireless networks when the wireless module is enabled, activating the location-based application upon detecting a wireless network effectively increases the frequency of background activation. Even if the application is not activated or closed by the terminal device, it can still report the terminal device's location information when a wireless network is detected. This increases the likelihood of obtaining real-time location information if the terminal device is lost, and more accurate location tracking increases the probability of the terminal device being recovered.
[0100] The terminal device positioning method provided in this application embodiment can also be executed by a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The aforementioned terminal device and server can be directly or indirectly connected through wired or wireless communication, which is not limited herein.
[0101] Figure 4 A flowchart illustrating another terminal device positioning method provided in this application embodiment, which can be executed by a server, includes:
[0102] S401: Receive or obtain a device lookup request from the first terminal device.
[0103] The device lookup request received or obtained by the server includes a user identifier, which is used to demonstrate the legitimate association between the second terminal device to be looked up and the user identifier, such as whether there is a binding relationship.
[0104] The first terminal device mentioned here can be... Figure 2 The terminal device in the corresponding embodiment may also be other terminal devices, and this application is not limited thereto.
[0105] S402: Obtain the location information of the second terminal device that is bound to the user identifier based on the user identifier.
[0106] The location information is reported by the second terminal device after it activates an inactive application when it scans for a wireless network. The location information is used to identify the location of the device that establishes the wireless network, and the application used for location is configured in the second terminal device.
[0107] The second terminal device mentioned here can be the target device in the aforementioned embodiments where the terminal device acts as the execution subject, or it can be... Figure 2 The terminal device in the corresponding embodiment. This application does not limit the second terminal device to a terminal device that has been lost; the second terminal device belongs to the terminal device that the user corresponding to the user identifier wants to know the current location of.
[0108] For details on how the second terminal device reports location information to the server via a positioning application, please refer to [link to relevant documentation]. Figure 2 Corresponding implementation examples.
[0109] The second terminal device is equipped with an application for location services. When the wireless module of the second terminal device is turned on, it can scan for wireless networks around the terminal device. If the second terminal device enters the signal coverage area of a certain wireless network, the wireless module can enable the second terminal device to discover the wireless network.
[0110] When a wireless network is detected, the aforementioned application on the second terminal device may be inactive. In this state, the application does not have the function of obtaining and reporting the terminal device's location information. However, since the second terminal device constantly scans for surrounding wireless networks when its wireless module is turned on, and wireless networks are virtually ubiquitous in current human activity environments, the location-specific application can be activated in the background when the second terminal device detects a wireless network. Due to the high signal coverage of wireless networks, the second terminal device's wireless module can frequently or even continuously scan for wireless networks, thus greatly increasing the time the application remains active. This allows the server to obtain the second terminal device's location information as real-time as possible. Moreover, activating the application in the background will not cause any user-level inconvenience to the user of the second terminal device, reducing the user's awareness of the application's activation.
[0111] In some operating systems of the second terminal device, in addition to scanning for wireless networks, the second terminal device also needs to connect to the wireless network based on the wireless module to activate the application in the background. For example, in some operating systems, the NEE Hotspot Configuration component can be kept awake while connected to a wireless network. When the second terminal device is connected to the wireless network, the NEE Hotspot Configuration component activates the application used for location in the background of the terminal device, so that the activated application can obtain the location information of the second terminal device in the background and report it to the server.
[0112] The first terminal device and the second terminal device can belong to the same user or different users. For example, if user A loses his second terminal device, he can retrieve it through user B's first terminal device.
[0113] The following example illustrates the scenario where the first terminal device and the second terminal device belong to user b and user a, respectively.
[0114] User A installed a location tracking app on the second terminal device and registered and logged into the app using User A's user identifier, which enabled the server to determine the binding relationship between User A's user identifier and the second terminal device.
[0115] If user A accidentally loses their second terminal device, they can seek help from user B, who is carrying the first terminal device. The location of the second terminal device can be determined using the first terminal device. For example, a location-tracking app can be installed on the first terminal device, and user A's user identifier can be entered to initiate a device search. Based on user A's user identifier carried in the device search request, the server can locate the second terminal device bound to user A's user identifier. Since the second terminal device has a location-tracking app installed, its location information can be reported from the backend using the aforementioned method. The server can then send the most recently reported location information to the first terminal device, allowing user A to determine the area where the second terminal device is located by checking the location displayed on the first terminal device.
[0116] The following example illustrates the scenario where both the first and second terminal devices belong to the same user.
[0117] It's common for a user to own multiple devices simultaneously, such as two mobile phones or one mobile phone and one laptop. These devices also come with various operating systems, such as Android and macOS. When a user's multiple devices share the same operating system, establishing a binding relationship between the user and those devices using a user identifier is relatively convenient. However, when a user wants to try multiple operating systems, their devices may have different operating systems.
[0118] In order to enable terminal devices to be located across different operating systems, such as using a terminal device with operating system a to locate a terminal device using operating system b, this application provides a cross-platform terminal device binding method to achieve cross-platform terminal device location.
[0119] In one possible implementation, if the first terminal device and the second terminal device have different operating systems, the method further includes:
[0120] Obtain the first account identifier of the social software configured in the first terminal device and the second account identifier of the social software configured in the second terminal device.
[0121] If it is determined that the first account identifier and the second account identifier correspond to the same user identifier, a binding relationship between the first terminal device and the second terminal device and the user identifier is established.
[0122] In other words, this application embodiment achieves the binding between cross-platform terminal devices and user identifiers through cross-platform social software. When a user logs into the social software with the same account on terminal devices of different operating systems, the server can obtain the association relationship between the account identifier and the device identifiers of the terminal devices of different operating systems. If the terminal devices of different operating systems are associated with the same account identifier, then it is possible to bind terminal devices of at least two operating systems through the same user identifier (which can be the account identifier).
[0123] Based on this, users can use an Android phone to locate another Apple phone, and vice versa. This cross-platform device location mechanism breaks down the barriers between operating systems, greatly facilitating users' needs for device location services.
[0124] S403: Determine the terminal location parameters of the second terminal device corresponding to the device search request based on the location information.
[0125] Because the second terminal device has an application installed or configured for positioning, this application can be based on the aforementioned Figure 2 In a corresponding embodiment, the wireless module of the second terminal device activates in the background and reports the real-time location information of the second terminal device when it scans for a wireless network. Therefore, before the server receives the device lookup request, it may have already obtained multiple location information of the second terminal device within a certain time period.
[0126] The server can extract the location information of the second terminal device obtained in the last one or several times. If the location information is the aforementioned terminal location, the terminal location can be directly determined as the terminal location parameter. If the location information is the aforementioned wireless network parameter, the terminal location parameter can be determined through the network parameter. Alternatively, based on the aforementioned wireless device library maintained by the server, the location information of the wireless device identified by the network parameter can be matched, and the terminal location parameter can be determined based on the location information.
[0127] Regardless of which method is used to determine the terminal location parameters, since Figure 2 The corresponding embodiment enables the terminal device to report its location information through an application that is frequently activated in the background, so that the determined terminal location parameters can better match the real-time location of the second terminal device, reducing the difficulty for users to find the second terminal device.
[0128] S404: Return the terminal location parameters to the first terminal device.
[0129] After determining the terminal location parameters of the second terminal device, these parameters can be returned to the first terminal device, allowing the first terminal device to display the terminal location parameters through a user interface, for example... Figure 3 As shown in Figure 302, users can easily identify the location of the second terminal device through the terminal location parameters displayed by the first terminal device.
[0130] Therefore, it is evident that the terminal device is equipped with a location-based application. When the terminal device scans for a wireless network, even if the application is not currently active, it can be activated in the background. This allows the application to obtain the terminal device's location information and report it to the server. Since the terminal device continuously scans for nearby wireless networks when its wireless module is enabled, activating the location-based application upon detecting a wireless network effectively increases the frequency of background activation. Even if the application is not activated or closed by the terminal device, it can still report the terminal device's location information when a wireless network is detected. This allows the server to obtain a relatively accurate real-time location of the terminal device. When the first terminal device needs to obtain the location of the second terminal device, the server, after verifying the legitimacy of the device search request, can determine the terminal location parameters corresponding to the search request based on the latest location information reported by the second terminal device and return them to the first terminal device. This allows the first terminal device to display the terminal location parameters that closely match the current location of the second terminal device through its user interface, facilitating the user's location and search for the second terminal device.
[0131] The following section will mainly explain the scheme for the server to identify confidence based on network parameters from a large amount of location information.
[0132] S501: Obtain the location information reported by the second terminal device.
[0133] In this embodiment, the location information includes network parameters of the wireless network. These network parameters may include the device identifier of the wireless device that established the wireless network and the identified device location. It may also further include or carry information such as the signal strength of the wireless network scanned by the second terminal device reporting this location information, the Service Set Identifier (SSID), the Basic Service Set Identifier (BSSID), and the application identifier.
[0134] S502: Add the device location identified by the location information to the historical location list corresponding to the wireless device according to the device identifier.
[0135] The device locations in this historical location list can come from a large number of terminal devices that are currently or have been within the coverage area of the wireless network, including second terminal devices. When a terminal device configured with the location application described in this application enters the coverage area of the wireless network, it can report its own location information through the application activated in the background, which includes the device location of the wireless device that established the wireless network.
[0136] S503: Determine the location confidence of the wireless device based on the distance between device locations in the historical location list.
[0137] Because the accuracy of device location determination based on wireless networks is not very high, there may be errors between the determined location and the actual location of the wireless device. Furthermore, wireless devices that establish wireless networks can be either fixed or mobile. For example, a fixed router can establish a wireless network, while smartphones and other smart devices that move with users can also establish a wireless network via mobile hotspots. Different types of wireless devices will also affect the accuracy of the determined device location; for instance, the location of a mobile wireless device will have a larger error.
[0138] Therefore, this application provides a method for determining the location confidence of a wireless device. By determining the location confidence used to identify whether the location of the wireless device is reliable, fixed-type wireless devices and mobile-type wireless devices can be identified, and the terminal location parameters of the second terminal device can be determined based on the level of confidence.
[0139] As mentioned earlier, a list of historical locations of a wireless device includes the device locations reported by different terminal devices. These device locations are determined based on conditions such as the distance between the terminal device and the wireless device at the time of reporting, and the signal strength. They are all used to identify the device location of the wireless device at the time of reporting.
[0140] The distances between device locations in the historical location list effectively reflect the type of wireless device. The network signal of a fixed wireless device is relatively more stable and less volatile than that of a mobile wireless device, resulting in a closer approximation of the actual device location. In contrast, the surrounding environment of a mobile wireless device changes significantly, making signal stability and volatility difficult to control, leading to larger errors in the determined device location. For example, due to the mobility of a mobile wireless device, the distances reported by surrounding terminal devices will vary considerably as the device moves. Conversely, due to the stationary nature of a fixed wireless device, the distances reported by surrounding terminal devices will be relatively smaller.
[0141] Furthermore, the stability of the wireless network of a wireless device can also affect the accuracy of the device location reported by surrounding terminal devices. When the stability is high, the device location determined by the terminal device or server based on the wireless signal is more accurate. Conversely, the error in the determined device location may be larger.
[0142] Therefore, the location reliability determined based on the distance between device locations in the historical location list can identify the reliability of the wireless device's location. This location reliability can reflect whether the wireless device is fixed or mobile, and can also indicate whether the wireless device's location is accurate.
[0143] Accordingly, S403 includes: determining the terminal location parameters of the second terminal device in response to the device search request based on the location information and the location confidence of the wireless device.
[0144] In other words, when the server determines the terminal location parameters based on the location information, it also needs to consider the location reliability of the wireless device corresponding to the location information. This location reliability can not only identify whether the location of the wireless device can be used as a basis for determining the terminal location parameters, but also further identify the degree of influence when determining the terminal location parameters if it can be used as a basis.
[0145] The above method can effectively identify the type of wireless device through location reliability, thereby clarifying which wireless devices can be used to calculate terminal location parameters. Moreover, it can clarify which wireless devices have more reliable device locations. This not only optimizes the device locations of wireless devices in the wireless device library, but also improves the positioning accuracy of terminal devices.
[0146] In one possible implementation, S503 includes:
[0147] The location center point of the wireless device is determined based on the distance between device locations in the historical location list.
[0148] The location reliability of the wireless device is determined based on the distance between the location center point and the device location.
[0149] The center point determined by the device location in the historical location list can roughly reflect the distribution center of the device locations reported by the terminal devices during the historical period. The distance between the device location and the center point in the historical location list can be used to understand how far each device location is from the distribution center.
[0150] If the locations of each device are generally far from the distribution center, the wireless device is more likely to be a mobile type, and the wireless signal may be unstable, resulting in low location reliability for the wireless device.
[0151] If the locations of each device are generally close to the distribution center, then the wireless device is more likely to be of the fixed type and the wireless signal is stable, thus the location reliability of the wireless device is high.
[0152] Based on the above embodiments, in one possible implementation, S403 includes: if the location confidence of the wireless device meets a threshold, determining a reliable location interval as the terminal location parameter based on the distance between the location center point and the device location.
[0153] The location reported by the terminal device can, to some extent, reflect the coverage area of the wireless network signal. Therefore, to improve the probability of finding the second terminal device, the terminal location parameter provided by the server to the first terminal device can identify an area. This area can roughly cover the location where the second terminal device might be when it reports its location information through the application. Displaying this area through the first terminal device is equivalent to identifying the area where the second terminal device might be located for the user.
[0154] Next, combine Figure 5 The application scenario is illustrated below. The first terminal device is the device performing the search, and the second terminal device is the device being searched. The second terminal device is equipped with a location-based app for positioning.
[0155] When the location-based app is launched, it operates in the foreground of the second terminal device. It periodically retrieves the device's real-time location information and reports it to the server, for example, at regular intervals. Just before the app enters the background of the second terminal device, it performs its final location information report in active mode and then enters the background. If the user opens the location-based app again, it can continue to periodically retrieve and report the second terminal device's real-time location information to the server. If a device lookup request is received from the first terminal device at this time, the app can determine the location based on the previously reported location information from the second terminal device (e.g., from a wireless device database) and return it to the first terminal device.
[0156] According to the mechanism of the second terminal device, the location-tracking app running in the background can be closed after a period of time or immediately, or its corresponding process can be killed. Afterwards, when the second terminal device scans for a wireless network via its wireless module, it can reactivate the location-tracking app in the background by connecting to that network. At this point, the location-tracking app can attempt to obtain the second terminal device's location, such as its geographic location. If successful, it reports this to the server, which does not require further processing. If the acquisition fails, for example, due to insufficient permission, it sends the network parameters of the currently connected wireless network to the server.
[0157] If the location information obtained by the server is a network parameter, the device identifier of the wireless device carried by the network parameter can be matched in the wireless device library. If a match is found, the device location corresponding to the network parameter can be updated in the historical location list of the wireless device in the wireless device library.
[0158] If a device lookup request from the first terminal device is received at this time, the location can be determined based on the location information previously reported by the second terminal device (e.g., determined from the wireless device library) and returned to the first terminal device.
[0159] In other words, whenever a device performing the search, such as the first terminal device, requests the location of the device being searched from the server via a device search request, the server will return its last location information to the device performing the search.
[0160] The device search is displayed on the user interface based on the "device name," "device location," and "time of the device's last reported location" returned by the server. Users can also perform "one-click navigation" or "ringtone search" via push notifications as needed.
[0161] Figure 6 This illustrates the process of reporting location information through a location-based application in Apple's operating system.
[0162] After the application's process is killed in the background, the application can be woken up in the background by the NEBotspotConfiguration component in the operating system when the terminal device connects to the wireless network.
[0163] The application's client begins by initializing CLLocationManager and requests location data access permission from the operating system. There are six possible states for location data access permission: Unauthorized; Location Denied; Location Service Restricted; Always Location (meaning location can occur even when the application is in the background); Location Allowed During Application Use.
[0164] When the permission status is "Unauthorized," the system's permission request interface can be used directly to request location data access permission from the user. The user can choose to grant permission once, allow it for the duration of use, always allow it, or deny it. In iOS 14 and later, the option to grant precise or approximate location information is also available. If the user denies permission, the device will be unable to report its location.
[0165] It should be noted that, Figure 6The example shown is merely an illustration, ending without obtaining location data access permission. In this embodiment, if the user does not grant location data access permission, the network parameters of the wireless device can be directly obtained through the CaptiveNetwork framework and reported to the server as location information.
[0166] When obtaining permission to access location data, the location information is retrieved via a callback through CLLocationManagerDelegate. At this point, the device's WGS-84 coordinates can be obtained. The client then uses a GPS correction algorithm to convert the WGS-84 coordinates to the more universal GCJ-02 coordinate system. A Geo-encoded object is created, and the coordinates are de-Geo-encoded to obtain a detailed geographic location description.
[0167] The system can obtain network parameters of the wireless network to which the terminal device is connected. Through the CaptiveNetwork framework, it retrieves these parameters, including the SSID and BSSID, as well as necessary information such as the device's unique identifier and application unique identifier. This information, along with the previously obtained geolocation information, is then packaged and sent to the server.
[0168] The server receives the data packet, unpacks it to obtain network parameters, and queries the wireless device database to see if the unique device identifier for that wireless device already exists. If the record is not yet in the database, it adds it to the database, sets the location confidence level to the initial medium value, and sets the confidence location interval to the initial smaller value.
[0169] If the record already exists in the wireless device database, its historical location list is retrieved, and the center point of all device locations is calculated in conjunction with the current device location. The distance from the current device location to the center point is then calculated. This allows for updating the confident location interval of the wireless device and updating its location confidence according to defined rules.
[0170] Wireless devices with low location confidence are considered to be frequently changing locations (such as mobile device hotspots) and will not be used to assist in locating the "device without location permissions". The confident location range is the radius of the area displayed on the electronic map of the first terminal device during "Find Device".
[0171] When a user clicks "Remotely Locate Phone" in a location-based app configured on another device, the server returns the device's location from the most recently acquired location information, along with the reliable location range. The location-based app on that other device then converts the GCJ-02 coordinates back to WGS-84 coordinates, allowing the electronic map SDK to plot the location of the terminal device to be located, along with its error radius.
[0172] Please see Figure 12 This includes a first terminal device, a second terminal device, and a server. In this scenario, the second terminal device is the device to be located, and the first terminal device is used to locate the second terminal device.
[0173] S1201: Detect the on / off state of the wireless module of the terminal device.
[0174] S1202: Perform wireless network scanning using the wireless module.
[0175] S1203: Connect to the wireless network via the wireless module.
[0176] S1204: Activate the inactive application in the background of the terminal device.
[0177] S1205: Identify and obtain permission to access location data.
[0178] When the application has permission to obtain location data, it can obtain the terminal location of the second terminal device and report it to the server. When the application does not have permission to obtain location data, it can obtain the network parameters of the wireless network to which the second terminal device is connected and report them to the server.
[0179] S1200: Obtain the state switching operation for the application.
[0180] The execution order of this step can be either before S2101 or after S1205. When the application is switched from the foreground to the background of the second terminal device, it sends location information to the server once. This location information can be the terminal's location or the network parameters of the wireless network, depending on whether the application has permission to obtain location data.
[0181] S1206: Obtain the location information reported by the second terminal device.
[0182] The server can obtain the location information reported by the second terminal device through the execution of the aforementioned S1200 or S1205.
[0183] S1207: Establish the binding relationship between the second terminal device and the user identifier.
[0184] Since the user's registered application identifier is also included when reporting location information, a binding relationship with the second terminal device can be established based on the user identifier.
[0185] S1208: Add the device location identified by the location information to the historical location list corresponding to the wireless device according to the device identifier.
[0186] S1209: Determine the location center point of the wireless device based on the distance between device locations in the historical location list.
[0187] S1210: Determine the location reliability of the wireless device based on the distance between the location center point and the device location.
[0188] S1211: Generate a device lookup request.
[0189] When a user of the second terminal device needs to locate it (e.g., if the second terminal device is lost or not nearby), the user can generate a device search request through the first terminal device. The first terminal device can be another device belonging to that user, or it can be a device belonging to another user.
[0190] A device lookup request can be generated by an application installed on the first terminal device for location purposes, which needs to carry the user's identifier.
[0191] S1212: Obtain the location information of the second terminal device that is bound to the user identifier based on the user identifier.
[0192] When the server receives the device lookup request, it uses the user identifier carried in the device lookup request to determine the location information of the second terminal device with a binding relationship.
[0193] S1213: Determine the terminal location parameters of the second terminal device corresponding to the device search request based on the location information.
[0194] The server can determine the terminal location parameters by referring to the location confidence determined in S1210, which may also include a confident location range.
[0195] S1214: Display the location of the second terminal device on the first terminal device according to the terminal location parameters.
[0196] The first terminal device obtains the terminal location parameters returned by the server and displays them on an electronic map. The display range can be determined based on a credible location interval.
[0197] In the foregoing Figure 2 Based on the corresponding embodiments, Figure 7 This is a structural diagram of a terminal device positioning device 700 provided in an embodiment of this application. The terminal device positioning device 700 includes a scanning unit 701, an activation unit 702, an acquisition unit 703, and a reporting unit 704.
[0198] The scanning unit 701 is used to perform wireless network scanning through the wireless module of the terminal device, wherein the terminal device is configured with an application for positioning.
[0199] The activation unit 702 is used to activate the inactive application in the background of the terminal device if a wireless network is detected.
[0200] The acquisition unit 703 is used to acquire the location information of the terminal device through the application, the location information including the terminal's location or the network parameters of the wireless network.
[0201] The reporting unit 704 is used to report the location information from the terminal device to the server through the application.
[0202] In one possible implementation, the activation unit is further configured to activate the inactive application in the background of the terminal device if a wireless network is detected and the device is connected to the wireless network.
[0203] In one possible implementation, the acquisition unit is further configured to:
[0204] In response to the application having location data acquisition permission, the application obtains the terminal location of the terminal device; or...
[0205] In response to the application not having permission to obtain location data, the network parameters of the wireless network are obtained through the application.
[0206] In one possible implementation, the acquisition unit is further configured to acquire a state switching operation for the application, the state switching operation being used to switch the application from a foreground active state to a background inactive state on the terminal device.
[0207] The reporting unit is also used to report the location information of the terminal device before switching to the background inactive state to the server through the application.
[0208] In one possible implementation, the device further includes a transmitting unit and a display unit:
[0209] The sending unit is used to send a device lookup request to the server, the device lookup request including a user identifier;
[0210] The acquisition unit is further configured to acquire terminal location parameters for the target device from the server, wherein the target device is bound to the user identifier, and the terminal location parameters are determined by the location information reported by the application configured on the target device.
[0211] The display unit is used to display the location of the target device on the terminal device according to the terminal location parameters.
[0212] Therefore, it is evident that the terminal device is equipped with a location-based application. When the terminal device scans for a wireless network, even if the application is not currently active, it can be activated in the background. This allows the application to obtain the terminal device's location information and report it to the server. Since the terminal device continuously scans for nearby wireless networks when the wireless module is enabled, activating the location-based application upon detecting a wireless network effectively increases the frequency of background activation. Even if the application is not activated or closed by the terminal device, it can still report the terminal device's location information when a wireless network is detected. This increases the likelihood of obtaining real-time location information if the terminal device is lost, and more accurate location tracking increases the probability of the terminal device being recovered.
[0213] In the foregoing Figure 4 Based on the corresponding embodiments, Figure 8 This is a structural diagram of another terminal device positioning device provided in an embodiment of this application. The terminal device positioning device 800 includes an acquisition unit 801, a determination unit 802, and a return unit 803.
[0214] The acquisition unit 801 is used to acquire a device lookup request from the first terminal device, the device lookup request including a user identifier;
[0215] The determining unit 802 is used to determine the second terminal device bound to the user identifier and the location information corresponding to the second terminal device. The location information is reported by the second terminal device after activating an inactive application when it scans for a wireless network. The location information is used to identify the location of the device that establishes the wireless network. The application used for location is configured in the second terminal device.
[0216] The determining unit 802 is further configured to determine the terminal location parameters of the second terminal device corresponding to the device search request based on the location information;
[0217] The return unit 803 is used to return the terminal location parameters to the first terminal device.
[0218] In one possible implementation, the device further includes an insertion unit:
[0219] The acquisition unit is further configured to acquire the location information reported by the second terminal device, the location information including the device identifier of the wireless device that established the wireless network;
[0220] The adding unit is used to add the device location identified by the location information to the historical location list corresponding to the wireless device according to the device identifier;
[0221] The determining unit is further configured to determine the location confidence of the wireless device based on the distance between device locations in the historical location list, wherein the location confidence is used to identify the reliability of the location of the wireless device; and to determine the terminal location parameters of the second terminal device corresponding to the device search request based on the location information and the location confidence of the wireless device.
[0222] In one possible implementation, the determining unit is further configured to:
[0223] The location center point of the wireless device is determined based on the distance between device locations in the historical location list;
[0224] The location reliability of the wireless device is determined based on the distance between the location center point and the device location.
[0225] In one possible implementation, the determining unit is further configured to determine a reliable location interval as a terminal location parameter based on the distance between the location center point and the device location if the location confidence of the wireless device meets a threshold.
[0226] In one possible implementation, the apparatus further includes a setup unit:
[0227] The acquisition unit is further configured to acquire the first account identifier of the social software configured in the first terminal device and the second account identifier of the social software configured in the second terminal device, wherein the first terminal device and the second terminal device have different operating systems;
[0228] The establishment unit is used to establish a binding relationship between the first terminal device and the second terminal device and the user identifier if it is determined that the first account identifier and the second account identifier correspond to the same user identifier.
[0229] Therefore, it is evident that the terminal device is equipped with a location-based application. When the terminal device scans for a wireless network, even if the application is not currently active, it can be activated in the background. This allows the application to obtain the terminal device's location information and report it to the server. Since the terminal device continuously scans for nearby wireless networks when its wireless module is enabled, activating the location-based application upon detecting a wireless network effectively increases the frequency of background activation. Even if the application is not activated or closed by the terminal device, it can still report the terminal device's location information when a wireless network is detected. This allows the server to obtain a relatively accurate real-time location of the terminal device. When the first terminal device needs to obtain the location of the second terminal device, the server, after verifying the legitimacy of the device search request, can determine the terminal location parameters corresponding to the search request based on the latest location information reported by the second terminal device and return them to the first terminal device. This allows the first terminal device to display the terminal location parameters that closely match the current location of the second terminal device through its user interface, facilitating the user's location and search for the second terminal device.
[0230] Figure 9 This is a system architecture diagram of a terminal device positioning system provided in an embodiment of this application. The terminal device positioning system 900 includes a terminal device 901 and a server 902. The terminal device 901 is used to perform the aforementioned... Figures 1-3 ,as well as Figures 5-6 In a corresponding embodiment, server 902 is used to perform the aforementioned... Figure 1 , Figures 4-6 Corresponding implementation examples.
[0231] This application also provides a computer device, which is the computer device described above, and may include a terminal device or a server. The aforementioned terminal device positioning device may be configured in the computer device. The computer device will now be described in conjunction with the accompanying drawings.
[0232] If the computer device is a terminal device, please refer to Figure 10 As shown, this application provides a terminal device, taking a mobile phone as an example:
[0233] Figure 10 This diagram illustrates a partial structural representation of a mobile phone related to the terminal device provided in this embodiment. (Reference) Figure 10The mobile phone includes components such as a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a WiFi module 1470, a processor 1480, and a power supply 1490. Those skilled in the art will understand that... Figure 10 The mobile phone structure shown does not constitute a limitation on the mobile phone and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0234] The following is combined Figure 10 A detailed introduction to each component of a mobile phone:
[0235] RF circuit 1410 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 1480; additionally, it transmits uplink data to the base station. Typically, RF circuit 1410 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), and a duplexer. Furthermore, RF circuit 1410 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, and Short Messaging Service (SMS).
[0236] The memory 1420 can be used to store software programs and modules. The processor 1480 executes various mobile phone functions and data processing by running the software programs and modules stored in the memory 1420. The memory 1420 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 1420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0237] The input unit 1430 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432. The touch panel 1431, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 1431), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 1431 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 1480, and can also receive and execute commands sent by the processor 1480. In addition, the touch panel 1431 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1431, the input unit 1430 may also include other input devices 1432. Specifically, other input devices 1432 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0238] Display unit 1440 can be used to display information input by the user or information provided to the user, as well as various menus of the mobile phone. Display unit 1440 may include display panel 1441, optionally configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 1441. Further, touch panel 1431 may cover display panel 1441. When touch panel 1431 detects a touch operation on or near it, it transmits the information to processor 1480 to determine the type of touch event. Subsequently, processor 1480 provides corresponding visual output on display panel 1441 based on the type of touch event. Although in Figure 10 In this embodiment, the touch panel 1431 and the display panel 1441 are two separate components to realize the input and output functions of the mobile phone. However, in some embodiments, the touch panel 1431 and the display panel 1441 can be integrated to realize the input and output functions of the mobile phone.
[0239] The mobile phone may also include at least one sensor 1450, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1441 according to the ambient light level, and the proximity sensor can turn off the display panel 1441 and / or the backlight when the phone is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, taps), etc. Other sensors that may be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0240] Audio circuit 1460, speaker 1461, and microphone 1462 provide an audio interface between the user and the mobile phone. Audio circuit 1460 converts received audio data into electrical signals and transmits them to speaker 1461, where speaker 1461 converts them into sound signals for output. On the other hand, microphone 1462 converts collected sound signals into electrical signals, which are received by audio circuit 1460, converted into audio data, and then processed by processor 1480 before being transmitted via RF circuit 1410 to, for example, another mobile phone, or the audio data can be output to memory 1420 for further processing.
[0241] WiFi is a short-range wireless transmission technology. Mobile phones, through the WiFi module 1470, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 10 WiFi module 1470 is shown, but it is understood that it is not an essential component of a mobile phone and can be omitted as needed without changing the essence of the invention.
[0242] The processor 1480 is the control center of the mobile phone, connecting various parts of the phone through various interfaces and lines. It executes various functions and processes data by running or executing software programs and / or modules stored in the memory 1420, and by calling data stored in the memory 1420. Optionally, the processor 1480 may include one or more processing units; preferably, the processor 1480 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 1480.
[0243] The mobile phone also includes a power supply 1490 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 1480 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0244] Although not shown, mobile phones may also include a camera, Bluetooth module, etc., which will not be described in detail here.
[0245] In this embodiment, the processor 1480 included in the terminal device also has the following functions:
[0246] Wireless network scanning is performed using the wireless module of a terminal device, which is equipped with an application for location services.
[0247] If a wireless network is detected, the inactive application will be activated in the background of the terminal device.
[0248] The application obtains the location information of the terminal device, which includes the terminal's location or the network parameters of the wireless network.
[0249] The application reports the location information to the server for the terminal device.
[0250] If the computer device is a server, this application embodiment also provides a server; please refer to [link to relevant documentation]. Figure 11 As shown, Figure 11This is a structural diagram of a server 1500 provided in an embodiment of this application. The server 1500 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1522 (e.g., one or more processors) and a memory 1532, and one or more storage media 1530 (e.g., one or more mass storage devices) for storing application programs 1542 or data 1544. The memory 1532 and storage media 1530 can be temporary or persistent storage. The program stored in the storage media 1530 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the CPU 1522 may be configured to communicate with the storage media 1530 and execute the series of instruction operations in the storage media 1530 on the server 1500.
[0251] Server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input / output interfaces 1558, and / or one or more operating systems 1541, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.
[0252] The steps performed by the server in the above embodiments can be based on Figure 11 The server structure shown.
[0253] In addition, this application embodiment also provides a storage medium for storing a computer program for executing the method provided in the above embodiment.
[0254] This application also provides a computer program product including instructions that, when run on a computer, cause the computer to perform the methods provided in the above embodiments.
[0255] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium can be at least one of the following media: read-only memory (ROM), RAM, magnetic disk, or optical disk, etc., and other media capable of storing program code.
[0256] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0257] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for locating a terminal device, characterized in that, The method is executed by a terminal device using an iOS operating system. The terminal device is configured with an application for locating and reporting location information. This application is inactive when closed by the user or the iOS operating system, and in this inactive state, it does not have the function of obtaining and reporting the location information of the terminal device. The method includes: The on / off status of the wireless module of the terminal device is detected; the wireless module is turned on based on a preset time node or time interval. In response to the detection that the wireless module is turned on, a wireless network scan is performed through the wireless module; If a wireless network is detected, the inactive application will be activated in the background of the terminal device through the NEBotspotConfiguration component in the IOS operating system. The activated application initializes CLLocationManager and obtains location data access permission from the iOS operating system to obtain the location information of the terminal device, including the terminal's location or the network parameters of the wireless network. The activated application reports the location information to the server for the terminal device. Obtain a state switching operation for the application, the state switching operation being used to switch the application from a foreground active state to a background inactive state on the terminal device; The application reports the location information of the terminal device before switching to the background inactive state to the server. The server is used to send the location information of the terminal device to other terminal devices when they locate the terminal device through a user identifier; the terminal device is bound to the user identifier; the other terminal devices use the Android operating system.
2. The method according to claim 1, characterized in that, If a wireless network is detected, the inactive application is activated in the background of the terminal device via the NEBotspotConfiguration component in the iOS operating system, including: If a wireless network is detected and the device connects to it, the inactive application is activated in the background of the terminal device via the NEBotspotConfiguration component in the iOS operating system.
3. The method according to claim 1, characterized in that, The step of initializing CLLocationManager through the application and obtaining location data acquisition permission from the iOS operating system to obtain the location information of the terminal device includes: In response to the application having location data acquisition permission, the application obtains the terminal location of the terminal device through the CLLocationManagerDelegate callback; or... In response to the application not having permission to obtain location data, the network parameters of the wireless network are obtained through the CaptiveNetwork framework by the application.
4. The method according to any one of claims 1-3, characterized in that, The method further includes: Send a device lookup request to the server, the device lookup request including a user identifier; The terminal location parameters for the target device are obtained from the server. The target device is bound to the user identifier. The terminal location parameters are determined by the location information reported by the application configured on the target device. The location of the target device is displayed on the terminal device according to the terminal location parameters.
5. A method for locating a terminal device, characterized in that, The method includes: Obtain a device lookup request from a first terminal device, the device lookup request including a user identifier; the first terminal device uses the Android operating system. The location information of a second terminal device bound to the user identifier is obtained based on the user identifier. The second terminal device uses an iOS operating system. The location information is obtained by the second terminal device when it scans for a wireless network in response to the activation of the wireless module. After the inactive application is activated by the NEBotspotConfiguration component in the iOS operating system, the activated application initializes CLLocationManager, obtains location data access permissions from the iOS operating system to obtain the location information of the second terminal device, and then reports it. The location information is used to identify the location of the device establishing the wireless network. The application used to locate and report the location is configured in the second terminal device. The application is inactive when closed by the user or the iOS operating system. In the inactive state, the application does not have the function of obtaining and reporting the location information of the terminal device. The wireless module is activated based on a preset time node or time interval. The location information also includes the location information of the second terminal device before the switch to the background inactive state, which is reported by the application when the application switches from the foreground active state to the background inactive state. The terminal location parameters of the second terminal device corresponding to the device search request are determined based on the location information; The terminal location parameters are returned to the first terminal device.
6. The method according to claim 5, characterized in that, The method further includes: Obtain the location information reported by the second terminal device, wherein the location information includes the device identifier of the wireless device that established the wireless network; The device location identified by the location information is added to the historical location list corresponding to the wireless device based on the device identifier; Based on the distance between device locations in the historical location list, the location confidence of the wireless device is determined, and the location confidence is used to identify the reliability of the location of the wireless device. Determining the terminal location parameters of the second terminal device corresponding to the device search request based on the location information includes: Based on the location information and the location confidence of the wireless device, the terminal location parameters of the second terminal device corresponding to the device search request are determined.
7. The method according to claim 6, characterized in that, Determining the location confidence of the wireless device based on the distance between device locations in the historical location list includes: The location center point of the wireless device is determined based on the distance between device locations in the historical location list; The location reliability of the wireless device is determined based on the distance between the location center point and the device location.
8. The method according to claim 7, characterized in that, The step of determining the terminal location parameters of the second terminal device corresponding to the device search request based on the location information and the location confidence of the wireless device includes: If the location confidence of the wireless device meets the threshold, the reliable location interval is determined as the terminal location parameter based on the distance between the location center point and the device location.
9. The method according to any one of claims 5-8, characterized in that, The method further includes: Obtain the first account identifier of the social software configured in the first terminal device and the second account identifier of the social software configured in the second terminal device, wherein the first terminal device and the second terminal device have different operating systems; If it is determined that the first account identifier and the second account identifier correspond to the same user identifier, a binding relationship between the first terminal device and the second terminal device and the user identifier is established.
10. A terminal device positioning device, characterized in that, The device is applied to a terminal device that uses the iOS operating system. The terminal device is equipped with an application for locating and reporting location information. The application is inactive when closed by the user or the iOS operating system, and in this inactive state, it does not have the function of acquiring and reporting the location information of the terminal device. The device includes a scanning unit, an activation unit, an acquisition unit, and a reporting unit. The device is used to detect the on / off state of the wireless module of the terminal device; the wireless module is turned on based on a preset time node or time interval. The scanning unit is used to perform wireless network scanning through the wireless module of the terminal device in response to detecting that the wireless module is turned on. The activation unit is used to activate the inactive application in the background of the terminal device through the NEBotspotConfiguration component in the IOS operating system if a wireless network is detected. The acquisition unit is used to initialize CLLocationManager through the activated application and obtain location data acquisition permission from the IOS operating system to obtain the location information of the terminal device, the location information including the terminal location or the network parameters of the wireless network; The reporting unit is used to report the location information to the server for the terminal device through the activated application. The acquisition unit is further configured to acquire a state switching operation for the application, the state switching operation being used to switch the application from a foreground active state to a background inactive state on the terminal device. The reporting unit is also used to report the location information of the terminal device before switching to the background inactive state to the server through the application. The server is used to send the location information of the terminal device to other terminal devices when they locate the terminal device through a user identifier; the terminal device is bound to the user identifier; the other terminal devices use the Android operating system.
11. The apparatus according to claim 10, characterized in that, The activation unit is further configured to: If a wireless network is detected and the device connects to the wireless network, the inactive application will be activated in the background of the terminal device.
12. The apparatus according to claim 10, characterized in that, The acquisition unit is also used for: In response to the application having location data acquisition permission, the application obtains the terminal location of the terminal device; or... In response to the application not having permission to obtain location data, the network parameters of the wireless network are obtained through the application.
13. The apparatus according to any one of claims 10-12, characterized in that, The device further includes a transmitting unit and a display unit: The sending unit is used to send a device lookup request to the server, the device lookup request including a user identifier; The acquisition unit is further configured to acquire terminal location parameters for the target device from the server, wherein the target device is bound to the user identifier, and the terminal location parameters are determined by the location information reported by the application configured on the target device. The display unit is used to display the location of the target device on the terminal device according to the terminal location parameters.
14. A terminal device positioning device, characterized in that, The device includes an acquisition unit, a determination unit, and a return unit: The acquisition unit is used to acquire a device lookup request from a first terminal device, the device lookup request including a user identifier; the first terminal device uses the Android operating system. The determining unit is used to determine the second terminal device bound to the user identifier and the location information corresponding to the second terminal device. The second terminal device uses the iOS operating system. The location information is reported by the second terminal device when it scans for a wireless network. After the inactive application is activated by the NEBotspotConfiguration component in the iOS operating system, the activated application initializes CLLocationManager and obtains location data acquisition permission from the iOS operating system to obtain the location information of the second terminal device. The location information is used to identify the location of the device that establishes the wireless network. The application used to locate and report the location is configured in the second terminal device. The application is inactive after being closed by the user or the iOS operating system. The application does not have the function of obtaining and reporting the location information of the terminal device when it is inactive. The wireless module is turned on based on a preset time node or time interval. The location information also includes the location information of the second terminal device before switching to the background inactive state, which is reported by the application when the application switches from the foreground active state of the second terminal device to the background inactive state. The determining unit is further configured to determine the terminal location parameters of the second terminal device corresponding to the device search request based on the location information; The return unit is used to return the terminal location parameters to the first terminal device.
15. The apparatus according to claim 14, characterized in that, The device further includes: an addition unit; The acquisition unit is further configured to acquire the location information reported by the second terminal device, the location information including the device identifier of the wireless device that established the wireless network; The adding unit is used to add the device location identified by the location information to the historical location list corresponding to the wireless device according to the device identifier; The determining unit is further configured to determine the location confidence of the wireless device based on the distance between device locations in the historical location list, wherein the location confidence is used to identify the reliability of the location of the wireless device; and to determine the terminal location parameters of the second terminal device corresponding to the device search request based on the location information and the location confidence of the wireless device.
16. The apparatus according to claim 15, characterized in that, The determining unit is further configured to: The location center point of the wireless device is determined based on the distance between device locations in the historical location list; The location reliability of the wireless device is determined based on the distance between the location center point and the device location.
17. The apparatus according to claim 16, characterized in that, The determining unit is further configured to: If the location confidence of the wireless device meets the threshold, the reliable location interval is determined as the terminal location parameter based on the distance between the location center point and the device location.
18. The apparatus according to any one of claims 14-17, characterized in that, The device also includes a setup unit: The acquisition unit is further configured to acquire the first account identifier of the social software configured in the first terminal device and the second account identifier of the social software configured in the second terminal device, wherein the first terminal device and the second terminal device have different operating systems; The establishment unit is used to establish a binding relationship between the first terminal device and the second terminal device and the user identifier if it is determined that the first account identifier and the second account identifier correspond to the same user identifier.
19. A terminal device positioning system, characterized in that, The system includes terminal devices and servers: The terminal device is used to execute the terminal device positioning method according to any one of claims 1-4; The server is used to execute the terminal device positioning method according to any one of claims 5-9.
20. A computer device, characterized in that, The computer device includes a processor and memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the terminal device positioning method according to any one of claims 1-4, or to execute the terminal device positioning method according to any one of claims 5-9, based on the instructions in the program code.
21. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for executing the terminal device positioning method according to any one of claims 1-4, or executing the terminal device positioning method according to any one of claims 5-9.
22. A computer program product comprising instructions, which, when run on a computer, causes the computer to perform the terminal device positioning method according to any one of claims 1-4, or to perform the terminal device positioning method according to any one of claims 5-9.
Citation Information
Patent Citations
Positioning information prompt method and device
CN105578411A
Method and device for determining credible wifi access point and equipment positioning method
CN106535113A
Method and apparatus for determining encoding mode, storage medium, and terminal
CN108235249A
Positioning method and device, storage medium and electronic equipment
CN110351654A