CN111182615B - Sensor starting method and device, storage medium and terminal - Google Patents

Sensor starting method and device, storage medium and terminal Download PDF

Info

Publication number
CN111182615B
CN111182615B CN201911261831.3A CN201911261831A CN111182615B CN 111182615 B CN111182615 B CN 111182615B CN 201911261831 A CN201911261831 A CN 201911261831A CN 111182615 B CN111182615 B CN 111182615B
Authority
CN
China
Prior art keywords
time
target
starting
terminal
time difference
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
CN201911261831.3A
Other languages
Chinese (zh)
Other versions
CN111182615A (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.)
Baiyin Power Supply Company State Grid Gansu Electric Power Co
Original Assignee
Baiyin Power Supply Company State Grid Gansu Electric Power Co
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 Baiyin Power Supply Company State Grid Gansu Electric Power Co filed Critical Baiyin Power Supply Company State Grid Gansu Electric Power Co
Priority to CN201911261831.3A priority Critical patent/CN111182615B/en
Publication of CN111182615A publication Critical patent/CN111182615A/en
Application granted granted Critical
Publication of CN111182615B publication Critical patent/CN111182615B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0267Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by controlling user interface components
    • H04W52/027Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by controlling user interface components by controlling a display operation or backlight unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3215Monitoring of peripheral devices
    • G06F1/3218Monitoring of peripheral devices of display devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72451User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to schedules, e.g. using calendar applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • 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/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • H04W52/0258Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity controlling an operation mode according to history or models of usage information, e.g. activity schedule or time of day
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
    • 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 application discloses a sensor starting method, a sensor starting device, a storage medium and a terminal. The method comprises the following steps: when a screen-brightening instruction is detected, a time difference value set is obtained, wherein the time difference value set comprises a plurality of time difference values, and the time difference values are as follows: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period; determining a target duration according to a plurality of time differences in the time difference set; and after the terminal is on, starting the light sensor in a delayed mode according to the target duration. The scheme can delay starting the light sensor according to actual conditions, so that the light sensor does not need to be kept in a long-term starting state, and the power consumption of the terminal is reduced.

Description

