CN113473362A - Positioning method, positioning device and storage medium - Google Patents
Positioning method, positioning device and storage medium Download PDFInfo
- Publication number
- CN113473362A CN113473362A CN202110724505.2A CN202110724505A CN113473362A CN 113473362 A CN113473362 A CN 113473362A CN 202110724505 A CN202110724505 A CN 202110724505A CN 113473362 A CN113473362 A CN 113473362A
- Authority
- CN
- China
- Prior art keywords
- positioning
- mode
- control list
- application program
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 230000000977 initiatory effect Effects 0.000 claims abstract description 15
- 230000008569 process Effects 0.000 claims description 15
- 230000001105 regulatory effect Effects 0.000 claims description 2
- 238000012545 processing Methods 0.000 description 14
- 238000004891 communication Methods 0.000 description 11
- 238000007726 management method Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
- H04W4/025—Services making use of location information using location based information parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W52/00—Power management, e.g. TPC [Transmission Power Control], power saving or power classes
- H04W52/02—Power saving arrangements
- H04W52/0209—Power saving arrangements in terminal devices
- H04W52/0251—Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
- H04W52/0258—Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity controlling an operation mode according to history or models of usage information, e.g. activity schedule or time of day
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
Abstract
The disclosure relates to a positioning method, a positioning device and a storage medium. The positioning method is applied to terminal equipment and comprises the following steps: when detecting that a target application program initiates a target positioning request, determining whether the target application program initiating the target positioning request is located in a preset control list or not; wherein the target location request is to: requesting positioning according to a first positioning mode; if the target application program is located in the preset control list, positioning according to a second positioning mode; wherein power consumption for positioning according to the second positioning mode is lower than power consumption for positioning according to the first positioning mode. Because the power consumption of the terminal equipment for positioning according to the second positioning mode is lower than the power consumption of the terminal equipment for positioning according to the first positioning mode, the power consumption of the terminal equipment due to positioning can be reduced by positioning according to the second positioning mode, and the cruising ability of the terminal equipment is further improved.
Description
Technical Field
The present disclosure relates to the field of electronic devices, and in particular, to a positioning method, an apparatus, and a storage medium.
Background
With the rapid development of communication technology and the increasing improvement of living standard of people, terminals such as smart phones and tablet computers have become an essential part of life of people. Various applications are installed in the intelligent terminal, such as shopping, weather, navigation and other applications. In the process of using the applications, part of the applications request to obtain the current position information of the user so as to provide better service for the user.
In the related art, after the application program acquires the authority of acquiring the position granted by the user, the position information can be used without limitation, so that the condition that part of the application program uses irregular positioning resources is caused, the power consumption of the terminal equipment is greatly improved, and the cruising ability of the equipment is reduced.
Disclosure of Invention
The disclosure provides a positioning method, a positioning device and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a positioning method applied to a terminal device, including:
when detecting that a target application program initiates a target positioning request, determining whether the target application program initiating the target positioning request is located in a preset control list or not; wherein the target location request is to: requesting positioning according to a first positioning mode;
if the target application program is located in the preset control list, positioning according to a second positioning mode;
wherein power consumption for positioning according to the second positioning mode is lower than power consumption for positioning according to the first positioning mode.
Optionally, the method further includes:
and if the target application program is not located in the preset control list, positioning according to the first positioning mode.
Optionally, the method further includes:
acquiring the current reporting period of the target positioning request in the positioning process according to the first positioning mode;
and increasing the reporting period of the target positioning request under the condition that the current reporting period is less than a preset reporting period.
Optionally, the increasing the reporting period of the target location request includes:
and updating the reporting period of the target positioning request to the preset reporting period.
Optionally, the preset control list includes: a first control list and a second control list, wherein the second positioning mode includes: a first sub-mode corresponding to the first control list and a second sub-mode corresponding to the second control list;
if the target application program is located in the preset control list, positioning according to a second positioning mode includes:
determining whether the target application program is located in the first control list;
if the target application program is not located in the first control list, determining whether the target application program is located in the second control list;
if the target application program is located in the second control list, positioning according to the second sub-mode;
and the power consumption for positioning according to the second sub-mode is higher than that for positioning according to the first sub-mode.
Optionally, if the target application is located in the preset control list, the positioning is performed according to a second positioning mode, including:
and if the target application program is positioned in the first control list, positioning according to the first sub-mode.
According to a second aspect of the embodiments of the present disclosure, there is provided a positioning apparatus applied to a terminal device, including:
the determining module is configured to determine whether a target application program initiating a target positioning request is located in a preset control list when the target application program initiating the target positioning request is detected; wherein the target location request is to: requesting positioning according to a first positioning mode;
the first positioning module is configured to perform positioning according to a second positioning mode if the target application program is located in the preset control list;
wherein power consumption for positioning according to the second positioning mode is lower than power consumption for positioning according to the first positioning mode.
Optionally, the apparatus further comprises:
and the second positioning module is configured to perform positioning according to the first positioning mode if the target application program is not located in the preset control list.
Optionally, the apparatus further comprises:
an obtaining module configured to obtain a current reporting period of the target positioning request during positioning according to the first positioning mode;
and the adjusting module is configured to increase the reporting period of the target positioning request under the condition that the current reporting period is less than a preset reporting period.
Optionally, the adjusting module is configured to:
and updating the reporting period of the target positioning request to the preset reporting period.
Optionally, the preset control list includes: a first control list and a second control list, wherein the second positioning mode includes: a first sub-mode corresponding to the first control list and a second sub-mode corresponding to the second control list;
the first positioning module is configured to:
determining whether the target application program is located in the first control list;
if the target application program is not located in the first control list, determining whether the target application program is located in the second control list;
if the target application program is located in the second control list, positioning according to the second sub-mode;
and the power consumption for positioning according to the second sub-mode is higher than that for positioning according to the first sub-mode.
Optionally, the first positioning module is configured to:
and if the target application program is positioned in the first control list, positioning according to the first sub-mode.
According to a third aspect of the embodiments of the present disclosure, there is provided a positioning apparatus including:
a processor and a memory for storing executable instructions operable on the processor, wherein:
the processor is configured to execute the executable instructions, and the executable instructions perform the steps of the method provided in any one of the above first aspects.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored therein computer-executable instructions that, when executed by a processor, implement the steps of the method provided in any one of the above-mentioned first aspects.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, a preset management and control list may be preset to manage and control an application program, when a target location request for requesting location according to a first location mode is detected, the target location request is not directly located according to the first location mode, but whether the target application program is located in the preset management and control list is determined first, if the target application program is located in the preset management and control list, it is indicated that the target application program meets a condition for location according to a second location mode, at this time, location may be directly performed based on the second location mode, because power consumption for location of a terminal device according to the second location mode is lower than power consumption for location according to the first location mode, the second location mode is opened to perform location, power consumption for location of the terminal device due to location can be reduced, and then endurance of the terminal device is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a first flowchart illustrating a positioning method according to an exemplary embodiment.
Fig. 2 is a schematic diagram of a network architecture system, shown in accordance with an example embodiment.
Fig. 3 is a flowchart illustrating a positioning method according to an exemplary embodiment.
FIG. 4 is a schematic diagram illustrating a positioning device according to an exemplary embodiment.
FIG. 5 is a block diagram illustrating a positioning device 1200 according to an exemplary embodiment.
FIG. 6 is a block diagram illustrating another apparatus 1300 for locating according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The embodiment of the present disclosure provides a positioning method, and fig. 1 is a first flowchart illustrating a positioning method according to an exemplary embodiment, as shown in fig. 1, the positioning method includes the following steps:
in step 101, when it is detected that a target application program initiates a target positioning request, determining whether the target application program initiating the target positioning request is located in a preset control list; wherein the target location request is to: requesting positioning according to a first positioning mode;
in step 102, if the target application program is located in the preset control list, positioning according to a second positioning mode;
wherein power consumption for positioning according to the second positioning mode is lower than power consumption for positioning according to the first positioning mode.
It should be noted that the positioning method may be applied to any terminal device, where the terminal device may include a mobile terminal and a fixed terminal, where the mobile terminal may include: a smart phone, a tablet computer, or a wearable electronic device, etc. The fixed terminal may include: personal computers, servers, etc.
In the embodiment of the present disclosure, the application program may refer to: the terminal device may interact with the user through an application, and the application may have a visual user interface. In some embodiments, the applications in the present disclosure may be of various types, for example, the applications may include: shopping applications, weather applications, navigation applications, and the like. In the process of using the application program, the location information of the terminal device is sometimes acquired for the convenience of the user.
In the embodiment of the present disclosure, when it is detected that an application program initiates a target location request, it may be determined whether the target application program initiating the target location request is located in a preset control list, and if the target application program is located in the preset control list, location is performed according to a second location mode. The target positioning request is used for requesting positioning according to a first positioning mode.
Here, the first positioning mode may include: a Global Navigation Satellite System (GNSS) positioning mode, a network positioning mode, and the like. The second positioning mode may include: a cache locate mode, a network locate mode, a bluetooth locate mode, etc. As long as the power consumption of the terminal device for positioning according to the second positioning mode is lower than the power consumption of the terminal device for positioning according to the first positioning mode. For example, when the first positioning mode is the gnss positioning mode, the second positioning mode may be the network positioning mode; when the first positioning mode is a network positioning mode, the second positioning mode may be a cache positioning mode, etc.
Here, the preset control list may be preset, application identifiers of the application programs may be stored in each preset control list, and in the implementation process, the target application identifier of the target application program initiating the target location request may be compared with the application identifiers in the preset control list, and whether the target application program is located in the preset control list is determined according to a comparison result.
For example, the similarity between the target application identifier and the application identifier in the preset control list may be determined, and when the similarity between the target application identifier and the application identifier in the preset control list is greater than a preset similarity threshold, it is determined that the target application program is located in the preset control list. Otherwise, if the similarity between the target application identifier and the application identifier in the preset control list is smaller than or equal to the preset similarity threshold, determining that the target application program is not located in the preset control list.
For another example, it may be determined whether an application identifier that is the same as the target application identifier exists in the preset control list, and if the application identifier that is the same as the target application identifier exists in the preset control list, it is determined that the target application program is located in the preset control list. Otherwise, if the preset control list does not have the application identifier which is the same as the target application identifier, determining that the target application program is not located in the preset control list.
In other embodiments, different preset control lists may also be preset according to the type of the application program. For example, a corresponding control list can be set for an application program of a shopping type; for another example, a corresponding control list may be set for the navigation type application. In the implementation process, the management of the application program may be implemented through different control lists, which is not specifically limited herein.
Fig. 2 is a schematic diagram of a network architecture system according to an exemplary embodiment, and as shown in fig. 2, a terminal device 201 may obtain satellite positioning information from a satellite positioning engine 202 or network positioning information from a base station 203 when detecting that an application initiates a target positioning request.
In the embodiment of the disclosure, a preset management and control list may be preset to manage and control an application program, when a target location request requesting location according to a first location mode is detected, the target location request is not directly located according to the first location mode, but whether the target application program is located in the preset management and control list is determined first, if the target application program is located in the preset management and control list, it is indicated that the target application program meets a condition of location according to a second location mode, at this time, location may be directly performed based on the second location mode, because power consumption of location of a terminal device according to the second location mode is lower than power consumption of location according to the first location mode, the second location mode is opened for location, which can reduce power consumption of the terminal device due to location, and further improve cruising ability of the terminal device.
In some embodiments, the application programs in the present disclosure include: foreground applications running at the front end of the terminal equipment and background applications running at the rear end of the terminal equipment. In the embodiment of the disclosure, the method and the device are not limited to the management and control of the background application, and can also manage and control the foreground application, so that the power consumption problem caused by position updating can be reduced.
In some embodiments, the method further comprises:
and if the target application program is not located in the preset control list, positioning according to the first positioning mode.
In the embodiment of the disclosure, under the condition that the target application program is not located in the preset control list, the positioning may be performed according to the first positioning mode. Taking the example that the first positioning mode is a GNSS positioning mode and the second positioning mode is a network positioning mode, if the target application program is not located in the preset control list, the positioning can be directly performed according to the GNSS positioning mode, and in the GNSS positioning mode, the terminal device can directly obtain the position information of the terminal device through a satellite positioning engine, thereby realizing the positioning of the terminal device.
It should be noted that, if the target application is not located in the preset control list, the requirement of the target application for the positioning accuracy is high, and at this time, the positioning accuracy for positioning according to the second positioning mode may not meet the requirement of the target application. In the embodiment of the disclosure, under the condition that the target application program is not located in the preset control list, the positioning can be directly performed according to the first positioning mode, and then the accuracy of positioning the terminal device is improved.
In some embodiments, the method further comprises:
acquiring the current reporting period of the target positioning request in the positioning process according to the first positioning mode;
and increasing the reporting period of the target positioning request under the condition that the current reporting period is less than a preset reporting period.
Here, in the process of performing positioning according to the first positioning mode, a current reporting period of the target positioning request may be obtained, and the current reporting period may be increased when the current reporting period is smaller than a preset reporting period. The preset reporting period may be set as required, for example, may be set to 5 seconds(s), 3s, and the like.
In the embodiment of the present disclosure, the current reporting period of the target location request may be compared with a preset reporting period, and when the current reporting period is smaller than the preset reporting period, that is, a time interval between each target location request is smaller (the current reporting period is smaller), the current reporting period is increased. By increasing the reporting period of the target positioning request, the frequency of processing the target positioning request can be reduced, and further the power consumption caused by positioning is reduced.
In some embodiments, the increasing the reporting period of the target location request includes:
and updating the reporting period of the target positioning request to the preset reporting period.
Here, the reporting period may be: and reporting the time interval between two adjacent target positioning requests. Taking the current time interval as M seconds and the preset reporting period as N seconds as an example, in the implementation process, if M < N, the reporting period of the target location request may be directly updated to N seconds, where M and N are both positive numbers.
In the embodiment of the disclosure, the reporting period of the target positioning request is updated to the preset reporting period, so that the frequency of processing the target positioning request can be reduced, and further, the power consumption caused by positioning is reduced. And by setting the upper limit value of the reporting period of the target positioning request, the final reporting period is not too large, and the real-time performance and the accuracy of position information acquisition can be ensured on the basis of reducing the power consumption generated by positioning.
In some embodiments, the preset control list includes: a first control list and a second control list, wherein the second positioning mode includes: a first sub-mode corresponding to the first control list and a second sub-mode corresponding to the second control list;
if the target application program is located in the preset control list, positioning according to a second positioning mode includes:
determining whether the target application program is located in the first control list;
if the target application program is not located in the first control list, determining whether the target application program is located in the second control list;
if the target application program is located in the second control list, positioning according to the second sub-mode;
and the power consumption for positioning according to the second sub-mode is higher than that for positioning according to the first sub-mode.
Here, the first sub-mode may include: caching a positioning mode; the second sub-mode may include: network location mode.
In the process of positioning the terminal device according to the cache positioning mode, the preset cache position can be obtained from the preset database, and the preset cache position obtained from the database is determined as the position information of the terminal device. The preset database may be determined according to historical positioning information of the terminal device, for example, in a process of starting the terminal device, the system application may acquire the position information of the terminal device, and after the system application acquires the position information of the terminal device, the position information may be stored in the database as a preset cache position. When the target application program initiates a target positioning request, the position information of the terminal device can be obtained from the database based on the target positioning request.
Taking the case that the terminal device and the base station establish network connection, in the process of acquiring the location information from the preset database, similarity calculation may be performed between the current base station information and the base station information corresponding to each preset cache location in the database, the preset cache location corresponding to the base station information with the similarity greater than the preset similarity is determined as the current location information of the terminal device, and the current location information is sent to the target application program. In other embodiments, the location information of the terminal device may also be determined from the preset database in other manners, which is not limited herein.
In some embodiments, the terminal device may directly send the target location request to the base station in the process of performing location according to the network location mode, so as to obtain location information from the base station; or sending the target positioning request to the wireless router to acquire the position information based on the wireless router; or, the position information is acquired through the Bluetooth module.
In the embodiment of the disclosure, in the implementation process, it may be preferentially determined whether the target application program is located in the first control list, and if the target application program is not located in the first control list, it is further determined whether the target application program is located in the second control list, and if the target application program is located in the second control list, the positioning may be directly performed according to the second sub-mode.
Because the first control list corresponds to the first sub-mode, the second control list corresponds to the second sub-mode, and the power consumption for positioning according to the second sub-mode is higher than the power consumption for positioning according to the first sub-mode, in the embodiment of the present disclosure, it is preferentially determined whether the target application program is located in the control list corresponding to the mode with lower power consumption, so that if the target application program is located in the control list corresponding to the mode with lower power consumption, the target application program can be directly positioned according to the mode with lower power consumption.
When the target application program is not located in the control list corresponding to the mode with lower power consumption (the first sub-mode), whether the target application program is located in the control list corresponding to the mode with higher power consumption (the second sub-mode) is determined, if the target application program is located in the control list corresponding to the second sub-mode, the target application program can be directly located according to the second sub-mode, and compared with the situation that the target application program is located according to the first sub-mode, although the power consumption is increased, the locating accuracy can be improved, and the locating process is more flexible.
In other embodiments, under the condition that the target application program is not located in the first control list or the second control list, the positioning may be directly performed according to the first positioning mode, and compared with performing the positioning according to the first sub-mode or the second sub-mode, the positioning accuracy through the first positioning mode is higher.
In some embodiments, if the target application is located in the preset control list, performing positioning according to a second positioning mode includes:
and if the target application program is positioned in the first control list, positioning according to the first sub-mode.
Because the first control list corresponds to the first sub-mode, the second control list corresponds to the second sub-mode, and the power consumption for positioning according to the second sub-mode is higher than the power consumption for positioning according to the first sub-mode, in the embodiment of the disclosure, it is preferentially determined whether the target application program is located in the control list corresponding to the mode with lower power consumption, so that if the target application program is located in the control list corresponding to the mode with lower power consumption, the target application program can be positioned according to the mode with lower power consumption, and further, the extra power consumption generated due to positioning is reduced.
In some embodiments, the target location request is initiated at the terminal device to request location in a first location mode (e.g., global navigation satellite system location mode) to obtain location information (e.g., satellite location information).
When a target application program requests to acquire satellite positioning information, the terminal device judges whether to send the satellite positioning information to the target application program according to a preset control list, if the target application program is located in a first control list (a primary control list), the terminal device is positioned according to a first sub-mode (such as a cache positioning mode), and a preset cache position is returned to the target application program.
And if the target application program is positioned in a second control list (a secondary control list), positioning according to a second sub-mode (such as a network positioning mode), and returning network position information to the target application program.
If the target application program is not located in the first control list or the second control list, the positioning can be directly performed according to the first positioning mode (satellite positioning mode), and the satellite positioning information is returned to the target application program.
Fig. 3 is a second flowchart illustrating a positioning method according to an exemplary embodiment, where as shown in fig. 3, the positioning method includes the following steps:
in step 301, an application initiated location request is detected.
In step 302, it is determined whether the detected location request is a target location request.
In step 303, if it is determined that the detected location request is a target location request, it is determined whether a target application program initiating the target location request is located in a first regulatory list.
In step 304, if the target application program is located in the first control list, the positioning is performed according to the first sub-mode.
In step 305, it is determined whether a preset cache location corresponding to the target application exists in the preset database.
Here, the first sub-mode may include: and caching the positioning mode. Positioning according to the first sub-mode may include: and determining whether a preset cache position corresponding to the target application program exists in the preset database.
In step 306, if the preset cache location corresponding to the target application exists in the preset database, the preset cache location corresponding to the target application is returned.
In step 307, if there is no preset cache location corresponding to the target application in the preset database, it is determined whether the network location obtained according to the second sub-mode (e.g., the network location mode) is available.
Here, the case where the network location is unavailable includes: the data network function of the terminal equipment is not started, the network connection fails, the network connection is not good, and the like.
In step 308, if a network location is available, the network location is returned.
In step 309, if the target application is not located in the first controlled list, it is determined whether the target application is located in the second controlled list.
In step 310, if the target application program is located in the second control list, the positioning is performed according to the second sub-mode.
Here, in the second sub-mode, step 307 may be performed. In some embodiments, the second sub-mode may include: network location mode. Positioning according to the second sub-mode may include: it is determined whether a network location is available.
Here, if a network location is available, step 308 may be performed.
In step 311, if the network location is not available, the current reporting period of the target location request is obtained.
In step 312, it is determined whether the current reporting period is less than a preset reporting period.
In step 313, if the current reporting period is less than the preset reporting period, the reporting period of the target location request is updated to the preset reporting period.
In step 314, the satellite position information obtained by the satellite positioning engine is returned.
In the embodiment of the disclosure, when an application program initiates a positioning request, it is first determined whether the positioning request is a target positioning request (e.g., whether acquisition of satellite positioning information is requested), if the positioning request is the target positioning request, it is then determined whether a target application program initiating the target positioning request is located in a first control list (primary control list), and if the target application program is located in the first control list (primary control list), the terminal device is positioned according to a first sub-mode (e.g., a cache positioning mode), and a preset cache position is returned to the target application program.
And if the target application program is positioned in a second control list (a secondary control list), positioning according to a second sub-mode (such as a network positioning mode), and returning network position information to the target application program.
If the target application program is not located in the first control list or the second control list, the current reporting period of the target positioning request can be obtained, and if the current reporting period is smaller than the preset reporting period, the reporting period of the target positioning request is updated to the preset reporting period, and the satellite position information obtained by the satellite positioning engine is returned.
Through the embodiment of the disclosure, the power consumption of the satellite positioning engine in the interactive system of the terminal equipment can be effectively reduced to a certain extent, and the target application program can acquire the position information more quickly, so that the user experience is greatly improved.
According to the technical scheme, the background application can be correspondingly controlled, the foreground application can be controlled, and the power consumption problem caused by position updating is reduced to a greater extent; on the basis of ensuring that the position information is obtained, the speed of obtaining the position information is improved, and the user experience is greatly improved; and the position cache in the disclosure does not depend on the three-party application program, so that the flexibility is higher.
The present disclosure also provides a positioning apparatus, fig. 4 is a schematic structural diagram of a positioning apparatus according to an exemplary embodiment, and as shown in fig. 4, the positioning apparatus 400 is applied to a terminal device, and includes:
the determining module 401 is configured to determine, when it is detected that a target application program initiates a target location request, whether the target application program initiating the target location request is located in a preset control list; wherein the target location request is to: requesting positioning according to a first positioning mode;
a first positioning module 402, configured to perform positioning according to a second positioning mode if the target application program is located in the preset control list;
wherein power consumption for positioning according to the second positioning mode is lower than power consumption for positioning according to the first positioning mode.
In some embodiments, the apparatus 400 further comprises:
and the second positioning module is configured to perform positioning according to the first positioning mode if the target application program is not located in the preset control list.
In some embodiments, the apparatus 400 further comprises:
an obtaining module configured to obtain a current reporting period of the target positioning request during positioning according to the first positioning mode;
and the adjusting module is configured to increase the reporting period of the target positioning request under the condition that the current reporting period is less than a preset reporting period.
In some embodiments, the adjustment module is configured to:
and updating the reporting period of the target positioning request to the preset reporting period.
In some embodiments, the preset control list includes: a first control list and a second control list, wherein the second positioning mode includes: a first sub-mode corresponding to the first control list and a second sub-mode corresponding to the second control list;
the first positioning module 402 is configured to:
determining whether the target application program is located in the first control list;
if the target application program is not located in the first control list, determining whether the target application program is located in the second control list;
if the target application program is located in the second control list, positioning according to the second sub-mode;
and the power consumption for positioning according to the second sub-mode is higher than that for positioning according to the first sub-mode.
In some embodiments, the first positioning module 402 is configured to:
and if the target application program is positioned in the first control list, positioning according to the first sub-mode.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 5 is a block diagram illustrating a positioning device 1200 according to an exemplary embodiment. For example, the apparatus 1200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, apparatus 1200 may include one or more of the following components: a processing component 1202, a memory 1204, a power component 1206, a multimedia component 1208, an audio component 1210, an input/output (I/O) interface 1212, a sensor component 1214, and a communications component 1216.
The processing component 1202 generally controls overall operation of the apparatus 1200, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 1202 may include one or more processors 1220 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 1202 can include one or more modules that facilitate interaction between the processing component 1202 and other components. For example, the processing component 1202 can include a multimedia module to facilitate interaction between the multimedia component 1208 and the processing component 1202.
The memory 1204 is configured to store various types of data to support operation at the device 1200. Examples of such data include instructions for any application or method operating on the device 1200, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 1204 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A power component 1206 provides power to the various components of the device 1200. Power components 1206 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for apparatus 1200.
The multimedia components 1208 include a screen that provides an output interface between the device 1200 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1208 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 1200 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The I/O interface 1212 provides an interface between the processing component 1202 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 1214 includes one or more sensors for providing various aspects of state assessment for the apparatus 1200. For example, the sensor assembly 1214 may detect an open/closed state of the device 1200, the relative positioning of the components, such as a display and keypad of the apparatus 1200, the sensor assembly 1214 may also detect a change in the position of the apparatus 1200 or a component of the apparatus 1200, the presence or absence of user contact with the apparatus 1200, an orientation or acceleration/deceleration of the apparatus 1200, and a change in the temperature of the apparatus 1200. The sensor assembly 1214 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 1214 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1214 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communications component 1216 is configured to facilitate communications between the apparatus 1200 and other devices in a wired or wireless manner. The apparatus 1200 may access a wireless network based on a communication standard, such as WiFi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 1216 receives the broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1216 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 1200 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as memory 1204 comprising instructions, executable by processor 1220 of apparatus 1200 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein which, when executed by a processor of a positioning device, enable the positioning device to perform a positioning method, the method comprising:
when detecting that a target application program initiates a target positioning request, determining whether the target application program initiating the target positioning request is located in a preset control list or not; wherein the target location request is to: requesting positioning according to a first positioning mode;
if the target application program is located in the preset control list, positioning according to a second positioning mode;
wherein power consumption for positioning according to the second positioning mode is lower than power consumption for positioning according to the first positioning mode.
FIG. 6 is a block diagram illustrating another apparatus 1300 for locating according to an exemplary embodiment. For example, the apparatus 1300 may be provided as a server. Referring to fig. 6, apparatus 1300 includes a processing component 1322, which further includes one or more processors, and memory resources, represented by memory 1332, for storing instructions, such as application programs, that may be executed by processing component 1322. The application programs stored in memory 1332 may include one or more modules that each correspond to a set of instructions. Further, processing component 1322 is configured to execute instructions to perform the positioning method described above, the method comprising:
when detecting that a target application program initiates a target positioning request, determining whether the target application program initiating the target positioning request is located in a preset control list or not; wherein the target location request is to: requesting positioning according to a first positioning mode;
if the target application program is located in the preset control list, positioning according to a second positioning mode;
wherein power consumption for positioning according to the second positioning mode is lower than power consumption for positioning according to the first positioning mode.
The apparatus 1300 may also include a power component 1326 configured to perform power management for the apparatus 1300, a wired or wireless network interface 1350 configured to connect the apparatus 1300 to a network, and an input-output (I/O) interface 1358. The apparatus 1300 may operate based on an operating system stored in the memory 1332, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (14)
1. A positioning method is applied to terminal equipment and comprises the following steps:
when detecting that a target application program initiates a target positioning request, determining whether the target application program initiating the target positioning request is located in a preset control list or not; wherein the target location request is to: requesting positioning according to a first positioning mode;
if the target application program is located in the preset control list, positioning according to a second positioning mode;
wherein power consumption for positioning according to the second positioning mode is lower than power consumption for positioning according to the first positioning mode.
2. The method of claim 1, further comprising:
and if the target application program is not located in the preset control list, positioning according to the first positioning mode.
3. The method of claim 2, further comprising:
acquiring the current reporting period of the target positioning request in the positioning process according to the first positioning mode;
and increasing the reporting period of the target positioning request under the condition that the current reporting period is less than a preset reporting period.
4. The method of claim 3, wherein increasing the reporting period of the target positioning request comprises:
and updating the reporting period of the target positioning request to the preset reporting period.
5. The method according to claim 1, wherein the preset regulatory list comprises: a first control list and a second control list, wherein the second positioning mode includes: a first sub-mode corresponding to the first control list and a second sub-mode corresponding to the second control list;
if the target application program is located in the preset control list, positioning according to a second positioning mode includes:
determining whether the target application program is located in the first control list;
if the target application program is not located in the first control list, determining whether the target application program is located in the second control list;
if the target application program is located in the second control list, positioning according to the second sub-mode;
and the power consumption for positioning according to the second sub-mode is higher than that for positioning according to the first sub-mode.
6. The method according to claim 5, wherein if the target application is located in the preset control list, performing positioning according to a second positioning mode includes:
and if the target application program is positioned in the first control list, positioning according to the first sub-mode.
7. A positioning device is applied to a terminal device, and comprises:
the determining module is configured to determine whether a target application program initiating a target positioning request is located in a preset control list when the target application program initiating the target positioning request is detected; wherein the target location request is to: requesting positioning according to a first positioning mode;
the first positioning module is configured to perform positioning according to a second positioning mode if the target application program is located in the preset control list;
wherein power consumption for positioning according to the second positioning mode is lower than power consumption for positioning according to the first positioning mode.
8. The apparatus of claim 7, further comprising:
and the second positioning module is configured to perform positioning according to the first positioning mode if the target application program is not located in the preset control list.
9. The apparatus of claim 8, further comprising:
an obtaining module configured to obtain a current reporting period of the target positioning request during positioning according to the first positioning mode;
and the adjusting module is configured to increase the reporting period of the target positioning request under the condition that the current reporting period is less than a preset reporting period.
10. The apparatus of claim 9, wherein the adjustment module is configured to:
and updating the reporting period of the target positioning request to the preset reporting period.
11. The apparatus according to claim 7, wherein the preset control list comprises: a first control list and a second control list, wherein the second positioning mode includes: a first sub-mode corresponding to the first control list and a second sub-mode corresponding to the second control list;
the first positioning module is configured to:
determining whether the target application program is located in the first control list;
if the target application program is not located in the first control list, determining whether the target application program is located in the second control list;
if the target application program is located in the second control list, positioning according to the second sub-mode;
and the power consumption for positioning according to the second sub-mode is higher than that for positioning according to the first sub-mode.
12. The apparatus of claim 11, wherein the first positioning module is configured to:
and if the target application program is positioned in the first control list, positioning according to the first sub-mode.
13. A positioning device, comprising:
a processor and a memory for storing executable instructions operable on the processor, wherein:
the processor is configured to execute the executable instructions, and the executable instructions perform the steps of the method provided by any one of the preceding claims 1 to 6.
14. A non-transitory computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, perform steps in a method as provided by any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110724505.2A CN113473362A (en) | 2021-06-29 | 2021-06-29 | Positioning method, positioning device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110724505.2A CN113473362A (en) | 2021-06-29 | 2021-06-29 | Positioning method, positioning device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113473362A true CN113473362A (en) | 2021-10-01 |
Family
ID=77873602
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110724505.2A Pending CN113473362A (en) | 2021-06-29 | 2021-06-29 | Positioning method, positioning device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113473362A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2480019A1 (en) * | 2011-01-18 | 2012-07-25 | Iniwan GmbH | Provision of a pre-defined content over an open wireless network |
CN105933521A (en) * | 2016-04-22 | 2016-09-07 | 广东小天才科技有限公司 | Method and device for selecting positioning mode by mobile terminal |
CN106131795A (en) * | 2016-08-30 | 2016-11-16 | 维沃移动通信有限公司 | A kind of localization method and mobile terminal |
CN108076429A (en) * | 2017-12-13 | 2018-05-25 | 广东欧珀移动通信有限公司 | Localization method, device, storage medium and mobile terminal |
CN109164477A (en) * | 2018-08-29 | 2019-01-08 | 维沃移动通信有限公司 | A kind of method and mobile terminal of application positioning |
WO2021027466A1 (en) * | 2019-08-13 | 2021-02-18 | 维沃移动通信有限公司 | Positioning method and terminal device |
-
2021
- 2021-06-29 CN CN202110724505.2A patent/CN113473362A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2480019A1 (en) * | 2011-01-18 | 2012-07-25 | Iniwan GmbH | Provision of a pre-defined content over an open wireless network |
CN105933521A (en) * | 2016-04-22 | 2016-09-07 | 广东小天才科技有限公司 | Method and device for selecting positioning mode by mobile terminal |
CN106131795A (en) * | 2016-08-30 | 2016-11-16 | 维沃移动通信有限公司 | A kind of localization method and mobile terminal |
CN108076429A (en) * | 2017-12-13 | 2018-05-25 | 广东欧珀移动通信有限公司 | Localization method, device, storage medium and mobile terminal |
CN109164477A (en) * | 2018-08-29 | 2019-01-08 | 维沃移动通信有限公司 | A kind of method and mobile terminal of application positioning |
WO2021027466A1 (en) * | 2019-08-13 | 2021-02-18 | 维沃移动通信有限公司 | Positioning method and terminal device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10292004B2 (en) | Method, device and medium for acquiring location information | |
CN109204231B (en) | Vehicle unlocking method and device | |
CN107094094B (en) | Application networking method and device and terminal | |
CN105744470B (en) | Positioning information transmission method, apparatus and system | |
CN112291631A (en) | Information acquisition method, device, terminal and storage medium | |
CN110166564B (en) | Information communication method, terminal and storage medium | |
CN109522058B (en) | Wake-up method, device, terminal and storage medium | |
EP2985697A1 (en) | Method and device for controlling router plug-in | |
US20200241572A1 (en) | Drone control method and device, drone and core network device | |
CN106506808B (en) | Method and device for prompting communication message | |
CN109245992B (en) | Request processing method and device, electronic equipment and storage medium | |
CN109885360B (en) | Data processing method, device and storage medium | |
CN107885464B (en) | Data storage method, device and computer readable storage medium | |
US11848885B2 (en) | System information reception method and apparatus, and system information transmission method and apparatus | |
CN103973883B (en) | A kind of method and device controlling voice-input device | |
CN106658412B (en) | Positioning method and device | |
CN107070816B (en) | Application identification method and device and mobile terminal | |
CN112019948A (en) | Intercommunication device communication method, intercommunication device and storage medium | |
CN114430370B (en) | Method, device, equipment and storage medium for determining network slice | |
US20240040637A1 (en) | Connection establishment method and apparatus | |
EP4192089A1 (en) | Mode indication method and apparatus, and a random access method and apparatus | |
CN113473362A (en) | Positioning method, positioning device and storage medium | |
CN113238887A (en) | Data processing method, device and storage medium | |
CN113407569A (en) | Information processing method, device and storage medium | |
CN112769677A (en) | Data synchronization method, data synchronization device, electronic equipment, storage medium and program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |