CN108738117B - Method for optimizing power consumption of application program and terminal - Google Patents

Method for optimizing power consumption of application program and terminal Download PDF

Info

Publication number
CN108738117B
CN108738117B CN201810442909.0A CN201810442909A CN108738117B CN 108738117 B CN108738117 B CN 108738117B CN 201810442909 A CN201810442909 A CN 201810442909A CN 108738117 B CN108738117 B CN 108738117B
Authority
CN
China
Prior art keywords
preset
time
positioning
position information
application program
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.)
Active
Application number
CN201810442909.0A
Other languages
Chinese (zh)
Other versions
CN108738117A (en
Inventor
黄辉
潘德东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing SF Intra City Technology Co Ltd
Original Assignee
Beijing SF Intra City Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing SF Intra City Technology Co Ltd filed Critical Beijing SF Intra City Technology Co Ltd
Priority to CN201810442909.0A priority Critical patent/CN108738117B/en
Publication of CN108738117A publication Critical patent/CN108738117A/en
Application granted granted Critical
Publication of CN108738117B publication Critical patent/CN108738117B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0248Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal dependent on the time of the day, e.g. according to expected transmission activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0264Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by selectively disabling software applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention provides an optimization method and a terminal for electric quantity consumed by an application program, wherein the method comprises the following steps: determining a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount; determining preset positioning time required for acquiring the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation; and performing intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program. The terminal executes the method. The method and the terminal provided by the embodiment of the invention can optimize the electric quantity consumed by the application program.

Description

Method for optimizing power consumption of application program and terminal
Technical Field
The embodiment of the invention relates to the technical field of application program optimization control, in particular to an optimization method and a terminal for power consumption of an application program.
Background
With the wide application of mobile phones, application programs developed based on mobile phones, namely APPs, are also widely used by many users, and some application programs apply a positioning function to acquire position information of the users in real time, but the positioning function consumes much electric quantity of the mobile phones.
For the type of service of an application, such as a taxi taking service, a take-away service, etc., it is necessary to continuously acquire location information of a user (a driver providing the service, a take-away rider, etc.) to supervise a user's walking route, for example, to prevent the driver from not taking a passenger but completing an order, to prevent the take-away rider from not taking a meal to the passenger's hand but confirming completion of a delivery task, etc. In the prior art, the positioning function of the mobile phone is usually continuously turned on, and the inventor finds that: although the intermittent positioning consumes more power in a single execution, the continuous positioning keeps the App busy for a while, and the intermittent positioning saves more power. However, there is no reasonable determination method for the parameters of intermittent positioning, such as the intermittent duration, the positioning duration, etc., which results in excessive power consumption of the application program, and further optimization is needed.
Therefore, how to avoid the above-mentioned drawbacks and optimize the power consumption of the application program becomes a problem to be solved urgently.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides an optimization method for power consumption of an application program and a terminal.
In a first aspect, an embodiment of the present invention provides a method for optimizing power consumption of an application program, where the method includes:
determining a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount;
determining preset positioning time required for acquiring the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation;
and performing intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
In a second aspect, an embodiment of the present invention provides an optimized terminal for consuming power by an application, where the terminal includes:
the determining unit is used for determining the preset moving speed and the preset position variation of the user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount;
the computing unit is used for determining preset positioning time required for acquiring the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation;
and the optimization unit is used for carrying out intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory, and a bus, wherein,
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform a method comprising:
determining a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount;
determining preset positioning time required for acquiring the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation;
and performing intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, including:
the non-transitory computer readable storage medium stores computer instructions that cause the computer to perform a method comprising:
determining a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount;
determining preset positioning time required for acquiring the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation;
and performing intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
According to the method and the terminal for optimizing the electric quantity consumed by the application program, provided by the embodiment of the invention, the electric quantity consumed by the application program can be optimized by obtaining the preset moving speed, the preset position variation and the preset positioning time, calculating the interval time for starting positioning each time, and intermittently controlling the positioning action of the user according to the interval time and the preset positioning time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating a method for optimizing power consumption of an application according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of parameter acquisition for intermittent positioning according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an optimized terminal structure for consuming power by an application according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of an optimization method for power consumption of an application program according to an embodiment of the present invention, and as shown in fig. 1, the optimization method for power consumption of an application program according to an embodiment of the present invention includes the following steps:
s101: determining a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; and acquiring the position information of the user once when the displacement change of the user reaches the preset position change amount.
Specifically, the terminal determines a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; and acquiring the position information of the user once when the displacement change of the user reaches the preset position change amount. An application may be understood as an application installed within a terminal that applies position location technology. The terminal may include a mobile phone, and the service type may be a shared bicycle, a take-out meal delivery, a taxi trip, and the like, for example, as follows:
for the type of the take-away meal delivery service, the preset moving speed of the user can be set to be 10 kilometers per hour; for the type of taxi trip, the preset moving speed of the user may be set to 40 km/hour. For the business type of take-away food delivery, the preset position variation is 200 meters, namely, when the displacement variation of the take-away knight reaches 200 meters, the position information of the take-away knight is acquired once; for the service type of the shared bicycle, the preset position variation amount can be selected to be 50 meters, namely, the position information of the rider is acquired once every time the displacement variation of the rider of the shared bicycle reaches 50 meters. The location information may be geographic coordinates, latitude and longitude, etc.
S102: determining preset positioning time required for acquiring the position information; and calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation.
Specifically, the terminal determines preset positioning time required for acquiring the position information; and calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation.
The specific manner of obtaining the preset positioning time may be as follows:
acquiring a plurality of positioning time to be selected; acquiring the total amount of the positioning time to be selected; and if the ratio of the number of the target positioning time to be selected, which is less than or equal to a preset threshold value, to the total number is greater than a preset ratio, taking the average value of the target positioning time to be selected as the preset positioning time. Since the reference value of one M value (corresponding to the candidate bit time) is limited, more candidate bit time is required. For example, 1000 samples are obtained, a preset threshold K is found from the 1000 samples, and if 99.5% (corresponding to a preset proportion) of M values (corresponding to the target candidate positioning time) in the samples are all smaller than or equal to the K value, an average value of the 995M values can be used as the preset positioning time.
The following explains the acquisition of the candidate positioning time:
acquiring initial position information and acquisition time obtained through initial positioning; the acquisition time is the completion time of the initial positioning; comparing the current position with the initial position information, and the current time with the acquisition time; if the comparison result meets the preset condition, taking the time interval between the acquisition time and the current time as the to-be-selected positioning time, wherein the comparison result comprises a first comparison result of the current position and the initial position information and a second comparison result of the current time and the acquisition time; correspondingly, the preset condition includes that the first comparison result is smaller than a preset position threshold, and the second comparison result is smaller than a preset time threshold. Examples are as follows: if the distance (first comparison result) between the initial position information (the position of the terminal obtained by adopting the positioning technology for the first time) and the current position (the current real position of the terminal) is 30 meters, and the time interval between the current time and the acquisition time is 1 minute; and if the preset position threshold is 50 meters and the preset time threshold is 2 minutes, the preset condition is met, and the time interval between the acquisition time and the current time is taken as the to-be-selected positioning time.
If the comparison result does not meet the preset condition, re-executing the initial position information and the acquisition time obtained by the initial positioning, and comparing the current position with the initial position information, and the current time with the acquisition time; and taking the time interval between the acquisition time and the current time as the to-be-selected positioning time until the comparison result meets the preset condition.
Briefly described as follows:
1. and when positioning is started, the mobile phone can start different positioning schemes according to different networks and environments, such as GPRS, GPS and the like.
2. Coordinates are collected. The handset returns to the application the currently collected coordinates, which may be the coordinates of the last fix or may be new.
3. And judging whether the coordinates are good or bad. There are two quality criteria for each coordinate: coordinate time and precision. The closer the coordinate time is to the present, the more valuable it is, the higher the accuracy is. Within 2 minutes, coordinates within 50 meters of precision are high-quality coordinates, and other coordinates are low-quality coordinates;
4. ending the or poll. When inferior coordinates are met, collection is continued; and finishing obtaining the excellent coordinates. The time spent in each process of acquiring the high-quality coordinates is the time of the position to be selected.
The interval time may be calculated according to the following formula:
the interval time is the preset positioning time + the preset position variation/the preset moving speed. Examples are as follows:
FIG. 2 is a schematic diagram of parameter acquisition for intermittent positioning according to an embodiment of the present invention; as shown in fig. 2, the service types of the takeaway service are as an example: suppose a take-away rider is taking a take-away and needs to track his location. His initial location is merchant a, the coordinates are reduced to (0, 0), and a straight road is required to reach the ordering user's destination, the coordinates are (0, 600) in meters. Assuming that the speed is 30km/h (corresponding to the preset moving speed) on average, and the distance accuracy is 200M (corresponding to the preset position variation) according to the service requirement, then T is 200 × 3.6/30 is 24s (corresponding to the positioning waiting time), assuming that M is 10s (corresponding to the preset positioning time), the distance for which positioning continues (i.e., the distance that the takeaway rider moves within the positioning action duration) is Dis 30/3.6 × 10 is 83.3M, and finally N (corresponding interval time) is M + T is 34 s, i.e., positioning is started every 34 s, continues for 10s (corresponding to the positioning action duration), and positioning continues after 24s (corresponding to the positioning waiting time).
S103: and performing intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
Specifically, the terminal intermittently controls the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
The following may be used: calculating positioning waiting time (corresponding to 24S in figure 2) according to the interval time (corresponding to the sum of 10S and 24S in figure 2) and the preset positioning time (corresponding to 10S in figure 2); starting the positioning action and starting first timing of the positioning action; when the first timing reaches the preset positioning time (corresponding to 10S in fig. 2), starting second timing of positioning waiting; and when the second timing reaches the positioning waiting time (corresponding to 24S in the figure 2), continuing to start the positioning action, and repeatedly executing. And performing positioning action of the intermittent control user according to the obtained parameters, so that the electric quantity consumed by the application program can be optimized.
According to the method for optimizing the electric quantity consumed by the application program, provided by the embodiment of the invention, the electric quantity consumed by the application program can be optimized by obtaining the preset moving speed, the preset position variation and the preset positioning time, calculating the interval time for starting positioning each time, and intermittently controlling the positioning action of the user according to the interval time and the preset positioning time.
On the basis of the above embodiment, calculating the interval time for enabling positioning each time according to the preset positioning time, the preset moving speed, and the preset position variation includes:
the interval time is calculated according to the following formula:
the interval time is the preset positioning time + the preset position variation/the preset moving speed.
Specifically, the terminal calculates the interval time according to the following formula:
the interval time is the preset positioning time + the preset position variation/the preset moving speed. Reference may be made to the above embodiments, which are not described in detail.
According to the optimization method for the power consumption of the application program, provided by the embodiment of the invention, the interval time of each starting positioning can be reasonably calculated through a specific formula and is used as an intermittent control parameter, so that the optimization control of the power consumption of the application program is realized.
On the basis of the above embodiment, the intermittently controlling the positioning action of the user according to the interval time and the preset positioning time includes:
and calculating the positioning waiting time according to the interval time and the preset positioning time.
Specifically, the terminal calculates the positioning waiting time according to the interval time and the preset positioning time. Reference may be made to the above embodiments, which are not described in detail.
And starting the positioning action and starting first timing of the positioning action.
Specifically, the terminal starts the positioning action and starts a first timing of the positioning action. Reference may be made to the above embodiments, which are not described in detail.
And starting second timing for positioning waiting when the first timing reaches the preset positioning time.
Specifically, the terminal starts a second timing of the positioning wait when the first timing reaches the preset positioning time. Reference may be made to the above embodiments, which are not described in detail.
And when the second timing reaches the positioning waiting time, continuing to start the positioning action and repeatedly executing.
Specifically, the terminal continues to start the positioning action after the second timing reaches the positioning waiting time, and repeatedly executes the positioning action. Reference may be made to the above embodiments, which are not described in detail.
The method for optimizing the power consumption of the application program provided by the embodiment of the invention intermittently controls the positioning action of the user orderly and reasonably through specific parameters, and further can optimize the power consumption of the application program.
On the basis of the above embodiment, the determining the preset positioning time required for acquiring the position information includes:
and acquiring a plurality of positioning time to be selected.
Specifically, the terminal obtains a plurality of positioning time to be selected. Reference may be made to the above embodiments, which are not described in detail.
Acquiring the total amount of the positioning time to be selected; and if the ratio of the number of the target positioning time to be selected, which is less than or equal to a preset threshold value, to the total number is greater than a preset ratio, taking the average value of the target positioning time to be selected as the preset positioning time.
Specifically, the terminal obtains the total amount of the positioning time to be selected; and if the ratio of the number of the target positioning time to be selected, which is less than or equal to a preset threshold value, to the total number is greater than a preset ratio, taking the average value of the target positioning time to be selected as the preset positioning time. Reference may be made to the above embodiments, which are not described in detail.
The method for optimizing the power consumption of the application program provided by the embodiment of the invention can reasonably acquire the preset positioning time, effectively perform intermittent control on the positioning action of the user and further optimize the power consumption of the application program.
On the basis of the above embodiment, the acquiring a plurality of candidate positioning times includes:
acquiring initial position information and acquisition time obtained through initial positioning; the acquisition time is a completion time of the initial positioning.
Specifically, the terminal acquires initial position information obtained through initial positioning and an acquisition time; the acquisition time is a completion time of the initial positioning. Reference may be made to the above embodiments, which are not described in detail.
And comparing the current position with the initial position information, and comparing the current time with the acquisition time.
Specifically, the terminal compares the current position with the initial position information, and the current time with the acquisition time. Reference may be made to the above embodiments, which are not described in detail.
And if the comparison result meets a preset condition, taking the time interval between the acquisition time and the current time as the to-be-selected positioning time.
Specifically, if the terminal judges that the comparison result meets the preset condition, the time interval between the acquisition time and the current time is used as the to-be-selected positioning time. Reference may be made to the above embodiments, which are not described in detail.
According to the method for optimizing the power consumption of the application program, the normal operation of the method is ensured by reasonably acquiring the time of a plurality of positions to be selected.
On the basis of the above embodiment, the method further includes:
if the comparison result does not meet the preset condition, re-executing the initial position information and the acquisition time obtained by the initial positioning, and comparing the current position with the initial position information, and the current time with the acquisition time; and taking the time interval between the acquisition time and the current time as the to-be-selected positioning time until the comparison result meets the preset condition.
Specifically, if the terminal judges that the comparison result does not satisfy the preset condition, the terminal re-executes the acquisition of the initial position information and the acquisition time obtained by the initial positioning, and compares the current position with the initial position information, and the current time with the acquisition time; and taking the time interval between the acquisition time and the current time as the to-be-selected positioning time until the comparison result meets the preset condition. Reference may be made to the above embodiments, which are not described in detail.
The method for optimizing the power consumption of the application program further ensures normal operation of the method by reasonably acquiring a plurality of positioning time to be selected.
On the basis of the above embodiment, the comparison result includes a first comparison result of the current position and the initial position information, and a second comparison result of the current time and the acquisition time; correspondingly, the preset condition includes that the first comparison result is smaller than a preset position threshold, and the second comparison result is smaller than a preset time threshold.
Specifically, the comparison result in the terminal includes a first comparison result of the current position and the initial position information, and a second comparison result of the current time and the acquisition time; correspondingly, the preset condition includes that the first comparison result is smaller than a preset position threshold, and the second comparison result is smaller than a preset time threshold. Reference may be made to the above embodiments, which are not described in detail.
According to the method for optimizing the power consumption of the application program, provided by the embodiment of the invention, the multiple to-be-selected positioning time is further reasonably obtained through specific preset conditions, and the normal operation of the method is ensured.
Fig. 3 is a schematic structural diagram of an optimized terminal for consuming power by an application according to an embodiment of the present invention, and as shown in fig. 3, an optimized terminal for consuming power by an application according to an embodiment of the present invention includes a determining unit 301, a calculating unit 302, and an optimizing unit 303, where:
a determining unit 301, configured to determine, according to a service type of an application program, a preset moving speed and a preset location variation of a user corresponding to the service type; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount; a calculating unit 302, configured to determine preset positioning time required for obtaining the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation; an optimizing unit 303, configured to perform intermittent control on the positioning action of the user according to the interval time and the preset positioning time, so as to optimize the electric quantity consumed by the application program.
Specifically, the determining unit 301 is configured to determine, according to a service type of an application program, a preset moving speed and a preset location variation of a user corresponding to the service type; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount; a calculating unit 302, configured to determine preset positioning time required for obtaining the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation; an optimizing unit 303, configured to perform intermittent control on the positioning action of the user according to the interval time and the preset positioning time, so as to optimize the electric quantity consumed by the application program.
According to the terminal for optimizing the electric quantity consumed by the application program, provided by the embodiment of the invention, the electric quantity consumed by the application program can be optimized by obtaining the preset moving speed, the preset position variation and the preset positioning time, calculating the interval time for starting positioning each time, and intermittently controlling the positioning action of the user according to the interval time and the preset positioning time.
The terminal for optimizing power consumption of an application provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the method embodiments, and the functions of the terminal are not described herein again, and refer to the detailed description of the method embodiments.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the electronic device includes: a processor (processor)401, a memory (memory)402, and a bus 403;
the processor 401 and the memory 402 complete communication with each other through a bus 403;
the processor 401 is configured to call the program instructions in the memory 402 to execute the methods provided by the above-mentioned method embodiments, for example, including: determining a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount; determining preset positioning time required for acquiring the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation; and performing intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: determining a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount; determining preset positioning time required for acquiring the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation; and performing intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: determining a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount; determining preset positioning time required for acquiring the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation; and performing intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the electronic device and the like are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for optimizing power consumption of an application program is characterized by comprising the following steps:
determining a preset moving speed and a preset position variation of a user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount;
determining preset positioning time required for acquiring the position information; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation;
according to the interval time and the preset positioning time, intermittently controlling the positioning action of the user to optimize the electric quantity consumed by the application program;
the determining the preset positioning time required for acquiring the position information includes:
acquiring a plurality of positioning time to be selected;
acquiring the total amount of the positioning time to be selected; and if the ratio of the number of the target positioning time to be selected, which is less than or equal to a preset threshold value, to the total number is greater than a preset ratio, taking the average value of the target positioning time to be selected as the preset positioning time.
2. The method according to claim 1, wherein calculating the interval time of each positioning activation according to the preset positioning time, the preset moving speed and the preset position change amount comprises:
the interval time is calculated according to the following formula:
the interval time is the preset positioning time + the preset position variation/the preset moving speed.
3. The method according to claim 1 or 2, wherein said intermittently controlling the positioning action of the user according to the interval time and the preset positioning time comprises:
calculating positioning waiting time according to the interval time and the preset positioning time;
starting the positioning action and starting first timing of the positioning action;
starting second timing for positioning waiting when the first timing reaches the preset positioning time;
and when the second timing reaches the positioning waiting time, continuing to start the positioning action and repeatedly executing.
4. The method of claim 1, wherein the obtaining a plurality of candidate bit times comprises:
acquiring initial position information and acquisition time obtained through initial positioning; the acquisition time is the completion time of the initial positioning;
comparing the current position with the initial position information, and the current time with the acquisition time;
and if the comparison result meets a preset condition, taking the time interval between the acquisition time and the current time as the to-be-selected positioning time.
5. The method of claim 4, further comprising:
if the comparison result does not meet the preset condition, re-executing the initial position information and the acquisition time obtained by the initial positioning, and comparing the current position with the initial position information, and the current time with the acquisition time; and taking the time interval between the acquisition time and the current time as the to-be-selected positioning time until the comparison result meets the preset condition.
6. The method of claim 4, wherein the comparison results comprise a first comparison result of the current position and the initial position information, and a second comparison result of the current time and the obtaining time; correspondingly, the preset condition includes that the first comparison result is smaller than a preset position threshold, and the second comparison result is smaller than a preset time threshold.
7. An optimized terminal for consuming power by an application program, comprising:
the determining unit is used for determining the preset moving speed and the preset position variation of the user corresponding to the service type according to the service type of the application program; so that the position information of the user is acquired once when the displacement change of the user reaches the preset position change amount;
the computing unit is used for determining preset positioning time required for acquiring the position information; the determining the preset positioning time required for acquiring the position information includes: acquiring a plurality of positioning time to be selected; acquiring the total amount of the positioning time to be selected; if the ratio of the number of the target positioning time to be selected, which is less than or equal to a preset threshold value, to the total number is greater than a preset ratio, taking the average value of the target positioning time to be selected as the preset positioning time; calculating the interval time of each positioning starting according to the preset positioning time, the preset moving speed and the preset position variation;
and the optimization unit is used for carrying out intermittent control on the positioning action of the user according to the interval time and the preset positioning time so as to optimize the electric quantity consumed by the application program.
8. An electronic device, comprising: a processor, a memory, and a bus, wherein,
the processor and the memory are communicated with each other through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 6.
CN201810442909.0A 2018-05-10 2018-05-10 Method for optimizing power consumption of application program and terminal Active CN108738117B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810442909.0A CN108738117B (en) 2018-05-10 2018-05-10 Method for optimizing power consumption of application program and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810442909.0A CN108738117B (en) 2018-05-10 2018-05-10 Method for optimizing power consumption of application program and terminal

Publications (2)

Publication Number Publication Date
CN108738117A CN108738117A (en) 2018-11-02
CN108738117B true CN108738117B (en) 2021-02-19

Family

ID=63937207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810442909.0A Active CN108738117B (en) 2018-05-10 2018-05-10 Method for optimizing power consumption of application program and terminal

Country Status (1)

Country Link
CN (1) CN108738117B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069120B (en) * 2019-04-30 2021-04-20 满帮信息咨询有限公司 Positioning equipment control method, system, equipment and medium based on network connection cooperation
CN111768155B (en) * 2020-06-30 2024-03-26 上海木木聚枞机器人科技有限公司 Scheduling control method, intelligent mobile device, server and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200661A (en) * 2013-03-25 2013-07-10 东莞宇龙通信科技有限公司 Mobile terminal positioning method and mobile terminal
CN104661180A (en) * 2013-11-21 2015-05-27 华为终端有限公司 Method for adjusting positioning frequency and terminal
CN105786150A (en) * 2014-12-22 2016-07-20 联想(北京)有限公司 Information processing method and electronic device
CN106125114A (en) * 2016-06-30 2016-11-16 维沃移动通信有限公司 Localization method and mobile terminal
CN106441320A (en) * 2015-08-06 2017-02-22 平安科技(深圳)有限公司 Positioning operation control method, vehicle and electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4926257B2 (en) * 2010-03-03 2012-05-09 株式会社エヌ・ティ・ティ・ドコモ Positioning terminal and server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200661A (en) * 2013-03-25 2013-07-10 东莞宇龙通信科技有限公司 Mobile terminal positioning method and mobile terminal
CN104661180A (en) * 2013-11-21 2015-05-27 华为终端有限公司 Method for adjusting positioning frequency and terminal
CN105786150A (en) * 2014-12-22 2016-07-20 联想(北京)有限公司 Information processing method and electronic device
CN106441320A (en) * 2015-08-06 2017-02-22 平安科技(深圳)有限公司 Positioning operation control method, vehicle and electronic device
CN106125114A (en) * 2016-06-30 2016-11-16 维沃移动通信有限公司 Localization method and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
针对手机动态定位精度不高的改进方案;百度文库;《百度文库》;20170523;全文 *

Also Published As

Publication number Publication date
CN108738117A (en) 2018-11-02

Similar Documents

Publication Publication Date Title
US11102618B2 (en) Smart signaling of location updates for arrival estimation and generation of arrival alerts
CN108765933B (en) Method, device, equipment and storage medium for recommending boarding points
US20180225796A1 (en) Resource Allocation in a Network System
US11948464B2 (en) Real-time service provider progress monitoring
CN105333880A (en) Communication terminal and prompting method and device
AU2016250168A1 (en) Fare determination system for on-demand transport arrangement service
US20180314998A1 (en) Resource Allocation in a Network System
WO2014161345A1 (en) System and method for processing location data of target user
CN108399460B (en) Network taxi booking order distribution processing method and server
CN108154566B (en) Intelligent card punching method and device
CN110782301A (en) Order combining method and device, electronic equipment and computer readable storage medium
CN108738117B (en) Method for optimizing power consumption of application program and terminal
CN111814069A (en) Information processing method, information processing apparatus, storage medium, and electronic device
JP2014002672A (en) Information processing system, information processing method, and program
AU2018217973A1 (en) Dynamic selection of geo-based service options in a network system
CN111866073A (en) Service site push analysis method and device, electronic equipment and storage medium
CN115988421A (en) Time weight clustering-based occupational and residential area estimation method and device
CN111626801A (en) Order distribution method and device, electronic equipment and computer storage medium
JP6029864B2 (en) Information processing system, information processing method, and program
CN106936881B (en) Information pushing method and device based on geographic position
CN111860931A (en) Arrival time reminding method, device, equipment and storage medium
CN111242711A (en) Information prompting method and device, electronic equipment and storage medium
CN113129102B (en) Delayed order dispatching method and device, electronic equipment and storage medium
CN111222727A (en) Service information adjusting method and device, electronic equipment and storage medium
CN112465331A (en) Riding safety control method, model training method, device, equipment and medium

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
GR01 Patent grant
GR01 Patent grant