Method and apparatus for acquiring location information
By allowing or denying the provision of location information based on the permission settings of the application set when the device is in a specific area, the problem of insufficient fine-grained location information hiding at the device level is solved, thereby improving the security and convenience of users' device use.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2024-12-19
- Publication Date
- 2026-06-23
AI Technical Summary
Existing device-level location hiding solutions are not sophisticated enough, causing inconvenience to users when using their devices, especially when only certain applications need to hide location information while other applications still require precise location.
By allowing or denying the provision of current location information based on the permission settings of the application set when the device is in a specific area, application-level location information management can be achieved, and the location can be hidden for specific applications only when needed.
It enables more refined privacy management, improves the security and convenience of user device use, and meets the privacy protection needs of different regions for different applications.
Smart Images

Figure CN122269436A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to methods and devices for acquiring location information. Background Technology
[0002] With the development of terminal technology, various positioning systems are now equipped in devices to provide users with a more convenient experience. The location information obtained through device positioning usually represents the user's location information, which may create a need for users to conceal the device's location information to protect their privacy. However, current methods of concealing device location information are based on the device level, which is not granular enough and can cause inconvenience to users when using the device. Summary of the Invention
[0003] This application provides a method and device for obtaining location information, which can solve the problem that the solution of hiding the location information of a device at the device level is not refined enough and will cause inconvenience to users when using the device.
[0004] To achieve the above objectives, this application adopts the following technical solution:
[0005] In a first aspect, a location information acquisition method is provided, applied to a first device, the method comprising: when the first device is in a first area, if it is determined that a first application is not allowed to acquire the current location of the first device in the first area, not providing the current location of the first device to the first application; and if it is determined that a second application is allowed to acquire the current location of the first device in the first area, providing the current location of the first device to the second application; and when the first device moves out of the first area, providing the current location of the first device to the first application.
[0006] Based on the above technical solution, when a device is in a certain area, if an application is determined to be allowed to obtain the device's current location within that area, the device will provide its current location to that application. Conversely, if an application is determined to be prohibited from obtaining the device's current location within that area, the device will not provide its current location to that application. Subsequently, when the application moves out of the area, the device's current location will be provided to that application. In this way, the device's location information can be hidden from certain applications only when the device is in certain areas, enabling more granular privacy management and improving user security and convenience. However, solutions that only hide device location information at the device level are not granular enough and can cause inconvenience to users.
[0007] In one possible design, determining that the first application is an application that is not allowed to obtain the current location of the first device within the first area includes: determining that the first area is a preset area that allows a first preset set of applications installed on the first device to obtain the location of the first device, and the first application does not belong to the first preset set of applications; or, determining that the first area is a preset area that does not allow the first preset set of applications installed on the first device to obtain the location of the first device, and the first application belongs to the first preset set of applications; or, determining that the second application is an application that is allowed to obtain the current location of the first device within the first area includes: determining that the first area is a preset area that allows the first preset set of applications installed on the first device to obtain the location of the first device, and the second application belongs to the first preset set of applications; or, determining that the first area is a preset area that does not allow the first preset set of applications installed on the first device to obtain the location of the first device, and the first application does not belong to the first preset set of applications.
[0008] When a device determines that a first region is a preset region where a first preset set of applications is allowed to obtain the device's location, if the first application does not belong to the first preset set of applications, it can be determined that the first application is not allowed to obtain the device's current location in the first region; if the second application belongs to the first preset set of applications, it can be determined that the second application is allowed to obtain the device's current location in the first region. Alternatively, when a device determines that a first region is a preset region where the first preset set of applications is not allowed to obtain the device's location, if the first application belongs to the first preset set of applications, it can be determined that the first application is not allowed to obtain the device's current location in the first region; if the second application does not belong to the first preset set of applications, it can be determined that the second application is allowed to obtain the device's current location in the first region. Thus, based on the application set corresponding to the preset region, subsequently, when the device is in a certain region, by determining whether an application belongs to the application set allowed to obtain the device's current location in that region, or whether it belongs to the application set not allowed to obtain the device's current location in that region, it can determine whether to provide its current location to an application. This process requires no user intervention, enabling not only more granular privacy management but also improving the convenience of privacy management.
[0009] In one possible design, the method further includes: when the first device is in the second area, if it is determined that the third application is not allowed to obtain the current location of the first device within the second area, the current location of the first device is not provided to the third application; when the first device moves out of the second area, the current location of the first device is provided to the third application, wherein the second area is different from the first area, and the third application is different from the first application. In this way, when the device is in different areas, its location information can be hidden from different applications, which can meet the user's need for privacy management of different applications when in different areas.
[0010] In one possible design, the third application does not belong to the second preset application set, where the applications in the second preset application set are those that allow the location of the first device to be obtained when the first device is in the second area; or, the third application belongs to the second preset application set, where the applications in the second preset application set are those that do not allow the location of the first device to be obtained when the first device is in the second area; both the second preset application set and the first preset application set include at least one application, and the at least one application in the second preset application set is partially the same as or completely different from the at least one application in the first preset application set. Thus, by setting different preset application sets for different areas, when the device is in different areas, the location of the applications in the corresponding application set can be hidden or provided. This can meet the user's need for privacy management of different applications when in different areas, improving the flexibility of privacy management.
[0011] In one possible design, the first preset application set is determined according to a set application type, and the types of applications included in the first preset application set are the same as the set application type; or, the first preset application set is determined according to a set application, and the first preset application set includes the set application; or, the first preset application set is determined according to a set application, and the first preset application set includes applications installed on the first device other than the set application.
[0012] In one possible design, before determining that the first application is not allowed to obtain the current location of the first device within the first area, and before providing the current location of the first device to the first application, the method further includes: receiving a first user operation, the first user operation being used to set the first area. In this way, the user can set the first area according to actual needs, providing privacy protection for areas with actual privacy protection requirements.
[0013] In one possible design, before determining that the first application is not allowed to obtain the current location of the first device within the first area, and before not providing the current location of the first device to the first application, the method further includes: receiving a second user operation, the second user operation being used to set the first preset application set. In this way, the user can set applications they do not trust as applications that need to conceal the location information of the first device, and set trusted and necessary applications as applications that do not need to conceal the location information of the first device. This enables more granular privacy management and improves the security and convenience of users using the device.
[0014] In one possible design, before determining that the first application is an application that is not allowed to obtain the current location of the first device within the first area, and before not providing the current location of the first device to the first application, the method further includes: displaying a first processing mode and / or a second processing mode, wherein the first processing mode is used to set applications in the first preset application set as applications that are allowed to obtain the location of the first device when the first device is in the first area, and the second processing mode is used to set applications in the first preset application set as applications that are not allowed to obtain the location of the first device when the first device is in the first area; and receiving a third user operation, wherein the third user operation is used to select the first processing mode or the second processing mode. In this way, the user can choose to set a certain area as an area where the location of a certain application set needs to be hidden, or choose to set a certain area as an area where the location of a certain application set does not need to be hidden, which can meet different user setting needs and improve setting flexibility.
[0015] In one possible design, before determining that the first application is not allowed to obtain the current location of the first device within the first area, the method further includes: determining that the first application requests to obtain the current location of the first device by calling the system interface of the first device. In this way, the device can determine whether an application is requesting its own current location by judging whether an application has called a system interface.
[0016] In one possible design, after not providing the first device's current location to the first application, the method further includes: reminding the user that the first device has entered a location-hidden area, and the first application is not allowed to obtain the first device's current location. This way, when the device fails to return its location to the application, potentially rendering the application unusable, the user is informed of the reason for the failure to return a location, thus improving the user experience. This addresses the user's confusion when the application malfunctions, allowing for quick problem-solving as needed, such as removing the restriction on the application's location information hiding function.
[0017] In one possible design, after not providing the first application with the current location of the first device, the method further includes: sending an indication message to a second device, the indication message being used by the second device to remind the user that the first device has entered a location-hidden area and the first application is not allowed to obtain the current location of the first device. For example, the first device can be a mobile phone, and the second device can be a wearable device. Alternatively, the first device can be an in-vehicle device, and the second device can be a wearable device. This enhances the reminder effect on the user.
[0018] In one possible design, the number of the first regions is at least one.
[0019] In a second aspect, an apparatus is provided that has the function of implementing the method as described in any of the designs of any of the preceding aspects. This function can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the described function.
[0020] Thirdly, an apparatus is provided, comprising: a processor and a memory coupled to the processor, the memory for storing program code including instructions, the processor reading the instructions from the memory to cause the apparatus to perform the method as designed in any of the preceding aspects.
[0021] Optionally, the memory can be coupled to the processor or independent of the processor.
[0022] In one possible design, the device may also include a display screen that can be used to perform display operations.
[0023] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium including a computer program that, when the computer program is run on a device, causes the device to perform the method as designed in any of the preceding aspects.
[0024] Fifthly, a computer program product is provided, the computer program product comprising: a computer program or instructions that, when the computer program or instructions are run on a computer, cause the computer to perform the method as designed in any of the preceding aspects.
[0025] A sixth aspect provides a chip system including at least one processor and at least one interface circuit, the at least one interface circuit being used to perform transceiver functions and send instructions to at least one processor, wherein when at least one processor executes instructions, at least one processor performs the method as described in any of the designs in any of the preceding aspects.
[0026] It should be noted that the technical effects of any of the designs in the second to sixth aspects mentioned above can be found in the technical effects of the corresponding designs in the first aspect, and will not be repeated here. Attached Figure Description
[0027] Figure 1 A schematic diagram of an interface provided for an embodiment of this application;
[0028] Figure 2 This application provides a schematic diagram of the architecture of a communication system.
[0029] Figure 3 This is a schematic diagram of the structure of a first device provided in an embodiment of this application;
[0030] Figure 4 A schematic diagram of the structure of a first device and a second device provided in an embodiment of this application;
[0031] Figure 5 A schematic diagram of an interface for setting a location range provided in an embodiment of this application;
[0032] Figure 6 A schematic diagram of an interface for setting a processing method provided in an embodiment of this application;
[0033] Figure 7 A schematic diagram illustrating the setting of an application scope as provided in an embodiment of this application;
[0034] Figure 8 This is a schematic diagram illustrating the need for location information concealment within different location ranges, as provided in an embodiment of this application.
[0035] Figure 9 A schematic flowchart illustrating a location information acquisition method provided in an embodiment of this application;
[0036] Figure 10 A schematic diagram illustrating a user reminder provided in an embodiment of this application;
[0037] Figure 11 A schematic diagram of an interface for managing the location information of a second device, provided as an embodiment of this application;
[0038] Figure 12 A flowchart illustrating another location information acquisition method provided in this application embodiment;
[0039] Figure 13 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0040] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between the related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. A and B can be singular or plural.
[0041] In the description of this application, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, a and b and c, where a, b, and c can be single or multiple.
[0042] Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0043] Currently, devices have various applications installed, such as system applications (e.g., gallery apps, music apps, clock apps, weather apps), and third-party applications (e.g., food delivery apps, navigation apps, short video apps, shopping apps). Some applications need to obtain the device's location information to provide users with corresponding services. For example, weather apps can provide users with the weather for the device's current location by obtaining the device's location information. Food delivery apps can recommend restaurants within the delivery range of merchants by obtaining the device's location.
[0044] For users who prioritize privacy and security, preventing apps from accessing their device's location information is a common privacy concern. Therefore, to meet users' needs for concealing (or hiding) their device's location information, one possible solution is for users to turn off a location switch on their device. For example, if this location switch is displayed in the settings app, the device could display something like this: Figure 1The location service interface 100 of the settings application shown in Figure (1) has a switch button 101 displayed on it. Users can hide the device's location information by turning off the switch button 101. In response to the user's operation of turning off the switch button 101, no application on the device can obtain the device's current location information. It is understood that the location switch on the device can also be displayed in other interfaces, such as the pull-down control center.
[0045] In another possible solution, users can also individually disable location access for a specific app on their device. For example, again using app settings to disable location permissions for a particular app, the device can display something like this: Figure 1 The location information permission interface 110 shown in (2) is as follows. It is understandable that for each application, the user can access permissions such as those for that application. Figure 1 Use the location information permissions interface shown in (2) to disable the application's location permissions. Figure 1 In (2), the location information permission interface is presented as an example of a food delivery application.
[0046] like Figure 1 As shown in (2), the location information permission interface 110 displays one or more permission setting options, such as the "Ask every time" option 111, "Allow only during use" option 112, and "Deny" option 113. Users can select the "Deny" option 113, and in response to this operation, the food delivery application will not be able to obtain the device's location information at any time.
[0047] In both of the above solutions, once the device's location information is hidden, it cannot be retrieved regardless of the device's location. However, in real-world applications, users may only need to hide the device's current location when it is in certain locations. Therefore, these solutions for hiding device location information are too rudimentary and can cause significant inconvenience for users.
[0048] Therefore, another possible solution is to obtain fuzzy location information of the device when it is in a critical location where user privacy needs to be protected. In other words, the device's location information is hidden in these privacy-protecting locations. This solution is device-level; once the device enters a privacy-protecting location, all applications installed on the device will obtain only fuzzy, inaccurate location information. This solution lacks finesse and can cause inconvenience for users. For example, when a device enters a certain park, a user might only want to hide their location from certain applications but still want to use other applications, such as food delivery apps. If the park is a privacy-protecting location, the aforementioned solution would prevent users from using essential applications like food delivery apps, causing significant inconvenience.
[0049] Therefore, this application provides a location information acquisition method that conceals device location information at the application level. This solves the problem that device-level methods for concealing device location information are not sophisticated enough, causing inconvenience to users when using the device.
[0050] For example, Figure 2 This diagram illustrates the architecture of a communication system in which a location information acquisition method according to an embodiment of this application is applied. Figure 2 As shown, the communication system 200 includes a first device 201 and a second device 202 (optional). Optionally, the number of second devices 202 can be one or more. Figure 2 Only one is shown in the image.
[0051] In some embodiments, the first device 201 may be a device with location concealment requirements. One or more applications may be installed on the first device 201. The first device 201 may have a location concealment function that allows the first device 201 to conceal some or all of its location information from the installed one or more applications. In other words, some or all of these one or more applications cannot obtain the precise location information of the first device 201, thus satisfying the location concealment requirements of the first device 201.
[0052] Optionally, in this embodiment, when the first device 201 conceals its location information from an installed application, it can instruct the second device 202 on at least one of the following: whether the application has obtained the location information of the first device 201, and the reason why the application has not obtained the location information of the first device 201. Correspondingly, after receiving the aforementioned instruction, the second device 202 can output a corresponding reminder message to remind the user of at least one of the following: whether the application has obtained the location information of the first device 201, and the reason why the application has not obtained the location information of the first device 201.
[0053] In other embodiments, the second device 202 may be a device with location anonymity requirements. The second device 202 may have one or more applications installed. The first device 201 may have a location anonymity function, which allows the first device 201 to conceal the location information of the second device 202 from some or all of the one or more applications installed on the second device 202. In other words, some or all of the one or more applications installed on the second device 202 cannot obtain the precise location information of the second device 202, thus satisfying the location anonymity requirements of the second device 202.
[0054] Optionally, the first device 201 and the second device 202 can establish a connection through wired or wireless communication technologies. For example, wireless communication technologies may include, but are not limited to, Bluetooth (BT) (e.g., classic Bluetooth or Bluetooth Low Energy (BLE) Bluetooth), Sparklink (e.g., classic Sparklink or Sparklink Low Energy (SLE)), Near Field Communication (NFC), Wireless Local Area Networks (WLAN) (e.g., Wireless Fidelity (Wi-Fi) networks), Zigbee, Frequency Modulation (FM), Infrared (IR), etc.
[0055] In this embodiment, the first device 201 and the second device 202 can be mobile phones, tablets, handheld computers, netbooks, as well as personal digital assistants (PDAs), artificial intelligence (AI) devices, in-vehicle devices, and wearable devices. Wearable devices include, but are not limited to, headphones, smartwatches, smart bracelets, smart ankle bracelets, and other various devices. Optionally, the first device 201 and the second device 202 can be the same type of device, such as both being mobile phones. They can also be different types of devices, such as the first device 201 being a mobile phone and the second device 202 being a wearable device.
[0056] Optionally, the operating systems installed on the first device 201, the second device 202, etc., include, but are not limited to, Alternatively, other operating systems may be used, or no operating system may be installed. This application does not limit the specific type of the first device 201 and the second device 202, or whether or not an operating system is installed, or the type of operating system installed.
[0057] For example, Figure 3 A schematic diagram of the structure of a first device 201 provided in an embodiment of this application is shown.
[0058] like Figure 3 As shown, the first device 201 may include a processor 310, a memory 320, a universal serial bus (USB) interface 321, a charging management module 330, a power management module 331, a battery 332, an antenna 1, an antenna 2, a mobile communication module 340, a wireless communication module 350, an audio module 360, buttons 370, a display screen 380, etc.
[0059] Processor 310 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0060] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0061] The processor 310 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. This memory can store instructions or data that the processor 310 has just used or that are used repeatedly. If the processor 310 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 310, and thus improves the efficiency of the system.
[0062] In some embodiments of this application, the processor 310 can be used to conceal the location information of the first device 201. In still other embodiments of this application, the processor 310 can also be used to conceal the location information of other devices besides the first device 201, such as the second device 202.
[0063] In some embodiments, processor 310 may include one or more interfaces, such as USB interface 321.
[0064] The memory 320 can be used to store computer executable program code, which includes instructions. The memory 320 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback), etc. The data storage area may store data created during the use of the first device 201, etc. Furthermore, the memory 320 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, universal flash storage (UFS), etc. The processor 310 executes various functional applications and data processing of the first device 201 by running instructions stored in the memory 320 and / or instructions stored in memory disposed in the processor.
[0065] The charging management module 330 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger.
[0066] The power management module 331 is used to connect the battery 332, the charging management module 330, and the processor 310. The power management module 331 receives input from the battery 332 and / or the charging management module 330 to power the processor 310, memory 320, audio module 360, and wireless communication module 350, etc.
[0067] The wireless communication function of the first device 201 can be implemented through antenna 1, antenna 2, mobile communication module 340, wireless communication module 350, modem processor, and baseband processor.
[0068] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the first device 201 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0069] The mobile communication module 340 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the first device 201.
[0070] The wireless communication module 350 can provide solutions for wireless communication applications applied to the first device 201, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), and satellite strobe. The wireless communication module 350 can be one or more devices integrating at least one communication processing module.
[0071] In some embodiments, antenna 1 of the first device 201 is coupled to mobile communication module 340, and antenna 2 is coupled to wireless communication module 350, enabling the first device 201 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0072] In some embodiments of this application, the wireless communication module 350 can be used to locate the first device 201 using various positioning systems such as GNSS, so as to obtain the location information of the first device 201.
[0073] The audio module 360 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals.
[0074] Buttons 370 include a power button, volume buttons, etc. Buttons 370 can be mechanical buttons or touch-sensitive buttons. The first device 201 can receive button input and generate key signal inputs related to user settings and function control of the first device 201.
[0075] The display screen 380 is used to display images, videos, etc. The display screen 380 includes a display panel. In some embodiments, the first device 201 may include one or N display screens 380, where N is a positive integer greater than 1. In some embodiments of this application, the display screen 380 can be used to display various interfaces (such as, but not limited to, those shown in the original text). Figure 5 , Figure 6 , Figure 7 The interface shown below is used to receive various operations performed by the user related to location information concealment. A description of these operations is provided later.
[0076] It is understandable that the above description uses the structure of a mobile phone as an example to illustrate the structure of the first device 201. In practical applications, when the first device 201 is a device of a different type than a mobile phone, it may include more or fewer modules. For example, when the first device 201 is an in-vehicle device, a laptop computer, a smart bracelet, etc., it may not include modules such as... Figure 3 Antenna 1 and mobile communication module 340 are shown.
[0077] For a description of the structure of the second device 202, please refer to the description of the structure of the first device 201. When the second device 202 and the first device 201 are of the same type, the structure of the second device 202 can be the same as that of the first device 201. When the second device 202 and the first device 201 are of different types, the first device 202 may include, for example... Figure 3 The first device 201 shown may have more or fewer modules in its structure. For example, taking the first device 202 as a wearable device, the first device 202 may not include modules such as... Figure 3 Antenna 1 and mobile communication module 340 are shown.
[0078] In some embodiments, the first device 201 and the second device 202 can be divided into functional modules. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional module.
[0079] In this embodiment, for example, Figure 4 The diagram shows a structural schematic of a first device 201 and a second device 202 provided in an embodiment of this application.
[0080] like Figure 4 As shown, the first device 201 may include a processing unit 401, an acquisition unit 402, a prompting unit 403, a transceiver unit (or described as a communication unit) 404, an application 405, etc. The second device 202 may include a transceiver unit 411, a prompting unit 412, etc.
[0081] In some embodiments, taking the application scenario where the first device 201 uses its own location concealment function to conceal the location information of the installed application and sends an indication message to the second device 202 as an example, in this embodiment, the processing unit 401 can be used to perform one or more processing operations to conceal the location information of the first device 201, such as including but not limited to determining the location range where the location information of the first device 201 needs to be concealed, determining the application where the location information of the first device 201 needs to be concealed or not, and determining the processing method of the location information of the first device 201 (such as concealing the location information or not concealing the location information), so as to realize the processing of the location information of the first device.
[0082] The acquisition unit 402 can be used to receive a location information acquisition request from the application 405. This request can be used to request the location information of the first device 201. Based on the location information acquisition request from the application 405, the acquisition unit 402 can obtain a concealed result of the location information of the first device 201 from the processing unit 401 and return this result to the application 405. The application 405 can be a system application or a third-party application. The application 405 can provide relevant services to the user by acquiring the location information of the first device 201. There can be one or more applications 405.
[0083] The prompting unit 403 can be used to output a reminder message to indicate to the user whether the application 405 has obtained the location information of the first device 201, and the reason why the location information of the first device 201 has not been obtained. The transceiver unit 404 can be used for the first device 201 to communicate with other devices (such as the second device 202). In some embodiments, the transceiver unit 404 can be used to send an indication message to the second device 202 to indicate whether the application 405 has obtained the location information of the first device 201, and the reason why the location information of the first device 201 has not been obtained.
[0084] The transceiver unit 411 can be used by the second device 202 to communicate with other devices (such as the first device 201). In some embodiments, the transceiver unit 411 can be used to receive an indication message from the first device 201. A description of this indication message can be found in the description of the transceiver unit 404. The prompting unit 412 can also be used to output a reminder message to indicate to the user whether the application 405 has obtained the location information of the first device 201, and the reason why the location information of the first device 201 has not been obtained, at least one of these.
[0085] In other embodiments, taking the application scenario where the first device 201 uses its own location concealment function to conceal the location information of the second device 202 as an example, such as... Figure 4 As shown, the second device 202 may also include an application 413, an acquisition unit 414, a processing unit 415, etc.
[0086] In this embodiment, the processing unit 401 can also be used to perform one or more processing operations to conceal the location information of the second device 202, such as including but not limited to determining the location range where the location information of the second device 202 needs to be concealed, determining the application where the location information of the second device 202 needs to be concealed or not concealed, and determining the processing method of the location information of the second device 202 (such as concealing the location information or not concealing the location information), so as to realize the processing of the location information of the second device.
[0087] The prompting unit 403 can also be used to indicate to the user whether the application 413 has obtained the location information of the second device 202, and the reason why the location information of the second device 202 has not been obtained.
[0088] The transceiver unit 404 can also be used to send processing results to the second device 202 and receive indication messages from the second device. These indication messages can be used to indicate to the first device 201 whether the application 413 has obtained the location information of the second device 202, and the reason why it has not obtained the location information of the second device 202. Here, the processing result can be the result determined by the processing unit 401 of concealing the location information of the second device 202 from which applications within which location ranges, or the result determined by the processing unit 401 of not concealing the location information of the second device 202 from which applications within which location ranges.
[0089] The transceiver unit 411 can also be used to receive processing results and indication messages from the first device 201. For an introduction to processing results and indication messages, please refer to the introduction of processing results and indication messages of the transceiver unit 404. The prompting unit 412 can also be used to indicate to the user whether the application 413 has obtained the location information of the second device 202, and the reason why the location information of the second device 202 has not been obtained.
[0090] Application 413 and Application 405 can be the same application or different applications. For an introduction to Application 413, please refer to the introduction of Application 405. The acquisition unit 414 can receive a location information acquisition request from Application 413. This request can be used to request the acquisition of the location information of the second device 202. Based on the location information acquisition request from Application 413, the acquisition unit 414 can obtain a concealed result of the location information of the second device 202 from the processing unit 415 and return this result to Application 413. The processing unit 415 can obtain the processing result of the location information of the second device 202 from the transceiver unit 411, and based on this result, determine how to return the location information of the second device 202 to the acquisition unit 414 (such as precise location information, coarse location information, or no location information), i.e., generate a concealed result.
[0091] For example, taking the application scenario where the first device 201 uses its own location concealment function to conceal its own location information to the installed application and sends an instruction message to the second device 202 as an example, combined with... Figure 4 The working processes of the first device 201 and the second device 202 are described below.
[0092] like Figure 4As shown, when application 405 needs to obtain the current location information of the first device 201, application 405 sends a location information acquisition request to acquisition unit 402. Correspondingly, acquisition unit 402 requests processing unit 401 to obtain the current location information of the first device 202. Processing unit 401 determines the concealment result of the first device 201's location information based on the location of the first device 202, the previously acquired location range where the location information of the first device 201 needs to be concealed or not concealed, and the applications that need to conceal or not conceal the location information. It then returns the concealment result to application 405. Processing unit 401 can also notify prompting unit 403 to output a reminder message; the description of this reminder message can be found in the description of the reminder message output by prompting unit 403. Optionally, processing unit 401 can also send an indication message to transceiver unit 404, which can forward the indication message to transceiver unit 411. The transceiver unit 411 can notify the prompting unit 412 to output a reminder message. For an introduction to the reminder message, please refer to the description of the reminder message output by the prompting unit 403 mentioned above.
[0093] It should be noted that, Figure 4 The division shown is merely illustrative and represents only one logical functional division. In actual implementation, other division methods are possible. For example, the acquisition unit 402 can be integrated into the processing unit 401. The processing unit 401 can also be subdivided into a location range specifying unit, an application range specifying unit, and a mode selection unit. The location range specifying unit can be used to acquire the location range where the location information of the first device 201 needs to be hidden; the application range specifying unit can be used to acquire the application where the location information of the first device 201 needs to be hidden or not hidden; and the mode selection unit can be used to acquire the processing method for the location information of the first device 201.
[0094] The acquisition unit 414 can be integrated into the processing unit 415, and the prompting unit 403 or the prompting unit 412 can be implemented as a display unit or a voice broadcasting unit. Optionally, the processing unit (such as the processing unit 401 and processing unit 415 mentioned above) can be implemented by a processor or processor-related circuit components, and can be a processor or a processing module. The transceiver unit (such as transceiver unit 404 and transceiver unit 411) can be implemented by a transceiver or transceiver-related circuit components, and can be a transceiver or a transceiver module. The display unit can be implemented by display screen-related components. The voice broadcasting unit can be implemented by audio module-related components.
[0095] or, Figure 4 The structure of the first device 201 or the second device 202 shown may further include a storage unit that stores programs or instructions. When the processing unit executes the program or instructions, it causes... Figure 4 The first device 201 or the second device 202 shown can perform the methods described in the following method embodiments.
[0096] Understandable, Figure 3 , Figure 4 The illustrated structures do not constitute a specific limitation on the first device 201 or the second device 202. In other embodiments of this application, the first device 201 or the second device 202 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The processing steps or functional characteristics of the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0097] The technical solutions involved in the following embodiments can all be applied to applications with, for example, Figure 3 , Figure 4 The device with the structure shown, and Figure 2 The system implementation of the architecture shown.
[0098] In some embodiments, the first device can use its built-in location anonymization function to conceal its own location information from installed applications. In this embodiment, the first device can be various mobile devices (such as handheld devices, portable devices, etc.), such as mobile phones, tablets, and laptops. The first device can determine whether to allow an application to obtain its current location information based on the location range (or described as a region, area, etc.) where the location information needs to be concealed, and the application that needs to conceal its location information. If it determines that the application is allowed to obtain its current location information, the first device can send its current location information to the application. Conversely, if it determines that the application is not allowed to obtain its current location information, the first device may not send its current location information to the application.
[0099] The following section will first introduce the location range where the location information of the first device needs to be concealed.
[0100] Understandably, as the first device moves, its location information will differ depending on its position. In some locations, the device's location information needs to be concealed, while in others it does not. In other words, the device's location information only needs to be concealed when it is within a location range where concealment is required. When the device is not within a location range requiring concealment, its location information does not need to be concealed.
[0101] In some embodiments, the location range within which the location information of the first device needs to be concealed can be set by the user. This allows the user to protect the privacy of a location range where actual privacy protection is required. The first device can receive a user operation to set the location range. In response to this operation, the first device can determine the location range within which the location information of the first device needs to be concealed based on the user-defined location range. For example, the user operation can be various operations such as voice operation, gesture operation, or button operation.
[0102] As a concrete example, the first device can present an interface for setting a location range, through which it receives user operations (which can be described as first user operations) for setting the location range. Optionally, this interface can be directly integrated into a settings application; that is, the settings application can integrate location hiding functionality. Alternatively, the interface can also be the runtime interface of an application specifically designed to implement location hiding functionality. For example, the interface for setting the location range can be as follows: Figure 5 The interface 500 shown in (1) can display a map 501, and the user can set the location range based on the map 501.
[0103] For example, Map 501 can be a high-precision map accurate to the smallest geographic unit (such as a neighborhood, street, or building). Figure 5 Taking this as an example, such as Figure 5 As shown in (2), users can mark one or more locations on map 501 by adding control 511 to map 501. Among them, Figure 5 In section (2), three locations are shown, such as location 1, location 2, and location 3. In response to these user-defined locations, the first device can determine the user-defined location range. For example, in this example, since map 501 is presented as a high-precision map, the location area occupied by the location defined by control 511 (e.g., a point within the smallest geographic unit) is small. The first device can determine the user-selected location range as an area of preset size with location 1 as a reference point (e.g., a center point or corner point), an area of preset size with location 2 as a reference point, and an area of preset size with location 3 as a reference point. That is to say, Figure 5 In the example shown in (2), the user sets three location ranges. Optionally, the preset size can be the same or different for different user-defined locations. This allows the user-defined location range to be implemented as a relatively large area.
[0104] Optionally, this preset size can be a default value preset by the first device, or it can be set by the user. Taking user setting as an example, in... Figure 5 (1) or as Figure 5The interface shown in (2) can also display a control 502. This control 502 can be used by the user to set a preset size value. For example, when the user uses a method such as Figure 5 The control 511 shown in (2) is used before or after the location is marked on the map 501, such as Figure 5 As shown in (2), the user can perform operations such as clicking on the control 502, and in response to the operation, the first device can display as shown in (2). Figure 5 As shown in (3), the user can set a preset size value through the control 520. Alternatively, the user can also directly set the preset size value through the control 520. Figure 5 The preset size of the area defined by the control 511 shown in Figure (2) can be set. Optionally, the user can set the same preset size for each location marked by the user. Of course, the user can also set different preset sizes for each location marked by the user. Since the area occupied by the user varies depending on the location, such as school, office park, bank, apartment building, etc., the user may have different area size requirements for different locations. In this way, the user can set the area size occupied by the location range according to actual needs, improve the flexibility of location range setting, and meet the user's actual needs.
[0105] Optional, in such Figure 5 Zhong (1) and Ru Figure 5 The interface 500 shown in (2) also displays a confirmation button 503, a cancel button 504, etc. The confirmation button 503 can be used to receive a user's confirmation operation; in response to this operation, the first device can confirm the location range set by the user. The cancel button 504 can be used to receive a user's cancellation operation; in response to this operation, the first device can confirm that the user has canceled the set location range.
[0106] Optionally, in the above example, when map 501 is presented as a high-precision map, the user can also adjust parameters such as... Figure 5 The high-precision map shown in (1) performs operations such as zooming so that the first device can display the low-precision map as described below. Similarly, the user can continue to set the location range in a manner similar to that described in the low-precision map example below.
[0107] For example, map 501 could also be a low-precision map accurate to non-small geographical units (such as urban areas, city districts, provinces, countries, and states). Users can also mark one or more locations on map 501 by adding controls 511, etc., to directly select a larger location area (such as urban areas, cities, provinces, and states) compared to the high-precision map example described above. In this example, the first device can determine the location marked by the user as the user-defined location range. This allows users to have more options for setting location ranges, simplifying the operation when setting larger location ranges.
[0108] Optionally, in the above example, the size of the first device's display screen limits the map area that can be displayed. Map 501 can be a map area displayed based on the first device's current location, such as a map area including the first device's current location. The user can perform operations such as swiping on the interface 500 to allow map 501 to display areas other than the first device's current location, so that the user can select other location ranges besides the first device's current location. Alternatively, map 501 can also be a map area displayed based on the first device's activity range, such as a map area including the first device's activity range (or including an activity range where the first device's activity level is greater than a preset level). The user can also perform operations such as swiping on the interface 500 to allow map 501 to display map areas other than the first device's activity range, so that the user can select other location ranges besides the first device's activity range. Or, in such cases... Figure 5 The interface 500 described in (1) can also display a search bar. Figure 5 (Not shown in the image) Users can directly enter a location in the search bar. In response to this operation, the first device can update the displayed map area to include the map area containing the location entered by the user.
[0109] Optionally, in this embodiment, the first device can support displaying maps of various resolutions and allow users to perform various operations on the map, enabling users to set one or more location ranges of arbitrary size and geographical location. The sizes of different location ranges can be the same or different, and they can be adjacent or non-adjacent on the map.
[0110] Furthermore, after the first device obtains the user-defined location range, it can determine the location range within which its location information should be hidden based on this range. As one possible implementation, the first device can default to defining the user-defined location range as the range where its location information needs to be hidden, and default to defining any undefined location range as the range where its location information does not need to be hidden. Alternatively, the first device can default to defining the user-defined location range as the range where its location information does not need to be hidden, and default to defining any undefined location range as the range where its location information needs to be hidden.
[0111] As another possible implementation, the first device can also receive a user-defined processing method, and determine the location range for concealing the location information of the first device based on the user-defined processing method and the user-defined user range. For example, in this implementation, such as... Figure 6 As shown, the first device can present a processing mode setting interface 600, which includes at least one of the following processing modes: a hidden location 601 within a specified range (which can be described as a second processing mode) and a return location 602 within a specified range (which can be described as a first processing mode). In response to a user's selection of a hidden location 601 within the specified range (which can be seen as an example of a third user operation), the first device can determine that the user wants to hide the first device's location information within the set location range, and thus determine the user-set location range as the range where the first device's location information needs to be hidden, and determine the unset location range as the range where the first device's location information does not need to be hidden. Conversely, in response to a user's selection of a return location 602 within the specified range (which can also be seen as an example of a third user operation), the first device can determine that the user wants to not hide the first device's location information within the set location range, and thus determine the user-set location range as the range where the first device's location information does not need to be hidden, and determine the unset location range as the range where the first device's location information needs to be hidden. In this way, users can choose to set their selected location range as the area where they want to hide their location, or they can choose to set their selected location range as the area where they do not want to hide their location, which can meet different user needs and improve the flexibility of settings.
[0112] It is understandable that the first device does not restrict the order in which the user sets the processing method or the user sets the location range.
[0113] The above embodiments use the example of determining the location range for hiding the location information of the first device based on a user-defined location range. In other embodiments, with user authorization, the first device can also statistically analyze its activity area and determine areas within its activity area that meet preset conditions as the location range for which the location information of the first device needs to be hidden, or as the location range for which the location information of the first device does not need to be hidden. For example, preset conditions may include an activity frequency greater than or equal to a preset frequency, an activity frequency less than a preset frequency, or a region type belonging to a preset region type (such as a high-privacy type, a low-privacy type, etc.). Optionally, in this embodiment, to meet the user's actual setting needs, the first device can also output a corresponding reminder message to remind the user before determining the area that meets the preset conditions as the location range for which the location information of the first device needs to be hidden. Alternatively, it can also receive user modifications to the areas determined by the first device that meet the preset conditions to obtain the location range that the user wants to set.
[0114] The above describes the range of locations where the location information of the first device needs to be concealed. The following section will introduce applications where the location information of the first device needs to be concealed.
[0115] Understandably, when a first device is within a location range where its location information needs to be hidden, it may or may not hide its location information from an application. Whether a first device hides its location information from an application depends on whether the application is one that requires hiding the first device's location information. When an application is one that requires hiding the first device's location information, it cannot obtain the first device's location information. When an application is not one that requires hiding the first device's location information, it can obtain the first device's location information.
[0116] Optionally, the first device may store an application list, which may include one or more applications. The applications in this list may be those that require the location information of the first device to be hidden. Alternatively, the applications in the application list may be those that do not require the location information of the first device to be hidden.
[0117] In some embodiments, the applications that need to conceal the location information of the first device can also be set by the user. In this way, the user only sets applications they do not trust to conceal the location information of the first device, while setting trusted and frequently used applications to not conceal the location information. This allows for more granular privacy management and improves the security and convenience of using the device.
[0118] The first device can receive a user operation (which can be described as a second user operation) for setting an application scope. In response to this operation, the first device can determine, based on the user-defined application scope, the applications that need to hide the location information of the first device when the first device is within the scope where location information hiding is required. Optionally, the user operation can be various operations such as voice operation, gesture operation, button operation, etc.
[0119] As a concrete example, the first device can present an interface for setting the application scope, through which it receives user operations for setting the application scope. Optionally, this interface can be directly integrated into a settings application; that is, the settings application can integrate location hiding functionality. Alternatively, the interface can also be the runtime interface of an application specifically designed to implement location hiding functionality. For example, the interface for setting the application scope can be as follows: Figure 7 The interface 700 shown can display applications installed on the first device, such as map applications, food delivery applications, social applications, gallery applications, short video applications, and other various applications. Optionally, the order in which interfaces 500, 600, and 700 are presented is not limited in this embodiment; that is, the order in which the user sets the application range, the location range, and the processing method is not limited. It is understood that this embodiment uses the example of the first device presenting different interfaces to receive user operations for setting the location range, user-defined processing methods, and user operations for setting the application range. In other embodiments, the first device may also present the same interface to receive multiple user operations for setting the location range, user-defined processing methods, and user operations for setting the application range.
[0120] Users can select one or more applications according to their actual needs. Figure 7Taking user-selected applications as examples—social media, short video, and photo gallery applications—further, after the first device obtains the user-selected applications, it can determine which applications require location information concealment when the first device is within a location concealment range. Similar to determining the location range for concealment based on the user-defined location range, the first device can default to identifying user-selected applications as those requiring location information concealment when the first device is within a location concealment range. Alternatively, it can default to identifying user-selected applications as those that do not require location information concealment when the first device is within a location concealment range.
[0121] As another possible implementation, the first device can also determine the application whose location information needs to be hidden based on the user-defined processing method and the user-selected application. For example, combined with... Figure 6 In the example shown, in response to a user's selection of a hidden location 601 within a specified range, the first device can determine that the user wants to hide the location information of the selected application within the selected location range. Therefore, the selected application is determined to be the application that needs to hide the location information of the first device, while applications not selected by the user are determined to be applications that do not need to hide the location information of the first device. Conversely, in response to a user's selection of a return location 602 within a specified range, the first device can determine that the user does not want to hide the location information of the selected application within the selected location range. Therefore, the selected application is determined to be the application that does not need to hide the location information of the first device, while applications not selected by the user are determined to be applications that need to hide the location information of the first device. Users can either set their selected applications to hide the location information of the first device or not, satisfying different user needs and improving setting flexibility.
[0122] Of course, in other embodiments, the first device can also determine the applications whose location information needs to be hidden based on the type of the application. For example, when an application does not belong to a preset application type (such as a food delivery application or other low-privacy type), the first device can determine that when the first device is within the location range where location information hiding is required, this application is one for which location information hiding is necessary. Alternatively, with user authorization, the first device can obtain the user's usage distribution of applications installed on the first device. If, based on this usage distribution, it is determined that the first device is within the aforementioned location range where location information hiding is required, and an application is used by the user, then it can be determined that when the first device is within the location range where location information hiding is required, this application is one for which location information hiding is not necessary. When an application is not used by the user, then it can be determined that when the first device is within the location range where location information hiding is required, this application is one for which location information hiding is necessary.
[0123] Optionally, in the above embodiments, there may be one or more location ranges where the location information of the first device needs to be hidden. For each location range where the location information of the first device needs to be hidden, the application that needs to hide the location information of the first device within that location range can be determined. That is, for different location ranges where the location information of the first device needs to be hidden, the applications that need to hide the location information of the first device can be exactly the same, partially the same, or completely different.
[0124] Conversely, there can be one or more location ranges where the location information of the first device does not need to be concealed. For each location range where the location information of the first device does not need to be concealed, the applications that do not need to conceal the location information of the first device within that location range can also be identified. In other words, for different location ranges where the location information of the first device does not need to be concealed, the applications that do not need to conceal the location information of the first device can be exactly the same, partially the same, or completely different.
[0125] For example, Figure 8 This illustration shows a schematic diagram illustrating the need for location information concealment within different location ranges, as provided in an embodiment of this application. For example... Figure 8As shown in (1), the location ranges where the location information of the first device needs to be hidden include location range A, location range B, and location range C. Optionally, these location ranges can be selected by the user in the manner described above, or determined by the device itself. Specifically, within location range A, the location information of the first device needs to be hidden for applications a1, a2, and a3. Within location range B, the location information of the first device needs to be hidden for applications a3, a4, and a5. Within location range C, the location information of the first device needs to be hidden for applications a6, a7, and a8.
[0126] like Figure 8 As shown in (2), the location ranges for which the location information of the first device does not need to be hidden include location range D, location range E, and location range F. Optionally, these location ranges can also be selected by the user in the manner described above, or determined by the device itself. Specifically, within location range D, the location information of the first device does not need to be hidden for applications b1, b2, and b3. Within location range E, the location information of the first device does not need to be hidden for applications b3, b4, and b5. Within location range F, the location information of the first device does not need to be hidden for applications b6, b7, and b8.
[0127] The following describes how the first device determines whether to allow an application to obtain its location information based on the location range within which it needs to conceal its own location information and the application that needs to conceal the first device's location information. For example, Figure 9 A flowchart illustrating a location information acquisition method provided in an embodiment of this application is shown, as follows: Figure 9 As shown, the method includes the following steps:
[0128] S901, The first device obtains the location acquisition request of application 1.
[0129] The location acquisition request is used to request the current location information of the first device. Optionally, application 1 can be any application installed on the first device.
[0130] In some embodiments, when the first device determines that it is currently within a location range where location information concealment is required, for example: when a user accesses a location via a method such as... Figure 5 , Figure 6 , Figure 7 If a device selects a location range to hide its location information from certain applications using methods such as [method name], and determines that it is currently within the set location range based on this setting method, the first device can execute steps S902 to S904.
[0131] S902, the first device determines whether application 1 is an application that requires hiding the location information of the first device.
[0132] If it belongs to the category, proceed to step S903. If it does not belong to the category, proceed to step S904.
[0133] S903, The first device does not send its current location information to application 1.
[0134] Optionally, in step S903, the first device may not send (or provide) its current location information to application 1, i.e., it may not return its location information to application 1. In this case, application 1 can serve as an example of the first application. Alternatively, the first device may return a vague or coarse-grained location information to application 1, which is different from its current location information. For example, when the first device's location information is a certain apartment building, the first device may return information including the urban area containing that apartment building (i.e., coarse-grained location information) to application 1.
[0135] S904, The first device sends its current location information to application 1.
[0136] When performing step S904, application 1 can serve as an example of the second application.
[0137] In other embodiments, when the first device determines that it is currently in a location range where location information concealment is not required, for example: when the user accesses a location via a method such as... Figure 5 , Figure 6 , Figure 7 If a device selects a location range within which it will not hide its location information from certain applications, and determines that it is currently within the set location range based on the setting method, the first device can execute steps S905 to S907.
[0138] S905, the first device determines whether application 1 is an application that does not require hiding the location information of the first device.
[0139] If it belongs to the category, proceed to step S906. If it does not belong to the category, proceed to step S907.
[0140] S906, The first device sends its current location information to application 1.
[0141] S907, The first device does not send its location information to application 1.
[0142] For an explanation of step S907, please refer to the explanation of step S903.
[0143] In some embodiments, when application 1 requests to obtain the current location information of the first device, but the first device does not send its own current location information to application 1, the first device may also output a reminder message. For example, this reminder message may be as follows: Figure 10 The reminder message 1000 shown is used to indicate to the user why application 1 has not obtained the current location information of the first device, that is, because the first device has entered a location-hidden area, application 1 is not allowed to obtain the current location of the first device. Thus, when the device does not return its location to the application, it may cause the application to malfunction, thereby outputting a corresponding reminder message to inform the user of the reason for not returning the location, which can improve the user experience. It resolves the user's confusion when the application malfunctions, allowing the user to quickly resolve problems as needed, such as removing the restriction on the application's location information hiding function.
[0144] In some embodiments, the first device may also send an indication message to the connected second device to indicate to the second device why application 1 has not obtained the current location information of the first device. This allows the second device to also output, for example... Figure 10 The displayed alert message 1000, "You have entered a location concealment zone; the location information obtained by application 1 has been concealed," serves to remind the user. For example, the first device could be a mobile phone, and the second device could be a wearable device. Alternatively, the first device could be an in-vehicle device, and the second device could be a wearable device. This enhances the effectiveness of the reminder to the user.
[0145] Optionally, in the two embodiments described above, the user can be notified of which applications their location information will be hidden once the first device enters the area where location information concealment is required. Alternatively, the user can be notified when an application requests to obtain the location information of the first device but fails to do so.
[0146] In other embodiments, the first device may use its own location concealment function to conceal the location information of the second device from applications installed on the second device. In this embodiment, the second device can be various devices with mobility attributes, such as wearable devices, mobile phones, and tablets. The first device can send the concealment result to the second device, so that the second device can determine whether to allow an application to obtain its current location information based on the concealment result. For example, the concealment result may include a location range where the location information of the second device needs to be concealed or a location range where the location information of the second device does not need to be concealed, as well as an application where the location information of the second device needs to be concealed or an application where the location information of the second device does not need to be concealed.
[0147] In this embodiment, as one possible implementation, the first device may present, for example, Figure 11 The interface 1100 shown can display identifiers for one or more devices, such as identifier 1101 for mobile phone 1, identifier 1102 for wristband 2, identifier 1103 for watch 3, etc. Each of these devices can be referred to as a second device, and these devices can be bound to a first device. The user can choose to manage the location information of each second device through the first device.
[0148] If the first device receives an operation to select watch 3, such as a click operation performed by the user on the identifier 1103 of watch 3, then in response to that operation, the first device can, through, such as Figure 5 , Figure 6 , Figure 7 The system receives operations for setting location ranges, processing methods, and application scopes, as shown in the diagram. Based on these operations, it then determines which location ranges and applications should have their location information hidden from the second device, or which location ranges and applications should not have their location information hidden from the second device. Alternatively, the first device can also determine, in a non-user-defined manner, such as through the methods described above that are determined by the first device, which location ranges and applications should have their location information hidden from the second device, or which location ranges and applications should not have their location information hidden from the second device.
[0149] Furthermore, the first device can indicate to the second device in which location ranges and for which applications its location information is hidden, or in which location ranges its location information is not hidden from which applications. Subsequently, when the second device receives a request from an installed application to obtain its current location information, the second device can determine whether to allow the application to obtain its current location information based on the aforementioned information. The implementation details regarding whether the second device sends its current location information to an application and the output of alert messages can refer to the relevant implementation of the first device described above.
[0150] For example, Figure 12 A flowchart illustrating another location information acquisition method provided in an embodiment of this application is shown. Figure 12 As shown, the method includes the following steps:
[0151] S1201. When the first device is in the first area, if the first device determines that the first application is an application that is not allowed to obtain the current location of the first device in the first area, it does not provide the current location of the first device to the first application; and if it determines that the second application is an application that is allowed to obtain the current location of the first device in the first area, it provides the current location of the first device to the second application.
[0152] Optionally, before determining that the first application is an application that is not allowed to obtain the current location of the first device within the first area, the first device may determine that the first application requests to obtain the current location of the first device by calling the system interface of the first device. Similarly, before determining that the second application is an application that is allowed to obtain the current location of the first device within the first area, the first device may also determine that the second application requests to obtain the current location of the first device by calling the system interface of the first device.
[0153] As one possible implementation, the first device can determine that if the first region is a preset region where a first preset set of applications installed on the first device are allowed to obtain the location of the first device, and the first application does not belong to the first preset set of applications, then the first application is determined to be an application that is not allowed to obtain the current location of the first device within the first region. As another possible implementation, the first device can determine that if the first region is a preset region where the first preset set of applications installed on the first device are not allowed to obtain the location of the first device, and the first application belongs to the first preset set of applications, then the first application is determined to be an application that is not allowed to obtain the current location of the first device within the first region.
[0154] Similarly, as one possible implementation, the first device can determine that the second application is allowed to obtain the current location of the first device within the first area if the first area is determined to be a preset area where a first preset set of applications installed on the first device is allowed to obtain the location of the first device, and the second application belongs to the first preset set of applications. As another possible implementation, the first device can determine that the second application is allowed to obtain the current location of the first device within the first area if the first area is determined to be a preset area where the first preset set of applications installed on the first device is not allowed to obtain the location of the first device, and the first application does not belong to the first preset set of applications.
[0155] Optionally, in this embodiment, the number of first regions may include at least one. In the above implementation, the first region can be a region pre-defined by the user, as described above, such as a location range where the location information of the first device needs to be concealed. Figure 8 The location range A shown in (1) is an example. Or a location range where the location information of the first device does not need to be concealed, such as... Figure 8 The location range D shown in (2) is as follows. Alternatively, the first area can also be an area other than the area preset by the user, such as... Figure 8 Areas other than the location range A shown in (1), or such as... Figure 8 The area outside the location range D shown in (2). The first device can determine the first area based on the area preset by the user, etc.
[0156] Optionally, the first preset application set may include at least one application. The first preset application set may be a set of applications pre-defined by the user, or it may be a set of applications on the first device other than those pre-defined by the user. For example, the first preset application set may be determined based on a set application type, and the types of applications included in the first preset application set are the same as the set application type. Alternatively, the first preset application set may be determined based on a set application, and it may include the set application. Or, the first preset application set may be determined based on a set application, and it may include applications installed on the first device other than the set application. Optionally, the aforementioned set application type and set applications may be set by the first device or by the user.
[0157] S1202, When the first device moves out of the first area, the first device provides the first application with the current location of the first device.
[0158] In some embodiments, Figure 12 The method further includes: when the first device is in the second region, if the first device determines that the third application is an application that is not allowed to obtain the current location of the first device in the second region, it does not provide the current location of the first device to the third application. When the first device moves out of the second region, it provides the current location of the first device to the third application. The second region is different from the first region, and the third application is different from the first application. Optionally, the second region may include at least one. The determination of the second region can refer to the determination of the first region. For example: taking the first region as... Figure 8 Taking the location range A shown in (1) as an example, the second region can be as follows: Figure 8 The regions shown in (1) that differ from location range A include location range B or location range C. For example, taking the first region as an example... Figure 8 Taking the location range D shown in (2) as an example, the second region can be as follows: Figure 8 The regions shown in (2) that are different from the location range D, such as location range E or location range F.
[0159] Optionally, the third application may not belong to the second preset application set, where the applications in the second preset application set are those that allow the location of the first device to be obtained when the first device is in the second area. Alternatively, the third application may belong to the second preset application set, where the applications in the second preset application set are those that do not allow the location of the first device to be obtained when the first device is in the second area. The determination of the second preset application set can be referenced to the determination of the first preset application set. The second preset application set also includes at least one application, and this at least one application is partially the same as or completely different from at least one application included in the first preset application set. For example, the first preset application set... Figure 8 Taking the set consisting of application a1, application a2, and application a3 shown in (1) as an example, the second preset application set can be as follows: Figure 8 The set shown in (1) consists of applications a3, a4, and a5, or applications a6, a7, and a8. For example, consider the first preset application set as... Figure 8 Taking the set consisting of application b1, application b2, and application b3 shown in (1) as an example, the second preset application set can be as follows: Figure 8 The set shown in (2) consists of application b3, application b4, and application b5, or the set consists of application b6, application b7, and application b8, etc.
[0160] This application also provides a chip system, such as... Figure 13 As shown, the chip system includes at least one processor 1301 and at least one interface circuit 1302. The processor 1301 and the interface circuit 1302 are interconnected via lines. For example, the interface circuit 1302 can be used to receive signals from other devices. As another example, the interface circuit 1302 can be used to send signals to other devices (e.g., the processor 1301). Exemplarily, the interface circuit 1302 can read instructions stored in memory and send those instructions to the processor 1301. When the instructions are executed by the processor 1301, the device can perform the various steps executed by the device in the above embodiments. Of course, the chip system may also include other discrete components, and this application embodiment does not specifically limit this.
[0161] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0162] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application does not specifically limit the type of memory or the arrangement of the memory and processor.
[0163] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0164] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0165] This application also provides a computer storage medium storing computer instructions, which, when executed on a device, cause the device to perform the methods described in the above-described method embodiments.
[0166] This application provides a computer program product, which includes a computer program or instructions that, when run on a computer, cause the computer to perform the methods described in the above-described method embodiments.
[0167] In addition, this application also provides an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the apparatus to perform the methods in the above-described method embodiments.
[0168] In this embodiment, the device, computer storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0169] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0170] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The embodiments can be combined with or referenced to each other without conflict. The apparatus embodiments described above are merely illustrative; for example, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0171] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0172] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0173] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0174] The above description is merely a 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 scope of the technology 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 acquiring location information, characterized in that, Applied to a first device, the method includes: When the first device is in the first area, if it is determined that the first application is not allowed to obtain the current location of the first device in the first area, the current location of the first device is not provided to the first application; and if it is determined that the second application is allowed to obtain the current location of the first device in the first area, the current location of the first device is provided to the second application. When the first device moves out of the first area, the current location of the first device is provided to the first application.
2. The method according to claim 1, characterized in that, The determination that the first application is an application that is not allowed to obtain the current location of the first device within the first area includes: The first area is determined to be a preset area that allows a first preset set of applications installed on the first device to obtain the location of the first device, and the first application does not belong to the first preset set of applications; or, the first area is determined to be a preset area that does not allow the first preset set of applications installed on the first device to obtain the location of the first device, and the first application belongs to the first preset set of applications. or, The determination that the second application is an application that allows the acquisition of the current location of the first device within the first area includes: The first area is determined to be a preset area that allows a first preset set of applications installed on the first device to obtain the location of the first device, and the second application belongs to the first preset set of applications; or, the first area is determined to be a preset area that does not allow the first preset set of applications installed on the first device to obtain the location of the first device, and the first application does not belong to the first preset set of applications.
3. The method according to claim 1 or 2, characterized in that, The method further includes: When the first device is in the second area, if it is determined that the third application is not allowed to obtain the current location of the first device in the second area, the current location of the first device will not be provided to the third application. When the first device moves out of the second area, the current location of the first device is provided to the third application, wherein the second area is different from the first area and the third application is different from the first application.
4. The method according to claim 3, characterized in that, The third application does not belong to the second preset application set. The applications in the second preset application set are those that allow the location of the first device to be obtained when the first device is in the second area. Alternatively, the third application belongs to a second preset application set, which is a set of applications that are not allowed to obtain the location of the first device when the first device is in the second area; both the second preset application set and the first preset application set include at least one application, and the at least one application included in the second preset application set is partially the same as or completely different from the at least one application included in the first preset application set.
5. The method according to any one of claims 2-4, characterized in that, The first preset application set is determined according to the set application type, and the types of applications included in the first preset application set are the same as the set application types. Alternatively, the first preset application set is determined based on the set applications, and the first preset application set includes the set applications; Alternatively, the first preset application set is determined based on the set applications, and the first preset application set includes applications installed on the first device other than the set applications.
6. The method according to any one of claims 1-5, characterized in that, Before determining that the first application is an application that is not allowed to obtain the current location of the first device within the first area, and before providing the current location of the first device to the first application, the method further includes: Receive a first user operation, which is used to set the first area.
7. The method according to any one of claims 2-6, characterized in that, Before determining that the first application is an application that is not allowed to obtain the current location of the first device within the first area, and before providing the current location of the first device to the first application, the method further includes: Receive a second user operation, which is used to set the first preset application set.
8. The method according to any one of claims 2-7, characterized in that, Before determining that the first application is an application that is not allowed to obtain the current location of the first device within the first area, and before providing the current location of the first device to the first application, the method further includes: Display a first processing method and / or a second processing method, wherein the first processing method is used to set the applications in the first preset application set to be allowed to obtain the location of the first device when the first device is in the first area, and the second processing method is used to set the applications in the first preset application set to be not allowed to obtain the location of the first device when the first device is in the first area; Receive a third user operation, the third user operation being used to select the first processing method or the second processing method.
9. The method according to any one of claims 1-8, characterized in that, Before determining that the first application is an application that is not allowed to obtain the current location of the first device within the first area, the method further includes: It is determined that the first application requests the current location of the first device by calling the system interface of the first device.
10. The method according to any one of claims 1-9, characterized in that, After not providing the first application with the current location of the first device, the method further includes: The user is reminded that because the first device has entered a location-hidden area, the first application is not allowed to obtain the current location of the first device.
11. The method according to any one of claims 1-10, characterized in that, After not providing the first application with the current location of the first device, the method further includes: A notification message is sent to the second device, which is used by the second device to remind the user that the first application is not allowed to obtain the current location of the first device because the first device has entered a location-hidden area.
12. The method according to any one of claims 1-11, characterized in that, The number of the first region is at least one.
13. A device, characterized in that, include: A processor and a memory, the memory being coupled to the processor, the memory being used to store program code including instructions, the processor reading the instructions from the memory to cause the device to perform the method as described in any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when executed on the device, causes the device to perform the method as described in any one of claims 1-12.
15. A computer program product, characterized in that, The computer program product includes: a computer program or instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 1-12.