Sensor starting method and device, storage medium and terminal
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method and apparatus for starting a sensor, a storage medium, and a terminal.
Background
Currently, terminals such as smartphones and tablet computers commonly use a large-screen LCD (Liquid Crystal Display ) for display, and the brightness of the display screen needs to be controlled by backlight. With the increasing use of the terminal, such as chatting, video watching, game playing, etc., the brightness of the display screen is affected by the adjustment of the backlight and the surrounding environment. Therefore, a related detecting device is required to be arranged in the terminal to detect the light of the external environment so as to adjust the brightness level of the terminal under various environments. In the existing terminal, the light detection device needs to be normally opened, so that the terminal power consumption is larger.
Disclosure of Invention
The embodiment of the application provides a sensor starting method, a sensor starting device, a storage medium and a terminal, which can reduce the power consumption of the terminal.
In a first aspect, an embodiment of the present application provides a sensor starting method, which is applied to a terminal, and the method includes:
when a screen-brightening instruction is detected, a time difference value set is obtained, wherein the time difference value set comprises a plurality of time difference values, and the time difference values are as follows: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period;
determining a target duration according to a plurality of time differences in the time difference set;
and after the terminal is on, starting the light sensor in a delayed mode according to the target duration.
In a second aspect, an embodiment of the present application provides a sensor starting device, which is applied to a terminal, and the device includes:
the first obtaining unit is used for obtaining a time difference value set when a screen-brightening instruction is detected, wherein the time difference value set comprises a plurality of time difference values, and the time difference values are as follows: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period;
a first determining unit, configured to determine a target duration according to a plurality of time differences in the time difference set;
and the starting unit is used for delaying the starting of the light sensor according to the target duration after the terminal is on the screen.
In a third aspect, embodiments of the present application also provide a computer readable storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform the above-described sensor activation method.
In a fourth aspect, an embodiment of the present application further provides a terminal, including a processor and a memory, where the processor is electrically connected to the memory, the memory is configured to store instructions and data, and the processor is configured to execute the above-mentioned sensor starting method.
In this application implementation, when detecting the instruction of bright screen, acquire time difference value set, time difference value set includes a plurality of time difference values, the time difference value is: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period; determining a target duration according to a plurality of time differences in the time difference set; and after the terminal is on, starting the light sensor in a delayed mode according to the target duration. The scheme can delay starting the light sensor according to actual conditions, so that the light sensor does not need to be kept in a long-term starting state, and the power consumption of the terminal is reduced.
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 is a schematic flow chart of a sensor starting method according to an embodiment of the present application.
Fig. 2 is another flow chart of a sensor starting method according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a sensor starting device according to an embodiment of the present application.
Fig. 4 is another schematic structural diagram of a sensor starting device according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Fig. 6 is another schematic structural diagram of a terminal provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides a sensor starting method, a sensor starting device, a storage medium and a terminal. Each of which will be described in detail below.
In an embodiment, a method for starting a sensor is provided, which is applied to terminal devices such as a smart phone, a tablet computer, a notebook computer and the like. Referring to fig. 1, the specific flow of the sensor starting method may be as follows:
101. when a screen-brightening instruction is detected, a time difference value set is obtained, wherein the time difference value set comprises a plurality of time difference values, and the time difference values are as follows: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period.
Wherein the historical period refers to any period of time prior to the current time, which may be set by one skilled in the art or the manufacturer of the product. For example, the historical period may be one month, one week in the past; or a period from a certain time to another time in the past. The light sensor may be an ambient light sensor.
In this embodiment, the time of obtaining the ambient light information refers to the time of obtaining the ambient light information by the light sensor for the first time in the current bright screen state after the light sensor is turned on by the bright screen of the terminal. And obtaining a plurality of time difference values by obtaining the time difference between the moment of each terminal screen-lighting in the historical period and the moment of obtaining the ambient light information through the light sensor for the first time in the screen-lighting state, so as to obtain the time difference value set.
For example, in the past month, the time difference between a certain bright screen time of the first day and the time when the ambient light information is acquired by using the optical sensor in the bright screen state is 5 minutes; the time difference between a certain screen-lightening moment and the moment when the ambient light information is acquired by using the optical line sensor in the current screen-lightening state is 10 minutes; the time difference between the next day of another bright screen time and the time when the ambient light information is acquired by using the light sensor in this bright screen state is 20 minutes … … and so on, and the time difference set is obtained by acquiring a plurality of the time differences in the past month.
102. And determining the target duration according to a plurality of time differences in the time difference set.
In this embodiment, the manner of determining the target duration according to the plurality of time differences in the time difference set may be various, and may be according to the present invention. For example, the number of the cells to be processed,
in some embodiments, the step of determining the target duration according to the plurality of time differences in the set of time differences may include the following steps:
(11) Determining a time stage of the terminal screen-lighting moment corresponding to each time difference value;
(12) Acquiring a time distance between a time stage and a current moment;
(13) Determining corresponding weight configuration information based on the time distance;
(14) And weighting the time differences according to the weight configuration information to obtain the target duration.
Specifically, the historical period needs to be divided into a plurality of time phases in advance, and the time phase corresponding to each time difference value is determined. For example, the history period is one month in the past, and the past month is divided into thirty time phases, each of which is one day. And if the terminal screen-lighting time corresponding to the time difference value acquired on the first day is 12:00, the time stage in which the terminal screen-lighting time is positioned is in the first time stage, and if the terminal screen-lighting time corresponding to the time difference value acquired on the second day is 18:00, the time stage in which the terminal screen-lighting time is positioned is in the second time stage, and so on.
The time distance between the time phase and the current time may be specifically obtained by obtaining an intermediate time of the time phase, and calculating a distance between the intermediate time and the current time as the time distance.
Different weights may then be matched for each time difference based on the length of the time distance. In practical application, the shorter the time distance is, the higher the corresponding matched weight value is. And finally, weighting the time differences based on the weight information matched with the time differences, so as to obtain the target duration.
In some embodiments, when determining the target duration according to a plurality of time differences in the time difference set, an average value of the plurality of time differences may be specifically obtained, and the average time value obtained by the processing is taken as the target duration.
103. And after the terminal is on, the light sensor is started in a delayed mode according to the target duration.
Specifically, after the terminal is triggered to lighten the screen in response to the screen lightening instruction, the light sensor can be started in a delayed manner according to the calculated target duration. For example, if the target duration is 10 minutes, the light sensor is started after the terminal is on for 10 minutes, so that the power consumption of the light sensor in the 10 minutes is saved, and the power consumption of the terminal is reduced.
In some embodiments, the information of the current bright screen and the information of the light sensor can be recorded as a sample so as to optimize the delayed start time of the light sensor later. That is, referring to fig. 2, after the light sensor is activated based on the target time period delay, the following procedure may be further included:
104. determining a first moment when a terminal is on;
105. after the light sensor is determined to be started, acquiring the second moment of the ambient light information through the light sensor;
106. acquiring a target time difference value between a first moment and a second moment;
107. the set of time differences is updated based on the target time difference.
Specifically, the time difference between the time when the terminal is on the screen and the time when the light sensor is used for acquiring the ambient light information for the first time in the state of the screen on the screen can be used as a time sample to be updated into the time difference set.
In practical application, when the number of samples in the time difference set reaches a certain value, the time difference with relatively long time can be deleted from the time difference set according to the sequence of the acquisition time from first to last, so as to ensure the validity of the data in the time difference set.
In some embodiments, after detecting the bright screen instruction, before acquiring the time difference value set, the following flow may be further included:
(21) Acquiring current geographic position information of a terminal and geographic position change information in a designated period;
(22) Acquiring starting information of the light sensor in a specified period;
(23) Analyzing the relationship among the current geographic position information, the geographic position change information and the starting information;
(24) When the relationship satisfies the condition, the light sensor is prohibited from being activated.
Specifically, the change information of the geographic position of the terminal in the specified period and the change condition of the starting information of the light sensor in the specified period can be collected. For example, when the terminal is at site a, how the sensor activation information is; in the process from the site A to the site B, how the starting information of the sensor changes, and so on.
By analyzing the change information of the geographic position of the terminal and the change condition of the starting information of the light sensor, whether the starting information of the sensor in the current state meets the requirement of the current geographic position can be deduced, and if so, the light sensor does not need to be started.
For example, the terminal turns on the light sensor at the place a, and makes an adjustment of the screen brightness based on the data detected by the light sensor, and then turns off the terminal screen and moves to the place B. The terminal does not illuminate the screen at location B and does not activate the light sensor. And returning to the place A, wherein the user uses the terminal to light the screen, and the light sensor is not used after the user reaches the place A for the first time to adjust the screen brightness, so that the screen brightness still meets the requirement of the current place A, and the light sensor is not required to be started to detect the ambient light information to adjust the screen brightness. Thus, activation of the light sensor may be inhibited.
In some embodiments, the startup information includes a startup state and a shutdown state. The step of analyzing the relationship among the current geographic location information, the geographic location change information and the start information may include the following procedures:
determining the corresponding relation between geographic position change information and starting information at each time point in a designated period;
when the current geographic position is matched with any target geographic position in the changed geographic positions, acquiring a target time point corresponding to the target geographic position;
if the light sensor corresponding to the target geographic position is in a starting state, acquiring target starting information from a target time point to the ending time of the appointed period;
when the starting state does not exist in the target starting information, the judgment relation meets the preset condition.
Specifically, when analyzing the relationship among the current geographic position information, the geographic position change information and the starting information, the corresponding relationship between the historical geographic position change information and the starting information condition under the same time system can be constructed first. Then, based on the current geographic position of the terminal, whether the matched target geographic position can be found or not is seen from the corresponding relation. If so, determining the starting information of the light sensor at the latest time point (namely the target time point) corresponding to the target geographic position and the starting information change condition after the target time point.
If the starting information at the target time point is in a starting state and then is kept in a closing state all the time, judging that the preset condition is met. That is, after the geographic position of the terminal is changed in series, if the terminal returns to the original position, the screen brightness is not changed, and the proximity sensor is not required to be started to adjust the screen brightness, so that the power consumption of the terminal is reduced.
As can be seen from the above, in the sensor starting method provided in this embodiment, when a screen-on instruction is detected, a time difference set is obtained, where the time difference set includes a plurality of time differences, and the time difference is: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period; determining a target duration according to a plurality of time differences in the time difference set; and after the terminal is on, starting the light sensor in a delayed mode according to the target duration. The scheme can delay starting the light sensor according to actual conditions, so that the light sensor does not need to be kept in a long-term starting state, and the power consumption of the terminal is reduced.
In order to further explain the sensor starting method provided by the application, the scheme of the application will be further described by taking the operation of pressing a power key by a user as a trigger to lighten a terminal screen and taking a light sensor as an ambient light sensor as an example.
When the mobile terminal presses the power key to light the screen, the time difference between pressing the power key and acquiring the light intensity of the environment is calculated. The method specifically comprises the following steps: detecting that a user presses a power key to record a first time value of the current time; detecting the automatic dimming start, and recording a second time value of the current time; calculating the first time value and the second time value obtains the time difference between pressing the power key and acquiring the environmental light intensity.
And similarly, obtaining the time difference between pressing the power key and obtaining the environmental light intensity obtained by calculation for a plurality of times, and obtaining the average time difference value of a plurality of time difference values.
In particular, a shift register may be preset, where the shift register includes a plurality of bits, and each bit is configured to store a calculated time difference between pressing the power key and obtaining the ambient light intensity. In addition, when new data is stored in the shift register, old data with longer time can be automatically shifted to the right by one bit, and the leftmost bit in the shift register is used for storing the new data. Obviously, the oldest data will be automatically shifted out of the shift register. And the time difference between the current pressing of the power key and the acquisition of the ambient light intensity is stored in the shift register. And finally, adding each bit number in the shift register and averaging to obtain an average time difference value.
When the mobile terminal power key is pressed next to light the screen, the ambient light sensor is turned on after waiting for the average time difference. In specific implementation, a timer can be set at the terminal, the timing duration is set as the average time difference, the timer is started when the power key of the mobile terminal is pressed down next time to light the screen, and the ambient light sensor is started to adjust the brightness of the screen when the time of the timer arrives.
Through the scheme, the mobile terminal with the ambient light sensor can be selectively opened according to actual conditions during dimming, and the mobile terminal does not need to be kept in a long-term opening state during use, so that the power consumption of the mobile terminal is reduced, and the mobile terminal is more stable.
In yet another embodiment of the present application, a sensor activation device is also provided, which may be integrated in the terminal in the form of software or hardware. The terminal can specifically comprise a mobile phone, a tablet personal computer, a notebook computer and other devices. As shown in fig. 3, the sensor starting apparatus 300 may include: a first acquisition unit 301, a first determination unit 302, and a starting unit 303, wherein:
the first obtaining unit 301 is configured to obtain, when a screen-brightening instruction is detected, a time difference set, where the time difference set includes a plurality of time differences, and the time difference is: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period;
a first determining unit 302, configured to determine a target duration according to a plurality of time differences in the time difference set;
and the starting unit 303 is configured to delay starting the light sensor according to the target duration after the terminal is on.
Referring to fig. 4, in some embodiments, the sensor starting apparatus 300 may further include:
a second determining unit 304, configured to determine a first time when the terminal is on screen after the light sensor is started based on the target time delay;
a third determining unit 305, configured to determine a second time when the ambient light information is acquired by the light sensor after the light sensor is started;
a second obtaining unit 306, configured to obtain a target time difference between the first time and the second time;
an updating unit 307, configured to update the time difference set based on the target time difference value.
In some embodiments, the first determining unit 302 may specifically be configured to:
and carrying out averaging processing on the time differences to obtain a target duration.
In some embodiments, the first determining unit 302 may specifically be configured to:
determining a time stage of the terminal screen-lighting moment corresponding to each time difference value;
acquiring the time distance between the time stage and the current moment;
determining corresponding weight configuration information based on the time distance;
and weighting the time differences according to the weight configuration information to obtain target duration.
In some embodiments, the sensor activation device 300 may further include:
the third acquisition unit is used for acquiring current geographic position information of the terminal and geographic position change information in a specified period after detecting a screen-lighting instruction and before acquiring a time difference value set;
a fourth acquisition unit configured to acquire start information of the light sensor in the specified period;
the analysis unit is used for analyzing the relation among the current geographic position information, the geographic position change information and the starting information;
and the processing unit is used for prohibiting the starting of the light sensor when the relation meets the condition.
In some embodiments, the analysis unit may be specifically configured to:
the starting information comprises a starting state and a closing state;
the analyzing the relationship among the current geographic position information, the geographic position change information and the starting information comprises the following steps:
determining a corresponding relation between the geographic position change information and the starting information at each time point in the appointed time period;
when the current geographic position is matched with any target geographic position in the changed geographic positions, a target time point corresponding to the target geographic position is obtained;
if the target geographic position corresponds to the starting state of the light sensor, acquiring target starting information from the target time point to the ending time of the appointed period;
and when the starting state does not exist in the target starting information, judging that the relation meets a preset condition.
As can be seen from the above, when a screen-lighting instruction is detected, the sensor starting device provided in the embodiment of the present application obtains a time difference set, where the time difference set includes a plurality of time differences, and the time difference is: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period; determining a target duration according to a plurality of time differences in the time difference set; and after the terminal is on, starting the light sensor in a delayed mode according to the target duration. The scheme can delay starting the light sensor according to actual conditions, so that the light sensor does not need to be kept in a long-term starting state, and the power consumption of the terminal is reduced.
In still another embodiment of the present application, a terminal is provided, where the terminal may be a terminal device such as a smart phone, a tablet computer, and the like. As shown in fig. 5, the terminal 400 includes a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.
The processor 401 is a control center of the terminal 400, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by running or loading applications stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the terminal.
In this embodiment, the processor 401 in the terminal 400 loads instructions corresponding to the processes of one or more applications into the memory 402 according to the following steps, and the processor 401 executes the applications stored in the memory 402, so as to implement various functions:
when a screen-brightening instruction is detected, a time difference value set is obtained, wherein the time difference value set comprises a plurality of time difference values, and the time difference values are as follows: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period;
determining a target duration according to a plurality of time differences in the time difference set;
and after the terminal is on, starting the light sensor in a delayed mode according to the target duration.
In some embodiments, after delaying activation of the light sensor based on the target time length, the processor 401 further performs the steps of:
determining a first moment when the terminal is on;
determining a second moment for acquiring ambient light information through the light sensor after the light sensor is started;
acquiring a target time difference value between a first moment and a second moment;
updating the set of time differences based on the target time difference.
In some embodiments, in determining the target time length from a plurality of time differences in the set of time differences, the processor 401 further performs the steps of:
and carrying out averaging processing on the time differences to obtain a target duration.
In some embodiments, in determining the target time length from a plurality of time differences in the set of time differences, the processor 401 further performs the steps of:
determining a time stage of the terminal screen-lighting moment corresponding to each time difference value;
acquiring the time distance between the time stage and the current moment;
determining corresponding weight configuration information based on the time distance;
and weighting the time differences according to the weight configuration information to obtain target duration.
In some embodiments, after detecting the bright screen instruction, before acquiring the set of time difference values, the processor 401 further performs the steps of:
acquiring current geographic position information of the terminal and geographic position change information in a designated period;
acquiring starting information of the light sensor in the appointed time period;
analyzing the relation among the current geographic position information, the geographic position change information and the starting information;
and when the relation meets the condition, prohibiting starting the light sensor.
In some embodiments, the startup information includes a startup state and a shutdown state. In analyzing the relationship among the current geographic location information, the geographic location change information, and the startup information, the processor 401 further performs the steps of:
determining a corresponding relation between the geographic position change information and the starting information at each time point in the appointed time period;
when the current geographic position is matched with any target geographic position in the changed geographic positions, a target time point corresponding to the target geographic position is obtained;
if the target geographic position corresponds to the starting state of the light sensor, acquiring target starting information from the target time point to the ending time of the appointed period;
and when the starting state does not exist in the target starting information, judging that the relation meets a preset condition.
Memory 402 may be used to store applications and data. The memory 402 stores applications that include instructions executable in a processor. Applications may constitute various functional modules. The processor 401 executes various functional applications and sensor activation by running applications stored in the memory 402.
In some embodiments, as shown in fig. 6, the terminal 400 further includes: a display 403, a control circuit 404, a radio frequency circuit 405, an input unit 406, a sensor 408 and a power supply 409. The processor 401 is electrically connected to the display 403, the control circuit 404, the radio frequency circuit 405, the input unit 406, the audio circuit 407, the sensor 408, and the power supply 409, respectively.
The display screen 403 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the terminal, which may be composed of images, text, icons, video and any combination thereof.
The control circuit 404 is electrically connected to the display screen 403, and is used for controlling the display screen 403 to display information.
The radio frequency circuit 405 is configured to receive and transmit radio frequency signals, so as to establish wireless communication with a terminal or other terminals via wireless communication, and receive and transmit signals with a server or other terminals.
The input unit 406 may be used to receive entered numbers, character information, or user characteristic information (e.g., fingerprints), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. The input unit 406 may include a fingerprint recognition module.
The audio circuit 407 may provide an audio interface between the user and the server through a speaker, microphone.
The sensor 408 is used to collect external environmental information. The sensors 408 may include ambient brightness sensors, acceleration sensors, light sensors, motion sensors, and other sensors.
A power supply 409 is used to power the various components of the terminal 400. In some embodiments, power supply 409 may be logically connected to processor 401 through a power management system, thereby performing functions such as managing charging, discharging, and power consumption through the power management system.
Although not shown in fig. 6, the terminal 400 may further include a speaker, a bluetooth module, etc., which will not be described herein.
From the above, when the terminal provided in the embodiment of the present application detects a screen-lighting instruction, a time difference set is obtained, where the time difference set includes a plurality of time differences, and the time difference is: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period; determining a target duration according to a plurality of time differences in the time difference set; and after the terminal is on, starting the light sensor in a delayed mode according to the target duration. The scheme can delay starting the light sensor according to actual conditions, so that the light sensor does not need to be kept in a long-term starting state, and the power consumption of the terminal is reduced.
In some embodiments, a computer readable storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform any of the sensor activation methods described above is also provided.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program to instruct related hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The foregoing describes the method, apparatus, storage medium and terminal for starting the sensor provided in the embodiments of the present application in detail, and specific examples are applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (8)

