CN113220531A - Control method and device of terminal sensor, terminal and storage medium - Google Patents
Control method and device of terminal sensor, terminal and storage medium Download PDFInfo
- Publication number
- CN113220531A CN113220531A CN202110536180.5A CN202110536180A CN113220531A CN 113220531 A CN113220531 A CN 113220531A CN 202110536180 A CN202110536180 A CN 202110536180A CN 113220531 A CN113220531 A CN 113220531A
- Authority
- CN
- China
- Prior art keywords
- terminal
- sensor
- application program
- information
- target application
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Telephone Function (AREA)
Abstract
The invention discloses a control method, a control device, a terminal and a storage medium of a terminal sensor, wherein a target application program is determined according to running state information of the sensor of the terminal by acquiring the running state information; acquiring the use state information of the target application program and acquiring the use scene information of the terminal; and controlling the sensor according to the use state information of the target application program and the use scene information of the terminal. The method solves the problems that in the prior art, due to the fact that the terminal lacks a method for managing and controlling the using behaviors of the sensor, the phenomenon that the sensor is abused by an application program is possible to occur, and therefore power consumption of the terminal is abnormal and privacy of a user is leaked.
Description
Technical Field
The invention relates to the field of intelligent terminals, in particular to a control method and device of a terminal sensor, a terminal and a storage medium.
Background
Currently, an intelligent system is a terminal operating system platform with the largest user group, a terminal is the most common and important electronic equipment for many users, and various sensor devices in the terminal provide a hardware basis for application program diversification functions. For example, the shake-shake function in the terminal is mainly implemented based on an acceleration sensor, the landscape and portrait screen switching function in the terminal is mainly implemented based on a direction sensor, the brightness change function in the terminal is mainly implemented based on a light sensor, the motion step counting function in the terminal is mainly implemented based on the acceleration sensor or a step counting sensor, and the game function in the terminal is implemented based on the superposition of a gyroscope, the acceleration and the direction sensor.
However, in practical applications, the terminal defaults to the fact that all applications can use the sensor, i.e., there is a lack of regulation on the use of the sensor. Due to the fact that the terminal lacks of a method for managing and controlling the using behaviors of the sensor, the phenomenon that the sensor is abused by an application program may occur, and therefore the problems that the power consumption of the terminal is abnormal and the privacy of a user is leaked are caused.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method, an apparatus, a terminal and a storage medium for controlling a terminal sensor, aiming at solving the problems that in the prior art, because a terminal lacks a method for managing and controlling the use behavior of the sensor, the phenomenon that an application abuses the sensor may occur, which may cause abnormal power consumption of the terminal and leakage of user privacy.
The technical scheme adopted by the invention for solving the problems is as follows:
in a first aspect, an embodiment of the present invention provides a method for controlling a terminal sensor, where the method includes:
acquiring running state information of a sensor of a terminal, and determining a target application program according to the running state information;
acquiring the use state information of the target application program and acquiring the use scene information of the terminal;
and controlling the sensor according to the use state information of the target application program and the use scene information of the terminal.
In one embodiment, the acquiring running state information of a sensor of a terminal, and determining a target application located in the terminal according to the running state information includes:
and acquiring the running state information of the sensor, and taking an application program using the sensor as the target application program when the running state information of the sensor is running.
In one embodiment, the obtaining the usage state information of the target application includes:
acquiring process information of the target application program;
when the process information of the target application program is a background process, acquiring the data sampling rate of the sensor;
and when the data sampling rate is greater than a preset sampling rate threshold value, determining that the use state information of the target application program is a power consumption state.
In one embodiment, the acquiring the usage scenario information of the terminal includes:
acquiring the position information of the terminal, and determining the state type of the terminal according to the position information;
and when the state type of the terminal is not moved, acquiring the operation mode information of the terminal, and determining the use scene information of the terminal according to the operation mode information.
In one embodiment, the obtaining operation mode information of the terminal and determining usage scenario information of the terminal according to the operation mode information includes:
acquiring operation mode information of the terminal;
and when the operation mode information is a low power consumption mode, determining that the use scene information of the terminal is a static scene, wherein the low power consumption mode is a mode in which the power consumption in the terminal is lower than a preset threshold value.
In one embodiment, the controlling the sensor according to the usage state information of the target application and the usage scenario information of the terminal includes:
determining the application program category corresponding to the target application program according to preset classification rules according to the use state information of the target application program and the use scene information of the terminal;
and when the application program type corresponding to the target application program is a control type, sending an instruction for stopping data acquisition to the sensor or intercepting the data acquired by the sensor.
In an embodiment, the determining, according to the usage state information of the target application and the usage scenario information of the terminal and according to a preset classification rule, an application category corresponding to the target application includes:
and when the use state information of the target application program is a power consumption state and the use scene information of the terminal is a static scene, determining that the application program type corresponding to the target application program is a control type.
In a second aspect, an embodiment of the present invention further provides a control device for a terminal sensor, where the control device includes:
the determining module is used for acquiring the running state information of a sensor of the terminal and determining a target application program according to the running state information;
the acquisition module is used for acquiring the use state information of the target application program and acquiring the use scene information of the terminal;
and the control module is used for controlling the sensor and the target application program according to the use state information of the target application program and the use scene information of the terminal.
In a third aspect, an embodiment of the present invention further provides a terminal, where the terminal includes a memory and one or more processors; the memory stores one or more programs; the program includes instructions for executing the control method of the terminal sensor according to any one of the above; the processor is configured to execute the program.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a plurality of instructions are stored, where the instructions are loaded and executed by a processor to implement any of the steps of the control method for a terminal sensor described above.
The invention has the beneficial effects that: the method comprises the steps of determining a target application program according to running state information by acquiring the running state information of a sensor of a terminal; acquiring the use state information of the target application program and acquiring the use scene information of the terminal; and controlling the sensor and the target application program according to the use state information of the target application program and the use scene information of the terminal. The method solves the problems that in the prior art, due to the fact that the terminal lacks a method for managing and controlling the using behaviors of the sensor, the phenomenon that the sensor is abused by an application program is possible to occur, and therefore power consumption of the terminal is abnormal and privacy of a user is leaked.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a control method of a terminal sensor according to an embodiment of the present invention.
Fig. 2 is a control architecture diagram of a terminal sensor according to an embodiment of the present invention.
Fig. 3 is a block diagram of a control device of a terminal sensor according to an embodiment of the present invention.
Fig. 4 is a schematic block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
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 should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
Currently, an intelligent system is a terminal operating system platform with the largest user group, a terminal is the most common and important electronic equipment for many users, and various sensor devices in the terminal provide a hardware basis for application program diversification functions. For example, the shake-shake function in the terminal is mainly implemented based on an acceleration sensor, the landscape and portrait screen switching function in the terminal is mainly implemented based on a direction sensor, the brightness change function in the terminal is mainly implemented based on a light sensor, the motion step counting function in the terminal is mainly implemented based on the acceleration sensor or a step counting sensor, and the game function in the terminal is implemented based on the superposition of a gyroscope, the acceleration and the direction sensor.
However, in practical applications, the terminal defaults to the fact that all applications can use the sensor, i.e., there is a lack of regulation on the use of the sensor. Due to the fact that the terminal lacks of a method for managing and controlling the using behaviors of the sensor, the phenomenon that the sensor is abused by an application program may occur, and therefore the problems that the power consumption of the terminal is abnormal and the privacy of a user is leaked are caused.
Aiming at the defects in the prior art, the invention provides a control method of a terminal sensor, which comprises the steps of obtaining running state information of a sensor of a terminal, and determining a target application program according to the running state information; acquiring the use state information of the target application program and acquiring the use scene information of the terminal; and controlling the sensor and the target application program according to the use state information of the target application program and the use scene information of the terminal. The method solves the problems that in the prior art, due to the fact that the terminal lacks a method for managing and controlling the using behaviors of the sensor, the phenomenon that the sensor is abused by an application program is possible to occur, and therefore power consumption of the terminal is abnormal and privacy of a user is leaked.
As shown in fig. 1, the present embodiment provides a method for controlling a terminal sensor, the method including the steps of:
and S100, acquiring running state information of a sensor of the terminal, and determining a target application program according to the running state information.
In order to prevent the sensors in the terminal from being abused, the present embodiment needs to monitor the operation states of all the sensors in the terminal. Specifically, in this embodiment, the running state information of the sensor on the terminal needs to be obtained in real time or at preset time intervals, and the sensor in the running state and the target application program using the sensor are determined according to the obtained running state information.
In one implementation, the sensor includes a plurality of sub-sensors, and types of data collected by each of the plurality of sub-sensors are different, and the step S100 specifically includes the following steps:
step S101, acquiring running state information of the sensor;
and S102, when the running state information of the sensor is running, taking an application program using the sensor as the target application program.
In short, in this embodiment, an application that needs to be managed and controlled is emphasized, that is, the target application is an application that uses a sensor in the terminal, so that the present embodiment needs to monitor the operating states of all sensors, and once an operating sensor is found, the application that uses the sensor needs to be monitored. It is understood that there is usually not only one sensor but a plurality of sensors in the terminal, each sensor is responsible for adopting one type of data, and the terminal provides a hardware basis for the application program diversification function through various sensor devices. For example, the shake-shake function in the terminal is mainly implemented based on an acceleration sensor, the landscape and portrait screen switching function in the terminal is mainly implemented based on a direction sensor, the brightness change function in the terminal is mainly implemented based on a light sensor, the motion step counting function in the terminal is mainly implemented based on the acceleration sensor or a step counting sensor, and the game function in the terminal is implemented based on the superposition of a gyroscope, the acceleration and the direction sensor. Therefore, the present embodiment needs to monitor the operating states of all the sensors, and once it is monitored that the operating state of any one of the sensors is running, the application program using the sensor is used as the target application program.
As shown in fig. 1, the method further comprises the steps of:
and step S200, acquiring the use state information of the target application program and acquiring the use scene information of the terminal.
Specifically, in order to avoid excessive management and control of the terminal sensor, a set of policy for managing and controlling the terminal sensor is formulated in this embodiment, and whether the behavior of using the sensor by the target application needs to be managed and controlled is determined by acquiring the use state information of the target application using the sensor and the use scene information of the current terminal, that is, the policy for selective control is adopted in this embodiment, so that the normal operation of the terminal is ensured and the normal requirement of the user on the application program is met.
In one implementation, in order to obtain the use state information of the target application, the embodiment first needs to obtain the process information of the target application. And when the process information of the target application program is a foreground process, determining the use state information of the target application program to be a use state. When the terminal device is actually applied, the foreground process is usually the highest priority, and all rights are allowed to be acquired. It should be emphasized that the foreground process in this embodiment refers to a process currently used by a user, which refers to an interface that can be directly seen and operated by the user, and a visible process, which refers to an interface that can be seen but not directly operated by the user. And when the process information of the target application program is a background process, acquiring the data sampling rate of the sensor, and when the data sampling rate is greater than a preset sampling rate threshold value, determining that the use state information of the target application program is a power consumption state. For example, a preset sampling rate threshold may be set to 1 second 50 times. The background process in this embodiment refers to a process in which an application runs in the background, or a process without any service (i.e., a process minimized by pressing a home key after an activity is opened). Since the background process user cannot directly see the sensor, once the behavior of using the sensor abnormally occurs, the control is difficult and the phenomenon of high power consumption is easy to occur, so the selective control strategy in the embodiment is mainly used for controlling the sensor used by the application program in the background process and the condition of high sampling rate occurs.
In one implementation, in order to obtain the usage scenario information of the terminal, the present embodiment needs to first obtain the location information of the terminal. In practical application, the terminal basically has a GPS positioning function, so the embodiment can determine the location information of the terminal by collecting GPS data of the terminal. And then determining the state type of the terminal according to the position information, wherein the state type is mobile or not mobile. Specifically, in this embodiment, it is required to acquire the location information of the terminal at the starting time point and the location information of the terminal at the ending time point within a preset time period, and determine the moving distance of the terminal within the preset time period according to the location information corresponding to the two time points, and when the moving distance is greater than a preset distance threshold, determine that the state category of the terminal is moving; and when the moving distance is smaller than or equal to a preset distance threshold, determining that the state category of the terminal is not moved.
And when the state type of the terminal is not moved, acquiring the operation mode information of the terminal, and determining the use scene information of the terminal according to the operation mode information. In summary, since the terminal usually indicates that the user is in a moving state when the terminal is moving, and a plurality of applications for recording the user's moving state are usually run in the background process of the terminal at present, in order to ensure the normal running of the applications, the present embodiment is configured to control only the state of the terminal in the non-moving state, that is, only when the terminal is stationary, the use of the sensor in the terminal is controlled. In addition, when the terminal is still, part of the applications in the terminal may also need to be started normally by using a sensor in the terminal, so as to further ensure normal operation of the applications in the terminal, in this embodiment, operation mode information of the terminal also needs to be obtained, and when the operation mode information is a low power consumption mode, it is determined that the usage scenario information of the terminal is a static scenario, where the low power consumption mode is a mode in which power consumption in the terminal is lower than a preset threshold, for example, a night mode, a sleep mode, or a screen saver mode.
In other words, in practical applications, the sensor is mostly used in a background process to count steps, for example, the wechat sport or the pay baby sport widely used by the user and the individual financial application also have a step number reward function, so the terminal generally needs to keep normal use of the sensor in the use scene of the user performing activities, that is, the use of the sensor cannot be controlled excessively. Conversely, when the terminal is in a use scenario where the user is stationary, the use of the sensors in the terminal may be actively controlled. Therefore, the present embodiment may adopt different control strategies according to different usage scenarios of the terminal.
As shown in fig. 1, the method further comprises the steps of:
and step S300, controlling the sensor according to the use state information of the target application program and the use scene information of the terminal.
Specifically, the use state information of the target application program may reflect whether the target application program is an application program in a foreground process or an application program in a background process, and the use scene information of the terminal may reflect whether the terminal is in a mobile state and whether the terminal is in a low power consumption use mode (i.e., a sleep mode, a night mode, or a screen saving mode), so that it may be determined whether the target application program really needs to use the sensor for data acquisition according to the two information, so as to control the sensor, to implement data exchange between the sensor and the target application program, and avoid unnecessary energy consumption of the terminal and prevent privacy data leakage of a user.
In one implementation, the step S300 specifically includes the following steps:
step S301, determining the application program category corresponding to the target application program according to a preset classification rule according to the use state information of the target application program and the use scene information of the terminal;
step S302, when the application program type corresponding to the target application program is a control type, sending an instruction for stopping data acquisition to the sensor or intercepting the data acquired by the sensor.
In short, in the present embodiment, it needs to comprehensively determine whether the target application is an application that needs to be controlled to use the sensor behavior in combination with the usage state information of the target application and the usage scenario information of the terminal, so as to achieve the purpose of selectively controlling the use of the sensor in the terminal. In one implementation, the preset classification rules are as follows: and when the use state information of the target application program is the use state, determining the application program type corresponding to the target application program as the non-control type. And when the use scene information of the terminal is an activity scene, determining the application program category corresponding to the target application program as a no-control category. And when the use state information of the target application program is a power consumption state and the use scene information of the terminal is a static scene, determining that the application program type corresponding to the target application program is a control type.
Specifically, when the usage state information of the target application is the usage state, it indicates that the target application is an application being used by the user or an application visible to the user, and therefore the behavior of using the sensor by the target application may not be controlled, that is, the target application is set to be regardless of the control category. When the usage scenario information of the terminal is an active scenario, it indicates that the terminal is moving continuously, i.e. the user is in a motion state, and therefore, no matter whether the target application is a foreground process or not, the behavior of the target application using the sensor is also not controlled, i.e. the target application is set to be of no control type. And when the use state information of the target application program is a power consumption state and the use scene information of the terminal is a static scene, the target application program is an application program running in a background, and the terminal is static at this time, that is, the user does not move, and basically no sensor is needed to be used in the scene.
In order to accurately control the behavior of the application in the terminal using the sensor, in one implementation manner, the present embodiment may further obtain type information of the target application, and determine whether the target application is an application in a management and control category according to the type information of the target application. Specifically, in this embodiment, each application program is classified in advance according to respective functions of all application programs in the terminal, for example, the type information in this embodiment may include an internet access type (such as a QQ browser APP, various e-commerce APPs, a news APP, a financial APP), a video type, a music type, a tool type (such as an application market APP and a learning tool APP), a camera type (such as a camera APP or a american image APP), and the like, and a corresponding control rule is set in advance for each type of application program, for example, the internet access type, the video type, the music type, the tool type, and the control rule of the camera type may be controllable. Specifically, after the application program category corresponding to the target application program is determined to be the management and control category, whether the application program category corresponding to the target application program needs to be modified is determined according to the type information of the target application program. Specifically, according to the type information of the target application program, determining a control rule corresponding to the target application program, and when the control rule of the target application program is controllable, finally determining that the application program category corresponding to the target application program is a control category. And when the control rule of the target application program is uncontrollable, modifying the application program type corresponding to the target application program into an independent control type.
In one implementation, in order to avoid excessive control over the use of the sensor, an exemption policy may be set in this embodiment, since it is considered that the user may have a habit of often switching different application interfaces temporarily. Specifically, when the time of the previous use of the target application is acquired, and the time interval between the time of the current use of the target application and the current time is less than the first time threshold, the application category of the sensor used by the target application is set to be the irrespective control category, for example, the first time threshold may be set to be 90 seconds, that is, the application used within 90 seconds does not control the behavior of using the sensor. When the interval duration between the current time and the current time of using the target application is greater than the second duration threshold, which indicates that the target application has not been used for a long time, the target application is set as the management and control category, for example, the second duration threshold may be set to 7 days, that is, an application that has not been used within seven days, and is set as the management and control category.
In one implementation, the application program that needs to control the behavior of the sensor can be determined by simply setting the black and white list. In the black and white list, the application program on the white list does not control the behavior of the application program using the sensor. Applications that are in the blacklist need to be controlled in their behavior with respect to the sensors.
When the target application program is determined to be in the management and control category, in order to control data communication between the sensor and the target application program, an instruction for stopping data collection may be sent to the sensor or data collected by the sensor may be intercepted. And when the target application program is of a non-control type, acquiring the data acquired by the sensor, and sending the data acquired by the sensor to the target application program, namely, keeping normal data communication between the sensor and the target application program.
In order to illustrate the technical effects of the present invention, the inventor makes corresponding tests, and the following are related test data, which shows that the method of the present invention has certain power saving effect.
In a bright screen standby heavy-load scene, a high-power-consumption Sensor demo exists, and the control ratio of the on-Sensor background control is optimized by 102mA compared with the off-Sensor current;
in a bright screen standby heavy-load scene + without high power consumption Sensor demo, the on-Sensor background control ratio is optimized by 16mA compared with the off-current;
in the screen-off standby heavy-load scene, a Sensor demo with high power consumption is adopted, and 195.1mA is optimized compared with the current for turning off the background control of the Sensor;
the screen-off standby heavy-load scene + no high-power-consumption Sensor demo, and the current for starting the background control of the Sensor is optimized by 8.9mA compared with the current for closing.
In addition, whether functions of a browser, video, music, news, e-commerce, application markets, learning tools, financial management, cameras or image beautifying software and all scenes can be normally used or not is focused in the functional test, and especially, the APP functions of WeChat step counting, financial management APP step counting (such as safe gold managers) and connecting bracelets are also tested to pass. In addition, in a heavy-load scene, the warm start performance of the application is improved to a certain extent. In addition, the inventor finds that the behavior of the background application abusing the terminal sensor excessively is greatly reduced according to the log in the big data feedback.
Based on the above embodiment, the present invention further provides a control device of a terminal sensor, as shown in fig. 3, the device includes:
the determining module 01 is used for acquiring running state information of a sensor of the terminal and determining a target application program according to the running state information;
an obtaining module 02, configured to obtain the use state information of the target application, and obtain the use scene information of the terminal;
and the control module 03 is configured to control the sensor according to the use state information of the target application program and the use scene information of the terminal.
In an implementation manner, as shown in fig. 2, the control module in this embodiment is mainly placed in the cloud for implementation, that is, the control policy of the terminal sensor is provided in the cloud, so that different control policies can be customized according to different items conveniently, or temporary adjustment of individual policies is facilitated, and in addition, cloud push of a black-and-white list can be provided, so that a certain abnormal problem can be repaired conveniently and immediately.
Based on the above embodiments, the present invention further provides a terminal, and a schematic block diagram thereof may be as shown in fig. 4. The terminal comprises a processor, a memory, a network interface and a display screen which are connected through a system bus. Wherein the processor of the terminal is configured to provide computing and control capabilities. The memory of the terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the terminal is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a control method of a terminal sensor. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.
It will be understood by those skilled in the art that the block diagram of fig. 4 is a block diagram of only a portion of the structure associated with the inventive arrangements and is not intended to limit the terminals to which the inventive arrangements may be applied, and that a particular terminal may include more or less components than those shown, or may have some components combined, or may have a different arrangement of components.
In one implementation, one or more programs are stored in a memory of the terminal and configured to be executed by one or more processors include instructions for performing a method of controlling a terminal sensor.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a method, an apparatus, a terminal and a storage medium for controlling a terminal sensor, wherein a target application is determined according to running state information of a sensor of the terminal by obtaining the running state information; acquiring the use state information of the target application program and acquiring the use scene information of the terminal; and controlling the sensor according to the use state information of the target application program and the use scene information of the terminal. The method solves the problems that in the prior art, due to the fact that the terminal lacks a method for managing and controlling the using behaviors of the sensor, the phenomenon that the sensor is abused by an application program is possible to occur, and therefore power consumption of the terminal is abnormal and privacy of a user is leaked.
It should be understood that the application of the present invention is not limited to the above examples, and that modifications and variations can be made by one skilled in the art in light of the above teachings, and all such modifications and variations are intended to fall within the scope of the invention as defined in the appended claims.
Claims (10)
1. A control method of a terminal sensor is characterized by comprising the following steps:
acquiring running state information of a sensor of a terminal, and determining a target application program according to the running state information;
acquiring the use state information of the target application program and acquiring the use scene information of the terminal;
and controlling the sensor according to the use state information of the target application program and the use scene information of the terminal.
2. The method for controlling the sensor of the terminal according to claim 1, wherein the obtaining the operation state information of the sensor of the terminal, and determining the target application program located in the terminal according to the operation state information comprises:
acquiring running state information of the sensor;
and when the running state information of the sensor is running, taking the application program using the sensor as the target application program.
3. The method for controlling the terminal sensor according to claim 1, wherein the acquiring the usage status information of the target application program comprises:
acquiring process information of the target application program;
when the process information of the target application program is a background process, acquiring the data sampling rate of the sensor;
and when the data sampling rate is greater than a preset sampling rate threshold value, determining that the use state information of the target application program is a power consumption state.
4. The method for controlling the terminal sensor according to claim 3, wherein the acquiring the usage scenario information of the terminal includes:
acquiring the position information of the terminal, and determining the state type of the terminal according to the position information;
and when the state type of the terminal is not moved, acquiring the operation mode information of the terminal, and determining the use scene information of the terminal according to the operation mode information.
5. The method for controlling the terminal sensor according to claim 4, wherein the obtaining operation mode information of the terminal and determining the usage scenario information of the terminal according to the operation mode information comprises:
acquiring operation mode information of the terminal;
and when the operation mode information is a low power consumption mode, determining that the use scene information of the terminal is a static scene, wherein the low power consumption mode is a mode in which the power consumption in the terminal is lower than a preset threshold value.
6. The method for controlling the sensor of the terminal according to claim 5, wherein the controlling the sensor according to the usage state information of the target application and the usage scenario information of the terminal comprises:
determining the application program category corresponding to the target application program according to preset classification rules according to the use state information of the target application program and the use scene information of the terminal;
and when the application program type corresponding to the target application program is a control type, sending an instruction for stopping data acquisition to the sensor or intercepting the data acquired by the sensor.
7. The method for controlling the terminal sensor according to claim 6, wherein the determining the application category corresponding to the target application according to the usage state information of the target application and the usage scenario information of the terminal and according to a preset classification rule comprises:
and when the use state information of the target application program is a power consumption state and the use scene information of the terminal is a static scene, determining that the application program type corresponding to the target application program is a control type.
8. A control device for an end sensor, the control device comprising:
the determining module is used for acquiring the running state information of a sensor of the terminal and determining a target application program according to the running state information;
the acquisition module is used for acquiring the use state information of the target application program and acquiring the use scene information of the terminal;
and the control module is used for controlling the sensor according to the use state information of the target application program and the use scene information of the terminal.
9. A terminal, comprising a memory and one or more processors; the memory stores one or more programs; the program includes instructions for executing the control method of the terminal sensor according to any one of claims 1 to 7; the processor is configured to execute the program.
10. A computer readable storage medium having stored thereon a plurality of instructions, wherein the instructions are loaded and executed by a processor to implement the steps of the method for controlling a terminal sensor according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110536180.5A CN113220531B (en) | 2021-05-17 | 2021-05-17 | Control method and device of terminal sensor, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110536180.5A CN113220531B (en) | 2021-05-17 | 2021-05-17 | Control method and device of terminal sensor, terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113220531A true CN113220531A (en) | 2021-08-06 |
CN113220531B CN113220531B (en) | 2023-06-20 |
Family
ID=77092443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110536180.5A Active CN113220531B (en) | 2021-05-17 | 2021-05-17 | Control method and device of terminal sensor, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113220531B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116999024A (en) * | 2023-05-26 | 2023-11-07 | 荣耀终端有限公司 | Physiological parameter detection method, electronic device, storage medium, and program product |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105302274A (en) * | 2015-09-22 | 2016-02-03 | 广东欧珀移动通信有限公司 | Sensor control method and apparatus |
CN108829453A (en) * | 2018-03-13 | 2018-11-16 | 广东欧珀移动通信有限公司 | Configuration method, device, terminal and the storage medium of sensor |
CN109151198A (en) * | 2018-08-27 | 2019-01-04 | 惠州Tcl移动通信有限公司 | A kind of control method, mobile terminal and storage medium close to light sensor |
CN110830653A (en) * | 2019-11-05 | 2020-02-21 | RealMe重庆移动通信有限公司 | Sensor control method, sensor control device, mobile terminal and storage medium |
CN110989819A (en) * | 2019-12-03 | 2020-04-10 | Oppo广东移动通信有限公司 | Doze mode control method, device, mobile terminal and storage medium |
-
2021
- 2021-05-17 CN CN202110536180.5A patent/CN113220531B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105302274A (en) * | 2015-09-22 | 2016-02-03 | 广东欧珀移动通信有限公司 | Sensor control method and apparatus |
CN108829453A (en) * | 2018-03-13 | 2018-11-16 | 广东欧珀移动通信有限公司 | Configuration method, device, terminal and the storage medium of sensor |
CN109151198A (en) * | 2018-08-27 | 2019-01-04 | 惠州Tcl移动通信有限公司 | A kind of control method, mobile terminal and storage medium close to light sensor |
CN110830653A (en) * | 2019-11-05 | 2020-02-21 | RealMe重庆移动通信有限公司 | Sensor control method, sensor control device, mobile terminal and storage medium |
CN110989819A (en) * | 2019-12-03 | 2020-04-10 | Oppo广东移动通信有限公司 | Doze mode control method, device, mobile terminal and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116999024A (en) * | 2023-05-26 | 2023-11-07 | 荣耀终端有限公司 | Physiological parameter detection method, electronic device, storage medium, and program product |
Also Published As
Publication number | Publication date |
---|---|
CN113220531B (en) | 2023-06-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9237460B2 (en) | Traffic control method and device | |
US9165136B1 (en) | Supervising execution of untrusted code | |
CN107748698A (en) | Start control method, device, storage medium and the terminal of application with broadcast mode | |
US10965680B2 (en) | Authority management method and device in distributed environment, and server | |
CN106102141A (en) | A kind of processing method and processing device based on packet | |
CN111240817B (en) | Resource scheduling method, resource scheduling device and storage medium | |
EP3486770B1 (en) | Processing method, device and storage medium for implementing automatic startup | |
CN113220531A (en) | Control method and device of terminal sensor, terminal and storage medium | |
CN109117280A (en) | The method that is communicated between electronic device and its limiting process, storage medium | |
CN109117279A (en) | The method that is communicated between electronic device and its limiting process, storage medium | |
EP3962180A1 (en) | Network-based control method for power consumption of applications, terminal and storage medium | |
DE112020004451T5 (en) | COORDINATE OPERATIONS OF MULTIPLE COMMUNICATIONS CHIPS VIA LOCAL HUB DEVICE | |
US11165715B2 (en) | Communication control method | |
CN111381943B (en) | Application program flash-back processing method, intelligent terminal and storage medium | |
CN112491731A (en) | Flow table processing method and device, computer equipment and storage medium | |
CN112632032A (en) | Data migration method and device, storage medium and terminal equipment | |
CN114691347A (en) | Thread memory obtaining method and device, intelligent terminal and storage medium | |
CN114629737B (en) | Bandwidth adjustment method, device, gateway equipment and storage medium | |
CN114375025B (en) | Networking management method for terminal and related product thereof | |
CN113411265B (en) | Power grid monitoring system preposition service channel dynamic adjusting method based on risk prediction | |
US20220357789A1 (en) | Application freezing control method and device, terminal, and readable storage medium | |
CN112306790B (en) | Memory data acquisition method and device, intelligent terminal and storage medium | |
CN113688008B (en) | Clustering algorithm technology-based power grid monitoring system pre-service fault processing method | |
CN117278848A (en) | Camera resolution adjustment method, device, computer equipment and storage medium | |
CN116896589A (en) | Interface request flow control method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |