CN111274113B - State prediction method and device and mobile terminal - Google Patents

State prediction method and device and mobile terminal Download PDF

Info

Publication number
CN111274113B
CN111274113B CN202010112890.0A CN202010112890A CN111274113B CN 111274113 B CN111274113 B CN 111274113B CN 202010112890 A CN202010112890 A CN 202010112890A CN 111274113 B CN111274113 B CN 111274113B
Authority
CN
China
Prior art keywords
mobile terminal
time
idle state
preset
state
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
CN202010112890.0A
Other languages
Chinese (zh)
Other versions
CN111274113A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010112890.0A priority Critical patent/CN111274113B/en
Publication of CN111274113A publication Critical patent/CN111274113A/en
Application granted granted Critical
Publication of CN111274113B publication Critical patent/CN111274113B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3471Address tracing
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a state prediction method, a state prediction device and a mobile terminal, and relates to the technical field of computers. The method comprises the following steps: judging whether the mobile terminal is in an idle state currently or not; if yes, the current time and the current position information of the mobile terminal are obtained, and whether the mobile terminal is in an idle state in a time period to be measured after the current time is predicted according to the current time and the current position information. Therefore, the state of the mobile terminal in the time period to be measured can be predicted more accurately.

Description

State prediction method and device and mobile terminal
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a state prediction method, a state prediction device, and a mobile terminal.
Background
The mobile terminal generally needs to be maintained and updated regularly, and because the maintenance and the update occupy a large amount of equipment resources, if a user uses the mobile terminal during the maintenance and the update, problems such as jamming and the like may occur, resulting in poor user experience. Therefore, it is often necessary to predict whether the mobile terminal is in an idle state for a certain period of time, that is, whether it will be used by a user for a certain period of time, so that maintenance, update, etc. are performed on the system of the mobile terminal when the mobile terminal is in an idle state for a certain period of time. However, the existing prediction method for the state of the mobile terminal has low accuracy.
Disclosure of Invention
In view of the above, the present application proposes a state prediction method, a state prediction device, and a mobile terminal, so as to improve the above problem.
In a first aspect, an embodiment of the present application provides a state prediction method, including: judging whether the mobile terminal is in an idle state currently or not; if the mobile terminal is in an idle state, acquiring the current moment and the current position information of the mobile terminal; and predicting whether the mobile terminal is in an idle state in a time period to be measured after the current time according to the current time and the current position information.
In a second aspect, an embodiment of the present application provides a state prediction apparatus, including: the device comprises a judging module, an acquiring module and a predicting module. The judging module is used for judging whether the mobile terminal is in an idle state currently. The acquisition module is used for acquiring the current moment and the current position information of the mobile terminal when the mobile terminal is in an idle state currently. And the prediction module is used for predicting whether the mobile terminal is in an idle state in a time period to be detected after the current moment according to the current moment and the current position information.
In a third aspect, an embodiment of the present application provides a mobile terminal, including: one or more processors; a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having program code stored therein, the program code being callable by a processor to perform the method described above.
Compared with the prior art, the scheme provided by the application judges whether the mobile terminal is in the idle state currently, when the mobile terminal is in the idle state currently, the current time and the current position information of the mobile terminal are acquired, and according to the current time and the current position information, whether the mobile terminal is in the idle state in a time period to be detected after the current time is predicted, so that the accuracy of a prediction result can be improved.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a block diagram of a mobile terminal according to an embodiment of the present application.
FIG. 2 illustrates a flow diagram of a state prediction method according to one embodiment of the present application.
Fig. 3 shows a flow diagram of a state prediction method according to another embodiment of the present application.
Fig. 4 shows a schematic diagram of the substeps of step S210 shown in fig. 3.
Fig. 5 shows a sub-step schematic diagram of step S220 shown in fig. 3.
Fig. 6 shows another sub-step schematic of step S220 shown in fig. 3.
Fig. 7 shows a further sub-step schematic of step S220 shown in fig. 3.
Fig. 8 shows a sub-step schematic diagram of step S240 shown in fig. 3.
Fig. 9 shows another sub-step schematic of step S240 shown in fig. 3.
Fig. 10 shows a block diagram of a state prediction apparatus provided in an embodiment of the present application.
Fig. 11 is a memory unit for storing or carrying program codes for implementing the state prediction method according to the embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application.
In practical applications, the mobile terminal system usually needs to be maintained and updated, and the background service also needs to be cleaned. The system maintenance, updating and background service cleaning generally occupy a large amount of equipment resources, and if the system maintenance, updating or background service cleaning is performed in the process of using the mobile terminal by a user, problems such as blocking, slow reaction and the like of the mobile terminal may be caused, so that the user experience is poor. Therefore, in order to determine the trigger occasions for system maintenance, update and background service cleaning, it is necessary to predict the state of the mobile terminal to determine whether the mobile terminal is in an idle state for a specific period of time.
In the related art, it is generally determined that the mobile terminal is in an idle state when the off-screen duration of the system of the mobile terminal reaches a certain threshold, but the prediction mode is too single and the accuracy is poor.
Through long-term research, the inventor provides a state prediction method and device and a mobile terminal, and the prediction accuracy of the state of the mobile terminal in a specific time period can be improved. This will be described below.
Referring to fig. 1, fig. 1 is a block diagram of a mobile terminal according to an embodiment of the present application. The mobile terminal 100 may be any portable device having a data processing function such as a smart phone, a tablet computer, an electronic book, etc. The mobile terminal 100 in the present application may include one or more of the following components: the processor 110, the memory 120, and one or more programs, wherein the one or more programs may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform the state prediction methods described below.
Processor 110 may include one or more processing cores. The processor 110 connects various parts of the overall mobile terminal 100 using various interfaces and lines, performs various functions of the mobile terminal 100 and processes data by executing or executing execution, programs, code sets, or instruction sets stored in the memory 120, and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 110 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 110 and may be implemented solely by a single communication chip.
The Memory 120 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data created by the mobile terminal 100 in use (such as device status information, history status records, hereinafter), and the like.
It is understood that the structure shown in fig. 1 is merely an example, and that the mobile terminal 100 may also include more or fewer components than shown in fig. 1, or have a completely different configuration than shown in fig. 1. For example, the mobile terminal 100 may further include a communication unit, a display unit, an audio unit, one or more sensors, etc., which may be, for example, one or more of a distance sensor, a light sensor, a motion sensor, to which the embodiments of the present application are not limited.
Referring to fig. 2, fig. 2 is a flowchart of a state prediction method according to an embodiment of the present application, where the method may be applied to the mobile terminal 100 shown in fig. 1, and the method may include the steps shown in fig. 2, which is described in detail below.
Step S110, judging whether the mobile terminal is in an idle state currently. If yes, go to step S120; if not, S140 may be performed.
In this embodiment, the idle state refers to a state in which the mobile terminal 100 is not used by the user. The mobile terminal 100 may monitor the usage state of one or more devices of the mobile terminal 100 in real time after the mobile terminal 100 is powered on, so as to determine whether the mobile terminal 100 is currently used by a user according to the usage state of the one or more devices, determine that the mobile terminal 100 is in an idle state when none of the monitored devices is used, and determine that the mobile terminal 100 is not in the idle state when any of the monitored devices is used.
Step S120, obtaining the current time and the current position information of the mobile terminal.
The current time refers to time point information when the mobile terminal is determined to be in an idle state, and the current location information characterizes a geographic location where the mobile terminal 100 is located when the mobile terminal 100 is determined to be in the idle state.
In this embodiment, a certain period of time is generally required in consideration of the change of the position of the user, and correspondingly, a certain period of time is required for the change of the position of the mobile terminal, so the current position information of the mobile terminal can be used as the predicted position information of the mobile terminal in the period to be measured after the current time.
And step S130, predicting whether the mobile terminal is in an idle state in a time period to be measured after the current time according to the current time and the current position information.
It has been found that the location of the user may change with time according to a certain rule, for example, during the working day, the day is usually near the office place, and the night is usually near the home, and correspondingly, the location information of the mobile terminal may also change with time according to the aforesaid rule. It can be seen that different time and locations characterize different usage scenarios where the probability of the user using the mobile terminal is different.
Based on this, in this embodiment, the current location information is used as the predicted location information of the mobile terminal in the time period to be measured after the current time, where the predicted location information and the time period to be measured may define a corresponding usage scenario, so that the probability that the mobile terminal is used by the user in the usage scenario may be determined, and further, whether the mobile terminal is in an idle state may be determined according to the probability.
Step S140, predicting that the mobile terminal is not in an idle state in a preset period of time after the current time.
In this embodiment, when it is monitored that the user is currently using the mobile terminal 100, it may be defaulted that the user will continue to use the mobile terminal 100 for a preset period of time after the current time. The historical use time period of the mobile terminal 100 used by the user for a plurality of times may be counted, the counted historical use time period may be averaged, and the obtained average value may be used as the time period of the preset time period.
Compared with the mode of determining that the mobile terminal is in the idle state when the screen-off duration of the mobile terminal reaches a certain threshold in the related art, the accuracy of the prediction result can be improved through the flow shown in fig. 2, and the specific time period of the mobile terminal in the idle state can be determined, so that the triggering time of system maintenance, updating, background service cleaning and the like can be accurately determined.
Referring to fig. 3, fig. 3 is a flowchart of a state prediction method according to another embodiment of the present application, where the method may be applied to the mobile terminal 100 shown in fig. 1, and the method may include the steps shown in fig. 3. The detailed description is as follows.
Step S210, judging whether the mobile terminal is in an idle state currently. If yes, go to step S220; if not, step S250 may be performed.
The implementation process of step S210 and step S250 is similar to that of step S110 and step S140 in the previous embodiment, and will not be described here again.
Alternatively, in the present embodiment, the mobile terminal 100 may include a display unit and an audio unit. The display unit may be, for example, a display screen of the mobile terminal 100, and the audio unit may be, for example, an audio playing device of the mobile terminal 100. Alternatively, step S210 may be implemented by the flow shown in fig. 4, which is described in detail below.
Step S211, detecting whether the display unit of the mobile terminal is currently used.
The mobile terminal 100 may detect whether the display unit is currently in a bright screen state, determine that the display unit is currently used if the display unit is in the bright screen state, and determine that the display unit is not currently used if the display unit is in the off screen state.
It will be appreciated that it is also possible to determine whether the display unit is currently being used by detecting whether the display unit is currently displaying data, which is not limited in this embodiment.
Step S212, detecting whether the audio unit of the mobile terminal is currently used.
Wherein the mobile terminal 100 may determine whether the audio unit is turned on, if so, whether the audio unit is currently used, and if not, whether the audio unit is not currently used.
It will be appreciated that the above manner is merely an example, and the mobile terminal 100 may also implement step S212 in other manners, for example, may also detect whether there is data transmitted to the audio unit, if so, determine that the audio unit is currently used, and if not, determine that the audio unit is not currently used.
Step S213, if the display unit and the audio unit are not used, determining that the mobile terminal is currently in an idle state.
Step S214, if any one of the display unit and the audio unit is used, determining that the mobile terminal is not currently in an idle state.
In practical applications, at least one of the display unit and the audio unit is typically used during the use of the mobile terminal 100 by a user. Based on this, the state in which the mobile terminal 100 is currently located can be determined through the above-described step S213 and step S214.
Alternatively, it has been found that in some cases, when the mobile terminal 100 runs some applications in the background, the display unit and the audio unit of the mobile terminal may not be used, based on which the number of applications currently running in the mobile terminal 100 may also be detected, and in the case that neither the display unit nor the audio unit is used, if the number of applications currently running in the mobile terminal 100 meets the preset condition, it may be determined that the mobile terminal 100 is currently in an idle state, otherwise, it is determined that the mobile terminal 100 is not currently in an idle state.
The preset condition may be, for example, that the number of applications currently running is less than a preset value, such as 3; as another example, the number of applications currently running may be 0. The present embodiment is not limited thereto.
Step S220, judging whether the mobile terminal is in a preset scene according to the sensor data of the mobile terminal. If yes, go to step S230; if not, step S260 may be performed.
In this embodiment, the preset scenario refers to a scenario in which the probability of using the mobile terminal 100 by the user is smaller, for example, when the mobile terminal 100 is placed in a pocket (such as a clothing pocket, a bag, etc.), and for example, when the mobile terminal 100 is in a motion state, the probability of using the mobile terminal 100 by the user is smaller.
Step S230, obtaining the current time and the current position information of the mobile terminal.
Step S240, predicting whether the mobile terminal is in an idle state in a period to be measured after the current time according to the current time and the current position information.
In this embodiment, the detailed implementation flow of step S230 to step S240 is similar to that of step S120 to step S130 in the previous embodiment, and will not be repeated here.
The time period to be measured may be a first time period after the current time, and the time length of the first time period may be flexibly set, for example, may be 5 minutes, 15 minutes, 1 hour, or the like, which is not limited in this embodiment. The setting may be generally according to a duration required for performing system maintenance, updating, and background service cleaning, for example, the background service cleaning typically needs 3 minutes, then the first period may be set to 15 minutes, and when it is determined that the mobile terminal 100 is in an idle state in the first period after the current time, any 3 minutes may be selected from the first period after the current time to perform background service cleaning, or the middle 3 minutes (for example, the 6 th to 8 th minutes or the 8 th to 10 th minutes) may be selected to perform background service cleaning.
Step S250 predicts that the mobile terminal is not in an idle state for a preset period of time after the current time.
Step S260, determining that the mobile terminal is in an idle state in a second period of time after the current time.
If the mobile terminal 100 is currently in an idle state, i.e., not currently used by a user, and the mobile terminal 100 is in a preset scenario, it may be basically determined that the mobile terminal 100 is not used by the user for a certain period of time after the current time, and thus it may be determined that the mobile terminal 100 is in an idle state for the period of time after the current time. The time length is the time length of the second time period, the time length of the mobile terminal 100 in the preset scene each time may be counted, the counted time lengths are averaged, and the obtained average value may be used as the time length of the second time period.
Alternatively, in this embodiment, the first period of time, the preset period of time, and the second period of time may be the same or different, and are not limited thereto.
Through the flow shown in fig. 3, a preset scene with a smaller probability of using the mobile terminal can be distinguished, so that whether the mobile terminal is in an idle state in a time period to be measured or not is predicted according to the current moment and the current position of the mobile terminal under the condition that the mobile terminal is not used currently and is not in the preset scene, and the accuracy of a prediction result is improved.
As described above, the preset scene may include a scene in which the mobile terminal 100 is placed in a clothing pocket or a bag, or the like, in which case it may be determined whether the mobile terminal 100 is in the preset scene through the flow shown in fig. 5, in other words, in one implementation of the present embodiment, step S220 may be implemented through the flow shown in fig. 5, as described in detail below.
Step S221, obtaining current first detection data of a light sensor of the mobile terminal.
Step S222, acquiring current second detection data of the distance sensor of the mobile terminal.
In this embodiment, the step S221 and the step S222 are not strictly executed, for example, when it is determined that the mobile terminal 100 is currently in the idle state, the two steps may be sequentially executed in a certain order, or the two steps may be executed in parallel, which is not limited in this embodiment.
The first detection data represents the illumination intensity of the environment where the mobile terminal 100 is currently located, and the second detection data represents the distance between the surrounding current barriers of the mobile terminal 100 and the mobile terminal 100.
Step S223, if the first detection data meets the first condition and the second detection data meets the second condition, determining that the mobile terminal is in the preset scene.
In step S224, if the first detection data does not meet the first condition, or the second detection data does not meet the second condition, it is determined that the mobile terminal is not in the preset scene.
In this embodiment, the first condition may be, for example, that the illumination intensity represented by the first detection data is 0, and it is understood that when the illumination intensity represented by the first detection data is not 0, but the difference from 0 is within an error range, for example, less than an error threshold (e.g., 0.5), the first detection data may also be considered to meet the first condition.
The second condition may be, for example, that the distance size of the second detection data characterization is 0. It will be appreciated that when the difference between the distance represented by the second detection data and 0 is within an error range, for example, less than a predetermined distance (e.g., 0.1, 0.2, or 0.5, etc.), the second detection data may still be regarded as meeting the second condition.
In this embodiment, when the first detection data meets the first condition and the second detection data meets the second condition, it is indicated that the mobile terminal 100 is placed in a clothing pocket or a bag, so that it can be determined that the mobile terminal 100 is in a preset scene. Correspondingly, when any one of the first detection data and the second detection data does not satisfy the corresponding condition, the mobile terminal 100 may be considered not to be in the preset scene with a lower probability of use.
Optionally, the preset scene may further include a scene in which the mobile terminal 100 is in a motion state. Based on this, in another implementation of the present embodiment, the mobile terminal 100 may further include a motion sensor, in which case, step S220 may be implemented through the flow shown in fig. 6.
Step S225, judging whether the mobile terminal is in a motion state according to the detection data of the motion sensor of the mobile terminal. If yes, go to step S226; if not, step S227 is performed.
Step S226, determining that the mobile terminal is in a preset scene.
Step S227, determining that the mobile terminal is not in a preset scene.
Alternatively, the motion sensor may be, for example, a speed sensor, a pedometer, or the like, to which the present embodiment is not limited. Taking the case that the motion sensor is a speed sensor as an example, it may be determined that the mobile terminal 100 is in a motion state when the acceleration detected by the speed sensor is not 0, or it is determined that the mobile terminal is not in a motion state. Taking the example where the motion sensor is a pedometer, it may be determined that the mobile terminal 100 is in motion when the step count value of the pedometer changes (e.g., increases).
It will be appreciated that the above description of the motion sensor is by way of example only, and that the motion sensor may also be an acceleration sensor, for example.
Alternatively, in still another implementation manner of the present embodiment, as shown in fig. 7, step S220 may include the following procedure:
step S221, obtaining current first detection data of a light sensor of the mobile terminal.
Step S222, acquiring current second detection data of the distance sensor of the mobile terminal.
Step S223, if the first detection data meets the first condition and the second detection data meets the second condition, determining that the mobile terminal is in the preset scene.
Step S228, if the first detection data does not meet the first condition, or the second detection data does not meet the second condition, determining whether the mobile terminal is in a motion state according to the detection data of the motion sensor of the mobile terminal. If yes, go to step S226; if not, step S227 is performed.
Step S226, determining that the mobile terminal is in a preset scene.
Step S227, determining that the mobile terminal is not in a preset scene.
It will be appreciated that the steps shown in fig. 7 are similar to the implementation flow of the corresponding steps shown in fig. 5 and 6, and will not be repeated here.
Through the flow shown in fig. 7, a preset scene with a low use probability of the mobile terminal 100 can be more accurately distinguished, so that the accuracy of a finally obtained prediction result is improved.
Alternatively, in this embodiment, step S240 may be implemented by the flow shown in fig. 8, which is described in detail below.
Step S241, obtaining a correspondence between each time unit in a preset time period, each preset position class, and a probability value of the mobile terminal in an idle state, where the preset time period includes a plurality of time units.
In this embodiment, the preset time period and the time length of the time units may be flexibly set, and one preset time period may include a plurality of continuous time units. For example, a predetermined period of time may be one week and a unit of time may be one hour. For another example, a predetermined time period may be one day and a time unit may be one minute. For another example, a predetermined time period may be one hour and a time unit may be 1 second or 10 seconds.
In the implementation, the mobile terminal 100 may record the location information of the mobile terminal 100 in each time unit. Wherein, after recording a plurality of position information, the recorded position information may be clustered. The clustering may be implemented by the mobile terminal 100, or the mobile terminal 100 may send the recorded location information to a third party device (e.g., a server), and the third party device performs clustering, and returns a clustering result to the mobile terminal 100. Through the clustering, one or more position classes can be obtained, and the obtained position classes are the preset position classes.
In detail, through the clustering, a plurality of pieces of position information having a distance smaller than a distance threshold value from each other can be divided into one class (also called a "cluster"), which is one position class, each position class having one center.
Step S242, determining, from preset position classes, a position class to which the current position information belongs according to the current position information.
After determining the preset position class, for the subsequently detected position information, the distance between the position information λ and the center of each position class may be calculated, and the position class corresponding to the minimum distance is used as the position class to which the position information λ belongs, and the position information λ is added to the position class to which the position information λ belongs. When new location information is added to a location class, its center can be updated. Based on this, the location class to which the detected location information λ belongs can be determined by the following formula:
wherein clusterirs represents all location classes, l c Represents the center of the c-th position class, DIST (lambda, l c ) Representing the center l of the position information lambda and the c-th position class c The above expression indicates that DIST (lambda, l) c ) And c, obtaining the minimum value.
Optionally, after the clustering, if the number of the subsequently detected location information reaches a certain number (for example, 1000 pieces), the clustering may be performed again, and the preset location class may be updated.
Optionally, in this embodiment, after determining the preset location class through the above clustering, a default location class may be further added, where the default location class includes all location information. When the location information cannot be determined or is not greatly associated with the scene in which the mobile terminal 100 is located, the current location class of the mobile terminal 100 may be directly determined as the default location class.
Step S243, determining the time unit included in the time period to be measured as a target time unit.
The time length of the time period to be measured may be set by a user, or may be set according to a time length required for a process (for example, the above-mentioned background service cleaning, system maintenance, system update, etc.) to be performed. The time period to be measured generally includes at least one time unit, taking the example that the time period to be measured includes 3 time units, taking the current moment as a starting point, and taking 3 time units after the current moment as the target time units.
Step S244, searching probability values corresponding to the target time unit and the current location according to the correspondence, and determining whether the mobile terminal is in an idle state in the time period to be detected according to the searched probability values.
For each target time unit, a target corresponding relation containing the target time unit and the current position class can be found from the equipment state probability information according to the target time unit and the current position class as indexes, and the probability value in the found target corresponding relation is the probability value of the mobile terminal 100 being in the position in the current position class and in the idle state in the target time unit.
Thus, for each target time unit, a corresponding probability value can be found. According to the probability value corresponding to each target time unit, it can be determined whether the mobile terminal 100 is in an idle state in the time period to be measured formed by each target time unit.
In detail, step S244 may include the following procedures:
calculating the product of the searched probability values;
and if the product reaches a probability threshold, determining that the mobile terminal is in an idle state in the time period to be measured.
Wherein the product represents: the probability value that the mobile terminal 100 is in the current location class and in the idle state within the period to be measured.
Illustratively, assuming that the current time is at the kth time unit, the mobile terminal 100 is in the current location class L for a period of time to be measured including n time units after the current time (kth time unit) i And the probability of being in an idle state can be calculated by the following expression:
in the above expression, P ij The device state probability information is shown as follows: a probability value of being in an idle state corresponding to the i-th location class, j-th time unit.
Optionally, before step S241, the state prediction method provided in this embodiment may further include a flow shown in fig. 9, so as to obtain device state probability information of the mobile terminal in a preset time period. The detailed description is as follows.
Step S245, recording the equipment state information of the mobile terminal in each time unit, wherein the equipment state information represents whether the mobile terminal is in an idle state or not.
For example, different identifiers may be employed to indicate an idle state and not in an idle state. For example, when the value of the device state information is 1, it is characterized that the mobile terminal 100 is in an idle state; when the value of the device state information is 0, it is characterized that the mobile terminal 100 is not in the idle state.
In this embodiment, the location information and the device state information of the mobile terminal 100 in the time unit may be recorded for each time unit, and one data record including the time unit, the location information and the device state information of the mobile terminal 100 in the time unit may be formed. Thus, for a preset time period, a plurality of data records corresponding to each time unit in the preset time period one by one can be obtained.
Alternatively, in the process of recording the device state information of the mobile terminal 100, the device state information of the mobile terminal 100 may be monitored in real time, and for each time unit, in the case that the device state information is not changed, the device state information recorded last time is directly obtained as the device state information of the time unit, and in the case that the device state information is changed, the changed device state information is obtained and recorded as the device state information of the time unit. In this way, data operations may be reduced.
Step S246, a history state record of the mobile terminal in each time unit of a plurality of preset time periods is obtained, where the history state record includes the time unit, a location class to which the location information of the mobile terminal in the time unit belongs, and device state information of the mobile terminal in the time unit.
For each data record, the position information in the data record can be updated into the position class to which the position information belongs, so that the corresponding historical state record is obtained. In other words, the history state record corresponding to each time unit includes: the time unit, the location class to which the location information of the mobile terminal 100 in the time unit belongs, and the setting of the mobile terminal in the time unit And (5) preparing state information. For convenience of description, in this embodiment, a history status record may be written as: (L) c T, S), wherein L c The location class is represented, T represents a time cell, and S represents device state information.
From historical state records of the mobile terminal 100 over a plurality of preset time periods in the past, the probability that the mobile terminal 100 is in a location in a particular location class and in an idle state within each time unit of one preset time period can be calculated. Taking a preset time period of one day and a time unit of 1 minute as an example, the history state record of the past m days can be obtained, and for the history state record of the x (x is not less than 1 and not more than m, and m and x are positive integers) th day in m days, a history state matrix A can be obtained x Matrix A x The number of rows equals the number of position classes and the number of columns equals the number of time units comprised in a predetermined time period, in this example the number of minutes comprised in a day.
Wherein for the jth time unit T on the xth day j Let T be j The corresponding history state record is: (L) j ,T j ,S j ) Then it can be derived from matrix A x In determining location class L j A row in which the element is located, and setting the value of the j-th element of the row to S j Wherein if S j Characterizing in an idle state, S j =1, if S j Indicating that it is not in idle state, S j =0. The values for the other elements that are not set may be set to 0. Thus, matrix A x An element other than 0 indicates that the mobile terminal 100 is located in a position class corresponding to a row in which the element is located in a time unit corresponding to a column in which the element is located, and is in an idle state.
Step S247, for each preset location class and each time unit in the preset time period, determining a first number of history state records including the location class and the time unit and the device state information representing the idle state from the obtained history state records, determining the number of the preset time periods as a second number, and calculating a ratio of the first number to the second number as a probability value of the idle state corresponding to the location class and the time unit.
Referring to the description about step S246, when the mobile terminal 100 is at one time unit T of the x-th day j In a certain position class L j When in idle state, then matrix a on day x x In time unit T j Corresponding column, location class L j The value of the element defined by the corresponding row is 1, otherwise 0. Thus, when the element a at the corresponding position in the matrix A for each of m days is to be calculated ij The resulting value is the first number, which represents the number of days in m days that the mobile terminal 100 is in the i-th location class and in the idle state within the j-th minute. Correspondingly, the second number is the number of days m.
The elements in the corresponding positions refer to elements in the same row and column in m matrices a.
Thus, the ratio of the first number to the second number represents a probability value that the mobile terminal 100 is in a position in the ith position class and in an idle state within the jth minute. It will be appreciated that m can be flexibly set as required, and in general, the larger m is, the more accurate the calculated probability value is. Wherein, after the calculated probability values in idle state corresponding to each minute of the day and each position class, all the calculated probability values form the equipment state probability information.
Alternatively, the device state probability information may be a device state probability matrix, where each row corresponds to a location class, each column corresponds to a time unit in a preset time period, and each element represents a probability that the mobile terminal 100 is in a location in the location class corresponding to the row where the element is located and is in an idle state in the time unit corresponding to the column where the element is located.
In this embodiment, the location information of the mobile terminal 100 is converted into the location class through the clustering process, so that the current location class of the mobile terminal 100 can be used as the predicted location class of the time period to be measured after the current time, and the location class represents a location range, so that the accuracy is further improved compared with the case that the current location information of the mobile terminal 100 is directly used as the predicted location information of the time period to be measured.
Further, since the probability value in the above-mentioned device state probability information indicates the joint probability that the mobile terminal 100 is in the specific location class and in the idle state in a certain time unit, when the probability that the mobile terminal is in the location in a certain location class is smaller, the probability value in the device state probability information that the mobile terminal 100 is in the location class and in the idle state in each time unit is also smaller, so that the error caused by taking the current location class of the mobile terminal 100 as the predicted location class of the mobile terminal 100 in the time period to be measured is reduced, in other words, the accuracy of the predicted result is improved.
Referring to fig. 10, a block diagram of a state prediction apparatus according to an embodiment of the present application is shown. The state prediction apparatus 1000 may include: a determination module 1010, an acquisition module 1020, and a prediction module 1030.
The determining module 1010 is configured to determine whether the mobile terminal is currently in an idle state.
Optionally, the determining module 1010 may specifically be configured to: detecting whether a display unit of the mobile terminal is currently used; detecting whether an audio unit of the mobile terminal is currently used; and if the display unit and the audio unit are not used, determining that the mobile terminal is in an idle state.
The acquiring module 1020 is configured to acquire, when the mobile terminal is currently in an idle state, current time and current location information of the mobile terminal.
The prediction module 1030 is configured to predict, according to the current time and the current location information, whether the mobile terminal is in an idle state in a period to be measured after the current time.
Alternatively, the time period to be measured may be a first time period after the current time. The acquisition module 1020 may also be configured to: before acquiring the current time and the current position information of the mobile terminal, if the mobile terminal is in an idle state currently, judging whether the mobile terminal is in a preset scene or not according to the sensor data of the mobile terminal; if the mobile terminal is not in the preset scene, acquiring the current moment and the current position information of the mobile terminal; and if the mobile terminal is in the preset scene, determining that the mobile terminal is in an idle state in a second time period after the current moment.
Optionally, the obtaining module 1020 may be further configured to: acquiring current first detection data of a light sensor of the mobile terminal; acquiring current second detection data of a distance sensor of the mobile terminal; if the first detection data accords with a first condition and the second detection data accords with a second condition, determining that the mobile terminal is in the preset scene; and if the first detection data does not meet the first condition or the second detection data does not meet the second condition, determining that the mobile terminal is not in the preset scene.
Optionally, the obtaining module 1020 may be further configured to: before determining that the mobile terminal is not in the preset scene, judging whether the mobile terminal is in a motion state according to detection data of a motion sensor of the mobile terminal; if the mobile terminal is in a motion state, determining that the mobile terminal is in the preset scene; and if the mobile terminal is not in the motion state, determining that the mobile terminal is not in the preset scene.
Optionally, the prediction module 1030 may specifically be configured to: acquiring a corresponding relation among each time unit in a preset time period, each preset position class and a probability value of the mobile terminal in an idle state, wherein the preset time period comprises a plurality of time units; determining a current position class to which the current position information belongs from preset position classes according to the current position information; determining the time unit included in the time period to be detected as a target time unit; and searching probability values corresponding to the target time unit and the current position class according to the corresponding relation, and determining whether the mobile terminal is in an idle state in the time period to be detected according to the searched probability values.
Optionally, the manner in which the prediction module 1030 determines, according to the found probability value, whether the mobile terminal is in an idle state in the period to be measured may be: calculating the product of the searched probability values; and if the product reaches a probability threshold, determining that the mobile terminal is in an idle state in the time period to be measured.
Optionally, the apparatus 1000 may further comprise a recording module. The recording module is used for: before the prediction module 1030 obtains a correspondence between each time unit in a preset time period, each preset position class, and a probability value that the mobile terminal is in an idle state, recording position information of the mobile terminal in each time unit; and clustering the recorded position information to obtain the preset position class.
Optionally, the recording module may be further configured to record, before the prediction module 1030 obtains a correspondence between each time unit in a preset time period, each preset location class, and a probability value of the mobile terminal being in an idle state, device state information of the mobile terminal in each time unit, where the device state information characterizes whether the mobile terminal is in the idle state; acquiring a history state record of the mobile terminal in each time unit of a plurality of preset time periods, wherein the history state record comprises the time unit, a position class to which position information of the mobile terminal in the time unit belongs and equipment state information of the mobile terminal in the time unit; for each preset position class and each time unit in the preset time period, determining a first number of history state records which comprise the position class and the time unit and are characterized by equipment state information in an idle state from the acquired history state records, determining the number of the preset time periods as a second number, and calculating the ratio of the first number to the second number to be used as a probability value of the position class and the time unit in the idle state.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In the several embodiments provided herein, the illustrated or discussed coupling or direct coupling or communication connection of the modules to each other may be through some interfaces, indirect coupling or communication connection of devices or modules, electrical, mechanical, or other forms.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
Referring to fig. 11, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 1100 has stored therein program code that can be invoked by a processor to perform the methods described in the method embodiments above.
The computer readable storage medium 1100 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, computer readable storage medium 1100 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 1100 has storage space for program code 1110 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 1110 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, one of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (12)