1. A sensor starting method applied to a terminal, comprising:
when a screen-brightening instruction is detected, current geographic position information of the terminal and geographic position change information in a specified period of time are obtained;
acquiring starting information of the light sensor in the appointed time period, wherein the starting information comprises a starting state and a closing state;
determining a corresponding relation between the geographic position change information and the starting information at each time point in the appointed time period;
when the current geographic position is matched with any target geographic position in the changed geographic positions, a target time point corresponding to the target geographic position is obtained;
if the target geographic position corresponds to the starting state of the light sensor, acquiring target starting information from the target time point to the ending time of the appointed period;
when the starting state does not exist in the target starting information, judging that the relation meets a preset condition;
when the relation meets the condition, prohibiting starting the light sensor;
when the relation does not meet the condition, a time difference value set is obtained, wherein the time difference value set comprises a plurality of time difference values, and the time difference values are as follows: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period;
determining a target duration according to a plurality of time differences in the time difference set;
and after the terminal is on, starting the light sensor in a delayed mode according to the target duration.
2. The sensor activation method according to claim 1, further comprising, after delaying activation of the light sensor based on the target time length:
determining a first moment when the terminal is on;
determining a second moment for acquiring ambient light information through the light sensor after the light sensor is started;
acquiring a target time difference value between a first moment and a second moment;
updating the set of time differences based on the target time difference.
3. The method of claim 1, wherein determining a target duration from a plurality of time differences in the set of time differences comprises:
and carrying out averaging processing on the time differences to obtain a target duration.
4. The method of claim 1, wherein determining a target duration from a plurality of time differences in the set of time differences comprises:
determining a time stage of the terminal screen-lighting moment corresponding to each time difference value;
acquiring the time distance between the time stage and the current moment;
determining corresponding weight configuration information based on the time distance;
and weighting the time differences according to the weight configuration information to obtain target duration.
5. A sensor activation device for a terminal, comprising:
the first acquisition unit is used for acquiring current geographic position information of the terminal and geographic position change information in a designated period when a screen-brightening instruction is detected;
acquiring starting information of the light sensor in the appointed time period, wherein the starting information comprises a starting state and a closing state;
determining a corresponding relation between the geographic position change information and the starting information at each time point in the appointed time period;
when the current geographic position is matched with any target geographic position in the changed geographic positions, a target time point corresponding to the target geographic position is obtained;
if the target geographic position corresponds to the starting state of the light sensor, acquiring target starting information from the target time point to the ending time of the appointed period;
when the starting state does not exist in the target starting information, judging that the relation meets a preset condition;
when the relation meets the condition, prohibiting starting the light sensor;
when the relation does not meet the condition, a time difference value set is obtained, wherein the time difference value set comprises a plurality of time difference values, and the time difference values are as follows: the time difference between the terminal screen-lighting time and the time of acquiring the ambient light information through the light sensor in the historical period;
a first determining unit, configured to determine a target duration according to a plurality of time differences in the time difference set;
and the starting unit is used for delaying the starting of the light sensor according to the target duration after the terminal is on the screen.
6. The sensor-enabled device of claim 5 further comprising:
the second determining unit is used for determining a first moment when the terminal is on screen after the light sensor is started based on the target duration delay;
the third determining unit is used for determining a second moment for acquiring the ambient light information through the light sensor after the light sensor is started;
a second acquisition unit configured to acquire a target time difference between the first time and the second time;
and the updating unit is used for updating the time difference value set based on the target time difference value.
7. A computer readable storage medium having stored therein a plurality of instructions adapted to be loaded by a processor to perform the sensor activation method of any one of claims 1-4.
8. The terminal is characterized by comprising a processor and a memory, wherein the processor is electrically connected with the memory, and the memory is used for storing instructions and data; the processor is configured to perform the sensor activation method of any one of claims 1-4.
CN201911261831.3A 2019-12-10 2019-12-10 Sensor starting method and device, storage medium and terminal Active CN111182615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911261831.3A CN111182615B (en) 2019-12-10 2019-12-10 Sensor starting method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911261831.3A CN111182615B (en) 2019-12-10 2019-12-10 Sensor starting method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN111182615A CN111182615A (en) 2020-05-19
CN111182615B true CN111182615B (en) 2023-12-26

