CN113220531B - 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
- CN113220531B CN113220531B CN202110536180.5A CN202110536180A CN113220531B CN 113220531 B CN113220531 B CN 113220531B CN 202110536180 A CN202110536180 A CN 202110536180A CN 113220531 B CN113220531 B CN 113220531B
- Authority
- CN
- China
- Prior art keywords
- terminal
- application program
- information
- target application
- sensor
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
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 terminal sensor; 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, the terminal lacks a method for controlling the use behaviors of the sensor, so that the sensor is possibly abused by an application program, and the power consumption of the terminal is abnormal and the privacy of a user is revealed.
Description
Technical Field
The present invention relates to the field of intelligent terminals, and in particular, to a method and apparatus for controlling a terminal sensor, a terminal, and a storage medium.
Background
At present, 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 a plurality of users, and various sensor equipment in the terminal provides a hardware basis for application program diversification functions. For example, the shake-shake function in the terminal is mainly realized based on an acceleration sensor, the horizontal-vertical screen switching function in the terminal is mainly realized based on a direction sensor, the brightness change function in the terminal is mainly realized based on a light sensor, the motion step counting function in the terminal is mainly realized based on an acceleration sensor or a step counting sensor, and the game function in the terminal is realized based on superposition of a gyroscope, the acceleration and the direction sensor.
However, in practical applications, the terminal defaults to essentially all applications that can use the sensor, i.e. lack of control over the use of the sensor. Because the terminal lacks a method for controlling the use behavior of the sensor, the phenomenon that the application programs misuse the sensor is likely to occur, so that the power consumption of the terminal is abnormal and the privacy of the user is revealed.
Accordingly, there is a need for improvement and development in the art.
Disclosure of Invention
The invention aims to solve the technical problems that aiming at the defects in the prior art, a control method, a device, a terminal and a storage medium of a terminal sensor are provided, and aims to solve the problems that in the prior art, the terminal lacks a method for controlling the use behavior of the sensor, so that the sensor is likely to be abused by an application program, and the power consumption of the terminal is abnormal and the privacy of a user is revealed.
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 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 includes:
and acquiring the running state information of the sensor, and taking the 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 status information of the target application program 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 larger than a preset sampling rate threshold value, determining that the using 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 category of the terminal according to the position information;
and when the state type of the terminal is not moving, 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 the operation mode information of the terminal, and determining the usage scenario information of the terminal according to the operation mode information, includes:
acquiring operation mode information of the terminal;
and when the running 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 of the terminal is lower than a preset threshold value.
In one embodiment, the controlling the sensor according to the usage status information of the target application and the usage scenario information of the terminal includes:
determining an 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;
and when the application program category corresponding to the target application program is a management and control category, sending an instruction for stopping data acquisition to the sensor or intercepting the data acquired by the sensor.
In one embodiment, the determining, according to the usage status information of the target application and the usage scenario information of the terminal, the application class corresponding to the target application according to a preset classification rule includes:
and when the using state information of the target application program is in a power consumption state and the using scene information of the terminal is in a static scene, determining the application program type corresponding to the target application program as a management and 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 the 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 contains instructions for executing the control method of the terminal sensor as described in any one of the above; the processor is configured to execute the program.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium having a plurality of instructions stored thereon, where the instructions are loaded and executed by a processor to implement the steps of the method for controlling a terminal sensor described in any one of the above.
The invention has the beneficial effects that: according to the embodiment of the invention, the running state information of the sensor of the terminal is obtained, and the target application program is determined 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, the terminal lacks a method for controlling the use behaviors of the sensor, so that the sensor is possibly abused by an application program, and the power consumption of the terminal is abnormal and the privacy of a user is revealed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and other drawings may be obtained according to the drawings without inventive effort to those skilled in the art.
Fig. 1 is a flow chart 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 schematic 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 more clear and clear, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and rear … …) are included in the embodiments of the present invention, the directional indications are merely used to explain the relative positional relationship, movement conditions, etc. between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
At present, 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 a plurality of users, and various sensor equipment in the terminal provides a hardware basis for application program diversification functions. For example, the shake-shake function in the terminal is mainly realized based on an acceleration sensor, the horizontal-vertical screen switching function in the terminal is mainly realized based on a direction sensor, the brightness change function in the terminal is mainly realized based on a light sensor, the motion step counting function in the terminal is mainly realized based on an acceleration sensor or a step counting sensor, and the game function in the terminal is realized based on superposition of a gyroscope, the acceleration and the direction sensor.
However, in practical applications, the terminal defaults to essentially all applications that can use the sensor, i.e. lack of control over the use of the sensor. Because the terminal lacks a method for controlling the use behavior of the sensor, the phenomenon that the application programs misuse the sensor is likely to occur, so that the power consumption of the terminal is abnormal and the privacy of the user is revealed.
In view of the above-mentioned drawbacks of the prior art, the present invention provides a control method for a terminal sensor, by acquiring operation state information of a sensor of a terminal, determining a target application program according to the operation 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, the terminal lacks a method for controlling the use behaviors of the sensor, so that the sensor is possibly abused by an application program, and the power consumption of the terminal is abnormal and the privacy of a user is revealed.
As shown in fig. 1, the present embodiment provides a control method of a terminal sensor, including the steps of:
step S100, acquiring running state information of a sensor of a terminal, and determining a target application program according to the running state information.
In order to prevent the sensor in the terminal from being abused, the present embodiment requires monitoring of the operation states of all the sensors in the terminal. Specifically, the embodiment needs to acquire the running state information of the sensor on the primary terminal in real time or at intervals of a preset time period, determine the sensor in the running state according to the acquired running state information, and use a target application program of the sensor.
In one implementation manner, the sensor includes a plurality of sub-sensors, the types of data collected by each sub-sensor in 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;
step S102, when the running state information of the sensor is running, an application program using the sensor is used as the target application program.
In short, the present embodiment focuses on an application program to be controlled, that is, the target application program is an application program using sensors in the terminal, so that the present embodiment needs to monitor the operation states of all the sensors, and once the running sensor is found, needs to monitor the application program using the sensor. It will be appreciated that there will typically not be only one sensor in the terminal, but a plurality of sensors, each of which is responsible for taking one type of data, the terminal providing a hardware basis for the application diversification function, precisely by means of a wide variety of sensor devices. For example, the shake-shake function in the terminal is mainly realized based on an acceleration sensor, the horizontal-vertical screen switching function in the terminal is mainly realized based on a direction sensor, the brightness change function in the terminal is mainly realized based on a light sensor, the motion step counting function in the terminal is mainly realized based on an acceleration sensor or a step counting sensor, and the game function in the terminal is realized based on superposition of a gyroscope, the acceleration and the direction sensor. Therefore, this embodiment needs to monitor the operation states of all the sensors, and once it is monitored that the operation state of any one of the sensors is operation, an application using the sensor is used as a target application.
As shown in fig. 1, the method further comprises the steps of:
step 200, obtaining the use state information of the target application program, and obtaining the use scene information of the terminal.
Specifically, in order to avoid excessively controlling the terminal sensor, the embodiment formulates a set of strategy for controlling the terminal sensor, and determines whether the behavior of using the sensor by the target application needs to be controlled by acquiring the use state information of the target application using the sensor and the use scene information of the current terminal, namely, the embodiment adopts a selective control strategy, thereby ensuring the normal operation of the terminal and meeting the normal demands of users on application programs.
In one implementation, in order to obtain the usage status information of the target application, the present 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 that the use state information of the target application program is 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, and a visible process, where the process currently used by the user refers to an interface that can be directly seen and operated by the user, and the visible process refers to an interface that can be seen by the user but cannot be 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 larger than a preset sampling rate threshold value, determining that the use state information of the target application program is a power consumption state. The preset sample rate threshold may be set to, for example, 50 times 1 second. The background process in this embodiment refers to a process in which an application program runs in the background, or a process without any service (i.e., a process in which a home key is pressed after the activity is turned on, which is minimized). Because the background process user can not directly see, once the behavior of the abnormal use sensor appears, the abnormal use sensor is difficult to control and the high power consumption phenomenon easily appears, so the selective control strategy in the embodiment is mainly used for controlling the application program in the background process to use the sensor, and the high sampling rate situation appears.
In one implementation, in order to obtain usage scenario information of a terminal, the present embodiment needs to first obtain location information of the terminal. In practical application, the terminal basically has a GPS positioning function, so that the embodiment can determine the position information of the terminal by collecting the GPS data of the terminal. And then determining the state type of the terminal according to the position information, wherein the state type is moving or not moving. Specifically, in this embodiment, the position information of the terminal at the starting time point and the position information of the terminal at the ending time point need to be acquired in a preset time period, and the moving distance of the terminal in the preset time period is determined according to the position information corresponding to the two time points respectively, and when the moving distance is greater than a preset distance threshold, the state category of the terminal is determined to be moving; and when the moving distance is smaller than or equal to a preset distance threshold value, determining that the state type of the terminal is not moved.
And when the state type of the terminal is not moving, 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 generally indicates that the user is in a moving state while the background process of the terminal generally runs a plurality of applications for recording the moving state of the user, in order to ensure the normal operation of the applications, the embodiment controls the state of the terminal only when the state of the terminal is not moving, that is, controls the use of the sensor in the terminal only when the terminal is stationary. In addition, since a part of application programs in the terminal may also need to be normally started by using a sensor in the terminal when the terminal is stationary, in order to further ensure the normal operation of the application programs in the terminal, in this embodiment, operation mode information of the terminal needs to be acquired, and when the operation mode information is a low power consumption mode, the use scene information of the terminal is determined to be a stationary scene, where the low power consumption mode is a mode in which the power consumption in the terminal is lower than a preset threshold, for example, a night mode or a sleep mode or a screen-off mode.
In other words, in practical applications, the use of the sensor in the background process is mainly applied to step counting, for example, the WeChat sports or the Payment treasury sports widely used by the user and the individual financial applications also have step number rewarding functions, so that the terminal is usually required to keep the normal use of the sensor under the use situation that the user performs activities, that is, the use of the sensor cannot be excessively controlled. Conversely, the use of the sensors in the terminal may be actively controlled while the terminal is in a user stationary use scenario. Therefore, the present embodiment may employ different control policies according to the usage scenario in which the terminal is located.
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, since the usage status 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 usage scenario information of the terminal may reflect whether the terminal is in a mobile mode or not and whether the terminal is in a low power consumption usage mode (i.e., a sleep mode or a night mode or a screen-off mode), it may be determined whether the target application program really needs to use a sensor to perform data acquisition under the current situation according to the two information, so that the sensor is controlled to realize data communication between the control sensor and the target application program, avoid unnecessary energy consumption of the terminal and prevent privacy behavior data leakage of a user.
In one implementation manner, the step S300 specifically includes the following steps:
step 301, determining an 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;
and step S302, when the application program category corresponding to the target application program is a management category, sending an instruction for stopping data acquisition to the sensor or intercepting the data acquired by the sensor.
In short, this embodiment needs to combine the two information, i.e., the usage status information of the target application program and the usage scenario information of the terminal, to determine whether the target application program is an application program that needs to be controlled to use the sensor behavior, so as to achieve the purpose of selectively controlling the usage of the sensor in the terminal. In one implementation, the preset classification rules are as follows: and when the using state information of the target application program is the using state, determining the application program type corresponding to the target application program as the regardless control type. And when the use scene information of the terminal is an active scene, determining the application program category corresponding to the target application program as an uncontrolled category. And when the use state information of the target application program is in a power consumption state and the use scene information of the terminal is in a static scene, determining that the application program type corresponding to the target application program is a management and control type.
Specifically, when the usage state information of the target application is a usage state, it indicates that the target application is an application being used by the user or an application visible to the user, so that the behavior of the target application using the sensor may not be controlled, that is, the target application is set to be regardless of the control type. When the usage scenario information of the terminal is an active scenario, the terminal is indicated to be continuously moving, namely, the user is in a motion state, so that the behavior of the sensor used by the target application program is not controlled no matter whether the target application program is a foreground process or not, namely, the target application program is set to be in a control type. When the usage status information of the target application is in a power consumption status and the usage scenario information of the terminal is in a static scenario, the target application is a background running application, and the terminal is static at this time, i.e. the user does not move, and basically no sensor is needed in the scenario, if the target application is allowed to use the sensor to collect data, it is possible to cause greater energy consumption of the terminal or leakage of privacy behavior data of the user, so that the target application is set into a management type, i.e. the behavior of the target application using the sensor needs to be controlled.
In order to accurately control the behavior of the application program in the terminal using the sensor, in one implementation manner, the embodiment may further obtain type information of the target application program, and determine whether the target application program is a management type application program according to the type information of the target application program. Specifically, in this embodiment, the respective applications are classified in advance according to respective functions of all applications in the terminal, for example, the type information in this embodiment may include a web surfing type (such as QQ browser APP, various electronic commerce APP, news APP, financial APP), a video type, a music type, a tool type (such as application market APP and learning tool APP), a camera type (such as camera APP or metagraph APP), and the like, and a corresponding management and control rule is set in advance for each type of application, for example, a web surfing type, a video type, a music type, a tool type, and a management and control rule of a camera type may be set to be controllable. Specifically, after determining that the application program category corresponding to the target application program is the management category, determining whether the application program category corresponding to the target application program needs to be modified 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 the application program category corresponding to the target application program as a control category. When the control rule of the target application program is uncontrollable, the application program category corresponding to the target application program is modified to be an uncontrolled category.
In one implementation, this embodiment may further set an exemption policy in order to avoid the use of the overcontrol sensor, since it is considered that the user may have a habit of switching between different application interfaces temporarily often. Specifically, when the time of using the target application program for the previous time is obtained and the interval duration between the time of using the target application program for the previous time and the current time is smaller than the first time threshold, the application program type of the sensor used by the target application program is set to be regardless of the control type, for example, the first time threshold can be set to 90 seconds, that is, the used application program in 90 seconds does not control the behavior of the sensor used by the application program. When the interval between the time of using the target application program for the first time and the current time is longer than the second time threshold value, which indicates that the target application program is not used for a long time, the target application program is set to be in a control type, for example, the second time threshold value can be set to 7 days, that is, the application program which is not used within seven days is set to be in the control type.
In one implementation, the application program that needs to control the behavior of the use sensor may also be determined in a manner that simply sets up a black-and-white list. In the black-and-white list, applications on the white list do not control their behavior using the sensor. Applications that are in the blacklist need to have control over their behavior using the sensor.
When the target application program is determined to be in the management and control type, in order to realize data communication between the control sensor and the target application program, an instruction for stopping data acquisition can be sent to the sensor or data acquired by the sensor can be intercepted. And when the target application program is of a control type, acquiring data acquired by the sensor, and transmitting 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 invention, the inventor makes corresponding tests, and the following are related test data, and the test data show that the method provided by the invention has a certain electricity-saving effect.
The current of the on-screen standby heavy-duty scene plus the high-power consumption Sensor demo is optimized by 102mA compared with the off current when the Sensor background is started;
the current of the on-screen standby heavy-duty scene and the high-power consumption-free Sensor demo is optimized by 16mA compared with the off current when the Sensor background is started;
the background control of the Sensor is started to optimize 195.1mA compared with the closed current;
the background control ratio of the on Sensor is optimized by 8.9mA compared with the off current.
In addition, in the functional test, the important focus is on whether the functions of a browser, a video, music, news, an electronic commerce, an application market, a learning tool, financial, a camera or a figure-beautifying software and all scenes can be normally used, and especially whether the functions of WeChat step counting, financial APP step counting (such as security Jin Guangu) and APP connected with a bracelet pass the functional test. In addition, in a heavy-load scene, the warm starting performance of the application is improved to a certain extent. Furthermore, the inventors found from the log in big data feedback that the behavior of the background application over abusing the terminal sensor is significantly reduced.
Based on the above embodiment, the present invention further provides a control device of a terminal sensor, as shown in fig. 3, where the device includes:
the determining module 01 is used for acquiring the running state information of the sensor of the terminal and determining a target application program according to the running state information;
an obtaining module 02, configured to obtain usage status information of the target application program, and obtain usage scenario information of the terminal;
and the control module 03 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.
In one implementation manner, as shown in fig. 2, the control module in this embodiment is mainly placed in the cloud to implement, that is, the control policy of the terminal sensor is provided in the cloud, so that different control policies can be conveniently customized according to different projects, or temporary adjustment of individual policies is convenient, and in addition, cloud pushing of a black-and-white list can be provided, so that an abnormal problem can be conveniently and immediately repaired.
Based on the above embodiment, the present invention also provides a terminal, and a functional block diagram thereof may be 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 adapted to provide computing and control capabilities. The memory of the terminal includes 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 the operating system and computer programs in the non-volatile storage media. The network interface of the terminal is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of controlling a terminal sensor. The display screen of the terminal may be a liquid crystal display screen or an electronic ink display screen.
It will be appreciated by those skilled in the art that the functional block diagram shown in fig. 4 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the terminal to which the present inventive arrangements may be applied, and that a particular terminal may include more or less components than those shown, or may combine some of the components, or 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, the one or more programs including instructions for performing a control method of a terminal sensor.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
In summary, the invention discloses a control method and device for a terminal sensor, a terminal and a storage medium, wherein the method and device for controlling the terminal sensor are used for determining a target application program according to operation state information of the sensor of the terminal; 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, the terminal lacks a method for controlling the use behaviors of the sensor, so that the sensor is possibly abused by an application program, and the power consumption of the terminal is abnormal and the privacy of a user is revealed.
It is to be understood that the present invention is not limited to the examples described above, and that modifications and variations may be made by those skilled in the art in light of the foregoing description, all such modifications and variations being intended to be included within the scope of the invention as defined in the appended claims.
Claims (5)
1. A method for controlling a terminal sensor, the method comprising:
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;
controlling the sensor according to the use state information of the target application program and the use scene information of the terminal;
reflecting the process information of the target application program through the use state information of the target application program;
the use scene information of the terminal reflects the state type and the running mode information of the terminal;
the obtaining the usage status information of the target application program 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;
when the data sampling rate is larger than a preset sampling rate threshold value, determining that the using state information of the target application program is in a power consumption state;
the obtaining the usage scenario information of the terminal includes:
acquiring the position information of the terminal, and determining the state category of the terminal according to the position information;
when the state type of the terminal is not moving, acquiring the operation mode information of the terminal, and determining the use scene information of the terminal according to the operation mode information;
the obtaining the operation mode information of the terminal, and determining the usage scenario information of the terminal according to the operation mode information includes:
acquiring operation mode information of the terminal;
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 of the terminal is lower than a preset threshold value;
the controlling the sensor according to the usage status information of the target application program and the usage scenario information of the terminal includes:
determining an 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;
when the application program category corresponding to the target application program is a management and control category, sending an instruction for stopping data acquisition to the sensor or intercepting the data acquired by the sensor;
the determining the application program category corresponding to the target application program according to the use state information of the target application program and the use scene information of the terminal and a preset classification rule comprises the following steps:
when the using state information of the target application program is in a power consumption state and the using scene information of the terminal is in a static scene, determining that the application program type corresponding to the target application program is a management and control type;
the method further comprises the steps of:
acquiring type information of target application programs, wherein the type information is determined by functions corresponding to the target application programs respectively;
determining a management and control rule corresponding to the target application program according to the type information of the target application program;
and when the control rule is controllable, determining the application program category corresponding to the target application program as a control category.
2. The method for controlling a sensor of a terminal according to claim 1, wherein the acquiring 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, an application program using the sensor is used as the target application program.
3. A control device of a terminal sensor, characterized in that the control device comprises:
the determining module is used for acquiring the running state information of the 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;
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;
the obtaining the usage status information of the target application program 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;
when the data sampling rate is larger than a preset sampling rate threshold value, determining that the using state information of the target application program is in a power consumption state;
the obtaining the usage scenario information of the terminal includes:
acquiring the position information of the terminal, and determining the state category of the terminal according to the position information;
when the state type of the terminal is not moving, acquiring the operation mode information of the terminal, and determining the use scene information of the terminal according to the operation mode information;
the obtaining the operation mode information of the terminal, and determining the usage scenario information of the terminal according to the operation mode information includes:
acquiring operation mode information of the terminal;
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 of the terminal is lower than a preset threshold value;
the controlling the sensor according to the usage status information of the target application program and the usage scenario information of the terminal includes:
determining an 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;
when the application program category corresponding to the target application program is a management and control category, sending an instruction for stopping data acquisition to the sensor or intercepting the data acquired by the sensor;
the determining the application program category corresponding to the target application program according to the use state information of the target application program and the use scene information of the terminal and a preset classification rule comprises the following steps:
when the using state information of the target application program is in a power consumption state and the using scene information of the terminal is in a static scene, determining that the application program type corresponding to the target application program is a management and control type;
further comprises:
acquiring type information of target application programs, wherein the type information is determined by functions corresponding to the target application programs respectively;
determining a management and control rule corresponding to the target application program according to the type information of the target application program;
and when the control rule is controllable, determining the application program category corresponding to the target application program as a control category.
4. A terminal comprising a memory and one or more processors; the memory stores one or more programs; the program comprising instructions for executing the control method of the terminal sensor according to any one of claims 1 to 2; the processor is configured to execute the program.
5. 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 of controlling an end sensor according to any of the preceding claims 1-2.
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 CN113220531A (en) | 2021-08-06 |
CN113220531B true 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) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116999024B (en) * | 2023-05-26 | 2024-07-16 | 荣耀终端有限公司 | 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 |
Also Published As
Publication number | Publication date |
---|---|
CN113220531A (en) | 2021-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112230758B (en) | Frame rate adjustment method, device, equipment and computer readable storage medium | |
US9723487B2 (en) | Mobile device security system | |
CN106102141B (en) | A kind of processing method and processing device based on packet | |
US9237460B2 (en) | Traffic control method and device | |
US20170310818A1 (en) | Terminal equipment control method, terminal equipment and system, computer storage media | |
US10965680B2 (en) | Authority management method and device in distributed environment, and server | |
CN107545067B (en) | Log information reporting method and device, storage medium, ADSP and terminal | |
US10956176B2 (en) | Processing method, device and storage medium for implementing automatic startup | |
CN107748698A (en) | Start control method, device, storage medium and the terminal of application with broadcast mode | |
CN110673640B (en) | Unmanned aerial vehicle control method, device, equipment and storage medium | |
CN113660173B (en) | Flow control method, device, computer equipment and storage medium | |
CN113220531B (en) | Control method and device of terminal sensor, terminal and storage medium | |
WO2014063487A1 (en) | Traffic control method and device | |
CN114040449A (en) | Terminal network speed control method, device, terminal and storage medium | |
US11943127B2 (en) | Network-based control method for power consumption of applications, terminal and storage medium | |
CN110928630A (en) | Activation control method, device and equipment for application program window and storage medium | |
WO2022161221A1 (en) | Method and device for protecting user information, and storage medium | |
CN114189559A (en) | Interface repeat request processing method and system based on Axios | |
CN109283995A (en) | A kind of method and system reducing internet-of-things terminal Subscriber Identity Module power consumption | |
CN107562602A (en) | Log information report method, device and storage medium, ADSP and terminal | |
DE112020004451T5 (en) | COORDINATE OPERATIONS OF MULTIPLE COMMUNICATIONS CHIPS VIA LOCAL HUB DEVICE | |
CA2802396A1 (en) | Systems and methods for managing emulation sessions | |
CN107609117B (en) | Log information reporting method and device, storage medium, ADSP and terminal | |
CN112486573B (en) | Data processing method, data processing equipment and storage medium of monitoring system | |
CN111783002B (en) | Webpage data loading method and device, electronic 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 |