1. A method of state prediction, comprising:
judging whether the mobile terminal is in an idle state currently or not;
if the mobile terminal is in the idle state currently, judging whether the mobile terminal is in a preset scene or not according to the sensor data of the mobile terminal;
if the mobile terminal is not in the preset scene, acquiring the current moment and the current position information of the mobile terminal;
and predicting whether the mobile terminal is in an idle state in a time period to be measured after the current time according to the current time and the current position information.
2. The method of claim 1, wherein the time period to be measured is a first time period after the current time; the method further comprises the steps of:
and if the mobile terminal is in the preset scene, determining that the mobile terminal is in an idle state in a second time period after the current moment.
3. The method according to claim 1, wherein the determining whether the mobile terminal is in a preset scene according to the sensor data of the mobile terminal comprises:
acquiring current first detection data of a light sensor of the mobile terminal;
Acquiring current second detection data of a distance sensor of the mobile terminal;
if the first detection data accords with a first condition and the second detection data accords with a second condition, determining that the mobile terminal is in the preset scene;
and if the first detection data does not meet the first condition or the second detection data does not meet the second condition, determining that the mobile terminal is not in the preset scene.
4. The method of claim 3, wherein prior to said determining that the mobile terminal is not in the preset scene, said determining whether the mobile terminal is in the preset scene based on sensor data of the mobile terminal further comprises:
judging whether the mobile terminal is in a motion state according to detection data of a motion sensor of the mobile terminal;
if the mobile terminal is in a motion state, determining that the mobile terminal is in the preset scene;
and if the mobile terminal is not in the motion state, executing the step of determining that the mobile terminal is not in the preset scene.
5. The method according to any one of claims 1-4, wherein the determining whether the mobile terminal is currently in an idle state comprises:
Detecting whether a display unit of the mobile terminal is currently used;
detecting whether an audio unit of the mobile terminal is currently used;
and if the display unit and the audio unit are not used, determining that the mobile terminal is in an idle state.
6. The method according to any one of claims 1-4, wherein predicting whether the mobile terminal is in an idle state during a time period to be measured after the current time based on the current time and the current location information comprises:
acquiring a corresponding relation among each time unit in a preset time period, each preset position class and a probability value of the mobile terminal in an idle state, wherein the preset time period comprises a plurality of time units;
determining a current position class to which the current position information belongs from preset position classes according to the current position information;
determining the time unit included in the time period to be detected as a target time unit;
and searching probability values corresponding to the target time unit and the current position class according to the corresponding relation, and determining whether the mobile terminal is in an idle state in the time period to be detected according to the searched probability values.
7. The method of claim 6, wherein determining whether the mobile terminal is in an idle state for the time period under test based on the found probability value comprises:
calculating the product of the searched probability values;
and if the product reaches a probability threshold, determining that the mobile terminal is in an idle state in the time period to be measured.
8. The method of claim 6, wherein prior to the acquiring the correspondence between each time unit within the preset time period, each preset location class, and the probability value that the mobile terminal is in an idle state, the method further comprises:
recording the position information of the mobile terminal in each time unit;
and clustering the recorded position information to obtain the preset position class.
9. The method of claim 8, wherein prior to the acquiring the correspondence between each time unit within the preset time period, each preset location class, and the probability value that the mobile terminal is in an idle state, the method further comprises:
recording equipment state information of the mobile terminal in each time unit, wherein the equipment state information represents whether the mobile terminal is in an idle state or not;
Acquiring a history state record of the mobile terminal in each time unit of a plurality of preset time periods, wherein the history state record comprises the time unit, a position class to which position information of the mobile terminal in the time unit belongs and equipment state information of the mobile terminal in the time unit;
for each preset position class and each time unit in the preset time period, determining a first number of history state records which comprise the position class and the time unit and are characterized by equipment state information in an idle state from the acquired history state records, determining the number of the preset time periods as a second number, and calculating the ratio of the first number to the second number to be used as a probability value of the position class and the time unit in the idle state.
10. A state prediction apparatus, comprising:
the judging module is used for judging whether the mobile terminal is in an idle state currently, and judging whether the mobile terminal is in a preset scene according to the sensor data of the mobile terminal if the mobile terminal is in the idle state currently;
the acquisition module is used for acquiring the current moment and the current position information of the mobile terminal if the mobile terminal is not in the preset scene;
And the prediction module is used for predicting whether the mobile terminal is in an idle state in a time period to be detected after the current moment according to the current moment and the current position information.
11. A mobile terminal, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-9.
12. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, which is callable by a processor for performing the method according to any one of claims 1-9.
CN202010112890.0A 2020-02-24 2020-02-24 State prediction method and device and mobile terminal Active CN111274113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010112890.0A CN111274113B (en) 2020-02-24 2020-02-24 State prediction method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010112890.0A CN111274113B (en) 2020-02-24 2020-02-24 State prediction method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN111274113A CN111274113A (en) 2020-06-12
CN111274113B true CN111274113B (en) 2023-07-21

