CN111434154A - Management method for internal and peripheral devices of terminal and terminal - Google Patents

Management method for internal and peripheral devices of terminal and terminal Download PDF

Info

Publication number
CN111434154A
CN111434154A CN201880078982.2A CN201880078982A CN111434154A CN 111434154 A CN111434154 A CN 111434154A CN 201880078982 A CN201880078982 A CN 201880078982A CN 111434154 A CN111434154 A CN 111434154A
Authority
CN
China
Prior art keywords
terminal
display
scene
parameter
scheduling module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201880078982.2A
Other languages
Chinese (zh)
Inventor
陈寒冰
乔永红
李刚
李杰纯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN111434154A publication Critical patent/CN111434154A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/04TPC
    • H04W52/18TPC being performed according to specific parameters
    • H04W52/28TPC being performed according to specific parameters using user profile, e.g. mobile speed, priority or network state, e.g. standby, idle or non transmission
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application provides a management method of peripheral devices in a terminal and the terminal, relates to the technical field of communication, and can reduce the use of the peripheral devices while meeting the data precision required by application, thereby reducing the power consumption of the terminal. The method comprises the following steps: the method comprises the steps that a terminal obtains a real-time operation scene where the terminal is located at present; when the real-time operation scene is a first operation scene, the terminal indicates the peripheral device to work according to a first working parameter; when the real-time operation scene is a second operation scene, the terminal indicates the peripheral device to work according to a second working parameter; and when the peripheral device works according to the first working parameter, the power consumption generated by the terminal is smaller than the power consumption generated by the terminal when the peripheral device works according to the second working parameter.

Description