Family

ID=70621538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911261831.3A Active CN111182615B (en) 2019-12-10 2019-12-10 Sensor starting method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN111182615B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09263346A (en) * 1996-03-28 1997-10-07 Canon Inc Sheet position detecting method, sheet carrying device, and image forming device
CN104468912A (en) * 2014-12-08 2015-03-25 上海斐讯数据通信技术有限公司 Method for controlling luminance of screen of mobile terminal and display terminal
CN106375578A (en) * 2016-08-31 2017-02-01 广东小天才科技有限公司 Mobile terminal screen brightening method and apparatus
CN106791474A (en) * 2017-01-22 2017-05-31 惠州Tcl移动通信有限公司 A kind of flash of light of mobile terminal starts processing method and system
CN108039151A (en) * 2017-11-30 2018-05-15 奇酷互联网络科技(深圳)有限公司 A kind of backlight adjusting method, equipment, mobile terminal and computer-readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102280603B1 (en) * 2017-06-01 2021-07-22 삼성전자주식회사 Electronic device and method for controlling ambient light sensor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09263346A (en) * 1996-03-28 1997-10-07 Canon Inc Sheet position detecting method, sheet carrying device, and image forming device
CN104468912A (en) * 2014-12-08 2015-03-25 上海斐讯数据通信技术有限公司 Method for controlling luminance of screen of mobile terminal and display terminal
CN106375578A (en) * 2016-08-31 2017-02-01 广东小天才科技有限公司 Mobile terminal screen brightening method and apparatus
CN106791474A (en) * 2017-01-22 2017-05-31 惠州Tcl移动通信有限公司 A kind of flash of light of mobile terminal starts processing method and system
CN108039151A (en) * 2017-11-30 2018-05-15 奇酷互联网络科技(深圳)有限公司 A kind of backlight adjusting method, equipment, mobile terminal and computer-readable storage medium

