Terminal control method and device, storage medium, electronic equipment and chip
By collecting sensor data in the terminal and storing it in a cache, and determining whether to wake up the processor for processing based on the amount of data, the problem of increasing power consumption caused by frequent wake-up of the processor is solved, and the effect of reducing power consumption is achieved.
Patent Information
- Application Number
- CN202311621157.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-05-30
AI Technical Summary
The terminal processor is frequently waked up for sensor data acquisition, resulting in increased power consumption.
The sensor data working in the terminal is collected and stored in the cache to monitor the amount of data in the cache, and wake up the processor for data processing when the target waterline value is reached or exceeded.
Reduces the frequency of the processor being awakened and reduces the power consumption during the acquisition of sensor data.
Smart Images

Figure CN120066237A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a terminal control method, device, storage medium, electronic device, and chip. Background Art
[0002] There are many sensors on a terminal, such as an acceleration sensor, an optical sensor, a temperature sensor, a barometer sensor, and a geomagnetic sensor, etc.
[0003] Currently, the processor on the terminal can collect sensor data at regular intervals. However, different sensors have their own corresponding collection periods and short intervals. Therefore, within a period of time, the processor needs to be frequently woken up according to these sampling periods to collect sensor data, which will increase the power consumption of the processor. Summary of the Invention
[0004] In view of this, this application provides a terminal control method, device, storage medium, electronic device, and chip, mainly aiming to improve the technical problem that the processor on the current terminal is frequently woken up to collect sensor data, which will increase the power consumption of the processor.
[0005] In a first aspect, this application provides a terminal control method, including:
[0006] Collect sensor data of at least one working sensor in the terminal, and store each collected sensor data in a cache;
[0007] Monitor the amount of sensor data in the cache;
[0008] Determine whether to wake up the processor of the terminal according to the monitored amount of data, so as to extract the sensor data in the cache for processing.
[0009] Optionally, the determining whether to wake up the processor of the terminal according to the monitored amount of data, so as to extract the sensor data in the cache for processing includes:
[0010] When it is monitored that the amount of data is greater than or equal to a target waterline value, wake up the processor to extract the sensor data in the cache for processing.
[0011] Optionally, the method further includes: determining the target waterline value according to the number of working sensors and the first preset data amount corresponding to each working sensor, where the first preset data amount is the cumulative amount of data collected by the sensor within a first target duration.
[0012] Optionally, the method further includes: determining the first target duration according to the duration of the evaluation period of the processor and the target wake-up times of the processor within the evaluation period.
[0013] Optionally, the method further includes: determining the target wake-up times based on the real-time data acquisition requirement information corresponding to each of the sensors operating in the terminal.
[0014] Optionally, the method further includes: if there is at least one target sensor among the operating sensors that meets the data real-time acquisition condition, determining the target waterline value according to the second preset data volume corresponding to each target sensor, where the second preset data volume is the data volume accumulated by the target sensor within the second target duration.
[0015] Optionally, the method further includes: determining the second target duration based on the real-time data acquisition requirement information corresponding to the target sensor.
[0016] Optionally, the method further includes: periodically clearing the sensor data in the cache whose storage duration is greater than or equal to a preset duration threshold.
[0017] In a second aspect, the present application provides a terminal control device, including:
[0018] An acquisition module, configured to acquire sensor data of at least one sensor operating in the terminal and store the acquired sensor data in a cache;
[0019] A monitoring module, configured to monitor the data volume of the sensor data in the cache;
[0020] A judgment module, configured to determine whether to wake up the processor of the terminal according to the monitored data volume to extract the sensor data in the cache for processing.
[0021] In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the terminal control method described in the first aspect is implemented.
[0022] In a fourth aspect, the present application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, and when the processor executes the computer program, the terminal control method described in the first aspect is implemented.
[0023] Fifth aspect, the present application provides a chip, including one or more interface circuits and one or more processors; the interface circuit is configured to receive a signal from a memory of an electronic device and send the signal to the processor, and the signal includes computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device is caused to execute the terminal control method described in the first aspect.
[0024] By means of the above technical solution, the present application provides a terminal control method, device, storage medium, electronic device and chip. Specifically, first, sensor data of at least one sensor working in the terminal is collected, and each time the collected sensor data is stored in a cache; then, the data volume of the sensor data in the cache is monitored; and then, according to the monitored data volume, it is determined whether to wake up the processor of the terminal to extract and process the sensor data in the cache. The present application can store each time the collected sensor data in the cache, and then determine whether to wake up the processor in the terminal according to the data volume of the sensor data in the cache. Compared with the current prior art in which the processor is frequently woken up to collect sensor data, the present application reduces the wake-up frequency of the terminal processor, and thus effectively reduces the power consumption during the process of the terminal processor collecting sensor data.
[0025] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the specific embodiments of the present application are specifically given below. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0028] Figure 1 It shows a schematic flowchart of a terminal control method provided by an embodiment of the present application;
[0029] Figure 2 It shows a schematic flowchart of another terminal control method provided by an embodiment of the present application;
[0030] Figure 3 It shows a schematic structural diagram of a terminal control device provided by an embodiment of the present application. Specific embodiments
[0031] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other.
[0032] To address the technical problem that the processor on the current terminal is frequently awakened to collect sensor data, which will increase the power consumption of the processor. This embodiment provides a terminal control method, as Figure 1 shown, the method includes:
[0033] Step 101, collect sensor data of at least one working sensor in the terminal, and store the collected sensor data in a buffer.
[0034] In this embodiment, the terminal may be an intelligent device such as a smart phone, a tablet computer, a drone, a smart robot, a smart watch, a smart bracelet, etc. There are many sensors on these terminals. For example, for a smart watch, there can be more than a dozen sensors installed on it. As long as the smart watch is in the on state, there will be sensors working.
[0035] For example, the sensors that are in the working state when the smart watch is in the screen-off state may include: an acceleration sensor, an optical heart rate sensor, a temperature sensor, etc. When the smart watch is in the screen-on state, in addition to the acceleration sensor, the optical heart rate sensor, the temperature sensor, etc., an ambient light sensor, an optical tracking sensor, etc. will also be turned on. There will be other sensors working in different application scenarios. For example, when the compass APP is opened, the barometer sensor, the geomagnetic sensor, etc. will also enter the working mode.
[0036] The execution subject of this embodiment may be a device or equipment for terminal control, which can be configured on the terminal side, such as an electronic device or a chip, etc. For example, the chip may be a chip with ultra-low power consumption. The data acquisition of the sensors can be completely completed by this chip. Among them, it is necessary to collect sensor data of at least one currently working sensor in the terminal, and for the sensors that are not currently working, it is not necessary to collect the data of these non-working sensors. The chip can store the sensor data collected each time in the buffer.
[0037] In this embodiment, the cache can be a buffer (Cache) for data exchange. When a certain hardware needs to read data, it will first look for the required data in the cache. If found, it will be directly executed; if not, it will look for it in the memory. Since the running speed of the cache is much faster than that of the memory, using the cache to store sensor data can help the processor run faster. Among them, there is generally more than one sensor working in the terminal, and the acquisition cycle of each sensor is different. Therefore, in this embodiment, the data of one or more sensors collected each time can be stored in the cache. In this way, the sensor data generated by all working sensors can be stored in the cache, which can ensure that the collected data will not be lost during the subsequent data processing by the processor.
[0038] Step 102: Monitor the data volume of the sensor data in the cache.
[0039] For this embodiment, after there is sensor data in the cache, the data volume of the sensor data in the cache can be monitored in real time.
[0040] For example, the sensor data generated by one or more working sensors at different times will be stored in the cache, and the data volume in the cache will increase as the working duration increases. By monitoring the amount of data in real time, quantitative data processing can be performed subsequently.
[0041] Step 103: Determine whether to wake up the processor of the terminal according to the monitored data volume of the sensor data, so as to extract the sensor data in the cache for processing.
[0042] In this embodiment, if it is determined according to the monitored data volume of the sensor data that the processor of the terminal needs to be woken up currently, then wake up the processor to extract all the sensor data collected during this period from the cache for processing.
[0043] For example, the terminal realizes measurement, transmission, processing, and / or automatic control, etc. through internal sensors, and stores all the obtained corresponding sensor data in the cache. When the data volume of the sensor data in the cache reaches a certain threshold, the processor is then awakened to process the sensor data in the cache. Specifically, starting from when the terminal enters the working state, when it is detected that the increased sensor data in the cache reaches the set data volume, the terminal processor is awakened, and all the sensor data in the cache during this period is extracted for processing; then the data volume in the cache is continuously monitored until the increased sensor data in the cache reaches the set data volume again, and the terminal processor is awakened again to process the newly added sensor data after the last time the processor was awakened; similarly, each time the terminal processor is awakened, it processes the sensor data within two adjacent time intervals until the terminal enters the shutdown state. If it is detected that the newly increased data volume does not reach the set value, the terminal processor is not awakened, which can reduce the number of times the terminal processor is awakened to achieve the purpose of reducing power consumption.
[0044] In addition, to save power, there is also an optional method of setting the timing for collecting sensor data based on the least common multiple of the collection periods of multiple sensors. For example, if there are three sensors T1, T2, and T3 with collection periods of 20 ms, 40 ms, and 50 ms respectively, then the least common multiple of these three collection periods, which is 200 ms, needs to be taken. In this way, the three awakenings can also be reduced to one awakening. This method can solve the problem of the processor being frequently awakened and reduce power consumption, but it still only collects the current data each time it is awakened and cannot obtain other data within the entire collection period. Reducing the data collection frequency of the sensors in this way is not suitable for some scenarios with high accuracy requirements. Compared with this optional method above, in this embodiment, the sensor data within two adjacent time intervals when the terminal processor is awakened can be fully cached and processed by the processor uniformly when the data volume reaches the set value. In this way, while reducing the number of times the terminal processor is awakened, the data collection is not reduced, improving the accuracy of data analysis and processing.
[0045] This embodiment first collects the sensor data of at least one working sensor in the terminal and stores each collected sensor data in the cache; then monitors the data volume of the sensor data in the cache; and then determines whether to awaken the processor of the terminal according to the monitored data volume to extract the sensor data in the cache for processing. In this embodiment, each collected sensor data can be stored in the cache, and then it is determined whether to awaken the processor in the terminal according to the data volume in the cache. Compared with the current prior art method in which the processor is frequently awakened to collect sensor data, this embodiment reduces the frequency of the terminal processor being awakened, thereby effectively reducing the power consumption during the process of the terminal processor collecting sensor data.
[0046] Based on the technical implementation content shown in the above embodiments, in order to further illustrate the specific implementation process of the method in this embodiment, this embodiment provides a specific method as shown in Figure 2 follows. The method includes:
[0047] Step 201: Collect sensor data of at least one sensor working in the terminal, and store each time the collected sensor data in the buffer.
[0048] Optionally, taking a smart watch as an example, the sensors working in the screen-off standby scenario after power-on include: an acceleration sensor, a temperature sensor, an optical heart rate sensor, and a capacitance sensor. At this time, only the data of the above 4 working sensors are collected. After the smart watch screen is lit, an ambient light sensor and an optical tracking sensor will be added to work, and the sensors working in the screen-off standby scenario still remain in the working state. At this time, the data of 6 sensors need to be collected simultaneously and stored in the buffer together. If the smart watch screen is turned off again or one or more sensor functions are turned off, the number of sensors that need to collect data in real time will be reduced according to the actual situation.
[0049] Step 202: Monitor the data volume of the sensor data in the buffer.
[0050] Step 203: When it is monitored that the data volume of the sensor data is greater than or equal to the target waterline value, wake up the processor to extract the sensor data in the buffer for processing.
[0051] For this embodiment, the target waterline value can be used to determine whether to wake up the processor. Exemplarily, the target waterline value can be set to the data volume generated by one or more working sensors within 1 s. Then, starting from the boot time, when the working time of these sensors is 500 ms, the generated data volume is less than the target waterline value, and the processor will not be woken up; when the working time of the sensors is greater than or equal to 1 s, the generated data volume is greater than or equal to the target waterline value, wake up the processor and extract the sensor data generated during this period in the buffer for processing.
[0052] By setting the target waterline value, the data collected by each working sensor according to different collection periods can wake up the processor to uniformly process the data in the buffer when reaching the waterline value, reducing the frequency of waking up the terminal processor and reducing the power consumption of the terminal processor during the process of collecting sensor data.
[0053] In some examples, the method in this embodiment further includes: determining the target waterline value according to the number of working sensors and the first preset data volume corresponding to each working sensor, where the first preset data volume is the cumulative data volume collected by the sensor within the first target duration.
[0054] Exemplarily, the target waterline value can be the sum of the first preset data amounts corresponding to the working sensors respectively. When the number of working sensors increases, the target waterline value increases; when the number of working sensors decreases, the target waterline value decreases. In this way, the wake-up frequency of the processor can be maintained in a stable state. Since the performance and real-time requirements of each sensor are different, the acquisition periods and the amounts of data generated are also different. In order to unify the time for waking up the sensors, the first preset data amount corresponding to each sensor can be set according to the different data amounts generated by different sensors within the same period. For example, if the data amount generated by each sensor in 1 s is set as the corresponding first preset data amount, then the target waterline value is the total data amount generated by all the working sensors in 1 s. Such a setting can better correspond to the time frequency at which the processor is woken up.
[0055] In some examples, the method of this embodiment further includes: determining the first target duration according to the duration of the evaluation period of the processor and the target wake-up times of the processor within the evaluation period.
[0056] Exemplarily, the value of the first target duration is the ratio of the duration of the evaluation period of the processor to the target wake-up times within the evaluation period. For example, if the duration of the evaluation period of the processor is 1 s and the target wake-up times of the processor within the evaluation period are 2 times, then the first target duration is 500 ms. The specific evaluation period and target wake-up times can be set according to the actual situation. Generally, the duration of this evaluation period can be set according to power consumption and real-time performance. Among them, the longer the duration of the evaluation period is set, the lower the power consumption is, and the corresponding real-time performance is worse.
[0057] In some examples, the method of this embodiment further includes: determining the target wake-up times based on the demand information for data real-time acquisition corresponding to the working sensors in the terminal respectively.
[0058] For example, considering the requirements for power consumption and real-time performance of specific devices and working states, if the requirement for real-time performance is high, a relatively short evaluation period duration should be set; if the requirement for real-time performance is low, a relatively long evaluation period duration can be set to minimize power consumption while not affecting the feedback requirements of real-time data.
[0059] In some examples, the method of this embodiment further includes: if there is at least one target sensor among the working sensors that meets the condition for data real-time acquisition, determining the target waterline value according to the second preset data amounts corresponding to the target sensors respectively, where the second preset data amount is the accumulated data amount statistically collected by the target sensors within the second target duration.
[0060] Exemplarily, for a smartwatch that has a high real-time requirement for the data of an optical heart rate sensor for the purpose of monitoring the human body's health status, a target waterline value is set according to the preset data volume corresponding to the optical heart rate sensor, and monitoring is performed on the optical heart rate sensor. For example, the duration of the evaluation period of the processor is 1 s, the first target duration is 500 ms, and the number of times the processor is woken up for the first target within the evaluation period is 2 times. The moments of waking up the processor are: 500 ms and 1000 ms. The data acquisition moments of the optical heart rate sensor are: 60 ms, 120 ms, 180 ms, 240 ms, 300 ms, 360 ms, 420 ms, 480 ms, 540 ms, 600 ms, 660 ms, 720 ms, 780 ms, 840 ms, 900 ms, 960 ms. It can be set that the number of times the processor is woken up for the second target within the evaluation period is 4 times, then the second target duration can be 240 ms, and the moments of waking up the processor are: 240 ms, 480 ms, 720 ms, 960 ms.
[0061] Since the moments of waking up the processor for the first target and the moments of waking up the processor for the second target do not overlap, the total number of times the processor is woken up within the 1-s evaluation period is the sum of the number of times the processor is woken up for the first target and the number of times the processor is woken up for the second target, that is, the processor is woken up a total of 6 times. If the moments of waking up the processor for the first target and the moments of waking up the processor for the second target overlap, the processor only needs to be woken up once at the same moment. If there are multiple sensors with high real-time requirements, the target waterline value at this time can be the sum of the second preset data volumes corresponding to the above sensors respectively.
[0062] The purpose of setting the second preset data volume and the second target duration is to make the processing of sensor data more timely and improve the real-time reporting of data in devices or scenarios with high real-time requirements for data.
[0063] In some examples, the method of this embodiment further includes: determining the second target duration based on the requirement information obtained according to the data real-time of the target sensor.
[0064] Exemplarily, the value of the second target duration is the ratio of the duration of the evaluation period of the processor to the number of times the processor is woken up within the evaluation period. For example, the duration of the evaluation period of the processor is 500 ms, and the number of times the processor is woken up within the evaluation period is 5 times, then the second target duration is 100 ms. The specific evaluation period and the number of times the processor is woken up can be set according to the actual situation. Generally, the duration of this evaluation period can be set according to power consumption and real-time performance. Among them, the longer the duration of the evaluation period is set, the lower the power consumption is, and the corresponding real-time performance is worse.
[0065] In some examples, the method of this embodiment further includes: regularly clearing the sensor data stored in the cache for a storage duration greater than or equal to a preset duration threshold.
[0066] The amount of cached data in the terminal occupies the memory space of the terminal. Regularly clearing it can effectively make the processor run more smoothly and release more system memory.
[0067] In this embodiment, taking the scenario of the smartwatch turning off the screen and standby after startup as an example, among which, an acceleration sensor, a temperature sensor, an optical heart rate sensor, and a capacitance sensor are in the working state. The acquisition periods of these sensors by the processor are 120ms, 1s, 60ms, and 500ms respectively. The following calculates the number of times the processor is woken up within 1s according to the existing technical solution and the solution of this embodiment respectively.
[0068] In the currently existing technical solution, the time and number of times the sensor is woken up within 1s are shown in Table 1. Among them, the times when the acceleration sensor (A) wakes up the processor are: 120ms, 240ms, 360ms, 480ms, 600ms, 720ms, 840ms, 960ms; the time when the temperature sensor (B) wakes up the processor is: 1000ms; the times when the optical heart rate sensor (C) wakes up the processor are: 60ms, 120ms, 180ms, 240ms, 300ms, 360ms, 420ms, 480ms, 540ms, 600ms, 660ms, 720ms, 780ms, 840ms, 900ms, 960ms; the times when the capacitance sensor (D) wakes up the processor are: 500ms, 1000ms. Removing the repeated time points for waking up the processor, the total number of wake-up times is 18 times.
[0069] Table 1
[0070]
[0071] In the technical solution of this embodiment, a chip is used to put the collected sensor data into a cache. When the amount of data in the cache reaches the set waterline value, an interrupt is reported to wake up the processor, and then the processor processes these data uniformly. Adopting the solution of this embodiment, the number of times the processor is woken up is determined according to the set cache waterline value. Since the data acquisition period of the sensor and the amount of data generated within the period are fixed, the waterline value of the cache can be set to the amount of data generated by the working sensor in 500 ms. Then, within a 1 s period, the processor is woken up 2 times. Similarly, if the waterline value of the cache is set to the amount of data generated by the working sensor in 1 s, the wake-up times are 1 time. The waterline value can actually be set according to the requirements of power consumption and real-time performance for specific devices and working states. For example, after the screen is lit, the ambient light sensor and the optical tracking sensor are added. At this time, as long as the corresponding waterline of the cache is increased, the number of times the processor is woken up can still remain the same as that in the screen-off standby state.
[0072] It can be seen that in the above example, taking a 1 s time period as an example, in the currently existing technical solutions, the number of times the processor needs to be woken up is 18 times, while in the technical solution of this embodiment, the waterline value can be set according to requirements, and only 1 or 2 times of waking up the processor are needed, greatly reducing the number of times the sensor is woken up, and the purpose of reducing power consumption according to requirements can be achieved.
[0073] Through the method of this embodiment, the collected sensor data can be stored in the cache, and it is determined whether to wake up the terminal processor according to the amount of sensor data in the cache, reducing the frequency of waking up the terminal processor and effectively reducing the power consumption during the process of the terminal processor collecting sensor data.
[0074] Further, as Figures 1 to 2 a specific implementation of the method shown, this embodiment provides a terminal control device, as Figure 3 shown, the device includes: a collection module 31, a monitoring module 32, and a judgment module 33.
[0075] The collection module 31 is configured to collect sensor data of at least one working sensor in the terminal and store the collected sensor data in the cache;
[0076] The monitoring module 32 is configured to monitor the amount of sensor data in the cache;
[0077] The judgment module 33 is configured to determine whether to wake up the processor of the terminal according to the monitored amount of data to extract the sensor data in the cache for processing.
[0078] In some examples of this embodiment, the determination module 33 is specifically configured to wake up the processor to extract the sensor data in the cache for processing when it is detected that the data volume is greater than or equal to the target waterline value.
[0079] In some examples of this embodiment, the determination module 33 is further specifically configured to determine the target waterline value according to the number of working sensors and the first preset data volume corresponding to each of the working sensors, where the first preset data volume is the data volume accumulated by the sensor within the first target duration.
[0080] In some examples of this embodiment, the determination module 33 is further specifically configured to determine the first target duration according to the duration of the evaluation period of the processor and the target wake-up times of the processor within the evaluation period.
[0081] In some examples of this embodiment, the determination module 33 is further specifically configured to determine the target wake-up times based on the real-time data acquisition requirement information corresponding to each of the working sensors in the terminal.
[0082] In some examples of this embodiment, the determination module 33 is further specifically configured to, if there is at least one target sensor that meets the data real-time acquisition condition among the working sensors, determine the target waterline value according to the second preset data volume corresponding to each of the target sensors, where the second preset data volume is the data volume accumulated by the target sensor within the second target duration.
[0083] In some examples of this embodiment, the determination module 33 is further specifically configured to determine the second target duration based on the real-time data acquisition requirement information corresponding to the target sensor.
[0084] In some examples of this embodiment, the device further includes: a clearing module;
[0085] The clearing module is specifically configured to periodically clear the sensor data in the cache whose storage duration is greater than or equal to the preset duration threshold.
[0086] It should be noted that for other corresponding descriptions of each functional unit involved in the terminal control device provided in this embodiment, reference can be made to the corresponding description in Figures 1 to 2 and will not be elaborated here.
[0087] Based on the method as shown in Figures 1 to 2 above, correspondingly, this embodiment further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method as shown in Figures 1 to 2 above is implemented.
[0088] Based on such understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes several instructions for causing a computer device (such as a personal computer, a server, or a network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0089] Based on the above-mentioned Figures 1 to 2 method as shown, and Figure 3 the virtual device embodiment as shown, in order to achieve the above object, an embodiment of the present application further provides an electronic device, such as intelligent terminals like smart phones, smart watches, smart bracelets, tablet computers, drones, smart robots, etc. The device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to implement the method as shown in Figures 1 to 2 the above.
[0090] Optionally, the above-mentioned physical device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, sensors, an audio circuit, a WI-FI module, etc. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc. Optionally, the user interface may further include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0091] Those skilled in the art can understand that the above-mentioned physical device structure provided by this embodiment does not constitute a limitation on the physical device, and it may include more or fewer components, or combine certain components, or have different component arrangements.
[0092] The storage medium may further include an operating system and a network communication module. The operating system is a program for managing the hardware and software resources of the above-mentioned physical device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to implement communication between the components inside the storage medium, and communication between other hardware and software in the information processing physical device.
[0093] Based on the above-mentioned Figures 1 to 2 method as shown, and Figure 3 the virtual device embodiment as shown, this embodiment further provides a chip, including one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from the memory of the electronic device and send the signal to the processor, and the signal includes computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device is caused to execute the method as shown in Figures 1 to 2 the above.
[0094] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or can also be implemented by hardware. By applying the solution of this embodiment, compared with the current existing technologies, in this embodiment, the sensor data collected is stored in the cache, and whether to wake up the terminal processor is determined according to the data volume of the sensor data in the cache, reducing the frequency of waking up the terminal processor, and effectively reducing the power consumption in the process of the terminal processor collecting sensor data.
[0095] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0096] The above description is only the specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments described herein, but rather will be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A terminal control method, characterized in that, it includes: collecting sensor data of at least one working sensor in the terminal and storing the collected sensor data in a cache; monitoring the data volume of the sensor data in the cache; determining whether to wake up the processor of the terminal according to the monitored data volume to extract the sensor data in the cache for processing.
2. The method according to claim 1, characterized in that, the determining whether to wake up the processor of the terminal according to the monitored data volume to extract the sensor data in the cache for processing includes: when it is monitored that the data volume is greater than or equal to a target waterline value, waking up the processor to extract the sensor data in the cache for processing.
3. The method according to claim 2, characterized in that, the method further includes: determining the target waterline value according to the number of working sensors and the first preset data volume corresponding to each of the working sensors, where the first preset data volume is the data volume cumulatively collected by the sensor within a first target duration.
4. The method according to claim 3, characterized in that, the method further includes: determining the first target duration according to the duration of the evaluation period of the processor and the target wake-up times of the processor within the evaluation period.
5. The method according to claim 4, characterized in that, the method further includes: determining the target wake-up times based on the demand information for data real-time acquisition corresponding to each of the working sensors in the terminal.
6. The method according to claim 2, characterized in that, the method further includes: if there is at least one target sensor among the working sensors that meets the data real-time acquisition condition, determining the target waterline value according to the second preset data volume corresponding to each of the target sensors, where the second preset data volume is the data volume cumulatively collected by the target sensor within a second target duration.
7. The method according to claim 6, characterized in that, the method further includes: determining the second target duration based on the demand information for data real-time acquisition corresponding to the target sensor.
8. The method according to claim 1, characterized in that, the method further includes: periodically clearing the sensor data in the cache whose storage duration is greater than or equal to a preset duration threshold.
9. A terminal control device, characterized in that, it includes: a collection module configured to collect sensor data of at least one working sensor in the terminal and store the collected sensor data in a cache; a monitoring module configured to monitor the data volume of the sensor data in the cache; a judgment module configured to determine whether to wake up the processor of the terminal according to the monitored data volume to extract the sensor data in the cache for processing.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 8.
11. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein, when the processor executes the computer program, the method described in any one of claims 1 to 8 is implemented.
12. A chip, wherein, it includes one or more interface circuits and one or more processors; the interface circuit is configured to receive a signal from the memory of the electronic device and send the signal to the processor, and the signal includes computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device is caused to execute the method described in any one of claims 1 to 8.