Management method for internal and peripheral devices of terminal and terminal Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a management method of peripheral devices in a terminal and the terminal.
Background
In order to provide more abundant functions, more and more peripheral devices, such as a Global Positioning System (GPS) device for positioning, a liquid crystal display device (L acquired digital display, L CD) for displaying, a wireless fidelity (Wi-Fi) device for wireless transmission, a Bluetooth (BT) device, etc., are generally integrated outside a main chip of a terminal.
The application installed in the terminal can request to acquire the device data detected by the peripheral device from the relevant peripheral device by calling the service interface with the relevance. For example, when the map application runs in the terminal, an Application Programming Interface (API) provided by a location manager (location manager) may be periodically called to request to query the current location data, so as to drive the GPS device to perform positioning, and the location data obtained by the positioning is fed back to the map application.
When some applications provide functions such as location services, peripheral devices are frequently requested to improve device data in order to improve data accuracy, for example, a GPS device is requested to perform positioning every 1 second, and then the GPS device performs positioning every 1 second according to the frequency. However, when the user is in an application scenario with low data accuracy requirement, the GPS device performs positioning according to this frequency, which results in unnecessary power consumption of the terminal.
Disclosure of Invention
Embodiments of the present application provide a method for managing peripheral devices in a terminal and a terminal, which can reduce the use of the peripheral devices while satisfying the data accuracy required by an application, thereby reducing the power consumption of the terminal.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in a first aspect, an embodiment of the present application provides a method for managing a peripheral device in a terminal, including: the method comprises the steps that a terminal obtains a real-time operation scene where the current terminal is located; when the real-time operation scene is a first operation scene, the terminal indicates the peripheral device to work according to a first working parameter; when the real-time operation scene is a second operation scene, the terminal indicates the peripheral device to work according to a second working parameter; and when the peripheral device works according to the first working parameter, the power consumption generated by the terminal is smaller than the power consumption generated by the terminal when the peripheral device works according to the second working parameter.
That is to say, the terminal can control the peripheral device to operate under different operating parameters according to the current real-time operating scene so as to respond to a service request initiated by the application to the peripheral device, so that the terminal can reduce the power consumption overhead of the peripheral device when the data precision required by the application is not high, thereby saving the power consumption of the terminal.
In a possible design method, the peripheral device is a positioning device, and the operating parameter is an operating frequency of the positioning device, wherein the operating scenario may specifically include a motion state of rest, walking, running, riding, low-speed traffic or high-speed traffic; the moving speed of the terminal in the first operation scene is smaller than that in the second operation scene, and the first working parameter is smaller than the second working parameter.
That is, the two processes of the terminal providing the location service to the application and the terminal controlling the location device to perform location are respectively managed and controlled by the terminal, wherein the application can still request and obtain the location result from the location manager as normal as in the prior art, and the location device in the terminal can operate at different operating frequencies according to the current motion state of the terminal. Therefore, when the terminal is in a motion state with low requirement on positioning accuracy, the working frequency of the positioning device can be reduced, and the power consumption expense caused by the operation of the positioning device is reduced while the positioning accuracy is ensured.
In a possible design method, a terminal acquires a real-time running scene where the current terminal is located, and the method specifically includes: the terminal detects the moving speed of the terminal; and the terminal determines the current motion state of the terminal according to the moving speed.
In a possible design method, a framework layer of a terminal includes a scheduling module for managing a working state of the positioning device, and a first flag bit preset by the terminal is used for storing an identifier of a motion state determined by the terminal last time.
Then, the terminal instructs the peripheral device to operate according to the first operating parameter, which specifically includes: responding to a positioning request of a first application to the positioning device, a position manager providing position service in the terminal sends a first query request to the scheduling module, wherein the first query request is used for querying the working frequency of the positioning device; in response to the first query request, the scheduling module determines a first working frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; the scheduling module sends the first working frequency to the position manager, so that the position manager drives the positioning device to position according to the first working frequency.
Or, the terminal instructs the peripheral device to operate according to the first operating parameter, specifically including: responding to a positioning request of the first application to the positioning device, a position manager providing position service in the terminal sends a second query request to the scheduling module, wherein the second query request is used for requesting whether the positioning device is allowed to be driven to be positioned or not; in response to the second query request, the scheduling module determines a first working frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; if the time length of the positioning request from the last positioning of the positioning device is less than a first working period, the scheduling module sends a message which does not allow the positioning device to be driven to position to the position manager; if the time length of the positioning request from the last positioning of the positioning device is greater than or equal to a first working period, the scheduling module sends a message for driving the positioning device to position to the position manager, and the first working period is the reciprocal of a first working frequency.
Or, the terminal instructs the peripheral device to operate according to the first operating parameter, specifically including: when the motion state indicated by the first flag bit in the scheduling module is a first motion state, the scheduling module determines a first working frequency corresponding to the first motion state; the scheduling module sends the first working frequency to a position manager which provides position service in the terminal, so that the position manager drives the positioning device to position according to the first working frequency.
In a possible design method, the working parameter is a playing parameter when the speaker plays audio; the operation scene may specifically include an audio playing scene of a music playing scene, a video playing scene, a voice playing scene, or a game playing scene; the requirement of the first operation scene on the sound quality is smaller than the requirement of the second operation scene on the sound quality.
That is to say, in the embodiment of the present application, the terminal may adjust the playing parameters of the peripheral device in real time when playing the audio according to the current actual audio playing scene. Therefore, when the terminal is in a scene with low requirement on the tone quality, the terminal can reduce parameters required by the peripheral device during working, thereby reducing power consumption expense caused by excessive working of the peripheral device and simultaneously meeting the requirement on the tone quality or the requirement on the display effect in the scene.
In a possible design method, a terminal acquires a real-time operation scene where a current terminal is located, including: the terminal determines a current audio playing scene according to the information of the current running application; or the terminal determines the current audio playing scene according to the currently played audio content.
In a possible design method, a frame layer of the terminal includes a scheduling module for managing the working state of the peripheral device, and a second flag bit preset by the terminal is used for storing an identifier of an audio playing scene determined by the terminal last time.
Then, the terminal instructs the peripheral device to operate according to the first operating parameter, which specifically includes: when the audio playing scene indicated by the second flag bit in the scheduling module is a first audio playing scene, the scheduling module determines a first playing parameter corresponding to the first audio playing scene; the scheduling module sends the first playing parameter to a multimedia manager which provides audio playing service in the terminal, so that the multimedia manager drives the loudspeaker to play audio according to the first playing parameter.
Or, the terminal instructs the peripheral device to operate according to the first operating parameter, specifically including: responding to a playing request of a second application to the loudspeaker, and sending a first acquisition request to the scheduling module by a multimedia manager providing audio playing service in the terminal, wherein the first acquisition request is used for inquiring playing parameters during audio playing; in response to the first obtaining request, the scheduling module determines a first playing parameter corresponding to a first audio playing scene according to the first audio playing scene indicated by the second flag bit; the scheduling module sends the first playing parameter to the multimedia manager, so that the multimedia manager drives the loudspeaker to play audio according to the first playing parameter.
In one possible design method, the peripheral device is a display, and the operating parameter is a display parameter of the display; the operation scene comprises a plurality of display scenes with different requirements on picture quality; the requirement of the first operation scene on the image quality is smaller than that of the second operation scene.
That is to say, in the embodiment of the present application, the terminal may adjust the working parameters of the display in real time according to the current actual display scene. Therefore, when the terminal is in a scene with low requirement on the display effect, the terminal can reduce parameters required by the peripheral device during working, thereby reducing power consumption overhead caused by excessive working of the peripheral device and simultaneously meeting the requirement on tone quality or the requirement on the display effect in the scene.
In a possible design method, a terminal acquires a real-time operation scene where a current terminal is located, including: and the terminal determines the current display scene according to the information of the current running application, or the terminal determines the current display scene according to the current display content.
In a possible design method, a frame layer of the terminal includes a scheduling module for managing the working state of the peripheral device, and a third flag bit preset by the terminal is used for storing an identifier of a display scene determined by the terminal last time.
Then, the terminal instructs the peripheral device to operate according to the first operating parameter, which specifically includes: when the display scene indicated by the third flag bit in the scheduling module is a first display scene, the scheduling module determines a first display parameter corresponding to the first display scene; the scheduling module sends the first display parameter to a graphic manager providing a display service in the terminal, so that the graphic manager drives the display to display according to the first display parameter.
Or, the terminal instructs the peripheral device to operate according to the first operating parameter, specifically including: responding to a playing request of a third application to the display, sending a second acquisition request to the scheduling module by a graphic manager providing a display service in the terminal, wherein the second acquisition request is used for inquiring display parameters of the display; in response to the second obtaining request, the scheduling module determines a first display parameter corresponding to the first display scene according to the first display scene indicated by the third flag bit; the scheduling module sends the first display parameter to the graphics manager, so that the graphics manager drives the display to display according to the first display parameter.
In a possible design method, the operating scenario includes an operating state of the AP, where the operating state includes an operating mode, a sleep mode, and an off mode, and then, when the first operating scenario is that the AP is in the sleep mode or the off mode, the operating parameter is an operating frequency of the peripheral device, and the first operating parameter is smaller than the second operating parameter. Therefore, the frequency of the peripheral device reporting data to the AP is reduced, namely the times of awakening the AP are reduced, so that the power consumption of the AP and the power consumption of the peripheral device are reduced.
In a second aspect, an embodiment of the present application provides a method for managing peripheral devices in a terminal, including: the method comprises the steps that a terminal obtains the working state of a current AP, wherein the working state comprises an operation mode, a sleep mode and a closing mode; when the working state is the sleep mode, the terminal instructs the peripheral device to discard the received data, or instructs the peripheral device to cache the received data, or instructs the peripheral device to report the received data to the AP periodically. Therefore, the peripheral device does not need to wake up the AP to upload the data when receiving the data every time, and the effect of reducing the power consumption of the AP is achieved.
In a third aspect, an embodiment of the present application provides a terminal, including: the detection unit is used for acquiring a real-time operation scene where the current terminal is located; a processing unit to: when the real-time operation scene is a first operation scene, indicating the peripheral device to work according to a first working parameter; when the real-time operation scene is a second operation scene, indicating the peripheral device to work according to a second working parameter; and when the peripheral device works according to the first working parameter, the power consumption generated by the terminal is smaller than the power consumption generated by the terminal when the peripheral device works according to the second working parameter.
In one possible design method, the peripheral device is a positioning device, and the operating parameter is an operating frequency of the positioning device, wherein the operating scene includes a motion state of rest, walking, running, riding, low-speed traffic or high-speed traffic; the moving speed of the terminal in the first operation scene is smaller than that in the second operation scene, and the first working parameter is smaller than the second working parameter.
In one possible design approach, the detection unit is specifically configured to: detecting the moving speed of the terminal; and determining the current motion state of the terminal according to the moving speed.
In a possible design method, the processing unit specifically includes a scheduling module located in a framework layer for managing the working state of the positioning device, and a location manager for providing location services; the first zone bit preset by the terminal is used for storing the identification of the motion state determined by the terminal at the latest time.
Wherein the processing unit is specifically configured to: the position manager sends a first query request to the scheduling module, wherein the first query request is used for querying the working frequency of the positioning device; in response to the first query request, the scheduling module determines a first working frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; the scheduling module sends the first working frequency to the position manager, so that the position manager drives the positioning device to position according to the first working frequency.
Or, the processing unit is specifically configured to: in response to a positioning request of the first application to the positioning device, the position manager sends a second query request to the scheduling module, wherein the second query request is used for requesting whether to allow the positioning device to be driven for positioning or not; in response to the second query request, the scheduling module determines a first working frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; if the time length of the positioning request from the last positioning of the positioning device is less than a first working period, the scheduling module sends a message which does not allow the positioning device to be driven to position to the position manager; if the time length of the positioning request from the last positioning of the positioning device is greater than or equal to a first working period, the scheduling module sends a message for driving the positioning device to position to the position manager, and the first working period is the reciprocal of a first working frequency.
Or, the processing unit is specifically configured to: when the motion state indicated by the first flag bit in the scheduling module is a first motion state, the scheduling module determines a first working frequency corresponding to the first motion state; the scheduling module sends the first working frequency to a position manager which provides position service in the terminal, so that the position manager drives the positioning device to position according to the first working frequency.
In one possible design method, the working parameter is a playing parameter when the speaker plays audio; the operation scene comprises an audio playing scene in a music playing scene, a video playing scene, a voice playing scene or a game playing scene; the requirement of the first operation scene on the sound quality is smaller than that of the second operation scene.
In one possible design approach, the detection unit is specifically configured to: determining a current audio playing scene according to the information of the currently running application; or, determining the current audio playing scene according to the currently played audio content.
In a possible design method, the processing unit specifically includes a scheduling module located in a framework layer for managing the working state of the peripheral device, and a multimedia manager for providing an audio playing service; and the second zone bit preset by the terminal is used for storing the identifier of the audio playing scene determined by the terminal at the latest time.
Wherein the processing unit is specifically configured to: when the audio playing scene indicated by the second flag bit in the scheduling module is a first audio playing scene, the scheduling module determines a first playing parameter corresponding to the first audio playing scene; the scheduling module sends the first playing parameter to the multimedia manager, so that the multimedia manager drives the loudspeaker to play audio according to the first playing parameter.
Or, the processing unit is specifically configured to: responding to a playing request of a second application to the loudspeaker, and sending a first acquisition request to the scheduling module by the multimedia manager, wherein the first acquisition request is used for inquiring playing parameters during audio playing; in response to the first obtaining request, the scheduling module determines a first playing parameter corresponding to a first audio playing scene according to the first audio playing scene indicated by the second flag bit; the scheduling module sends the first playing parameter to the multimedia manager, so that the multimedia manager drives the loudspeaker to play audio according to the first playing parameter.
In one possible design method, the peripheral device is a display, and the operating parameter is a display parameter of the display; the operation scene comprises a plurality of display scenes with different requirements on picture quality; the requirement of the first operation scene on the image quality is smaller than that of the second operation scene.
In one possible design approach, the detection unit is specifically configured to: and determining the current display scene according to the information of the currently running application, or determining the current display scene according to the current display content.
In one possible design method, the processing unit specifically includes a scheduling module located in a framework layer for managing the operating state of the peripheral device, and a graphics manager for display services; and the third zone bit preset by the terminal is used for storing the identifier of the display scene determined by the terminal at the latest time.
Wherein the processing unit is specifically configured to: when the display scene indicated by the third flag bit in the scheduling module is a first display scene, the scheduling module determines a first display parameter corresponding to the first display scene; the scheduling module sends the first display parameter to the graphics manager, so that the graphics manager drives the display to display according to the first display parameter.
Or, the processing unit is specifically configured to: responding to a playing request of a third application to the display, and sending a second acquisition request to the scheduling module by the graph manager, wherein the second acquisition request is used for inquiring display parameters of the display; in response to the second obtaining request, the scheduling module determines a first display parameter corresponding to the first display scene according to the first display scene indicated by the third flag bit; the scheduling module sends the first display parameter to the graphics manager, so that the graphics manager drives the display to display according to the first display parameter.
In a possible design method, the operating scenario includes an operating state of the application processor AP, where the operating state includes an operating mode, a sleep mode, and an off mode, and when the first operating scenario is that the AP is in the sleep mode or the off mode, the operating parameter is an operating frequency of the peripheral device, and the first operating parameter is smaller than the second operating parameter.
In a fourth aspect, an embodiment of the present application provides a terminal, including: the detection unit is used for acquiring the working state of the current AP, and the working state comprises an operation mode, a sleep mode and a closing mode; a processing unit to: when the working state is the sleep mode, the peripheral device is instructed to discard the received data, or the peripheral device is instructed to cache the received data, or the peripheral device is instructed to report the received data to the AP periodically.
In a fifth aspect, an embodiment of the present application provides a terminal, including: a processor, a memory, a communication interface, and a display; the memory is used for storing computer execution instructions, the processor is coupled with the memory, and when the terminal runs, the processor executes the computer execution instructions stored in the memory so as to enable the terminal to execute any one of the management methods of the peripheral devices in the terminal.
In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on any one of the terminals, the instructions cause the terminal to execute a method for managing peripheral devices in any one of the terminals.
In a seventh aspect, an embodiment of the present application provides a computer program product including instructions, which, when run on any one of the terminals described above, causes the terminal to execute a method for managing peripheral devices in any one of the terminals described above.
In the embodiments of the present application, the names of the components in the terminal do not limit the device itself, and in practical implementations, the components may appear by other names. Insofar as the functions of the respective components are similar to those of the embodiments of the present application, they are within the scope of the claims of the present application and their equivalents.
In addition, the technical effects brought by any one of the design manners in the second aspect to the seventh aspect can be referred to the technical effects brought by the different design methods in the first aspect, and are not described herein again.
Drawings
Fig. 1 is a first schematic structural diagram of a terminal according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram illustrating an architecture of an operating system in a terminal according to an embodiment of the present disclosure;
fig. 3 is a first schematic structural diagram of a method for managing peripheral devices in a terminal according to an embodiment of the present application;
fig. 4 is a first flowchart illustrating a method for managing a peripheral device in a terminal according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a second method for managing peripheral devices in a terminal according to an embodiment of the present application;
fig. 6 is a third schematic structural diagram of a method for managing a peripheral device in a terminal according to an embodiment of the present application;
fig. 7 is a fourth schematic architecture diagram of a method for managing a peripheral device in a terminal according to an embodiment of the present application;
fig. 8 is a second flowchart illustrating a method for managing peripheral devices in a terminal according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a fifth method for managing peripheral devices in a terminal according to an embodiment of the present application;
fig. 10 is a third schematic flowchart of a method for managing a peripheral device in a terminal according to an embodiment of the present application;
fig. 11 is a sixth schematic structural diagram of a method for managing a peripheral device in a terminal according to an embodiment of the present application;
fig. 12 is a fourth schematic flowchart of a method for managing a peripheral device in a terminal according to an embodiment of the present application;
fig. 13 is a seventh schematic structural diagram illustrating a method for managing a peripheral device in a terminal according to an embodiment of the present application;
fig. 14 is an eighth schematic structural diagram of a method for managing a peripheral device in a terminal according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 16 is a third schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
The management method for the peripheral devices in the terminal provided by the embodiment of the application can be applied to any terminal integrated with the peripheral devices, such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR) device, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA) and the like, and the method is not limited in any way.
As shown in fig. 1, the terminal in the embodiment of the present application may be a mobile phone 100. The embodiment will be specifically described below by taking the mobile phone 100 as an example. It should be understood that the illustrated handset 100 is only one example of the above-described terminal, and that the handset 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components.
As shown in fig. 1, the mobile phone 100 may specifically include: a processor 101, Radio Frequency (RF) circuitry 102, memory 103, a touch screen 104, a bluetooth device 105, one or more sensors 106, a Wi-Fi device 107, a pointing device 108, audio circuitry 109, a peripheral interface 110, and a power system 111. These components may communicate over one or more communication buses or signal lines (not shown in fig. 1). Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 is not intended to be limiting, and that the handset 100 may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes the components of the handset 100 in detail with reference to fig. 1:
the processor 101 is a control center of the cellular phone 100, connects various parts of the cellular phone 100 using various interfaces and lines, and performs various functions of the cellular phone 100 and processes data by running or executing an application program stored in the memory 103 and calling data stored in the memory 103. In some embodiments, processor 101 may include one or more processing units; for example, the processor 101 may be an kylin 960 chip manufactured by Huanti technologies, Inc. In some embodiments of the present application, the processor 101 may further include a fingerprint verification chip for verifying the acquired fingerprint.
The rf circuit 102 may be used for receiving and transmitting wireless signals during the transmission and reception of information or calls. In particular, the rf circuit 102 may receive downlink data of the base station and then process the received downlink data to the processor 101; in addition, data relating to uplink is transmitted to the base station. Typically, the radio frequency circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency circuitry 102 may also communicate with other devices via wireless communication. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications, general packet radio service, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
The memory 103 is used for storing application programs and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running the application programs and data stored in the memory 103. The memory 103 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs (such as a sound playing function and an image playing function) required by at least one function; the storage data area may store data (e.g., audio data, a phonebook, etc.) created from use of the handset 100. Further, the memory 103 may include a high speed Random Access Memory (RAM), and may also include a non-volatile memory, such as a magnetic disk storage device, a flash memory device, or other volatile solid state storage device. The memory 103 may store various operating systems, such as those developed by apple Inc
Figure PCTCN2018080573-APPB-000001
Operating System, developed by Google
Figure PCTCN2018080573-APPB-000002
An operating system, etc. The memory 103 may be independent and connected to the processor 101 through the communication bus; memory 103 may also be capable of processingThe devices 101 are integrated together.
The touch screen 104 may specifically include a touch pad 104-1 and a display 104-2.
Wherein the touch pad 104-1 can capture touch operations of the user of the mobile phone 100 (e.g., operations of the user on or near the touch pad 104-1 using any suitable object such as a finger, a stylus, etc.) and transmit the captured touch information to other devices (e.g., the processor 101). Wherein, the touch operation of the user near the touch pad 104-1 can be called as floating touch; hover touch may refer to a user not needing to directly contact the touchpad in order to select, move, or drag a target (e.g., an icon, etc.), but only needing to be located near the terminal in order to perform a desired function. In addition, the touch pad 104-1 can be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave.
Display (also referred to as a display screen) 104-2 may be used to display information entered by or provided to the user as well as various menus for handset 100. The display 104-2 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The touch pad 104-1 may be overlaid on the display 104-2, and when the touch pad 104-1 detects a touch operation thereon or nearby, it may be transmitted to the processor 101 to determine the type of touch operation, and then the processor 101 may provide a corresponding visual output on the display 104-2 according to the type of touch operation. Although in FIG. 1, the touch pad 104-1 and the display screen 104-2 are shown as two separate components to implement the input and output functions of the cell phone 100, in some embodiments, the touch pad 104-1 and the display screen 104-2 may be integrated to implement the input and output functions of the cell phone 100.
It is understood that the touch screen 104 is formed by stacking multiple layers of materials, and only the touch pad (layer) and the display screen (layer) are shown in the embodiment of the present application, and other layers are not described in the embodiment of the present application. In addition, the touch pad 104-1 may be disposed on the front surface of the mobile phone 100 in a full panel manner, and the display screen 104-2 may also be disposed on the front surface of the mobile phone 100 in a full panel manner, so that a frameless structure can be implemented on the front surface of the mobile phone.
The handset 100 may also include a bluetooth device 105 for enabling data exchange between the handset 100 and other short-range terminals (e.g., cell phones, smart watches, etc.). The bluetooth device in the embodiment of the present application may be an integrated circuit or a bluetooth chip.
The handset 100 may also include at least one sensor 106, such as a fingerprint acquisition device 112, a light sensor, a motion sensor, and other sensors. Specifically, the fingerprint acquisition device 112 may be disposed on the back side of the handset 100 (e.g., below the rear camera), or the fingerprint acquisition device 112 may be disposed on the front side of the handset 100 (e.g., below the touch screen 104). For another example, the fingerprint acquisition device 112 may be configured in the touch screen 104 to implement a fingerprint identification function, that is, the fingerprint acquisition device 112 may be integrated with the touch screen 104 to implement a fingerprint identification function of the mobile phone 100; the light sensor may include an ambient light sensor that adjusts the brightness of the display of the touch screen 104 based on the intensity of ambient light, and a proximity sensor that turns off the display when the cell phone 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone 100, further description is omitted here.
The Wi-Fi device 107 is used for providing network access for the mobile phone 100 according to Wi-Fi related standard protocols, the mobile phone 100 can be accessed to a Wi-Fi access point through the Wi-Fi device 107, so that the mobile phone helps a user to send and receive e-mails, browse webpages, access streaming media and the like, and wireless broadband internet access is provided for the user. In other embodiments, the Wi-Fi device 107 can also act as a Wi-Fi wireless access point and can provide Wi-Fi network access to other terminals.
The positioning device 108 may specifically be a receiver of a positioning system such as Global Positioning System (GPS) or beidou satellite navigation system, russian G L ONASS, etc. after receiving the geographical location sent by the positioning system, the positioning device 108 may send the information to the processor 101 for processing or to the memory 103 for storage, in some other embodiments, the positioning device 108 may also be a receiver of an Assisted Global Positioning System (AGPS) that assists the positioning device 108 in performing ranging and positioning services by serving as an assist server, in which case the assist positioning server communicates with the positioning device 108 (i.e., GPS receiver) of the terminal such as the Mobile phone 100 via a wireless communication Network to provide positioning assistance, in some other embodiments, the positioning device 108 may also be based on a positioning technology of a Wi-Fi-access point, since each positioning technology of the positioning devices such as the Mobile phone 100 has a location device 108 (i.e., a Mobile phone access point) that may be activated by scanning a Mobile phone access point Code, and may also obtain information via a Mobile phone access point Code or a Mobile phone number indicating that the Mobile phone access point can be activated by scanning a Mobile phone access point id-Mobile phone access point 52, and the Mobile phone access point can obtain information via a Mobile phone access point Code 36wireless access point Code.
The audio circuitry 109, speaker 113, microphone 114 can provide an audio interface between a user and the handset 100. The audio circuit 109 may transmit the electrical signal converted from the received audio data to the speaker 113, and convert the electrical signal into a sound signal by the speaker 113 for output; on the other hand, the microphone 114 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 109, and outputs the audio data to the RF circuit 102 to be transmitted to, for example, another cellular phone, or outputs the audio data to the memory 103 for further processing.
Peripheral interface 110, which is used to provide various interfaces for external input/output devices (e.g., keyboard, mouse, external display, external memory, SIM card, etc.). For example, a mouse via a Universal Serial Bus (USB) interface, and a Subscriber Identity Module (SIM) card provided by a telecommunications carrier via metal contacts on a card slot of the SIM card. Peripheral interface 110 may be used to couple the aforementioned external input/output peripherals to processor 101 and memory 103.
The mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) for supplying power to each component, and the battery may be logically connected to the processor 101 through the power management chip, so as to implement functions of managing charging, discharging, and power consumption through the power supply device 111.
Although not shown in fig. 1, the mobile phone 100 may further include a camera (front camera and/or rear camera), a flash, a micro-projector, a Near Field Communication (NFC) device, and so on, which are not described in detail herein.
The devices in the mobile phone 100 that can communicate with the processor 101 may be referred to as peripheral devices of the mobile phone 100, and device data obtained when the peripheral devices operate may support applications running in an operating system to implement service functions such as navigation, display, playing, and transmission.
For example, the operating system of the mobile phone 100 may be an operating system such as Android or IOS, taking the Android operating system as an example, as shown in fig. 2, the Android operating system may be divided into four layers, and from a high layer to a low layer, the Android operating system is an application layer 201 (i.e., an APP layer), an application framework layer 202 (i.e., a framework layer), a system runtime library layer 203 (i.e., L ibraries or a native layer), and a L inux kernel layer 204.
The L inux kernel layer 204 can be used to control the security (security), memory management (memory management), program management (process management), network stack (network stack), driver model (driver model) and other functions of the mobile phone 100. L inux kernel layer 204 can also be used as an abstraction layer between hardware (e.g., CPU, network card, memory, etc.) and software stack, and can hide specific hardware details to provide uniform services for upper layers (the system operating library layer 203, the application framework layer 202 and the application layer 201).
For example, as also shown in FIG. 2, L inux kernel layer 204 may include a system resource manager 321 and/or a device driver 323 the system resource manager 321 may include a process manager (not shown), a memory manager (not shown), and a file system manager (not shown). the system resource manager 321 may perform control, allocation, recovery, etc. of system resources the device driver 323 may include, for example, a display driver (not shown), a camera driver (not shown), a Bluetooth driver (not shown), a shared memory driver (not shown), a USB driver (not shown), a keypad driver (not shown), a Wi-Fi driver (not shown), and/or an audio driver (not shown). furthermore, according to embodiments disclosed herein, the device driver 323 may include an inter-process communication (IPC) driver (not shown).
The system runtime library layer 203 includes C/C + + libraries, such as media library, system C library, and display manager library (surface manager), which can be used by different components in the Android system, so that the application adds new functions during runtime by using a programming language. According to embodiments disclosed herein, the system runtime layer 203 may perform functions related to input and output, management of memory, arithmetic functions, and the like.
The framework layer 202 provides developers with an API framework that can fully access applications. In particular, the frame layer 202 provides a very large number of APIs for developing application programs, and the frame layer 202 can provide functions to Applications (APPs) in the APP layer 201 through the APIs, so that the applications can efficiently use limited system resources in the electronic device.
For example, as shown in FIG. 2, the framework layer 202 provides an API framework that includes at least one of: an application manager 341, a window manager 342, a multimedia manager 343, a resource manager 344, a power manager 345, a database manager 346, a package manager 347, a connection manager 348, a notification manager 349, a location manager 340, a graphics manager 341, a security manager 352, and any other suitable and/or similar manager.
The application manager 341 may manage, for example, a lifecycle of at least one application. The window manager 342 may manage Graphical User Interface (GUI) resources used on the screen. The multimedia manager 343 may detect formats for reproducing various media files and may encode or decode the media files by using a codec suitable for the associated format. The resource manager 344 may manage resources, such as source code, memory, storage space, etc., of at least one application. The power manager 345 may operate with a basic input/output system (BIOS), may manage a battery or power, may provide power information for operation, and the like. The database manager 346 may manage the database in the following manner: enabling the generation, searching and/or alteration of a database to be used by at least one application. The package manager 347 may manage installation and/or update of applications distributed in the form of package files. The connection manager 348 may manage wireless connections such as Wi-Fi and BT. The notification manager 349 may display or report events, such as arrival messages, appointments, proximity alerts, etc., to the user in a manner that does not bother the user. The location manager 340 may manage location information of the electronic device. The graphic manager 341 may manage graphic effects to be provided to the user and/or UIs related to the graphic effects. The security manager 352 may provide various security functions for system security, user authentication, and the like. According to the embodiments disclosed herein, when the electronic device (e.g., the handset 100) has a telephone function, the middleware 330 may further include a telephone manager (not shown) for managing a voice telephone call function and/or a video telephone call function of the electronic device.
The application program layer 201 mainly includes an APP written by using java language, and when a user operates an operation interface on the APP, the user can interact with the system runtime library layer 203 or L inux kernel layer 204 by calling a relevant API in the framework layer 202, so as to implement a function corresponding to the operation interface.
Illustratively, as also shown in FIG. 2, system level applications and/or third party applications may be included in the application layer 201. For example, a home application 371, a dialing application 372, an SMS/MMS application 373, a mapping application 374, a browser application 375, a camera application 376, an alarm application 377, a contacts application 378, a voice dialing application 379, an email application 380, a calendar application 381, a media player application 382, an album application 383, a clock application 384, and any other suitable and/or similar application.
For example, referring to fig. 1-2, when the map application 374 is running, in order to provide location services to a user, the map application 374 needs to periodically (for example, every 1 second) request the location manager 350 in the framework layer 202 to acquire current location data, then, after receiving the request, the location manager 350 may call L inux kernel layer 204 or a device driver 323 in the HA L (Hardware Abstraction layer L layer) of the Android system to drive the positioning device 108 to perform positioning work, and then, after obtaining the positioning result, the positioning device 108 may report the positioning result to the L inux kernel layer 204, and the L inux kernel layer 204 packages the positioning result layer by layer and reports the packaging result to the map application 374 initiating the location request, so that the map application 374 may provide location services such as navigation, route planning and the like for the user based on the positioning result.
It can be seen that the working states of the peripheral devices such as the positioning device 108 in the prior art completely depend on the service request sent by the application in the APP layer. If the application frequently issues service requests to peripheral devices (for example, the positioning apparatus 108 described above), the positioning apparatus 108 needs to operate at a high frequency, which results in huge power consumption overhead, but if the frequency of issuing service requests to the positioning apparatus 108 by the application is too low, the positioning accuracy when the application provides positioning services to users may be affected, and therefore, how to reduce the power consumption overhead of the peripheral devices while satisfying the data accuracy required by the application becomes an urgent problem to be solved.
In this embodiment, as shown in fig. 3, a detection module for sensing a current operation scene is disposed in the terminal, and the detection module may detect a specific current real-time operation scene of the terminal, for example, a motion scene, an audio playing scene, a video display scene, and the like. As shown in fig. 3, a scheduling module 301 for managing the operating state of the peripheral device may also be disposed in the frame layer 202. The scheduling module 301 may obtain the real-time operation scene detected by the detection module, and determine the working parameters of the related peripheral devices according to different operation scenes. Thus, when the application has a requirement (for example, a positioning requirement, a playing requirement, or a display requirement) for calling the peripheral device when the APP layer runs, a peripheral device manager (for example, the location manager 350 in fig. 2, etc.) for managing the peripheral device in the frame layer 202 may negotiate, with the scheduling module 301, specific operating parameters of the peripheral device during operation, such as an operating frequency of the positioning apparatus, a playing parameter of audio playing, a display parameter of the display, etc. Subsequently, the peripheral device manager may control the peripheral device to operate under the working parameter according to the working parameter negotiated with the scheduling module 301, so that the terminal may control the peripheral device to operate under different working parameters according to the current real-time operation scenario, so as to respond to a service request initiated by an application to the peripheral device, so that the terminal may reduce power consumption overhead of the peripheral device when the application operates, thereby saving terminal power consumption.
It should be noted that the scheduling module 301 may be provided in the form of a stand-alone software module in the frame layer 202, or may be integrated in any system service in the frame layer 202, for example, in the location manager 340, the multimedia manager 343, or the graphics manager 341 shown in fig. 2. Of course, a person skilled in the art may also set the scheduling module 301 between the APP layer 201 and the frame layer 202 according to actual experience or an actual application scenario, or set the scheduling module 301 between the frame layer 202 and the kernel layer 204, which is not limited in this embodiment of the application, and the following embodiments all describe that the scheduling module 301 is independently set in the frame layer 202 as an example.
A method for managing a peripheral device according to an embodiment of the present application is described in detail below by taking a positioning apparatus in a terminal as an example of the peripheral device, and as shown in fig. 4, the method includes:
s401, the terminal periodically detects the current motion state of the terminal.
For example, the terminal may measure the current motion state of the terminal through one or more sensors of an acceleration sensor, a gravity sensor, a gyroscope, or a GPS device.
For example, the motion state of the terminal may be divided into various motion states such as still, walking, running, low-speed traffic, and high-speed traffic according to the magnitude of the speed. It is determined that the current motion state of the terminal is stationary when the moving speed of the terminal is equal to or approaches 0, it is determined that the current motion state of the terminal is walking when the moving speed of the terminal is (0, 5 km/h), it is determined that the current motion state of the terminal is running (or riding) when the moving speed of the terminal is (5km/h, 20 km/h), it is determined that the current motion state of the terminal is low-speed traffic when the moving speed of the terminal is (20km/h, 100 km/h), and it is determined that the current motion state of the terminal is high-speed traffic when the moving speed of the terminal is greater than 100 km/h.
Certainly, the motion state of the terminal can be divided into indoor and outdoor according to the position of the terminal, and the indoor can also comprise places such as home and work units; or, the terminal may further determine the motion state of the current terminal in combination with the speed and the position of the terminal when detecting the current motion state, for example, running at home, using the terminal on a subway, climbing stairs, taking an elevator, and the like, which is not limited in this embodiment of the present application.
In addition, similar to the scheduling module 301, the terminal may further provide a detection module for detecting the current motion state of the terminal in the frame layer, and be configured to execute the step S401. Furthermore, the detection module may store the identifier of the current motion state of the terminal obtained by each detection in a preset first flag bit. Subsequently, the scheduling module 301 may further determine an operating parameter corresponding to the current motion state of the terminal for the positioning apparatus, such as an operating frequency of the positioning apparatus, by reading the content in the first flag.
S402, if the current motion state of the terminal is the first motion state, the terminal indicates the positioning device to acquire and update the positioning result according to the first frequency.
And S403, if the current motion state of the terminal is the second motion state, the terminal indicates the positioning device to acquire and update the positioning result according to the second frequency.
The moving speed of the terminal in the first motion state is lower than that of the terminal in the second motion state, and the first frequency is lower than the second frequency. Here, the moving rate refers to a speed at which the terminal actually moves, for example, a speed during the process of the user carrying the terminal from point a to point B, and when the terminal only has a speed but does not move (for example, the user carrying the terminal runs on a treadmill, although the terminal has a speed, the movement generated by the terminal is small and negligible), it can be considered that the terminal does not have a moving rate or the moving rate is 0 at this time.
As shown in fig. 5, when a user opens a first application, namely, an encyclopedia (or opens a function of the first application that needs to provide a location service), the running encyclopedia application may send a location request for obtaining a current location result to a location manager in a frame layer, since this is the location request initiated by the encyclopedia application that is first received by the location manager, the location manager may call a driver of a location device in L inux kernel layer or HA L after receiving the location request, so as to drive the location device to start a location operation, and obtain a location result for the current terminal.
Or, after receiving the positioning request initiated by the hundred-degree map application, the location manager may also request the scheduling module 301 whether to drive the positioning apparatus to obtain the latest positioning result. Since the present location request is a location request initiated by the Baidu map application for the first time, the scheduling module 301 may send a response message to the location manager to approve the operation of the location device. Thus, after receiving the response message, the position manager can drive the positioning device to start positioning work, and obtain the positioning result of the current terminal.
The first application is one or more applications that may be capable of providing location services, for example, a map application, a weather application, or a trip application, and the like, which is not limited in this embodiment of the application.
Similar to the first flag bit, the terminal may further store the latest positioning result obtained after each positioning by the positioning device in a preset storage unit. Then, the location manager may report the location result stored in the storage unit to the hundred-degree map application initiating the location request by reading the content in the storage unit. The storage unit may be specifically a register or a memory, and the like, which is not limited in this embodiment of the application.
Subsequently, the positioning result obtained by the positioning device each time positioning can be updated in the storage unit, and when the first application (for example, the hundred degree map application) subsequently sends a positioning request to the location manager again, the location manager may determine to report the positioning result stored in the storage unit to the first application through interaction with the scheduling module 301, or re-drive the positioning device to obtain the latest positioning result to report to the first application, so that the first application completes the positioning service.
It should be noted that the positioning device referred to in the embodiments of the present application may refer to any peripheral device capable of providing a positioning function, for example, one or more of a GPS device, a Wi-Fi device, or a modulation and demodulation device (Modem), and the embodiments of the present application do not limit this.
When the positioning device is a GPS device, the location manager in the frame layer that calls the GPS device to provide location service may specifically be an L BS (location based service) module, when the positioning device is a Wi-Fi device, the location manager in the frame layer that calls the Wi-Fi device to provide location service may specifically be a Wi-Fi manager (Wi-Fi manager), and when the positioning device is a Modem, the location manager in the frame layer that calls the Modem to provide location service may specifically be a telephone manager (TelephonyManager).
In one possible design method, as shown in fig. 6, a scheduling module 301 for managing the operating state of the positioning apparatus is disposed in a frame layer of the terminal. The scheduling module 301 may determine a corresponding operating frequency for the positioning apparatus according to the motion state of the current terminal by reading the motion state of the latest detected terminal stored in the first flag bit.
For example, as shown in fig. 7, when the moving rate of the terminal in the motion state is higher, the terminal needs higher precision for the positioning service, so the scheduling module 301 may determine a higher operating frequency (e.g. 5 times per second) for the positioning device, and the period for the positioning device to perform positioning is smaller; accordingly, as shown in fig. 7, when the moving rate of the terminal in the motion state is lower, the terminal requires relatively lower precision for the positioning service, so that the scheduling module 301 may determine a lower operating frequency for the positioning device (e.g., 1 time per 10 seconds), at this time, the period for the positioning device to perform positioning is longer, the number of times of operation of the positioning device is reduced, and thus the power consumption overhead caused by frequent positioning of the positioning device is reduced.
Then, when the terminal receives a positioning request initiated by the first application for the first time, the location manager may periodically request the scheduling module 301 to acquire the positioning frequency of the current positioning apparatus. After receiving the request of the location manager, as shown in fig. 6, the scheduling module 301 may determine a corresponding operating frequency for the positioning device according to the motion state of the current terminal in the first flag bit, and feed back the operating frequency to the location manager, so that the location manager may drive the positioning device to operate according to the operating frequency.
For example, if the motion state of the terminal is the first motion state (e.g., walking state) with a low movement rate, it indicates that the movement rate of the user is low at this time, and even if the positioning device is frequently called to perform positioning (e.g., positioning 10 times per second), the obtained positioning results of several adjacent times hardly change, and a large amount of unnecessary power consumption is consumed when the positioning device operates. Therefore, when the motion state of the terminal is the walking state, the scheduling module 301 may determine that the operating frequency in the walking state is a lower first frequency for the positioning device (e.g., trigger the positioning device to position 1 time per second), and send the first frequency to the location manager. Furthermore, the position manager can trigger the positioning device to perform positioning according to a first lower frequency, so that the positioning accuracy provided by the positioning device to the first application in the first motion state can be ensured, the working frequency of the positioning device can be reduced, and the power consumption expense of the positioning device can be saved.
For another example, if the motion state of the terminal is a second motion state (e.g., a high-speed traffic state) with a higher moving speed, it indicates that the moving speed of the user is higher at this time, and the positioning accuracy of the positioning service such as navigation and the like can be achieved only by obtaining the positioning result with a higher frequency. Therefore, when the motion state of the terminal is switched to the high speed traffic state, the scheduling module 301 may determine, for the positioning device, a second frequency at which the operating frequency in the high speed traffic state is higher (for example, trigger the positioning device to position 10 times per second), and send the second frequency to the location manager. Furthermore, the position manager can trigger the positioning device to perform positioning according to a higher second frequency, so that the positioning accuracy provided by the positioning device to the first application in the second motion state is ensured.
Similarly, after the positioning device measures a new positioning result each time according to the first frequency or the second frequency, the terminal may update the new positioning result to the storage unit, so that the location manager may obtain the latest positioning result from the storage unit according to the positioning request and send the latest positioning result to the first application initiating the positioning request.
Of course, the location manager may also request the scheduling module 301 to determine a corresponding operating frequency for the positioning apparatus according to the motion state of the current terminal when receiving the positioning request initiated by the first application for the first time, which is not limited in this embodiment of the present application.
In another possible design method, since the scheduling module 301 may determine the corresponding operating frequency for the positioning apparatus according to the current motion state of the terminal, the scheduling module may determine when to allow the positioning apparatus to operate and when not to allow the positioning apparatus to operate. Then, each time the location manager receives a location request initiated by the first application, the location manager may query the scheduling module 301 whether to allow the driving location device to work at this time to obtain a new location result.
For example, the scheduling module 301 may determine that the terminal is in the walking state by reading the first flag, and further, the scheduling module may determine that the operating frequency of the positioning device in the walking state is once every 5 seconds, that is, the operating cycle of the positioning device is 5 seconds. Then, if the time interval between the time when the location manager receives the location request this time and the time when the location device operates last time is less than 5 seconds, it indicates that the location result requested this time by the first application is almost the same as the location result obtained last time, and therefore, the scheduling module 301 may instruct the location manager to feed back the location result stored last time in the storage unit to the first application, and at this time, the location device does not need to perform the location operation, which may reduce the power consumption consumed by the location device.
Correspondingly, if the time interval between the time when the location manager receives the location request and the time when the location device works last time is greater than or equal to 5 seconds, it indicates that the location result stored in the current storage unit cannot meet the location accuracy of the first application in the walking state, and then the scheduling module 301 may instruct the location manager to drive the location device to perform location so as to obtain the latest location result and feed the latest location result back to the first application.
In another possible design method, in order to reduce the power consumption overhead caused by frequent interaction between the location manager and the scheduling module 301, the scheduling module 301 may be further configured to periodically read the motion state stored in the first flag bit, and when the motion state stored in the first flag bit is updated, the scheduling module actively determines the operating frequency of the location device at that time, and sends the operating frequency to the location manager, so that the location manager drives the location device to perform location according to the operating frequency.
For example, when the first flag is updated from the walking state to the running state, the scheduling module 301 may adjust the operating frequency of the positioning device from a lower first frequency to a higher second frequency, and send the second frequency to the location manager, so that the location manager drives the positioning device to perform positioning according to the second frequency, so as to meet the location accuracy when the first application provides the location service in the running state.
In addition, when the motion state of the terminal is detected to be a static state, the scheduling module can indicate the positioning device to enter a dormant state, so that the power consumption of the positioning device is reduced to the maximum extent. At this time, when the first application initiates the positioning request, the first application may use the positioning result cached in the storage unit to implement the positioning service. Wherein the stationary state may further include an absolute stationary state and a relative stationary state, and the terminal may be determined to be in the absolute stationary state (e.g., the terminal is used while sitting, standing, or lying down) when the terminal has neither a change in displacement nor a change in velocity for a period of time (e.g., the terminal is used while being placed on a table, etc.); when the terminal has not undergone a change in displacement over a period of time, but has undergone a change in speed, (e.g., use of the terminal while running on a treadmill, etc.), it may be determined that the terminal is in a relatively stationary state.
Or, when the motion state of the terminal is detected to be an indoor state, since the accuracy of the GPS device in indoor positioning is low, the scheduling module may instruct the GPS device to enter the sleep state, and then the terminal may use another positioning device (e.g., a Wi-Fi device) to perform positioning.
It should be noted that the terminal may start to periodically detect the current motion state of the terminal after the first application initiates the positioning request for the first time, or may start to periodically detect the current motion state of the terminal before the first application initiates the positioning request for the first time, that is, the execution sequence between step S401 and steps S402-S403 is not limited in this embodiment of the application.
It can be seen that, in the embodiment of the present application, the two processes of the terminal providing the location service to the application and the terminal controlling the location device to perform location are respectively managed and controlled by the terminal, wherein the application can still request and obtain the location result from the location manager as normal as in the prior art, and the location device of the terminal can operate at different operating frequencies according to the current motion state of the terminal. Therefore, when the terminal is in a motion state with low requirement on positioning accuracy, the working frequency of the positioning device can be reduced, and the power consumption expense caused by the operation of the positioning device is reduced while the positioning accuracy is ensured.
A method for managing a peripheral device according to an embodiment of the present application is described in detail below by taking a Speaker (SPK) in a terminal as an example of the peripheral device, and as shown in fig. 8, the method includes:
s801, the terminal periodically detects the current audio playing scene of the terminal.
Specifically, the audio playing scene may include a music playing scene, a video playing scene, a voice playing scene, a game playing scene, and the like. The terminal can determine the current audio playing scene by acquiring parameters such as a package name (package name) of the currently running application, an ID (identity) of the main thread and the like.
For example, the terminal may classify each application supporting audio playing as a corresponding audio playing scene in advance. For example, a music application, a video application and a game application are installed in the terminal, wherein the music application belongs to a music playing scene, the video application belongs to a video playing scene, and the game application belongs to a game playing scene.
Then, the terminal may periodically obtain the packet name of the currently running application, and determine the audio playing scene to which the current terminal belongs according to the packet name. As shown in fig. 9, a storage unit may be arranged in the terminal for storing a flag bit (e.g., a second flag bit) of a latest audio playing scene, and subsequently, after the terminal determines a current audio playing scene each time, the identifier of the determined audio playing scene may be updated in the second flag bit, so that the subsequent terminal may adjust the playing parameters when working towards the speaker according to the audio playing scene indicated in the second flag bit.
In addition, the terminal can also preset the priority order among different applications according to the requirements of the user on the tone quality, and as the requirements of general users on the tone quality when listening music and voice are high, the requirements on the tone quality when watching video are general, and the requirements on the tone quality when playing games are low, the priority of the application playing music and voice can be set to be the highest, the priority of the game application is the lowest, and the priority of the video application is centered.
Therefore, when a plurality of applications run in the terminal at the same time, the terminal can determine the audio playing scene to which the application with the highest priority belongs as the current audio playing scene of the terminal.
S802, when the current audio playing scene of the terminal is a first playing scene, the terminal sets the playing parameters of the loudspeaker when playing the audio as the first playing parameters.
And S803, when the current audio playing scene of the terminal is a second playing scene, setting the playing parameter of the speaker playing the audio as the second playing parameter by the terminal.
And the requirement on the tone quality in the first playing scene is lower than that in the second playing scene, and the power consumption of the terminal when the terminal works according to the first playing parameter is lower than that of the loudspeaker when the terminal works according to the second playing parameter.
Specifically, because the requirements of the user on the sound quality are different in different audio playing scenes, for the audio playing scene with low sound quality requirement, the terminal can correspondingly reduce the playing parameters of the speaker when playing the audio, thereby reducing the power consumption of peripheral devices such as a power Amplifier (AP) or a speaker when playing the audio, and reducing the power consumption consumed by the terminal.
The playing parameter may be an EQ (equalizer) parameter or a volume parameter. The volume parameter generally refers to loudness when audio is played, and when the loudness is larger, the power consumption of the power amplifier is larger; the EQ parameters serve to adjust the timbre by performing gain or attenuation on one or more frequency bands of the sound. Generally, EQ parameters include frequency (frequency), gain (gain), and bandwidth (quantize). The frequency can be used for setting a frequency point of the audio, the gain can be used for adjusting the gain or attenuation of the audio on the frequency, and the bandwidth is used for setting the frequency band size of the gain or attenuation. Generally, low-frequency components in the played audio are generally the main reason for consuming power, and therefore, reducing the low-frequency gain when playing the audio in an audio playing scene with low requirements on sound quality can significantly reduce the power consumption of the terminal.
Then, in step S802, if it is detected in step S801 that the current audio playing scene is the first playing scene (e.g., game playing scene) with lower sound quality requirement, the terminal may set the playing parameter when the speaker plays the audio to the first playing parameter with lower value, for example, reduce the default loudness of the terminal from 75dB to 62dB, and reduce the default low-frequency gain of the terminal from 58dB to 38dB, so that the power consumption consumed by the terminal when the subsequent speaker plays the audio using the playing parameter can be reduced.
Correspondingly, in step S803, if it is detected in step S801 that the current audio playing scene is the second playing scene (for example, a music playing scene) with a higher requirement on sound quality, the terminal may set the playing parameter of the audio to be played to the second playing parameter with a higher value. Therefore, the multimedia manager can call the loudspeaker to play the audio to be played according to the second playing parameter, so that the requirement of the second application on the tone quality when the second application plays the audio in the second playing scene is met.
In one possible design method, as also shown in fig. 9, the scheduling module 301 of the frame layer is provided with corresponding relationships between different audio playing scenes and different playing parameters. Then, after the scheduling module 301 determines that the current audio playing scene is the first playing scene by reading the second flag bit, the playing parameter when the speaker plays the audio is determined as the first playing parameter corresponding to the first playing scene, and the first playing parameter is sent to the multimedia manager providing the audio playing function. Therefore, when a subsequent multimedia manager receives an audio playing request sent by any application (namely, a second application) supporting audio playing in the terminal, the multimedia manager can call the loudspeaker to play audio according to the first playing parameter, so that the power consumption overhead during audio playing is reduced, and meanwhile, the requirement of the second application on the tone quality during audio playing in the first playing scene can be ensured.
In another possible design method, as shown in fig. 9, each time the second application sends an audio playing request to the multimedia manager in the frame layer, the multimedia manager may request the scheduling module 301 to obtain a playing parameter corresponding to the audio playing scene at that time. Then, in response to the request sent by the multimedia manager, the scheduling module 301 may determine a playing parameter when the audio is played at this time according to the playing scene indicated by the second flag bit, and send the playing parameter to the multimedia manager, so that the multimedia manager may invoke the speaker to play the audio according to the playing parameter.
In other embodiments of the present application, when the second application sends an audio playing request to the multimedia manager in the frame layer, the multimedia manager may also set a playing parameter when the speaker plays audio according to a packet name or type of the second application. For example, for a navigation type application with low requirement on sound quality, the multimedia manager can set playing parameters such as low loudness and low-frequency gain, so that the vibration frequency of the loudspeaker during working is reduced, and the power consumption generated by the loudspeaker is reduced; for the application of music types with higher requirements on tone quality, the multimedia manager can set playing parameters such as higher loudness and low-frequency gain, and the like, so that better tone quality is provided when the loudspeaker works.
It should be noted that, a person skilled in the art may divide different audio playing scenes according to actual experience or actual application scenes, and set specific values of playing parameters in the different audio playing scenes, which is not limited in this embodiment of the present application.
A method for managing a peripheral device according to an embodiment of the present application is described in detail below with a display (e.g., L CD) in a terminal as an example of the peripheral device, and as shown in fig. 10, the method includes:
s1001, the terminal periodically detects the current display scene of the terminal.
For example, as shown in table 1, the display scenes may be divided into 4 types of display scenes (i.e., display scenes 1 to 4 in table 1) with different requirements on display effect according to specific contents displayed by the terminal. The display scene 4 is display content in an image library application with a high requirement on display effect, the display scene 3 is display content in a UI, a video, a photo preview or an electronic book with a high requirement on display effect, the display scene 2 is display content in a general shopping, news, social or educational application with a high requirement on display effect, and the display scene 1 is display content in a browser, a game, weather or navigation application with a low requirement on display effect.
TABLE 1
Displaying scenes Displaying content Display effect requirement
Displaying scene 4 Picture library Height of
Displaying scene 3 UI, video, photo preview, electronic book Is higher than
Displaying scene 2 Shopping, news, social, education In general
Displaying scene 1 Browser, game, weather, navigation Is low in
Then, in step S1001, the terminal may determine the current display scene by acquiring the specific display content in the current display in combination with table 1, or the terminal may also determine the current display scene by combining table 1 according to the type of the currently running application.
As shown in fig. 11, a flag (e.g., a third flag) for storing the latest display scene may be set in the terminal, and when the terminal determines the current display scene each time, the identifier of the determined display scene may be updated in the third flag, so that the subsequent terminal may adjust the display parameters of the display according to the display scene indicated in the third flag when the display works.
S1002, when the current display scene of the terminal is a first display scene, if the terminal sets the display parameters of the display to be the first display parameters.
And S1003, when the current display scene of the terminal is a second display scene, setting the display parameters of the display to be the second display parameters by the terminal.
The requirement for the display effect in the first display scene is lower than the requirement for the display effect in the second display scene, and the power consumption of the display when the display works by using the first display parameter is lower than the power consumption of the display when the display works by using the second display parameter.
Because the requirements of the user on the display effect are different in different display scenes, for a display scene with low requirement on the display effect (for example, the display scene 4 in table 1), the terminal can correspondingly reduce the display parameters when the display is displayed, thereby reducing unnecessary power consumption consumed when the display is operated.
The display parameter may include one or more of resolution, brightness, or contrast of the display, which is not limited in this embodiment. When the resolution, brightness or contrast is higher, the larger the power consumption generated when the display works is, and the better the display effect is; when the resolution, brightness or contrast is lower, the power consumption generated when the display operates is smaller, and the display effect is reduced accordingly. The terminal may change the luminance of the display by adjusting the gray scale value of each pixel unit in the display, or may change the luminance of the display by adjusting the gray scale values of different primary colors (e.g., red, blue, and green) in each pixel unit, which is not limited in this embodiment of the present application.
Then, in step S1002, if it is detected in step S1001 that the current display scene is the display scene 1 (i.e. the first display scene), since the requirement for the display effect in the display scene 1 is low, the terminal may set the display parameter of the current display content to the first display parameter with a low value, for example, adjust the brightness of the display from 85 to 70. In this way, as also shown in fig. 11, the graphics manager may invoke the display to display according to the first display parameter, so as to reduce power consumption consumed by the display, and simultaneously, ensure a display effect of the third application in the first display scene.
Accordingly, in step S1003, if it is detected in step S1001 that the current display scene is the display scene 4 (i.e. the second display scene), since the requirement for the display effect in the display scene 4 is high, the terminal may set the display parameter of the current display content to the second display parameter with a higher value. In this way, the graphics manager may invoke the display to display according to the second display parameter, thereby ensuring the display effect of the third application in the second display scene.
For example, as shown in fig. 11, the scheduling module of the framework layer is provided with a corresponding relationship between different display scenes and different display parameters. Then, after the scheduling module determines the current display scene through the third flag bit, the display parameter corresponding to the current display scene may be determined according to the pair relationship. Then, the scheduling module may send the determined display parameter to the graphics manager, so that when the graphics manager subsequently receives a display request sent by any application (i.e., a third application) supporting image display, the graphics manager may call the display to display according to the determined display parameter.
Still alternatively, as shown in fig. 11, each time the third application sends a display request to the graphics manager in the frame layer, the graphics manager may request the scheduling module to acquire the display parameters corresponding to the current display scene. Then, in response to the request sent by the graphics manager, the scheduling module may determine a display parameter of the display according to the display scene indicated by the third flag bit, and send the display parameter to the graphics manager, so that the graphics manager may invoke the display to display according to the display parameter.
In other embodiments of the present application, when the third application sends a display request to the graphics manager in the frame layer, the graphics manager may also set display parameters of the display according to the packet name or type of the third application. For example, for an application such as an weather application with a low image quality requirement, the graphics manager may set a low brightness, resolution, and other display parameters, so as to reduce power consumption of the display; for the application of cameras, galleries and the like with high image quality requirements, the image manager can set display parameters such as high brightness and resolution to ensure that the display provides good image quality when working.
It should be noted that, a person skilled in the art may divide different display scenes according to actual experience or actual application scenes, and set specific values of display parameters in the different display scenes, which is not limited in this embodiment of the present application.
It can be seen that, in the embodiment of the present application, the terminal may adjust, in real time, parameters of the peripheral device (e.g., a speaker or a display) during operation according to an actual scene (e.g., an audio playing scene or a display scene) in which the terminal is currently located. Therefore, when the terminal is in a scene with low requirements on tone quality or display effect, the terminal can reduce parameters required by the peripheral devices during working, thereby reducing power consumption overhead caused by excessive working of the peripheral devices and meeting the requirements on tone quality or display effect in the scene.
In other embodiments of the present application, there is also provided a method for reducing power consumption overhead of an Application Processor (AP) in a terminal, as shown in fig. 12, the method including:
and S1201, the terminal periodically detects the current operation data of the terminal.
The operation data may specifically include the motion state detected in step S401, such as still, walking, running, low-speed traffic, high-speed traffic, and the like, or may include the audio playing scene detected in step S801, such as a music playing scene, a video playing scene, a voice playing scene, a game playing scene, and the like, or may further include the display scene detected in step S1001, such as the display scenes 1 to 4 in the table 1, or the operation data may further include parameters reflecting the current terminal requirements of the user, such as signal strength of the terminal, on/off of a screen, or a usage habit of the user, and the like, which is not limited in this embodiment of the present application.
And S1202, the terminal determines the working mode of the AP according to the current operation data.
For example, the operating modes of the AP may include an operating mode, a sleep mode, and an off mode. Then, in step S1202, if the operation data detected in step S1201 reflects that the current usage demand of the terminal by the user is high, for example, the user is playing a game on the terminal, the terminal may determine that the operation mode of the AP is the operation mode; if the operation data detected in step S1201 reflects that the user' S current demand for use of the terminal is low, for example, the user is sleeping or flying, the terminal may determine that the operation mode of the AP is a sleep mode or an off mode.
Of course, a person skilled in the art may divide the operation mode of the AP according to actual experience or actual application scenarios, which is not limited in this embodiment of the present application.
And S1203, when the working mode of the AP is the sleep mode, the terminal intercepts data acquired by the peripheral device.
In step S1203, if it is determined that the operating mode of the AP is the sleep mode, in order to reduce unnecessary power consumption overhead caused by the peripheral device frequently waking up the AP to report data, the terminal may control the peripheral device (e.g., a Wi-Fi device, a bluetooth device, or a GPS device, etc.) to reduce a frequency of acquiring data, or intercept a frequency of reporting, to the AP, the data acquired by the peripheral device to the AP, so as to reduce power consumption overhead caused by frequently waking up the AP.
In one possible design approach, when the operating mode of the AP is the sleep mode, the scheduling module for managing the peripheral devices may set the operating mode of one or more peripheral devices to the intercept mode. In the interception mode, the working frequency of the peripheral device is reduced, so that the frequency of reporting data to the AP by the peripheral device is reduced, that is, the number of times that the AP is awakened is reduced, and the power consumption of the AP and the peripheral device is reduced.
For example, as shown in fig. 13, the operation mode of the Wi-Fi device includes two modes, namely data transparent transmission mode and data interception mode, and when the operation mode of the AP is the sleep mode, the scheduling module may set the operation mode of the Wi-Fi device to the data interception mode. When the working frequency of the Wi-Fi device in the data interception mode is lower than that of the Wi-Fi device in the data transmission mode, for example, the working frequency of the Wi-Fi device for acquiring data every 1 second can be reduced to the working frequency of the Wi-Fi device for acquiring data every 10 seconds. Subsequently, after the Wi-Fi device acquires the data, the AP can still be awakened normally through modes such as interruption and the like, and the data is reported to the AP.
In one possible design approach, a management module may be provided in the peripheral device for managing the reporting of data to the AP. Still taking a Wi-Fi device as an example of a peripheral device, as shown in fig. 14, the Wi-Fi device may continue to receive data normally by using a method in the prior art, but after the Wi-Fi device receives data, if a management module in the Wi-Fi device inquires that a current AP operating mode is a sleep mode, the management module may set a mode in which the Wi-Fi device uploads data to the AP to an intercept mode. In the interception mode, the Wi-Fi device may discard the received data, or the Wi-Fi device may cache the received data until the management module inquires that the current working mode of the AP is, and then report the working mode to the AP, or the Wi-Fi device may also periodically upload the received data to the AP. Therefore, the Wi-Fi device does not need to wake up the AP to upload data when receiving the data every time, and the effect of reducing the power consumption of the AP is achieved.
Therefore, in the embodiment of the application, the terminal can recognize the current use requirement of the user on the terminal, and then intercepts the frequency of the peripheral device for receiving data when the use requirement of the user on the terminal is low, or intercepts the frequency of the peripheral device for reporting data to the AP, so that the frequency of awakening the AP when the work requirement is not high is reduced, and the effect of reducing the power consumption of the AP is achieved.
It is to be understood that the above-mentioned terminal and the like include hardware structures and/or software modules corresponding to the respective functions for realizing the above-mentioned functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
In the embodiment of the present application, the terminal and the like may be divided into functional modules according to the method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
In the case of adopting a method of dividing each functional module corresponding to each function, fig. 15 shows a schematic structural diagram of a terminal related in the foregoing embodiment, where the terminal is used to implement the method described in each method embodiment, and the method specifically includes: a detection unit 1501 and a processing unit 1502.
Wherein, the detecting unit 1501 is configured to support the terminal to execute the process S401 in fig. 4, the process S801 in fig. 8, the process S1001 in fig. 10, and the process S1201 in fig. 12; the processing unit S1502 is configured to support the terminal to execute the processes S402-S403 in fig. 4, the processes S802-S803 in fig. 8, the processes S1002-S1003 in fig. 10, and the processes S1202-S1203 in fig. 12. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
In the case of using an integrated unit, the above-described detection unit 1501 and the processing unit 1502 may be integrated as a processing module. Of course, the terminal may further include a storage module, a communication module, and an input/output module. At this time, as shown in fig. 16, a schematic diagram of a possible structure of the terminal according to the above embodiment is shown, which includes a processing module 1601, a communication module 1602, an input/output module 1603, and a storage module 1604.
The processing module 1601 is configured to control and manage an operation of the terminal. The communication module 1602 is used for supporting communication between the terminal and other network entities. The input/output module 1603 is used to receive information input by a user or output information provided to the user and various menus of the terminal. The storage module 1604 is used to store program codes and data of the terminal.
Illustratively, the Processing module 1601 may be a Processor or a controller, such as a Central Processing Unit (CPU), a GPU, a general purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others.
The communication module 1602 may be a transceiver, a transceiver circuit, an input-output device or a communication interface, etc. For example, the communication module 1602 may be specifically a bluetooth device, a Wi-Fi device, a peripheral interface, and so on.
The storage module 1604 may be memory, which may include high-speed Random Access Memory (RAM), and may also include non-volatile memory, such as magnetic disk storage, flash memory devices, or other volatile solid state storage devices.
The input/output module 1603 may be an input/output device such as a touch screen, a keyboard, a microphone, and a display. The display may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. In addition, a touch pad may be integrated with the display for collecting touch events thereon or nearby and transmitting the collected touch information to other devices (e.g., a processor, etc.).
The computer instructions may be stored in or transmitted from a computer-readable storage medium to another computer-readable storage medium, e.g., from a website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DS L)) or wireless (e.g., infrared, wireless, microwave, etc.) manner to another website, computer, server, or data center.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (22)

  1. A management method for peripheral devices in a terminal is characterized by comprising the following steps:
    the method comprises the steps that a terminal obtains a real-time operation scene where the terminal is located at present;
    when the real-time operation scene is a first operation scene, the terminal indicates the peripheral device to work according to a first working parameter;
    when the real-time operation scene is a second operation scene, the terminal indicates the peripheral device to work according to a second working parameter;
    and when the peripheral device works according to the first working parameter, the power consumption generated by the terminal is smaller than the power consumption generated by the terminal when the peripheral device works according to the second working parameter.
  2. The method of claim 1, wherein the peripheral device is a positioning device, the operating parameter is an operating frequency of the positioning device,
    wherein the operation scene comprises a motion state in still, walking, running, riding, low-speed traffic or high-speed traffic;
    the moving speed of the terminal in the first operation scene is smaller than that in the second operation scene, and the first working parameter is smaller than the second working parameter.
  3. The method according to claim 2, wherein the terminal acquires a real-time operation scene where the terminal is currently located, and the method comprises the following steps:
    the terminal detects the moving speed of the terminal;
    and the terminal determines the current motion state of the terminal according to the moving speed.
  4. The method according to claim 2 or 3, wherein a scheduling module for managing the operating state of the positioning device is included in a framework layer of the terminal, and the first flag bit preset by the terminal is used for storing an identifier of the motion state determined by the terminal last time.
  5. The method of claim 4, the terminal instructing the peripheral device to operate according to a first operating parameter, comprising:
    a location manager providing location service in the terminal sends a first query request to the scheduling module, wherein the first query request is used for querying the working frequency of the positioning device;
    in response to the first query request, the scheduling module determines a first working frequency corresponding to a first motion state according to the first motion state indicated by the first flag bit;
    and the scheduling module sends the first working frequency to the position manager, so that the position manager drives the positioning device to position according to the first working frequency.
  6. The method of claim 4, the terminal instructing the peripheral device to operate according to a first operating parameter, comprising:
    in response to a positioning request of a first application to the positioning device, a position manager providing a position service in the terminal sends a second query request to the scheduling module, wherein the second query request is used for requesting whether to allow the positioning device to be driven for positioning or not;
    in response to the second query request, the scheduling module determines a first working frequency corresponding to a first motion state according to the first motion state indicated by the first flag bit;
    if the time length of the positioning request from the last positioning of the positioning device is less than a first working period, the scheduling module sends a message which does not allow the positioning device to be driven to position to the position manager; if the time length of the positioning request from the last positioning of the positioning device is greater than or equal to a first working period, the scheduling module sends a message allowing the positioning device to be driven to position to the position manager, and the first working period is the reciprocal of the first working frequency.
  7. The method of claim 4, the terminal instructing the peripheral device to operate according to a first operating parameter, comprising:
    when the motion state indicated by the first flag bit in the scheduling module is a first motion state, the scheduling module determines a first working frequency corresponding to the first motion state;
    and the scheduling module sends the first working frequency to a position manager which provides position service in the terminal, so that the position manager drives the positioning device to position according to the first working frequency.
  8. The method according to claim 1, wherein the peripheral device is a speaker, and the operating parameter is a playing parameter of the speaker when playing audio;
    the operation scene comprises an audio playing scene in a music playing scene, a video playing scene, a voice playing scene or a game playing scene; and the requirement of the first operation scene on the sound quality is less than that of the second operation scene.
  9. The method according to claim 8, wherein the terminal acquires a real-time operation scene where the terminal is currently located, and the method comprises the following steps:
    the terminal determines a current audio playing scene according to the information of the current running application; alternatively, the first and second electrodes may be,
    and the terminal determines the current audio playing scene according to the currently played audio content.
  10. The method according to claim 8 or 9, wherein a frame layer of the terminal includes a scheduling module for managing the operating state of the peripheral device, and a second flag bit preset by the terminal is used for storing an identifier of an audio playing scene determined by the terminal last time.
  11. The method of claim 10, wherein the terminal instructs the peripheral device to operate according to a first operating parameter, comprising:
    when the audio playing scene indicated by the second flag bit in the scheduling module is a first audio playing scene, the scheduling module determines a first playing parameter corresponding to the first audio playing scene;
    and the scheduling module sends the first playing parameter to a multimedia manager which provides audio playing service in the terminal, so that the multimedia manager drives the loudspeaker to play audio according to the first playing parameter.
  12. The method of claim 10, wherein the terminal instructs the peripheral device to operate according to a first operating parameter, comprising:
    responding to a playing request of a second application to the loudspeaker, and sending a first acquisition request to the scheduling module by a multimedia manager providing an audio playing service in the terminal, wherein the first acquisition request is used for inquiring playing parameters during audio playing;
    in response to the first obtaining request, the scheduling module determines a first playing parameter corresponding to a first audio playing scene according to the first audio playing scene indicated by the second flag bit;
    and the scheduling module sends the first playing parameter to the multimedia manager, so that the multimedia manager drives the loudspeaker to play audio according to the first playing parameter.
  13. The method of claim 1, wherein the peripheral device is a display, and the operating parameter is a display parameter of the display;
    the operation scene comprises a plurality of display scenes with different requirements on picture quality; the requirement of the first operation scene on the picture quality is smaller than that of the second operation scene.
  14. The method according to claim 13, wherein the terminal acquires a real-time operation scene where the terminal is currently located, and the method comprises:
    the terminal determines the current display scene according to the information of the currently running application, or,
    and the terminal determines the current display scene according to the current display content.
  15. The method according to claim 13 or 14, wherein a frame layer of the terminal includes a scheduling module for managing the operating state of the peripheral device, and a third flag bit preset by the terminal is used for storing an identifier of a display scene determined by the terminal last time.
  16. The method of claim 15, wherein the terminal instructs the peripheral device to operate according to a first operating parameter, comprising:
    when the display scene indicated by the third flag bit in the scheduling module is a first display scene, the scheduling module determines a first display parameter corresponding to the first display scene;
    and the scheduling module sends the first display parameter to a graphic manager providing display service in the terminal, so that the graphic manager drives the display to display according to the first display parameter.
  17. The method of claim 15, wherein the terminal instructs the peripheral device to operate according to a first operating parameter, comprising:
    responding to a playing request of a third application to the display, sending a second acquisition request to the scheduling module by a graphic manager providing a display service in the terminal, wherein the second acquisition request is used for inquiring display parameters of the display;
    in response to the second obtaining request, the scheduling module determines a first display parameter corresponding to a first display scene indicated by the third flag bit according to the first display scene;
    and the scheduling module sends the first display parameter to the graphics manager, so that the graphics manager drives the display to display according to the first display parameter.
  18. The method of claim 1, wherein the operating scenario comprises an operating state of an Application Processor (AP), the operating state comprising an operating mode, a sleep mode, and an off mode,
    when the first operation scene is that the AP is in a sleep mode or a closing mode, and the second operation scene is that the AP is in an operation mode, the working parameter is the working frequency of the peripheral device, and the first working parameter is smaller than the second working parameter.
  19. A management method for peripheral devices in a terminal is characterized by comprising the following steps:
    a terminal acquires the working state of a current application processor AP, wherein the working state comprises an operation mode, a sleep mode and a closing mode;
    when the working state is the sleep mode, the terminal instructs the peripheral device to discard the received data, or instructs the peripheral device to cache the received data, or instructs the peripheral device to report the received data to the AP periodically.
  20. A terminal, comprising: a processor, a display, a memory, and a communication interface;
    the memory is configured to store computer executable instructions, and the processor is coupled to the memory and configured to execute the computer executable instructions stored in the memory when the terminal is running, so as to enable the terminal to perform the method for managing peripheral devices in the terminal according to any one of claims 1 to 18 or 19.
  21. A computer-readable storage medium having instructions stored therein, which when run on a terminal, cause the terminal to perform a method of managing peripheral devices in a terminal according to any one of claims 1 to 18 or 19.
  22. A computer program product comprising instructions for causing a terminal to perform a method of managing internal and peripheral devices of a terminal according to any one of claims 1 to 18 or 19, when the computer program product is run on the terminal.
CN201880078982.2A 2018-03-26 2018-03-26 Management method for internal and peripheral devices of terminal and terminal Pending CN111434154A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/080573 WO2019183783A1 (en) 2018-03-26 2018-03-26 Management method for peripheral device in terminal and terminal

Publications (1)

Publication Number Publication Date
CN111434154A true CN111434154A (en) 2020-07-17

Family

ID=68062412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880078982.2A Pending CN111434154A (en) 2018-03-26 2018-03-26 Management method for internal and peripheral devices of terminal and terminal

Country Status (2)

Country Link
CN (1) CN111434154A (en)
WO (1) WO2019183783A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116709477A (en) * 2022-11-22 2023-09-05 荣耀终端有限公司 Dormancy awakening method, electronic equipment, bluetooth peripheral and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930719A (en) * 2009-06-18 2010-12-29 辉达公司 Method and system for automatically switching scene mode of display
CN103327585A (en) * 2013-05-27 2013-09-25 深圳市中兴移动通信有限公司 Communication terminal and communication method thereof
WO2014187043A1 (en) * 2013-05-20 2014-11-27 中兴通讯股份有限公司 Application display processing method and apparatus
CN105100411A (en) * 2015-05-27 2015-11-25 努比亚技术有限公司 Display control method and device
CN105407458A (en) * 2015-10-27 2016-03-16 努比亚技术有限公司 Method and device for calling GPS prediction position information by mobile terminal
CN105933542A (en) * 2016-06-28 2016-09-07 宇龙计算机通信科技(深圳)有限公司 Adjusting method and system of smart power amplifier
CN106534542A (en) * 2016-11-19 2017-03-22 滁州昭阳电信通讯设备科技有限公司 Display resolution adjusting method and mobile terminal
WO2017045642A1 (en) * 2015-09-17 2017-03-23 北京奇虎科技有限公司 Terminal locating frequency regulating method and system and locating interval regulating method and system
CN107562602A (en) * 2017-09-13 2018-01-09 广东欧珀移动通信有限公司 Log information report method, device and storage medium, ADSP and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7359713B1 (en) * 2003-02-28 2008-04-15 Trimble Navigation Limited Battery consumption optimization for mobile users

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930719A (en) * 2009-06-18 2010-12-29 辉达公司 Method and system for automatically switching scene mode of display
WO2014187043A1 (en) * 2013-05-20 2014-11-27 中兴通讯股份有限公司 Application display processing method and apparatus
CN103327585A (en) * 2013-05-27 2013-09-25 深圳市中兴移动通信有限公司 Communication terminal and communication method thereof
CN105100411A (en) * 2015-05-27 2015-11-25 努比亚技术有限公司 Display control method and device
WO2017045642A1 (en) * 2015-09-17 2017-03-23 北京奇虎科技有限公司 Terminal locating frequency regulating method and system and locating interval regulating method and system
CN105407458A (en) * 2015-10-27 2016-03-16 努比亚技术有限公司 Method and device for calling GPS prediction position information by mobile terminal
CN105933542A (en) * 2016-06-28 2016-09-07 宇龙计算机通信科技(深圳)有限公司 Adjusting method and system of smart power amplifier
CN106534542A (en) * 2016-11-19 2017-03-22 滁州昭阳电信通讯设备科技有限公司 Display resolution adjusting method and mobile terminal
CN107562602A (en) * 2017-09-13 2018-01-09 广东欧珀移动通信有限公司 Log information report method, device and storage medium, ADSP and terminal