Also Published As

Publication number Publication date
CN111182615A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN108614722B (en) Application program preloading method and device, storage medium and terminal
EP3101958B1 (en) Mobile terminal and method for controlling the same
CN105929925B (en) Electronic device and method for managing power in electronic device
CN107402835B (en) Application program exception handling method and device, storage medium and mobile terminal
EP3575961B1 (en) Method and apparatus for updating application prediction model, storage medium, and terminal
CN108510963B (en) Screen brightness adjusting method and device, storage medium and intelligent terminal
CN108804153B (en) Application program preloading method and device, storage medium and terminal
EP3133466B1 (en) Method and device for reminding in shutdown state
US20150054725A1 (en) Method for adjusting display backlight with aid of ambient light brightness detection and time detection, and associated apparatus and associated computer program product
CN109272917B (en) Screen brightness adjusting method and device, storage medium and electronic equipment
WO2020133418A1 (en) Application icon display method and apparatus, and storage medium and electronic device
CN107623899B (en) Information processing method, information processing apparatus, storage medium, and electronic device
CN107302633B (en) Application control method, device, storage medium and electronic equipment
CN107544898A (en) Data capture method, device, equipment and storage medium
KR102496058B1 (en) Scan method in wireless local area network and electronic device implementing the same
KR20200015000A (en) Method for memory leak detection and electronic device thereof
CN103116418B (en) A kind of method of dynamic conditioning touch-screen input detection rates and mobile terminal
CN113220176A (en) Display method and device based on widget, electronic equipment and readable storage medium
CN107832131B (en) Application program closing method and device, storage medium and electronic equipment
CN111182615B (en) Sensor starting method and device, storage medium and terminal
CN110830653B (en) Sensor control method, sensor control device, mobile terminal and storage medium
CN112997132A (en) Application freezing method and device and electronic equipment
CN112997507A (en) Audio system control method, device, terminal and computer readable storage medium
CN109388487B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN108769093B (en) Push method and device for software application store and mobile terminal

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
TA01 Transfer of patent application right

Effective date of registration: 20231129

Address after: 730900 6 Renmin Road, Baiyin District, Baiyin City, Gansu Province

Applicant after: BAIYIN POWER SUPPLY COMPANY, STATE GRID GANSU ELECTRIC POWER Co.

Address before: 516006 Zhongkai hi tech Zone, Huizhou, Guangdong, 86 Chang seven Road West

Applicant before: HUIZHOU TCL MOBILE COMMUNICATION Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant