CN112783563A - Mobile terminal sensor working method, system, terminal and storage medium - Google Patents

Mobile terminal sensor working method, system, terminal and storage medium Download PDF

Info

Publication number
CN112783563A
CN112783563A CN202110120025.5A CN202110120025A CN112783563A CN 112783563 A CN112783563 A CN 112783563A CN 202110120025 A CN202110120025 A CN 202110120025A CN 112783563 A CN112783563 A CN 112783563A
Authority
CN
China
Prior art keywords
memory
sensors
mobile terminal
sensor
temporarily
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110120025.5A
Other languages
Chinese (zh)
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.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202110120025.5A priority Critical patent/CN112783563A/en
Publication of CN112783563A publication Critical patent/CN112783563A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides a working method, a system, a terminal and a storage medium of a mobile terminal sensor, wherein the method comprises the following steps: detecting the number of sensors for temporarily closing the mobile terminal; when the number of the sensors which are temporarily closed exceeds a preset threshold value, starting a timer; and keeping the operation of the sensors with the threshold number in the memory at preset time intervals, and copying the data of the rest sensors in the memory to the memory. According to the scheme of the invention, when a plurality of sensors are required to be used in the mobile terminal to detect the state, if any sensor needs to quit in the midway, the sensors can be prevented from being shut down, the restarting times of the sensors are further reduced, and the working response speed of the sensors is accelerated.

Description

Mobile terminal sensor working method, system, terminal and storage medium
Technical Field
The invention relates to the field of mobile terminals, in particular to a working method, a working system, a working terminal and a working medium of a mobile terminal sensor.
Background
At present, the functions of a mobile terminal are complex, and simultaneously the whole real-time state of the mobile terminal needs to be kept, more sensors are often required to be called for synchronous detection, commonly used sensors in the mobile terminal comprise an acceleration sensor, a magnetic sensor, a direction sensor, a gyroscope sensor, a light sensing sensor, a pressure sensor, a temperature sensor, a proximity sensor, a gravity sensor, a linear acceleration sensor, a rotation vector sensor and the like, even for some application functions, a plurality of sensors need to be started simultaneously for detection, and the direction needs to be detected through the magnetic sensor and the acceleration sensor if navigation is required; when a plurality of sensors are operated simultaneously for a period of time, it is often encountered that one of the sensors is turned off and then turned back on again later, for example, when using beauty salons, it is necessary to acquire the magnetic sensor at the time of positioning, but not necessary the rest of the time, and then the magnetic sensor needs to be turned back on once every time positioning is initiated in beauty salons, resulting in a slower response.
Therefore, the prior art has defects and needs to be improved and developed.
Disclosure of Invention
In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method for operating a sensor of a mobile terminal, which aims to solve the problem that when a plurality of sensors are required to detect a state in the conventional mobile terminal, the sensor needs to be turned off halfway, and when the sensor needs to be turned on again, the sensor needs to be restarted, so that the sensor response is slow.
In order to solve the above technical problems, the technical solution adopted by the present invention to solve the above technical problems is as follows:
in a first aspect, the present invention provides a method for operating a sensor of a mobile terminal, including:
detecting the number of sensors for temporarily closing the mobile terminal;
when the number of the sensors which are temporarily closed exceeds a preset threshold value, starting a timer;
and keeping the operation of the sensors with the threshold number in the memory at preset time intervals, and copying the data of the rest sensors in the memory to the memory.
Further, the method for operating a sensor of a mobile terminal, wherein when the number of the sensors that are temporarily turned off exceeds a preset threshold value, after starting the timer, further includes:
and sequencing the temporarily closed sensors in sequence so as to circularly operate the temporarily closed sensors in a memory in sequence.
Further, the method for operating a sensor of a mobile terminal, wherein the operation of the sensors with the number of threshold values is reserved in the memory every predetermined time, and after the data of the rest sensors in the memory is copied to the memory, the method further comprises:
when the timer is triggered again, acquiring a sensor which is operated in the memory and is temporarily closed;
copying data in a memory corresponding to a temporarily closed sensor which is running in the memory to a memory;
and acquiring the number of the temporarily closed sensors of the threshold value number behind the currently operating temporarily closed sensor, copying the corresponding operating data in the memory from the memory to the memory, and operating in the memory.
Further, the method for operating a sensor of a mobile terminal, after detecting the number of sensors that the mobile terminal is temporarily turned off, further includes:
and when the number of the temporarily closed sensors is less than or equal to a preset threshold value, ending the process.
Further, in the working method of the mobile terminal sensor, the preset threshold value is set by a user through a setting menu;
and/or, the mobile terminal manufacturer sets the memory size according to the product use.
Further, the working method of the mobile terminal sensor is characterized in that the preset time is 5 seconds.
Further, in the working method of the mobile terminal sensor, the memory is a power-down memory which is not easy to lose, and the power-down memory which is not easy to lose is one of emmc and eeSensorm.
In a second aspect, the present invention further provides a mobile terminal sensor operating system, including:
the sensor detection module is used for detecting the number of sensors which are temporarily closed by the mobile terminal;
the timing module is used for starting a timer when the number of the temporarily closed sensors exceeds the number of preset threshold values;
the sensor operation module is used for keeping the operation of the sensors with the threshold number in the memory at intervals of preset time;
and the copying module is used for copying the data of the rest sensors in the memory to the memory.
In a third aspect, the present invention further provides a mobile terminal, wherein the mobile terminal includes a central processing unit, and a memory connected to the central processing unit, and the memory stores a computer program, and when the computer program is executed by the central processing unit, the steps of the sensor operating method of the mobile terminal according to any one of claims 1 to 7 are implemented.
A fourth aspect. The present invention also provides a storage medium, wherein the storage medium stores a computer program, and the computer program, when executed by a central processing unit, implements the steps of the mobile terminal sensor operating method according to any one of claims 1 to 7.
Has the advantages that: the invention provides a working method, a system, a terminal and a storage medium of a mobile terminal sensor, wherein the method comprises the following steps: detecting the number of sensors for temporarily closing the mobile terminal; when the number of the sensors which are temporarily closed exceeds a preset threshold value, starting a timer; and keeping the operation of the sensors with the threshold number in the memory at preset time intervals, and copying the data of the rest sensors in the memory to the memory. Aiming at the defects that the temporarily closed sensors in the prior art influence the operation of a mobile terminal system more and easily cause the system to automatically terminate some temporarily closed sensors, the invention combines the characteristic that the real-time performance of a user to the temporarily closed sensors is not high, and periodically copies the operation data of a certain number of temporarily closed sensors in the memory into the paper memory to enable the temporarily closed sensors to operate, copies the operation data of the rest sensors in the memory into the memory to enable the rest sensors not to operate temporarily, and then repeatedly circulates the process to enable each temporarily closed sensor to have an opportunity to be temporarily closed, and simultaneously detects the number of the temporarily closed sensors of the mobile terminal, when the number n of the temporarily closed sensors exceeds the preset threshold value number n0The method comprises the following steps of starting a timer at regular intervals, sequencing the sensors which are temporarily closed at present in sequence every preset time, and then: p (1), P (2), P (3).. P (n), only allowed in memory each timeRetention of n0The operation of each sensor, the data of other sensors in the memory are copied to the power-down nonvolatile memory, and by the scheme of the invention, when a plurality of sensors are required to be used in the mobile terminal to detect the state at the same time, if any sensor needs to quit in the midway, the sensors can be prevented from being shut down, the restarting times of the sensors are further reduced, and the working response speed of the sensors is accelerated.
Drawings
Fig. 1 is a flowchart illustrating a method for operating a sensor of a mobile terminal according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart of data copying in a mobile terminal sensor operating method according to an embodiment of the present invention.
Fig. 3 is a flowchart illustrating a method for operating a mobile terminal sensor according to the number of sensors and a determination performed by a timer according to an embodiment of the present invention.
Fig. 4 is a block diagram of an implementation of a system of a mobile terminal sensor operating method according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
Detailed Description
The invention provides a working method, a system, a terminal and a storage medium of a mobile terminal sensor. In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Furthermore, references herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application, and the appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
The existing mobile terminal has complex functions, and needs to keep the whole real-time state of the mobile terminal, and often needs to call more sensors for synchronous detection, the sensors commonly used in the mobile terminal comprise an acceleration sensor, a magnetic sensor, a direction sensor, a gyroscope sensor, a light sensing sensor, a pressure sensor, a temperature sensor, a proximity sensor, a gravity sensor, a linear acceleration sensor, a rotation vector sensor and the like, even for some application functions, a plurality of sensors need to be started simultaneously for detection, and the direction needs to be detected through the magnetic sensor and the acceleration sensor if navigation is needed; when a plurality of sensors are operated simultaneously for a period of time, it is often encountered that one of the sensors is turned off and then turned back on again later, for example, when using beauty salons, it is necessary to acquire the magnetic sensor at the time of positioning, but not necessary the rest of the time, and then the magnetic sensor needs to be turned back on once every time positioning is initiated in beauty salons, resulting in a slower response.
Based on this, the present invention provides a working method of a mobile terminal sensor, please refer to fig. 1, fig. 1 is a flowchart of a preferred embodiment of the working method of the mobile terminal sensor of the present invention, as shown in the figure, it includes the steps of:
s10, detecting the number of sensors for temporarily closing the mobile terminal;
s20, when the number of the sensors which are temporarily closed exceeds a preset threshold value, starting a timer;
and S30, keeping the operation of the sensors with the threshold number in the memory at preset time intervals, and copying the data of the rest sensors in the memory to the memory.
Specifically, in the mobile terminal, some applications may use some sensors to detect only part of the time when running, and may shut down the sensors when the rest of the time is not needed, the mobile terminal may detect the number of the temporarily shut-down sensors in real time, when the number of the temporarily shut-down sensors exceeds a preset threshold, a timer is started, and periodically, at the timing of the timer, the number of the sensors with the threshold number is kept in a memory at predetermined intervals, and data of the remaining temporarily shut-down sensors in the memory is copied to a memory.
In this embodiment, when it is determined that the number of the temporarily turned-off sensors exceeds the preset threshold value, the temporarily turned-off sensors are sequentially sorted, so that the temporarily turned-off sensors can be circularly operated in the memory in sequence.
Specifically, for example, when the mobile terminal detects that there are currently 8 sensors that are temporarily turned off, the currently 8 sensors that are temporarily turned off are sequentially sorted as follows: p (1), P (2), P (3), P (4), P (5), P (6), P (7) and P (8), wherein the preset threshold value is 2, the sensors are sequentially operated according to the sequence, the sensors P (1) and P (2) are operated in the memory, the data of the sensors P (3) to P (8) in the memory are copied into the memory, the data of the sensors P (1) and P (2) in the memory are copied into the memory after the timing time of the timer, the sensors P (3) and P (4) are operated in the memory, and the steps are circularly executed according to the steps.
In this embodiment, after the number of the sensors that are temporarily turned off in the mobile terminal is detected, the detected number of the sensors that are temporarily turned off is compared with a preset threshold value, when the number of the sensors that are temporarily turned off is greater than the preset threshold value, a timer is started and subsequent steps are started, and when the number of the sensors that are temporarily turned off is less than or equal to the preset threshold value, the process is ended.
Specifically, the number of the detected sensors which are temporarily turned off is compared with a preset threshold value, so that the situation that the operation of the mobile terminal is blocked due to the fact that too many sensors simultaneously operate in the system to occupy a large amount of memory space of the system can be prevented, and some sensors can be prevented from being directly turned off by the mobile terminal when exiting in midway, the number of times of restarting the sensors is further reduced, and the work response speed of the sensors is accelerated.
In some specific embodiments, the preset threshold may be set by a user through a setting menu according to personal preference, or may be set by a mobile terminal manufacturer according to the size of a memory used by the product, where generally, the preset threshold of a mobile terminal with a large memory may be correspondingly larger, and the preset threshold of a mobile terminal with a small memory may be correspondingly smaller.
In this embodiment, the predetermined time is preferably 5s, the memory is a power-down memory which is not easily lost, the power-down memory is one of emmc and eesensor, and the mobile terminal can be prevented from data loss due to unexpected sudden power failure by selecting the power-down memory.
In this embodiment, please refer to fig. 2, where fig. 2 is a flowchart illustrating data copying in a working method of a mobile terminal sensor according to an embodiment of the present invention, and the flowchart specifically includes:
s40, when the timer is triggered again, acquiring a temporary closing sensor which is currently running in the memory;
s41, copying data in the memory corresponding to the temporary shutdown sensor which is running in the memory to a memory;
and S42, acquiring the number of the temporary shutdown sensors of the threshold value after the temporary shutdown sensors currently running, copying the corresponding running data in the memory from the memory to the memory, and running in the memory.
Specifically, assume that there are n sensors that are currently temporarily turned off, and the preset threshold value is n0And n > n0Then the sensors that are currently temporarily off are ranked as follows: p (1), P (2), P (3.) the0) When sensors P (1), P (2), P (3).. P (n)0) After the operation reaches the preset time, the sensors P (1), P (2) and P (3) are used0) Copying the operation data in the memory into the memory, and obtaining the sensor P (n) from the memory0+1)、P(n0+2)、P(n0+3)......P(2n0) And copying the operation data into the memory, and starting to operate the sensor P (n) in the memory0+1)、P(n0+2)、P(n0+3)......P(2n0) When P (n) is encountered, then the detected temporarily closed sensor is then operated from P (1) again and the above steps are performed in a loop.
More specifically, in the actual using process, assuming that the number of the sensors detecting the temporary turning-off in the mobile terminal is 8, the sorted sequence is as follows: p (1), P (2), P (3), P (4), P (5), P (6), P (7) and P (8), and the threshold value is set to be 3, then the actual operation process is as follows:
firstly, copying the operation data of P (1), P (2) and P (3) in the memory from the memory to the memory for operation, and copying the operation data of the other sensors in the memory to the memory;
when the time counted by the timer reaches 5 seconds, copying the operating data of P (1), P (2) and P (3) in the memory from the memory to the memory, and simultaneously copying the operating data of P (4), P (5) and P (6) in the memory from the memory to the memory for operation;
when the time counted by the timer reaches 5 seconds again, copying the operation data of P (4), P (5) and P (6) in the memory from the memory to the memory, and simultaneously copying the operation data of P (7), P (8) and P (1) in the memory from the memory to the memory for operation;
and then, continuously and circularly executing the steps, and circularly operating the sensors which are temporarily closed.
In this embodiment, referring to fig. 3, fig. 3 is a flowchart illustrating a method for determining according to the number of sensors and a timer in a sensor operating method of a mobile terminal according to an embodiment of the present invention, which specifically includes the following steps:
s100, detecting whether the number of the sensors which are temporarily closed in the mobile terminal is larger than a preset threshold value or not, if so, executing a step S200, otherwise, executing a step S500;
s200, starting a timer with the timeout time of 5 seconds;
s300, judging whether the timer is overtime, if so, continuing to execute the step S400, otherwise, continuing to execute the current process until the timer is overtime;
s400, data copying is carried out on the sensor which is temporarily closed through the memory and the internal memory, and the specific data copying process is shown in the steps S40-S42;
and S500, copying all the operation data in the memory of the temporarily-closed sensor into the memory for operation, and closing the timer.
Specifically, whether the number of the temporary shutdown sensors in the mobile terminal exceeds a preset threshold value is detected firstly, the operation data of the temporarily closed sensors can be copied to the memory for operation when the number of the temporarily closed sensors is less than or equal to the preset threshold value, therefore, the condition that when the total application of the mobile terminal issues new function requirements, the sensors need to be turned on again, so that the sensor response is slow, and when some sensors are quitted in the middle, the system can be directly shut down without the mobile terminal, further reduces the restarting times of the sensors, accelerates the work response speed of the sensors, and when the number of the temporarily closed sensors is larger than a preset threshold value, the operation of the temporarily closed sensors can be performed in a loop, the sensors are not completely closed, and the response speed of all the sensors can be further improved.
In some embodiments, the mobile terminal temporarily shuts down transmission due to real-time detectionThe number of sensors, and thus the number of each sensor in the generated sequence, will vary, in particular when a temporary switch-off of sensor P (n) in the sequence is detected1) Is turned off, the sensor number is cancelled, removed from the sequence, and all sensors P (n) in the sequence numbered thereafter are temporarily turned off1+1)、P(n1+2)、P(n1P (n) is numbered one less to form a complete contiguous sequence; when it is detected that the sensor being used by the application is turned off, it is added to the end of the sequence and set with the number P (n + 1); when detecting a temporarily closed sensor P (n)2) When re-requested by the application, the sensor number is cancelled, removed from the sequence, and all subsequent sensors P (n) in the sequence numbered thereafter are temporarily turned off1+1)、P(n1+2)、P(n1P (n) is numbered one less to form a complete contiguous sequence.
Specifically, by detecting the number of the temporarily closed sensors in real time, the sequence of the temporarily closed sensors and the number of each sensor in the sequence can be continuously updated, and a new complete continuous sequence is reconstructed, so that whether the number of the temporarily closed sensors in the new sequence is greater than a preset threshold value or not can be conveniently judged, the continuously updated sequence can also enable some sensors which are just switched to the temporarily closed state to be added into the process of circulating operation, and therefore the situation that the sensors are completely closed because the sensors are not responded for a long time is avoided, and similarly, the continuously updated sequence can also prevent the difference between the number of times that the temporarily closed sensors are put into the memory to operate and the number of times that other temporarily closed sensors are put into the memory to operate from being greater than one.
More specifically, in the actual using process, assuming that the number of sensors detecting that the mobile terminal is temporarily turned off is 3, the sorted sequence is as follows: p (1), P (2), P (3), set threshold value as 2, then the actual operation process under the different circumstances is detected as follows:
1. the temporary shutdown sensors currently running in the memory are P (3) and P (1), and the timing time of the timer has not reached 5s, at this time, the sensor P (2) receives a shutdown instruction initiated by the mobile terminal, the state of the temporary shutdown is switched to a completely shutdown state, the number of the sensor is cancelled and removed from the sequence, and the number of the sensor P (3) is modified to be P (2), and since the number of the sensors temporarily shutdown in the mobile terminal at this time is 2 and is equal to a preset threshold value, the running data of the new sensors with the numbers of P (1) and P (2) is copied from the memory to run, and the timer is shut down.
2. The temporary shutdown sensors currently running in the memory are P (1) and P (2), and if one sensor in the application of the mobile terminal does not need to be called, the sensor is switched to a temporary shutdown state, the sensor is added into the sequence and numbered as P (4), and then the process of circular operation is executed according to the new sequence.
3. The sensors which are temporarily closed and currently running in the memory are P (3) and P (1), and the timing time of the timer does not reach 5s, at this time, the sensor P (2) receives a call instruction of an application, the state of the temporary closing is switched to the state of starting, the number of the sensor is cancelled and removed from the sequence, meanwhile, the number of the sensor P (3) is modified to be P (2), and because the number of the sensors which are temporarily closed in the mobile terminal is 2 at this time and is equal to a preset threshold value, the running data of the new sensors with the numbers of P (1) and P (2) is copied from the memory to run, and the timer is closed.
Referring to fig. 4, fig. 4 is a structural diagram illustrating an implementation of a system for implementing a mobile terminal sensor operating method according to the present invention, where the system includes:
a sensor detection module 10, configured to detect the number of sensors that are temporarily turned off by the mobile terminal;
the timing module 20 is configured to start a timer when the number of the temporarily-turned-off sensors exceeds a preset threshold number;
a sensor operation module 30, configured to keep the operation of the sensors with the threshold number in the memory every predetermined time;
and the copying module 40 is used for copying the data of the rest sensors in the memory into the storage.
In this embodiment, the system of the mobile terminal sensor operating method further includes:
the triggering module 50 is configured to, after detecting the number of the sensors that are temporarily turned off in the mobile terminal, compare the detected number of the sensors that are temporarily turned off with a preset threshold, start a timer and start to execute subsequent steps when the number of the sensors that are temporarily turned off is greater than the preset threshold, and end the process when the number of the sensors that are temporarily turned off is less than or equal to the preset threshold.
In one implementation, the sensor detection module 10 includes:
the sensor state monitoring unit is used for monitoring the starting and closing of the temporarily closed sensor, switching the temporarily closed sensor to be turned on again and switching the working sensor to be temporarily closed;
and the counting unit is used for counting the number of the sensors which are temporarily closed at present.
In one implementation, the timing module 20 includes:
the timing unit is used for measuring the running time of the sensor and completing periodic timing work;
and the overtime judging unit is used for judging whether the timer is overtime or not, if the timer is not overtime, continuing to operate the temporarily closed sensor which is currently operating in the memory, and if the timer is overtime, copying data in the memory corresponding to the temporarily closed sensor which is currently operating in the memory into the memory, and operating the temporarily closed sensors with the next threshold number in the memory.
In one implementation, the copy module 40 includes:
the data copying unit is used for copying the operation data of the sensor which is temporarily closed in the memory into the memory, or copying the data which is copied from the memory last time and temporarily closes the operation of the sensor into the memory;
and the copy management unit is used for ensuring that each temporary shutdown sensor can be reasonably placed in the memory to operate, and the number of the temporary shutdown sensors operated at every moment in the memory does not exceed a preset threshold value, namely, the difference between the operation times that the temporary shutdown sensors are placed in the memory and the operation times that other temporary shutdown sensors are placed in the memory is prevented from being more than one.
Further, the present invention also provides a mobile terminal, as shown in fig. 5, wherein the mobile terminal includes a central processing unit 10, which is adapted to implement each instruction; and a memory 20 connected to the central processing unit, wherein the memory stores a computer program, and the computer program is executed by the central processing unit 10 to implement the mobile terminal sensor operating method according to any of the above schemes.
Preferably, the mobile terminal may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a hybrid device, and the like. The memory 20 may in some embodiments be an internal storage unit of the mobile terminal, such as a hard disk or a memory of the mobile terminal. The memory 20 may also be an external memory of the mobile terminal in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the mobile terminal.
Further, the memory 20 may also include both an internal storage unit and an external storage device of the mobile terminal. The memory 20 is used for storing application software installed in the device and various data. The memory 20 may also be used to temporarily store data that has been output or is to be output.
The present invention further provides a storage medium, wherein the storage medium stores a computer program, and the computer program, when executed by a central processing unit, implements the steps of the mobile terminal sensor operating method according to any of the above schemes.
In summary, the present invention provides a method, a system, a terminal and a storage medium for operating a mobile terminal sensor, wherein the method comprises: sensor for detecting temporary closing of mobile terminalThe number of the cells; when the number of the sensors which are temporarily closed exceeds a preset threshold value, starting a timer; and keeping the operation of the sensors with the threshold number in the memory at preset time intervals, and copying the data of the rest sensors in the memory to the memory. Aiming at the defects that the temporarily closed sensors in the prior art influence the operation of a mobile terminal system more and easily cause the system to automatically terminate some temporarily closed sensors, the invention combines the characteristic that the real-time performance of a user to the temporarily closed sensors is not high, and periodically copies the operation data of a certain number of temporarily closed sensors in the memory into the paper memory to enable the temporarily closed sensors to operate, copies the operation data of the rest sensors in the memory into the memory to enable the rest sensors not to operate temporarily, and then repeatedly circulates the process to enable each temporarily closed sensor to have an opportunity to be temporarily closed, and simultaneously detects the number of the temporarily closed sensors of the mobile terminal, when the number n of the temporarily closed sensors exceeds the preset threshold value number n0The method comprises the following steps of starting a timer at regular intervals, sequencing the sensors which are temporarily closed at present in sequence every preset time, and then: p (1), P (2), P (3).. P (n), only n is allowed to be reserved in the memory each time0The operation of each sensor, the data of other sensors in the memory are copied to the power-down nonvolatile memory, and by the scheme of the invention, when a plurality of sensors are required to be used in the mobile terminal to detect the state at the same time, if any sensor needs to quit in the midway, the sensors can be prevented from being shut down, the restarting times of the sensors are further reduced, and the working response speed of the sensors is accelerated.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A working method of a mobile terminal sensor is characterized by comprising the following steps:
detecting the number of sensors for temporarily closing the mobile terminal;
when the number of the sensors which are temporarily closed exceeds a preset threshold value, starting a timer;
and keeping the operation of the sensors with the threshold number in the memory at preset time intervals, and copying the data of the rest sensors in the memory to the memory.
2. The method according to claim 1, wherein after the starting the timer when the number of the temporarily turned-off sensors exceeds a preset threshold, the method further comprises:
and sequencing the temporarily closed sensors in sequence so as to circularly operate the temporarily closed sensors in a memory in sequence.
3. The method according to claim 2, wherein the step of reserving a threshold number of sensors in the memory for operation every predetermined time and copying data of the remaining sensors in the memory to the memory further comprises:
when the timer is triggered again, acquiring a sensor which is operated in the memory and is temporarily closed;
copying data in a memory corresponding to a temporarily closed sensor which is running in the memory to a memory;
and acquiring the number of the temporarily closed sensors of the threshold value number behind the currently operating temporarily closed sensor, copying the corresponding operating data in the memory from the memory to the memory, and operating in the memory.
4. The method for operating a sensor of a mobile terminal according to claim 1, wherein after detecting the number of sensors temporarily turned off by the mobile terminal, the method further comprises:
and when the number of the temporarily closed sensors is less than or equal to a preset threshold value, ending the process.
5. The method according to claim 1, wherein the preset threshold value is set by a user through a setting menu;
and/or, the mobile terminal manufacturer sets the memory size according to the product use.
6. The mobile terminal sensor operating method of claim 1, wherein the predetermined time is 5 seconds.
7. The working method of the mobile terminal sensor according to claim 1, wherein the memory is a power-down non-volatile memory, and the power-down non-volatile memory is one of emmc and eeSensorm.
8. A mobile terminal sensor operating system, comprising:
the sensor detection module is used for detecting the number of sensors which are temporarily closed by the mobile terminal;
the timing module is used for starting a timer when the number of the temporarily closed sensors exceeds the number of preset threshold values;
the sensor operation module is used for keeping the operation of the sensors with the threshold number in the memory at intervals of preset time;
and the copying module is used for copying the data of the rest sensors in the memory to the memory.
9. A mobile terminal, characterized in that the mobile terminal comprises a central processing unit, and a memory connected to the central processing unit, the memory storing a computer program, which when executed by the central processing unit implements the steps of the mobile terminal sensor operating method according to any one of claims 1 to 7.
10. A storage medium, characterized in that it stores a computer program which, when executed by a central processing unit, implements the steps of the mobile terminal sensor operating method according to any one of claims 1 to 7.
CN202110120025.5A 2021-01-28 2021-01-28 Mobile terminal sensor working method, system, terminal and storage medium Pending CN112783563A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110120025.5A CN112783563A (en) 2021-01-28 2021-01-28 Mobile terminal sensor working method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110120025.5A CN112783563A (en) 2021-01-28 2021-01-28 Mobile terminal sensor working method, system, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN112783563A true CN112783563A (en) 2021-05-11

Family

ID=75759457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110120025.5A Pending CN112783563A (en) 2021-01-28 2021-01-28 Mobile terminal sensor working method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112783563A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012124383A1 (en) * 2011-03-11 2012-09-20 株式会社エヌ・ティ・ティ・ドコモ Mobile information terminal and gripping characteristics authentication method
CN105204926A (en) * 2015-09-02 2015-12-30 Tcl移动通信科技(宁波)有限公司 Mobile terminal as well as method and system for controlling running of multiple background programs of mobile terminal
US9230150B1 (en) * 2014-07-28 2016-01-05 Google Technology Holdings LLC Finger print sensor and auxiliary processor integration in an electronic device
CN106055075A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Method and device for closing sensors
CN106095290A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 Sensor calls method for closing and the device of function
CN106292991A (en) * 2015-06-01 2017-01-04 中兴通讯股份有限公司 A kind of method and device reducing terminal unit power consumption

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012124383A1 (en) * 2011-03-11 2012-09-20 株式会社エヌ・ティ・ティ・ドコモ Mobile information terminal and gripping characteristics authentication method
US9230150B1 (en) * 2014-07-28 2016-01-05 Google Technology Holdings LLC Finger print sensor and auxiliary processor integration in an electronic device
CN106292991A (en) * 2015-06-01 2017-01-04 中兴通讯股份有限公司 A kind of method and device reducing terminal unit power consumption
CN105204926A (en) * 2015-09-02 2015-12-30 Tcl移动通信科技(宁波)有限公司 Mobile terminal as well as method and system for controlling running of multiple background programs of mobile terminal
CN106055075A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Method and device for closing sensors
CN106095290A (en) * 2016-05-31 2016-11-09 广东欧珀移动通信有限公司 Sensor calls method for closing and the device of function

Similar Documents

Publication Publication Date Title
EP2824895B1 (en) Information backup method and apparatus, mobile terminal
US7934111B2 (en) Apparatus and method for allowing quick activation of electronic equipment, and recording medium having a program stored thereon for performing such method
US9069551B2 (en) Systems and methods of exiting hibernation in response to a triggering event
US8176305B2 (en) Information processing apparatus, activation method, and program
WO2017045419A1 (en) Method and apparatus for controlling the powering-on of terminal
TW200836053A (en) Information processing apparatus, startup method and computer program
US8914594B2 (en) Systems and methods of loading data from a non-volatile memory to a volatile memory
US10379874B1 (en) Expedited resume process from low battery
US10268486B1 (en) Expedited resume process from hibernation
EP3158452A1 (en) Firmware interface with durable memory storage
US10175995B1 (en) Device hibernation control
US10872018B2 (en) Memory data preservation solution
WO2020024981A1 (en) Charging method and apparatus, charging terminal, and computer readable storage medium
CN101573689A (en) Hide boot
US7542091B2 (en) Device power management method and apparatus
CN109117191A (en) Method, device and equipment for restarting electric appliance and storage medium
JP2015118423A (en) Refresh device and electronic apparatus
CN111885420B (en) Standby protection method and device, smart television and readable storage medium
CN112783563A (en) Mobile terminal sensor working method, system, terminal and storage medium
CN106101406B (en) Shutdown alarm triggering processing method based on mobile terminal and mobile terminal
WO2018040177A1 (en) Method and apparatus for rebooting
CN105204926B (en) Mobile terminal and multi-background program operation control method and system thereof
CN110148992B (en) Charging control method, terminal device and storage medium
US20130073792A1 (en) Electronic apparatus using nand flash and memory management method thereof
US20140019740A1 (en) Computer Startup Method, Startup Apparatus, State Transition Method And State Transition Apparatus

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210511