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 embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
For further explanation of the present application, the following examples are provided:
fig. 1 shows a flow chart of a method for determining a time duration for recording a user movement according to an exemplary embodiment of the present invention; as shown in fig. 1, the method comprises the following steps:
step 101, when the electronic device is detected to be in a motion mode, determining a first group of function modules which are currently started by the electronic device.
In an embodiment, the electronic device may be a wearable device such as a smart bracelet, a smart watch, smart glasses, and the like. In an embodiment, in order to conveniently count the power consumption of the electronic device in a unit time, the electronic device may be divided into a plurality of functional modules, and the power consumed by the plurality of functional modules may be monitored by a battery management module on the electronic device. In one embodiment, the first set of function modules may include a GPS module of the electronic device, a sensor module of the electronic device (which may include an acceleration sensor, a gyroscope, a heart rate sensor, a barometric pressure sensor, and the like of the electronic device), a motion calculation module of the electronic device, a non-motion related application resource module of the electronic device, a consumption module of system resources on the electronic device, and an application or resource consumption module that has been currently turned on by the electronic device, such as an application that has been turned on without regard to a motion pattern (e.g., a music application, and the like). In an embodiment, whether the electronic device turns on a motion mode or whether a motion application (app) on the electronic device is turned on may be detected by an operating system of the electronic device, and it is determined that the electronic device is detected to be in the motion mode if the operating system of the electronic device detects that the electronic device turns on the motion mode or that the motion app on the electronic device is already turned on.
Step 102, determining the power consumption of the first group of function modules in a unit time, and determining the current remaining power of the electronic device.
In one embodiment, the power consumption of the first group of functional modules in a unit time can be monitored by a battery management module on the electronic device, and the current remaining power of the electronic device can be obtained by the battery management module.
And 103, determining a first time length for recording the movement of the user of the electronic equipment in the movement mode according to the electric quantity consumption and the residual electric quantity of the first group of function modules in the unit time.
For example, the power consumption of the GPS module in the first group of function modules per unit time is a1, the power consumption of the sensor module per unit time is a2, the power consumption of the motion calculation module per unit time is a3, the power consumption of the non-motion related application resource module of the electronic device per unit time is a4, the power consumption of the application program that is not related to the motion mode and is turned on per unit time is a5, and the current remaining power of the electronic device is W1, then the first time length T1 is W1/(a1+ a2+ a3+ a4+ a 5). It can be understood by those skilled in the art that the present application is not limited to the physical unit of the remaining power and the power consumption, and for example, the physical unit of the remaining power and the power consumption may be embodied in percentage or ampere hour, depending on the battery management module, as long as the remaining power and the power consumption are consistent.
As can be seen from the above description, in the embodiment of the present invention, the first duration for recording the motion of the user in the motion mode of the electronic device is determined according to the power consumption and the remaining power of the first group of function modules in the unit time, so that the motion duration that the remaining power of the electronic device can support can be accurately estimated, and a reference is provided for the user to use the electronic device to perform motion recording.
Fig. 2 shows a flow diagram of a method of determining a time duration for recording a user movement according to a further exemplary embodiment of the present invention; as shown in fig. 2, the method comprises the following steps:
step 201, when the electronic device is detected to be in a motion mode, determining a first group of function modules which are currently started by the electronic device.
The description of step 201 can refer to the description of the embodiment shown in fig. 1, and will not be described in detail here.
Step 202, determining a time point when the electronic device starts a motion mode.
In an embodiment, the point in time at which the electronic device initiates the movement mode may be monitored by the operating system of the electronic device, for example, monitoring that the electronic device initiates the movement mode at 15 pm.
In step 203, the battery management module of the electronic device determines the power consumption of the first group of function modules in a set time period before the time point, and determines the current remaining power of the electronic device.
In one embodiment, the set time period may be customized by the user, for example, 1 hour, and the battery management module may determine the power consumption of the first set of functional modules within 1 hour before 15 hours, that is, the power consumption of the first set of functional modules between 14 hours and 15 hours. The determination manner of the remaining power W1 can be referred to the above description of the embodiment shown in fig. 1, and will not be described in detail here.
And 204, determining the electric quantity consumption of the first group of function modules in unit time according to the electric quantity consumption in the set time period and the time length corresponding to the set time period.
For example, the power consumption a1 of the GPS module in 1 hour is divided by the time length 1 hour, so as to obtain the power consumption a1 of the GPS module in unit time, the power consumption a2 of the sensor module in 1 hour is divided by the time length 1 hour, the power consumption a2 of the sensor module in unit time can be obtained, the power consumption A3 of the motion calculation module in 1 hour is divided by the time length of 1 hour, the power consumption A3 of the exercise calculation module in unit time can be obtained, the power consumption A4 of the non-exercise related application resource module in 1 hour is divided by the time length 1 hour, the power consumption a4 of the non-motion-related application resource module in unit time can be obtained, the power consumption A5 of the motion-mode-independent application program in 1 hour is divided by the time length of 1 hour, the power consumption a5 of the application program in unit time is obtained, which is not related to the motion mode.
Step 205, dividing the remaining power by the power consumption of the first group of function modules in unit time to obtain a first duration for recording the user motion of the electronic device in the motion mode.
The sum of a1, a2, a3, a4 and a5 obtained in the step 204 is calculated, and the remaining power W1 is divided by the sum, so that the first time length T1 is W1/(a1+ a2+ a3+ a4+ a 5).
In this embodiment, the movement duration that the remaining power of the electronic device can support can be accurately estimated by counting the power consumption of each functional module in the first group of functional modules in unit time, so that the estimation of the first duration is more accurate and reasonable.
FIG. 3 shows a flowchart of a method of determining a time period for recording a user movement according to yet another exemplary embodiment of the present invention; as shown in fig. 3, the method comprises the following steps:
step 301, determining whether the first time length is less than a first preset time length, if the first time length is less than the first preset time length, executing step 302, and if the first time length is greater than or equal to the first preset time length, executing step 309, wherein the first preset time length is a time length which is preset by a user of the electronic device and needs to move.
In an embodiment, the first preset time period may be used to indicate a time length that the user needs to move in the current movement mode, for example, if the user needs to move for 45 minutes, the first preset time period is 45 minutes.
Step 302, if the first duration is less than a first preset duration, determining a second group of functional modules that the electronic device can be turned off in the motion mode from the first group of functional modules.
Step 303, the second group of function modules is closed.
In step 302 and step 303, in an embodiment, if the first duration calculated by the embodiment shown in fig. 1 or fig. 2 is 30 minutes, it indicates that the current remaining power of the electronic device can only support power consumption of 30 minutes, in this case, the electronic device cannot support the user to record all motion processes of 45 minutes, and therefore, the electronic device may determine an application program unrelated to motion from the currently running function modules, for example, the first group of function modules in the embodiment shown in fig. 2 includes: the GPS module, the sensor module, the motion calculation module, the non-motion related application resource module, and the motion mode independent application program may be determined from the first set of function modules that the motion mode independent application program (e.g., music application program, etc.) may be turned off, and then the motion mode independent application program may be determined to be included in the second set of function modules.
And step 304, after the second group of function modules is closed, determining a third group of function modules which are left to be opened by the electronic equipment.
For example, the third set of functional modules may include: the system comprises a GPS module, a sensor module, a motion calculation module and a non-motion related application resource module.
And 305, determining a second time length for recording the user movement of the electronic equipment in the movement mode according to the electric quantity consumption and the residual electric quantity of the third group of functional modules in the unit time.
In an embodiment, the calculation manner of the second time duration may refer to the calculation manner of the first time duration, and the embodiment is not described in detail.
Step 306, determining whether the second time length is less than a second preset time length, if the second time length is less than the second preset time length, executing step 307, if the second time length is greater than or equal to the second preset time length, executing step 308, where the second preset time length is a time length preset by a user of the electronic device, the time length being required to charge the electronic device, and the second preset time length being less than the first preset time length.
In an embodiment, the second preset time period may be used to indicate a time length that needs to be charged and is set by a user to avoid automatic shutdown of the electronic device, for example, when the time length that the electronic device is 10 minutes away from the automatic shutdown is 10 minutes, the second preset time period is 10 minutes.
And 307, if the second time length is less than a second preset time length, generating a prompt message that the motion record of the electronic equipment is incomplete, and ending the process.
And 308, displaying the second duration on a display screen of the electronic equipment, and ending the process.
Step 309, displaying the first duration on the display screen of the electronic device, and ending the process.
In this embodiment, when the first duration is less than the first preset duration, the second group of function modules that the electronic device can be turned off in the motion mode is determined from the first group of function modules, so that power consumption of the electronic device can be reduced, the endurance time of the electronic device is increased, and the motion process of the user can be recorded completely as much as possible. Through the display of the first duration and the second duration on the display screen, the user can accurately predict the time length that the electronic equipment can record, and the experience of the user in using the electronic equipment is improved.
Taking an electronic device as an intelligent watch as an example, an application scenario of the method is exemplarily described as follows:
(1) when the user carries out outdoor exercises, always worry that the residual capacity of intelligent wrist-watch can not support user's whole motion process, can ensure through this application that the user is accurate to know the motion of electronic equipment is long to make the user confirm according to the motion is long whether intelligent wrist-watch can support the motion and finish, and make intelligent wrist-watch accomplish once complete record, perhaps can start the function of GPS navigation.
(2) Before the user carries out the marathon motion, whether the smart watch can record a complete marathon journey needs to be accurately known, so that the user is guided to use, and the smart watch needs to be charged and the like.
Corresponding to the method for determining the time length for recording the user movement, the present application also proposes a schematic structure diagram of an electronic device according to an exemplary embodiment of the present application, shown in fig. 4. Referring to fig. 4, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required by other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program, and a device for determining the movement duration is formed on the logic level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Fig. 5 is a schematic structural diagram illustrating an apparatus for determining a time period for recording a user's movement according to an exemplary embodiment of the present invention; as shown in fig. 5, the determining means for recording the user movement time period may include: a first determining module 51, a second determining module 52, and a third determining module 53. Wherein:
a first determining module 51, configured to determine, when it is detected that the electronic device is in a motion mode, a first group of function modules that are currently turned on by the electronic device;
a second determining module 52, configured to determine the power consumption of the first group of function modules determined by the first determining module 51 in a unit time, and determine the current remaining power of the electronic device;
and a third determining module 53, configured to determine, according to the power consumption of the first group of function modules in the unit time determined by the second determining module 52 and the remaining power determined by the second determining module 52, a first duration for recording the motion of the user in the motion mode of the electronic device.
Fig. 6 illustrates a schematic configuration diagram of an apparatus for determining a time period for recording a user's movement according to still another exemplary embodiment of the present invention; as shown in fig. 6, on the basis of the embodiment shown in fig. 5, the second determining module 52 may include:
a first determination unit 521, configured to determine a time point when the electronic device starts a motion mode;
a second determination unit 522 for determining, by the battery management module of the electronic device, the power consumption of the first group of function modules within a set period of time before the time point determined by the first determination unit 521;
a third determining unit 523, configured to determine the power consumption of the first group of function modules in the unit time according to the power consumption in the set time period determined by the second determining unit 522 and the time length corresponding to the set time period.
In one embodiment, the third determining module 53 may include:
the division unit 531 is configured to divide the remaining power determined by the second determining module 52 by the power consumption of the first group of functional modules determined by the second determining module 52 in the unit time, so as to obtain a first duration for recording the user movement of the electronic device in the movement mode.
Fig. 7 illustrates a schematic configuration diagram of an apparatus for determining a time period for recording a user's movement according to still another exemplary embodiment of the present invention; as shown in fig. 7, on the basis of the above-mentioned embodiments shown in fig. 5 or fig. 6, the apparatus may further include:
a fourth determining module 54, configured to determine whether the first time period determined by the third determining module 53 is less than a first preset time period, where the first preset time period is a time period that needs to be moved and is preset by a user of the electronic device;
a fifth determining module 55, configured to determine, if the fourth determining module 54 determines that the first time period is less than the first preset time period, a second group of functional modules, which are closable by the electronic device in the exercise mode, from the first group of functional modules;
and a control module 56, configured to turn off the second set of function modules determined by the fifth determination module 55.
In an embodiment, the apparatus may further comprise:
a sixth determining module 57, configured to determine, after the control module 56 turns off the second group of function modules, a third group of function modules that are left to be turned on by the electronic device;
a seventh determining module 58, configured to determine, according to the power consumption and the remaining power of the third set of function modules determined by the sixth determining module 57 in the unit time, a second duration for recording the user movement of the electronic device in the movement mode;
and a display module 59, configured to display the second duration determined by the seventh determining module 58 on a display screen of the electronic device.
In an embodiment, the apparatus may further comprise:
an eighth determining module 60, configured to determine whether the second duration determined by the seventh determining module 58 is less than a second preset duration, where the second preset duration is a time length that needs to be preset by a user of the electronic device to charge the electronic device, and the second preset duration is less than the first preset duration;
and the information prompt module 61 is configured to generate a prompt message that the motion record of the electronic device is incomplete if the eighth determining module 60 determines that the second duration is less than the second preset duration.
The embodiment shows that the method and the device can be convenient for a user to judge the current state of the residual electric quantity of the electronic equipment in advance when the user uses the electronic equipment to move, so that the method and the device can be used for recording the movement time of the user, and the problems that the electronic equipment in the prior art cannot determine the recordable movement time of the user and the movement record is incomplete due to insufficient endurance of the electronic equipment in the movement process of the user are well solved.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.