Also Published As

Publication number Publication date
WO2019183783A1 (en) 2019-10-03

Similar Documents

Publication Publication Date Title
WO2020192456A1 (en) Voice interaction method and electronic device
US11809705B2 (en) Touch control method and apparatus
WO2019183785A1 (en) Frame rate adjustment method and terminal
US20170024121A1 (en) Operating method for contents searching function and electronic device supporting the same
CN111247510B (en) Display method of application window and terminal
WO2021121052A1 (en) Multi-screen cooperation method and system, and electronic device
US10853026B2 (en) Method and apparatus for streaming audio by using wireless link
WO2019033385A1 (en) Display method and terminal
WO2020211705A1 (en) Contact person recommendation method and electronic device
US11409567B2 (en) Application management method and terminal
WO2018133289A1 (en) Advertisement display method and terminal
EP4254927A1 (en) Photographing method and electronic device
KR20180110517A (en) An elelctronic device and a coverrage compensation method for a shortrange communication in the elelctronic device
CN113391743B (en) Display method and electronic equipment
WO2021042881A1 (en) Message notification method and electronic device
US20160196030A1 (en) Method and electronic device for displaying electronic document
CN111434154A (en) Management method for internal and peripheral devices of terminal and terminal
CN114168873B (en) Method and device for processing page popup frame, terminal device and storage medium
CN113285853B (en) Log reporting method, device, terminal and storage medium
WO2024022119A1 (en) Data synchronization method, electronic device and system
CN117406950A (en) Audio play control 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