Family

ID=71003666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010112890.0A Active CN111274113B (en) 2020-02-24 2020-02-24 State prediction method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN111274113B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102577528A (en) * 2009-09-16 2012-07-11 三星电子株式会社 Apparatus and method for reducing power consumption in portable terminal
KR20150019646A (en) * 2013-08-14 2015-02-25 삼성전자주식회사 Portable terminal and method for providing user interface in idle mode
CN106455022A (en) * 2016-10-20 2017-02-22 广东欧珀移动通信有限公司 Power saving mode switching method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006356B (en) * 2010-09-27 2013-07-24 浙江大学 Method for detecting state of cell phone pocket by using Android operating system
CN105517025A (en) * 2014-09-22 2016-04-20 中兴通讯股份有限公司 Terminal state processing method and terminal state processing device
CN104660820B (en) * 2015-02-28 2017-07-14 努比亚技术有限公司 The implementation method and mobile terminal of mobile terminal administration pattern
CN107734145B (en) * 2017-09-19 2020-11-17 维沃移动通信有限公司 Method for processing background task, mobile terminal and computer readable storage medium
US10761584B2 (en) * 2018-03-16 2020-09-01 Vigyanlabs Innovations Private Limited System and method to enable prediction-based power management
CN108810272B (en) * 2018-06-07 2020-10-13 中国人民解放军战略支援部队信息工程大学 Behavior recognition model training method and device based on multiple sensors of mobile terminal
CN108965609A (en) * 2018-08-31 2018-12-07 南京宽塔信息技术有限公司 The recognition methods of mobile terminal application scenarios and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102577528A (en) * 2009-09-16 2012-07-11 三星电子株式会社 Apparatus and method for reducing power consumption in portable terminal
KR20150019646A (en) * 2013-08-14 2015-02-25 삼성전자주식회사 Portable terminal and method for providing user interface in idle mode
CN106455022A (en) * 2016-10-20 2017-02-22 广东欧珀移动通信有限公司 Power saving mode switching method and device

Also Published As

Publication number Publication date
CN111274113A (en) 2020-06-12

Similar Documents

Publication Publication Date Title
CN113892087B (en) Third party application performance improvement toolkit
US11893961B2 (en) Automatically adjusting screen brightness based on screen content
CN107567083B (en) Method and device for performing power-saving optimization processing
EP3231199B1 (en) Notifications on mobile devices
CN107729092B (en) Automatic page turning method and system for electronic book
CN111078446A (en) Fault information acquisition method and device, electronic equipment and storage medium
CN109587328B (en) Message management method and device, storage medium and electronic equipment
CN111311014B (en) Service data processing method, device, computer equipment and storage medium
CN115017400A (en) Application APP recommendation method and electronic equipment
CN115408696A (en) Application identification method and electronic equipment
CN115018081B (en) Feature selection method, application program prediction method and device
CN113055984B (en) Terminal control method and device, mobile terminal and storage medium
CN111274113B (en) State prediction method and device and mobile terminal
CN110781052A (en) Offline monitoring method and device, computer equipment and storage medium
CN108234758B (en) Application display method and device, storage medium and electronic equipment
CN113050783B (en) Terminal control method and device, mobile terminal and storage medium
CN113934481A (en) Notification information pushing method, intelligent terminal and storage medium
CN112948223A (en) Method and device for monitoring operation condition
CN113123955A (en) Plunger pump abnormality detection method and device, storage medium and electronic device
CN113473399B (en) Abnormal aggregation event detection method and device, computer equipment and storage medium
US11467936B2 (en) Predicting motherboard connector failures
CN111437609B (en) Plug-in detection method and device
CN113056756B (en) Sleep recognition method and device, storage medium and electronic equipment
CN109451015B (en) Crowd sensing data processing method and device, electronic equipment and storage medium
CN115879359B (en) Electronic component life prediction method, electronic device and storage 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