WO2019183783A1 - Management method for peripheral device in terminal and terminal - Google Patents

Management method for peripheral device in terminal and terminal Download PDF

Info

Publication number
WO2019183783A1
WO2019183783A1 PCT/CN2018/080573 CN2018080573W WO2019183783A1 WO 2019183783 A1 WO2019183783 A1 WO 2019183783A1 CN 2018080573 W CN2018080573 W CN 2018080573W WO 2019183783 A1 WO2019183783 A1 WO 2019183783A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
display
parameter
scheduling module
peripheral device
Prior art date
Application number
PCT/CN2018/080573
Other languages
French (fr)
Chinese (zh)
Inventor
陈寒冰
乔永红
李刚
李杰纯
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2018/080573 priority Critical patent/WO2019183783A1/en
Priority to CN201880078982.2A priority patent/CN111434154A/en
Publication of WO2019183783A1 publication Critical patent/WO2019183783A1/en

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

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a method and a terminal for managing a peripheral device in a terminal.
  • terminals such as mobile phones usually integrate more and more peripheral devices outside the main chip of the terminal, for example, a global positioning system (GPS) device that can be used for positioning, which can be used for display.
  • GPS global positioning system
  • LCD liquid crystal display
  • Wi-Fi wireless-fidelity
  • BT Bluetooth
  • the application installed in the terminal can request the device data detected by the peripheral device from the relevant peripheral device by calling the service interface of the correlation.
  • the application programming interface (API) provided by the location manager can be periodically requested to query the current location data, thereby driving the GPS device to perform positioning. The position data obtained by this positioning is fed back to the map application.
  • peripheral devices are frequently requested to improve device data. For example, if the GPS device is requested to be positioned once every 1 second, the GPS device will perform positioning every 1 second according to this frequency. . However, when the user is in an application scenario where the data accuracy is not high, the positioning of the GPS device according to this frequency will cause the terminal to consume unnecessary power.
  • Embodiments of the present application provide a method and a terminal for managing a peripheral device in a terminal, which can reduce the use of peripheral devices while reducing the power consumption of the terminal while satisfying the data precision required by the application.
  • an embodiment of the present application provides a method for managing a peripheral device in a terminal, including: acquiring, by a terminal, a real-time running scenario in which the current terminal is located; and when the real-time running scenario is a first running scenario, the terminal instructing the peripheral device Working according to the first working parameter; when the real-time running scenario is the second running scenario, the terminal instructs the peripheral device to work according to the second working parameter; wherein, when the peripheral device works according to the first working parameter, the power consumption generated by the terminal is less than the The power consumption generated by the terminal when the peripheral device operates according to the second operating parameter.
  • the terminal can control the peripheral device to work under different operating parameters according to the current real-time running scenario, in response to the service request initiated by the application to the peripheral device, so that the terminal can reduce the peripheral device when the data required by the application is not high.
  • the power consumption overhead saves terminal power consumption.
  • the peripheral device is a positioning device
  • the working parameter is an operating frequency of the positioning device
  • the running scenario may specifically include static, walking, running, riding, low-speed traffic or high-speed traffic.
  • the moving speed of the terminal in the first running scenario is less than the moving speed of the terminal in the second running scenario, and the first operating parameter is smaller than the second operating parameter.
  • the terminal provides the positioning service to the application and the terminal controls the positioning device to perform the positioning.
  • the two processes are separately controlled by the terminal, wherein the application can still request and obtain the positioning result from the location manager as in the prior art.
  • the positioning device in the terminal can work at different working frequencies according to the current state of motion of the terminal. In this way, when the terminal is in a motion state that does not require high positioning accuracy, the operating frequency of the positioning device can be reduced, thereby reducing the power consumption overhead caused by the positioning device operation while ensuring the positioning accuracy.
  • the terminal acquires a real-time running scenario in which the current terminal is located, and specifically includes: the terminal detects a moving rate of the terminal; and the terminal determines, according to the moving rate, a current moving state of the terminal.
  • the framework layer of the terminal includes a scheduling module for managing the working state of the positioning device, and the first flag set by the terminal is used to store the identifier of the motion state determined by the last terminal.
  • the terminal instructs the peripheral device to work according to the first working parameter, and specifically includes: in response to the positioning request of the first application to the positioning device, the location manager that provides the location service in the terminal sends a first query request to the scheduling module, where The first query request is used to query the working frequency of the positioning device; in response to the first query request, the scheduling module determines the first working frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; The module transmits the first operating frequency to the location manager such that the location manager drives the positioning device to perform positioning according to the first operating frequency.
  • the terminal instructs the peripheral device to work according to the first working parameter, and specifically includes: in response to the positioning request of the first application to the positioning device, the location manager that provides the location service in the terminal sends a second query request to the scheduling module, where The second query request is used to request whether the query is allowed to drive the positioning device to be located; and in response to the second query request, the scheduling module determines the first working frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; If the positioning request is less than the first working period from the positioning device, the scheduling module sends a message to the location manager that is not allowed to drive the positioning device; if the positioning request is located closest to the positioning device The scheduling module is greater than or equal to the first working period, and the scheduling module sends a message to the location manager that allows the positioning of the positioning device to be driven, and the first working period is a reciprocal of the first working frequency.
  • the terminal instructs the peripheral device to work according to the first working parameter, specifically: when the motion state indicated by the first flag bit in the scheduling module is the first motion state, the scheduling module determines the first corresponding to the first motion state. a working frequency; the scheduling module sends the first working frequency to the location manager that provides the location service in the terminal, so that the location manager drives the positioning device to perform positioning according to the first working frequency.
  • the working parameter is a playing parameter when the speaker plays audio; wherein the running scenario may specifically include an audio in a music playing scene, a video playing scene, a voice playing scene or a game playing scene.
  • the scene is played; the sound quality requirement of the first running scene is smaller than the sound quality of the second running scene.
  • the terminal can adjust the playing parameters of the peripheral device when playing the audio in real time according to the actual audio playing scene currently located.
  • the terminal can reduce the parameters required for the peripheral device to work, thereby reducing the power consumption overhead caused by the excessive operation of the peripheral device, and satisfying the sound quality requirement or the display effect in the scene.
  • the terminal acquires a real-time running scenario in which the current terminal is located, including: determining, by the terminal, the current audio playing scenario according to information of the currently running application; or determining, by the terminal, the current audio according to the currently played audio content. Play the scene.
  • the frame layer of the terminal includes a scheduling module for managing the working state of the peripheral device, and the second flag set by the terminal is used to store the identifier of the audio playing scene determined by the last terminal.
  • the terminal instructs the peripheral device to work according to the first working parameter, and specifically includes: when the audio playing scene indicated by the second flag bit in the scheduling module is the first audio playing scene, the scheduling module determines the first audio playing scene Corresponding first playing parameter; the scheduling module sends the first playing parameter to the multimedia manager that provides the audio playing service in the terminal, so that the multimedia manager drives the speaker to play the audio according to the first playing parameter.
  • the terminal instructs the peripheral device to work according to the first working parameter, specifically: in response to the second application playing the request for the speaker, the multimedia manager that provides the audio playing service in the terminal sends the first acquiring request to the scheduling module, a obtaining request is used to query a playing parameter when the audio is played; in response to the first obtaining request, the scheduling module determines a first playing parameter corresponding to the first audio playing scene according to the first audio playing scene indicated by the second flag bit; The scheduling module sends the first play parameter to the multimedia manager, so that the multimedia manager drives the speaker to play audio according to the first play parameter.
  • the peripheral device is a display
  • the working parameter is a display parameter of the display
  • the running scenario includes multiple display scenarios with different image quality requirements; The requirement is less than the quality requirement of the second running scene.
  • the terminal can adjust the working parameters when the display is displayed in real time according to the actual display scene currently located. In this way, when the terminal is in a scene where the display effect is not high, the terminal can reduce the parameters required for the peripheral device to work, thereby reducing the power consumption overhead caused by excessive operation of the peripheral device, and satisfying the sound quality requirement or display in the scene. Performance requirements.
  • the terminal acquires the real-time running scenario in which the current terminal is located, and the terminal determines the current display scenario according to the currently running application information, or the terminal determines the current display scenario according to the current display content.
  • the framework layer of the terminal includes a scheduling module for managing the working state of the peripheral device, and the third flag set by the terminal is used to store the identifier of the display scene determined by the last terminal.
  • the terminal instructs the peripheral device to work according to the first working parameter, and specifically includes: when the display scenario indicated by the third flag bit in the scheduling module is the first display scenario, the scheduling module determines, corresponding to the first display scenario, The first display parameter; the scheduling module sends the first display parameter to the graphic manager providing the display service in the terminal, so that the graphic manager drives the display to display according to the first display parameter.
  • the terminal instructs the peripheral device to work according to the first working parameter, specifically: in response to the third application playing the display request, the graphics manager providing the display service in the terminal sends a second acquisition request to the scheduling module, and second Obtaining a display parameter for querying the display; in response to the second obtaining request, the scheduling module determines, according to the first display scenario indicated by the third flag bit, a first display parameter corresponding to the first display scenario; the scheduling module The first display parameter is sent to the graphics manager such that the graphics manager drives the display for display in accordance with the first display parameter.
  • the foregoing operating scenario includes an operating state of the AP, where the working state includes an operating mode, a sleep mode, and an off mode, then, when the first running scenario is that the AP is in a sleep mode or an off mode,
  • the operating parameter is the operating frequency of the peripheral device, and the first operating parameter is less than the second operating parameter.
  • an embodiment of the present application provides a method for managing a peripheral device in a terminal, including: acquiring, by a terminal, an operating state of a current AP, where the working state includes an operation mode, a sleep mode, and an off mode; and when the working state is a sleep mode
  • the terminal instructs the peripheral device to discard the received data, or instructs the peripheral device to buffer the received data, or instructs the peripheral device to periodically report the received data to the AP. In this way, the peripheral device does not need to wake up the AP to upload the data every time the data is received, thereby achieving the effect of reducing the power consumption of the AP.
  • an embodiment of the present application provides a terminal, including: a detecting unit, configured to acquire a real-time running scenario in which the current terminal is located, and a processing unit, configured to: when the real-time running scenario is a first running scenario, indicating The peripheral device operates according to the first working parameter; when the real-time running scenario is the second operating scenario, the peripheral device is instructed to operate according to the second working parameter; wherein, the power consumption generated by the terminal when the peripheral device operates according to the first working parameter It is less than the power consumption generated by the terminal when the peripheral device operates according to the second operating parameter.
  • the peripheral device is a positioning device
  • the operating parameter is an operating frequency of the positioning device
  • the running scene comprises one of stationary, walking, running, riding, low speed traffic or high speed traffic.
  • the motion state; the moving rate of the terminal in the first running scenario is smaller than the moving speed of the terminal in the second running scenario, and the first working parameter is smaller than the second working parameter.
  • the detecting unit is specifically configured to: detect a moving rate of the terminal; and determine, according to the moving rate, a current state of motion of the terminal.
  • the processing unit specifically includes a scheduling module that manages the working state of the positioning device in the framework layer, and a location manager that provides a location service; the first flag set by the terminal is used to store the last time. The identifier of the motion state determined by the terminal.
  • the processing unit is specifically configured to: the location manager sends a first query request to the scheduling module, where the first query request is used to query an operating frequency of the positioning device; and in response to the first query request, the scheduling module is configured according to the first flag Determining a first motion state of the bit, determining a first operating frequency corresponding to the first motion state; the scheduling module transmitting the first operating frequency to the location manager, such that the location manager drives the positioning device according to the first operating frequency Positioning.
  • the processing unit is specifically configured to: in response to the positioning request of the first application to the positioning device, the location manager sends a second query request to the scheduling module, where the second query request is used to request whether the query is allowed to drive the positioning device Positioning; in response to the second query request, the scheduling module determines a first operating frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; if the positioning request is located from the positioning device last time If the first working period is less than the first working period, the scheduling module sends a message to the location manager that does not allow the positioning of the positioning device to be driven; if the positioning request is located for the last time of the positioning device is greater than or equal to the first working period, the scheduling is performed. The module sends a message to the location manager that allows the location of the positioning device to be driven, the first duty cycle being the reciprocal of the first operating frequency.
  • the processing unit is configured to: when the motion state indicated by the first flag bit in the scheduling module is the first motion state, the scheduling module determines a first working frequency corresponding to the first motion state; A working frequency is sent to the location manager providing the location service in the terminal, so that the location manager drives the positioning device to perform positioning according to the first working frequency.
  • the working parameter is a playing parameter when the speaker plays audio; wherein the running scene includes an audio playing scene in a music playing scene, a video playing scene, a voice playing scene or a game playing scene.
  • the first operating scenario requires less sound quality than the second operating scenario.
  • the detecting unit is specifically configured to: determine a current audio playing scene according to information of the currently running application; or determine a current audio playing scene according to the currently played audio content.
  • the processing unit specifically includes a scheduling module that manages the working state of the peripheral device in the framework layer, and a multimedia manager that provides an audio playback service; the second flag set by the terminal is used to store the latest The identifier of the audio playback scene determined by the terminal.
  • the processing unit is configured to: when the audio play scene indicated by the second flag bit in the scheduling module is the first audio play scene, the scheduling module determines a first play parameter corresponding to the first audio play scene; The scheduling module sends the first play parameter to the multimedia manager, so that the multimedia manager drives the speaker to play the audio according to the first play parameter.
  • the processing unit is configured to: in response to the second application applying the speaker to the speaker, the multimedia manager sends a first acquisition request to the scheduling module, where the first acquisition request is used to query a play parameter when the audio is played; a first obtaining request, the scheduling module determines a first playing parameter corresponding to the 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, The multimedia manager is caused to drive the speaker to play audio according to the first play parameter.
  • the peripheral device is a display
  • the working parameter is a display parameter of the display
  • the running scene includes multiple display scenes with different image quality requirements; The requirement is less than the quality requirement of the second running scene.
  • the detecting unit is specifically configured to: determine a current display scene according to information of the currently running application, or determine a current display scene according to the current display content.
  • the processing unit specifically includes a scheduling module for managing the working state of the peripheral device in the framework layer, and a graphics manager for displaying the service; the third flag set by the terminal is used to store the last time. The identifier of the display scene determined by the terminal.
  • the processing unit is configured to: when the display scenario indicated by the third flag bit in the scheduling module is the first display scenario, the scheduling module determines a first display parameter corresponding to the first display scenario; the scheduling module The first display parameter is sent to the graphics manager such that the graphics manager drives the display for display in accordance with the first display parameter.
  • the processing unit is specifically configured to: in response to the third application applying a play request to the display, the graphics manager sends a second acquisition request to the scheduling module, where the second obtaining request is used to query display parameters of the display; a second acquisition request, the scheduling module determines a first display parameter corresponding to the first display scenario according to the first display scenario 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 for display in accordance with the first display parameter.
  • the running scenario includes an operating state of the application processor AP, where the working state includes an operating mode, a sleep mode, and an off mode, when the first running scenario is that the AP is in a sleep mode or an off mode,
  • the operating parameter is the operating frequency of the peripheral device, and the first operating parameter is less than the second operating parameter.
  • an embodiment of the present application provides a terminal, including: a detecting unit, configured to acquire an operating state of a current AP, where the working state includes an operating mode, a sleep mode, and a shutdown mode; and a processing unit, configured to: when the work When the state is in the sleep mode, the peripheral device is instructed to discard the received data, or the peripheral device is instructed to buffer the received data, or the peripheral device is periodically reported to the AP to receive the received data.
  • an embodiment of the present application provides a terminal, including: a processor, a memory, a communication interface, and a display; the memory is configured to store a computer execution instruction, and the processor is coupled to the memory, and when the terminal is running, the processing The computer executes the computer-executed instructions stored in the memory to cause the terminal to execute the management method of the peripheral device in any of the above terminals.
  • the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores an instruction, when the instruction is run on any of the foregoing terminals, causing the terminal to execute any one of the foregoing terminals.
  • the management method of peripheral devices is not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, the embodiment of the present application.
  • the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores an instruction, when the instruction is run on any of the foregoing terminals, causing the terminal to execute any one of the foregoing terminals.
  • an embodiment of the present application provides a computer program product, including an instruction, when the terminal runs on any of the foregoing terminals, causing the terminal to perform a management method of the peripheral device in any of the foregoing terminals.
  • the names of the components in the terminal are not limited to the device itself, and in actual implementation, the components may appear under other names. As long as the functions of the various components are similar to the embodiments of the present application, they are within the scope of the claims and their equivalents.
  • FIG. 1 is a schematic structural diagram 1 of a terminal according to an embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of an operating system in a terminal according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram 1 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart 1 of 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 2 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram 3 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram 4 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure
  • FIG. 8 is a second schematic flowchart of a method for managing peripheral devices in a terminal according to an embodiment of the present disclosure
  • FIG. 9 is a schematic structural diagram 5 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic flowchart 3 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure
  • FIG. 11 is a schematic structural diagram 6 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure
  • FIG. 12 is a schematic flowchart 4 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure
  • FIG. 13 is a schematic structural diagram 7 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure
  • FIG. 14 is a schematic structural diagram 8 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure
  • FIG. 15 is a schematic structural diagram 2 of a terminal according to an embodiment of the present disclosure.
  • FIG. 16 is a schematic structural diagram 3 of a terminal according to an embodiment of the present disclosure.
  • first and second are used for descriptive purposes only, and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining “first” and “second” may include one or more of the features either explicitly or implicitly. In the description of the embodiments of the present application, “multiple” means two or more unless otherwise stated.
  • the management method of the peripheral device in the terminal provided by the embodiment of the present application can be applied to a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR), a virtual reality (VR) device, and a notebook.
  • the present embodiment does not impose any restrictions on any terminal that integrates peripheral devices, such as a computer, an in-vehicle device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and the like. .
  • the terminal in the embodiment of the present application may be the 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 mobile phone 100 is only one example of the above terminal, and the mobile phone 100 may have more or fewer components than those shown in the figure, two or more components may be combined, or Has a different component configuration.
  • the mobile phone 100 may specifically include: a processor 101, a radio frequency (RF) circuit 102, a memory 103, a touch screen 104, a Bluetooth device 105, one or more sensors 106, a Wi-Fi device 107, and positioning.
  • Components such as device 108, audio circuit 109, peripheral interface 110, and power system 111. These components can communicate over one or more communication buses or signal lines (not shown in Figure 1). It will be understood by those skilled in the art that the hardware structure shown in FIG. 1 does not constitute a limitation to a mobile phone, and the mobile phone 100 may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • the processor 101 is a control center of the mobile phone 100, and connects various parts of the mobile phone 100 by using various interfaces and lines, and executes the mobile phone 100 by running or executing an application stored in the memory 103 and calling data stored in the memory 103.
  • the processor 101 may include one or more processing units; for example, the processor 101 may be a Kirin 960 chip manufactured by Huawei Technologies Co., Ltd.
  • the processor 101 may further include a fingerprint verification chip for verifying the collected fingerprint.
  • the radio frequency circuit 102 can be used to receive and transmit wireless signals during transmission or reception of information or calls.
  • the radio frequency circuit 102 can process the downlink data of the base station and then process it to the processor 101; in addition, transmit the data related to the uplink to the base station.
  • radio frequency circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • the radio frequency circuit 102 can also communicate with other devices through wireless communication.
  • the wireless communication can use any communication standard or protocol, including but not limited to global mobile communication systems, general packet radio services, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
  • the memory 103 is used to store applications and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running applications and data stored in the memory 103.
  • the memory 103 mainly includes a storage program area and a storage data area, wherein the storage program area can store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.); the storage data area can be stored according to the use of the mobile phone. Data created at 100 o'clock (such as audio data, phone book, etc.).
  • the memory 103 may include a high speed random access memory (RAM), and may also include a nonvolatile memory such as a magnetic disk storage device, a flash memory device, or other volatile solid state storage device.
  • the memory 103 can store various operating systems, for example, developed by Apple. Operating system, developed by Google Inc. Operating system, etc.
  • the above memory 103 may be independent and connected to the processor 101 via the above communication bus; the memory 103 may also be integrated with the processor 101.
  • the touch screen 104 may specifically include a touch panel 104-1 and a display 104-2.
  • the touch panel 104-1 can collect touch operations on or near the user of the mobile phone 100 (for example, the user uses a finger, a stylus, or the like on the touch panel 104-1 or on the touchpad 104.
  • the operation near -1), and the collected touch information is transmitted to other devices (for example, the processor 101).
  • the touch operation of the user in the vicinity of the touch panel 104-1 may be referred to as a hovering touch; the hovering touch may mean that the user does not need to directly touch the touchpad in order to select, move or drag a target (eg, an icon, etc.) And only the user is located near the terminal in order to perform the desired function.
  • the touch panel 104-1 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • a display (also referred to as display) 104-2 can be used to display information entered by the user or information provided to the user as well as various menus of the handset 100.
  • the display 104-2 can be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the touch panel 104-1 may be overlaid on the display 104-2, and when the touch panel 104-1 detects a touch operation thereon or nearby, the touch panel 104-1 transmits to the processor 101 to determine the type of the touch operation, and then the processor 101 may provide a corresponding visual output on display 104-2 depending on the type of touch operation.
  • the touchpad 104-1 and the display 104-2 are implemented as two separate components to implement the input and output functions of the handset 100, in some embodiments, the touchpad 104- 1 is integrated with the display screen 104-2 to implement the input and output functions of the mobile phone 100.
  • the touch screen 104 is formed by stacking a plurality of layers of materials. In the embodiment of the present application, only the touch panel (layer) and the display screen (layer) are shown, and other layers are not described in the embodiment of the present application. .
  • the touch panel 104-1 may be disposed on the front surface of the mobile phone 100 in the form of a full-board
  • the display screen 104-2 may also be disposed on the front surface of the mobile phone 100 in the form of a full-board, so that the front of the mobile phone can be borderless. Structure.
  • the mobile phone 100 can also include a Bluetooth device 105 for enabling data exchange between the handset 100 and other short-range terminals (eg, mobile phones, smart watches, etc.).
  • the Bluetooth device in the embodiment of the present application may be a device such as an integrated circuit or a Bluetooth chip.
  • the handset 100 can also include at least one sensor 106, such as a fingerprint acquisition device 112, a light sensor, a motion sensor, and other sensors.
  • the fingerprint collection device 112 can be configured on the back of the handset 100 (eg, below the rear camera) or on the front side of the handset 100 (eg, below the touch screen 104).
  • the fingerprint collection device 112 can be configured in the touch screen 104 to implement the fingerprint recognition function, that is, the fingerprint collection device 112 can be integrated with the touch screen 104 to implement the fingerprint recognition function of the mobile phone 100;
  • the light sensor can include an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display of the touch screen 104 according to the brightness of the ambient light, and the proximity sensor can turn off the power of the display when the mobile phone 100 moves to the ear.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.
  • the mobile phone 100 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
  • the Wi-Fi device 107 is configured to provide the mobile phone 100 with network access complying with the Wi-Fi related standard protocol, and the mobile phone 100 can access the Wi-Fi access point through the Wi-Fi device 107, thereby helping the user to send and receive emails, Browsing web pages and accessing streaming media, etc., it provides users with wireless broadband Internet access.
  • the Wi-Fi device 107 can also function as a Wi-Fi wireless access point, and can provide Wi-Fi network access to other terminals.
  • the positioning device 108 is configured to provide a geographic location for the mobile phone 100. It can be understood that the positioning device 108 can be specifically a receiver of a positioning system such as a global positioning system (GPS) or a Beidou satellite navigation system, Russian GLONASS. After receiving the geographical location transmitted by the positioning system, the positioning device 108 sends the information to the processor 101 for processing, or sends it to the memory 103 for storage. In still other embodiments, the positioning device 108 may also be an assisted global positioning system (AGPS) receiver, and the AGPS system assists the positioning device 108 in performing ranging and positioning services by acting as an auxiliary server.
  • AGPS assisted global positioning system
  • the secondary location server provides location assistance over a wireless communication network in communication with a location device 108, such as a GPS receiver, of the handset 100.
  • the positioning device 108 can also be a Wi-Fi access point based positioning technology. Since each Wi-Fi access point has a globally unique media access control (MAC) address, the terminal can scan and collect the surrounding Wi-Fi access points when Wi-Fi is turned on. Broadcast signals, so the MAC address broadcasted by the Wi-Fi access point can be obtained; the terminal sends the data (such as the MAC address) capable of indicating the Wi-Fi access point to the location server through the wireless communication network, and is retrieved by the location server.
  • MAC media access control
  • the geographic location of each Wi-Fi access point calculates the geographic location of the terminal and sends it to the location device 108 of the terminal.
  • the positioning device 108 can also be a base station based positioning technology.
  • the mobile phone 100 can obtain the MCC (Mobile Country Code), the MNC (Mobile Network Code), the LAC (Location Area Code), and the CID (Telephony Code) by calling the telephone service (TelephonyManager) in the system service.
  • Base station information such as the cell identity (base station number) and BSSS (Base Station Signal Strength), and then the latitude and longitude information of the base station is determined by the base station information. At this time, the latitude and longitude information of the base station can be used as the positioning result of the mobile phone 100.
  • the audio circuit 109, the speaker 113, and the microphone 114 can provide an audio interface between the user and the handset 100.
  • the audio circuit 109 can transmit the converted electrical data of the received audio data to the speaker 113 for conversion to the sound signal output by the speaker 113; on the other hand, the microphone 114 converts the collected sound signal into an electrical signal by the audio circuit 109. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 102 for transmission to, for example, another mobile phone, or the audio data is output to the memory 103 for further processing.
  • the peripheral interface 110 is used to provide various interfaces for external input/output devices (such as a keyboard, a mouse, an external display, an external memory, a subscriber identity module card, etc.). For example, it is connected to the mouse through a universal serial bus (USB) interface, and is connected with a subscriber identification module (SIM) card provided by the telecommunication operator through a metal contact on the card slot of the subscriber identification module. . Peripheral interface 110 can be used to couple the external input/output peripherals described above to processor 101 and memory 103.
  • USB universal serial bus
  • SIM subscriber identification module
  • the mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) that supplies power to the various components.
  • the battery may be logically connected to the processor 101 through the power management chip to manage charging, discharging, and power management through the power supply device 111. And other functions.
  • the mobile phone 100 may further include a camera (front camera and/or rear camera), a flash, a micro projection device, a near field communication (NFC) device, etc., and will not be described herein. .
  • a camera front camera and/or rear camera
  • a flash a micro projection device
  • NFC near field communication
  • the devices in the mobile phone 100 that can communicate with the processor 101 can be referred to as peripheral devices of the mobile phone 100, and the device data obtained when the peripheral device works can support navigation, display, and playback of applications running in the operating system. And service functions such as transmission.
  • the operating system of the mobile phone 100 may be an operating system such as Android or IOS, and the Android operating system is taken as an example.
  • the Android operating system may be divided into four layers, and the application layer is from the upper layer to the lower layer respectively.
  • 201 ie, the APP layer
  • the application framework layer 202 ie, the framework layer
  • the system runtime layer 203 ie, the Libraries or native layer
  • the Linux kernel layer 204 ie, the Linux kernel layer 204.
  • the Linux kernel layer 204 can be used to control the security, memory management, process management, network stack, driver model and the like of the mobile phone 100.
  • the Linux kernel layer 204 also serves as an abstraction layer between hardware (eg, CPU, network card, memory, etc.) and the software stack, which hides specific hardware details for the upper layer (system runtime layer 203, application framework layer 202, and applications).
  • Program layer 201) provides a unified service.
  • the Linux kernel layer 204 can include a system resource manager 321 and/or a device driver 323.
  • the system resource manager 321 can include a process manager (not shown), a memory manager (not shown), and a file system manager (not shown).
  • the system resource manager 321 can perform control, allocation, recovery, and the like 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) And a keypad driver (not shown), a Wi-Fi driver (not shown), and/or an audio driver (not shown).
  • device driver 323 can include an interprocess communication (IPC) driver (not shown).
  • IPC interprocess communication
  • the system runtime layer 203 includes some C/C++ libraries, such as a media library, a system C library, and a surface manager, which can be used by different components in the Android system, so that the application is used during operation. Programming language to add new features. According to an embodiment disclosed herein, the system runtime layer 203 can 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 be used to fully access the application. Specifically, the framework layer 202 provides a very large number of APIs for developing applications, and the framework layer 202 can provide functions to an application (APP) in the APP layer 201 through an API, so that the application can efficiently use limited system resources in the electronic device. .
  • APP application
  • the API framework provided by the framework layer 202 includes at least one of the following: an application manager 341, a window manager 342, a multimedia manager 343, a resource manager 344, a power manager 345, and a database management. 346, package manager 347, connection manager 348, notification manager 349, location manager 340, graphics manager 341, security manager 352, and any other suitable and/or similar manager.
  • the application manager 341 can manage, for example, the life cycle of at least one application.
  • Window manager 342 can manage graphical user interface (GUI) resources used on the screen.
  • the multimedia manager 343 can detect a format for reproducing various media files, and can encode or decode the media file by using a codec suitable for the relevant format.
  • the resource manager 344 can manage resources of at least one application, such as source code, memory, storage space, and the like.
  • the power manager 345 can operate with a basic input/output system (BIOS), can manage a battery or power source, and can provide power information for operation and the like.
  • Database manager 346 can manage the database in a manner that enables generation, searching, and/or changing of a database to be used by at least one application.
  • the package manager 347 can manage the installation and/or update of applications distributed in the form of package files.
  • Connection manager 348 can manage wireless connections such as Wi-Fi and BT.
  • the notification manager 349 can 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 can manage location information of the electronic device.
  • the graphics manager 341 can manage graphics effects to be provided to the user and/or UIs related to the graphics effects.
  • Security manager 352 can provide various security functions for system security, user authentication, and the like. According to an embodiment of the present disclosure, when an electronic device (eg, mobile phone 100) has a phone function, the middleware 330 may further include a phone manager (not shown) for managing voice phone call functions of the electronic device and/or Video call function.
  • the application layer 201 mainly includes an APP written in the Java language.
  • the user When the user operates the operation interface on the APP, the user can interact with the system runtime layer 203 or the Linux kernel layer 204 by calling the related API in the framework layer 202. The corresponding function of the operation interface.
  • a system level application and/or a third party application may be included in the application layer 201.
  • the map application 374 requires a periodic (e.g., every 1 second) request to obtain the current location from the location manager 350 in the framework layer 202 at runtime to provide location services to the user. Location data. Then, after receiving the request, the location manager 350 may invoke the Linux kernel layer 204 or the device driver 323 in the HAL (Hardware Abstraction Layer) of the Android system to drive the positioning device 108 to perform the positioning operation.
  • a periodic (e.g., every 1 second) request to obtain the current location from the location manager 350 in the framework layer 202 at runtime to provide location services to the user. Location data.
  • the location manager 350 may invoke the Linux kernel layer 204 or the device driver 323 in the HAL (Hardware Abstraction Layer) of the Android system to drive the positioning device 108 to perform the positioning operation.
  • HAL Hardware Abstraction Layer
  • the positioning result can be reported to the Linux kernel layer 204, and the Linux kernel layer 204 encapsulates the positioning result layer by layer and reports it to the map application 374 that initiates the location request, so that the map application 374 can be based on the positioning.
  • location services such as navigation and route planning.
  • the working state of the peripheral device such as the positioning device 108 in the prior art completely depends on the service request issued by the application in the APP layer. Then, if the application frequently sends a service request to a peripheral device (such as the above-described positioning device 108), the positioning device 108 needs to operate at a high frequency to bring about a huge power consumption overhead, but if the application sends a service request to the positioning device 108, the frequency is too low. , it may affect the positioning accuracy when the application provides the positioning service to the user. Therefore, how to reduce the power consumption of the peripheral device while satisfying the data precision required by the application becomes an urgent problem to be solved.
  • a peripheral device such as the above-described positioning device 108
  • a detection module for sensing a current running scenario is set in the terminal, and the detecting module can detect a real-time running scenario in which the terminal is currently located, for example, a motion scene, Audio playback scenes, video display scenes, etc.
  • a scheduling module 301 for managing the working state of the peripheral device may also be disposed in the framework layer 202. The scheduling module 301 can obtain a real-time running scenario detected by the detecting module, and determine working parameters of the related peripheral device for different operating scenarios.
  • the peripheral device manager in the framework layer 202 for managing peripheral devices can negotiate with the scheduling module 301 the specific operating parameters of the peripheral device at the time, such as the operating frequency of the positioning device, the playing parameters of the audio playing, the display parameters of the display, and the like. Subsequently, the peripheral device manager can control the peripheral device to work under the working parameter according to the working parameter negotiated with the scheduling module 301, so that the terminal can control the peripheral device to work under different working parameters according to the current real-time running scenario, in response. Applying a service request initiated to a peripheral device enables the terminal to reduce the power consumption overhead of the peripheral device while the application is running, thereby saving terminal power consumption.
  • peripheral devices such as positioning requirements, playback requirements, or display requirements, etc.
  • the scheduling module 301 may be disposed in the framework layer 202 in the form of an independent software module, or may be integrated into any system service in the framework layer 202, for example, integrated in the location manager 340 shown in FIG. In the multimedia manager 343 or the graphics manager 341.
  • the scheduling module 301 can be disposed between the APP layer 201 and the framework layer 202 according to actual experience or actual application scenarios, or the scheduling module 301 can be disposed between the framework layer 202 and the kernel layer 204.
  • the embodiment of the present application does not impose any limitation on this.
  • the scheduling module 301 is independently disposed in the framework layer 202 as an example for description.
  • the method for managing a peripheral device provided by the embodiment of the present application is described in detail below by using a positioning device in the terminal as an example of a peripheral device. As shown in FIG. 4, the method includes:
  • the terminal periodically detects the current motion state of the terminal.
  • the terminal may measure the current state of motion of the terminal by one or more sensors of the acceleration sensor, the gravity sensor, the gyroscope or the GPS device.
  • the motion state of the terminal can be divided into various motion states such as stationary, walking, running, low-speed traffic, and high-speed traffic according to the speed.
  • the moving speed of the terminal is equal to or close to 0
  • the speed is (5km/h, 20km/h)
  • the moving speed of the terminal is (20km/h, 100km/h)
  • the current motion state of the terminal can be determined.
  • For low-speed traffic when the moving speed of the terminal is greater than 100km/h, it can be determined that the current state of motion of the terminal is high-speed traffic.
  • the motion state of the terminal can also be divided into indoor and outdoor according to the location of the terminal, and the indoor can also include a home, a work unit, etc.; or, the terminal can also combine the speed and position of the terminal when detecting the current motion state.
  • the motion state of the current terminal is determined, for example, running in the home, using the terminal on the subway, climbing the stairs, and taking the elevator, etc., which is not limited in this embodiment.
  • the terminal may further set a detection module for detecting a current motion state of the terminal in the framework layer, to perform the foregoing step S401.
  • the detecting 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 can further determine the working parameters corresponding to the current motion state of the terminal, such as the working frequency of the positioning device, by reading the content in the first flag bit.
  • the terminal instructs the positioning device to acquire and update the foregoing positioning result according to the first frequency.
  • the terminal instructs the positioning device to acquire and update the foregoing positioning result according to the second frequency.
  • the moving rate of the terminal in the first motion state is lower than the moving rate of the terminal in the second motion state, and the first frequency is lower than the second frequency.
  • the moving rate refers to the speed at which the terminal generates the actual displacement, for example, the speed at which the user carries the terminal from the point A to the point B, and when the terminal only has the speed but does not generate the displacement (for example, the user carries the terminal at Although there is speed when running on the treadmill, the displacement generated by the terminal is small and can be ignored. It can be considered that the terminal does not have a moving rate or a moving rate of 0 at this time.
  • the running Baidu map application can send the current location to the location manager in the framework layer. Positioning request for the positioning result. Since this is the location request initiated by the Baidu map application received by the location manager for the first time, the location manager can call the driver of the Linux kernel layer or the positioning device in the HAL after receiving the positioning request, thereby driving the positioning device to start the positioning work. , get the positioning result of the current terminal.
  • the location manager may further request whether the scheduling module 301 can drive the positioning device to obtain the latest positioning result. Since the positioning request is a positioning request initiated by the Baidu map application for the first time, the scheduling module 301 can send a response message to the location manager agreeing to the operation of the positioning device. In this way, after receiving the response message, the location manager can drive the positioning device to start the positioning work, and obtain the positioning result for the current terminal.
  • the first application is one or more applications that can provide a location service, such as a map application, a weather application, or a travel application, and the embodiment of the present application does not impose any limitation.
  • the terminal may also store the latest positioning result obtained after each positioning device is located in a preset storage unit. Then, the location manager can report the location result stored in the storage unit to the Baidu map application that initiates the location request by reading the content in the storage unit.
  • the storage unit may be a device such as a register or a memory. The embodiment of the present application does not impose any limitation on this.
  • the positioning result obtained by the positioning device each time the positioning is performed may be updated in the storage unit, and when the first application (for example, the Baidu map application described above) subsequently sends the positioning request to the location manager again, the location manager may pass the The scheduling module 301 interacts, and determines that the positioning result stored in the storage unit is reported to the first application, or the positioning device is re-driven to obtain the latest positioning result and reported to the first application, so that the first application completes the positioning service.
  • the first application for example, the Baidu map application described above
  • the positioning device involved in the embodiment of the present application may refer to any peripheral device capable of providing a positioning function, such as one or more of a GPS device, a Wi-Fi device, or a modem (Modem).
  • a positioning function such as one or more of a GPS device, a Wi-Fi device, or a modem (Modem).
  • the embodiment does not impose any restrictions on this.
  • the location manager in the framework layer that calls the GPS device to provide the location service may specifically be an LBS (location based service) module; when the positioning device is a Wi-Fi device, the framework layer The location manager that invokes the Wi-Fi device to provide the location service may specifically be a Wi-Fi Manager (Wi-FiManager); when the location device is a Modem, the location manager in the framework layer that calls the Modem to provide the location service may specifically be the telephone management. (TelephonyManager).
  • Wi-FiManager Wi-Fi Manager
  • a scheduling module 301 for managing the working state of the positioning device is disposed in the framework layer of the terminal.
  • the scheduling module 301 can determine the corresponding working frequency for the positioning device according to the motion state of the current terminal by reading the motion state of the most recently detected terminal stored in the first flag bit.
  • the scheduling module 301 can determine a higher operating frequency for the positioning device (for example, 5 times per second), the positioning period of the positioning device is small at this time; correspondingly, as shown in FIG. 7, when the moving rate of the motion state of the terminal is lower, the accuracy required by the terminal for the positioning service is relatively higher.
  • the scheduling module 301 can determine a lower operating frequency for the positioning device (for example, once every 10 seconds). At this time, the positioning device performs a positioning period, which reduces the number of times the positioning device works, thereby reducing the frequent positioning of the positioning device. The resulting power consumption overhead.
  • the location manager may periodically request the scheduling module 301 to acquire the positioning frequency of the current positioning device.
  • the scheduling module 301 receives the request of the location manager, as shown in FIG. 6, the corresponding working frequency is determined for the positioning device according to the motion state of the current terminal in the first flag bit, and the working frequency is fed back to the location management.
  • the position manager can drive the positioning device to operate according to the operating frequency.
  • the scheduling module 301 can determine, for the positioning device, that the operating frequency in the walking state is lower than the first frequency (eg, triggering the positioning device to locate once every second), and the first A frequency is sent to the location manager.
  • the location manager can trigger the positioning device to perform positioning according to the lower first frequency, so that the positioning accuracy provided by the positioning device to the first application in the first motion state can be ensured, and the operating frequency of the positioning device can be reduced, thereby saving The power consumption of the positioning device.
  • the scheduling module 301 can determine, for the positioning device, that the operating frequency in the high-speed traffic state is higher than the second frequency (eg, triggering the positioning device to locate 10 times per second), and The second frequency is sent to the location manager. Furthermore, the location manager can trigger the positioning device to perform positioning according to the higher second frequency, and ensure the positioning accuracy provided by the positioning device to the first application in the second motion state.
  • the terminal may update the new positioning result to the storage unit, so that the location manager can obtain the storage unit from the storage unit according to the positioning request.
  • the latest positioning result is sent to the first application that initiated the positioning request.
  • the location manager may also determine the corresponding working frequency for the positioning device according to the motion state of the current terminal when the first application initiates the positioning request.
  • the embodiment of the present application does not impose any restrictions on this. .
  • the scheduling module 301 can determine the corresponding working frequency for the positioning device according to the motion state of the current terminal, the scheduling module can determine when the positioning device is allowed to work, and when the positioning device is not allowed. jobs. Then, each time the location manager receives the location request initiated by the first application, the scheduling module 301 can query the scheduling module 301 whether to allow the driving location device to work to obtain a new positioning result.
  • the scheduling module 301 can determine that the terminal is in a walking state by reading the first flag bit, and the scheduling module can further determine that the working frequency of the positioning device is located once every 5 seconds in the walking state, that is, the working period of the positioning device is 5 seconds. Then, if the time interval when the location manager receives the location request from the location of the location device last time is less than 5 seconds, the location result of the first application is almost the same as the location result obtained last time. Therefore, the scheduling module 301 can instruct the location manager to feed back the most recent positioning result stored in the storage unit to the first application. At this time, the positioning device does not need to perform positioning work, and the power consumption consumed by the positioning device can be reduced.
  • the scheduling module 301 can instruct the location manager to drive the positioning device to perform positioning to obtain the latest positioning result feedback to the first application.
  • the scheduling module 301 may be further configured to periodically read the motion state stored in the first flag bit.
  • the scheduling module actively determines the operating frequency of the positioning device at this time, and sends the working frequency to the location manager, so that the location manager drives the positioning device to perform positioning according to the working frequency.
  • the scheduling module 301 can 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 position manager causes the position manager to drive the positioning device to perform positioning at the second frequency to satisfy the positional accuracy when the first application provides the location service in the running state.
  • the scheduling module may instruct the positioning device to enter a sleep state, thereby minimizing the power consumption of the positioning device.
  • the location service may be implemented by using the location result cached in the storage unit.
  • the quiescent state may further comprise an absolute quiescent state and a relatively quiescent state, and when the terminal has neither a change in displacement nor a change in speed (for example, the terminal is placed on a table, etc.), it may be determined.
  • the terminal is in an absolutely static state (for example, sitting, standing or lying down using the terminal); when the terminal does not change in displacement for a period of time, but a change in speed occurs (for example, using a terminal when running on a treadmill, etc.) When it is determined, the terminal is determined to be in a relatively stationary state.
  • the scheduling module may instruct the GPS device to enter a sleep state, and the terminal may use other positioning devices (eg, Wi- Fi device) for positioning.
  • other positioning devices eg, Wi- Fi device
  • the terminal may periodically detect the current motion state of the terminal, or may start to periodically detect the current motion state of the terminal before the first application initiates the location request for the first time, that is, the present application.
  • the embodiment does not limit the execution order between step S401 and steps S402-S403.
  • the terminal provides the positioning service to the application and the terminal controls the positioning device to perform the positioning, and the terminal is separately controlled, wherein the application can still be in the normal position as in the prior art.
  • the manager requests and obtains the positioning result, and the positioning device of the terminal can work at different working frequencies according to the motion state of the current terminal. In this way, when the terminal is in a motion state that does not require high positioning accuracy, the operating frequency of the positioning device can be reduced, thereby reducing the power consumption overhead caused by the positioning device operation while ensuring the positioning accuracy.
  • a speaker (SPK) in the terminal is used as an example of a peripheral device, and a method for managing a peripheral device according to an embodiment of the present application is described in detail. As shown in FIG. 8, the method includes:
  • the terminal periodically detects a current audio playing scenario of the terminal.
  • the audio play scene may include a music play scene, a video play scene, a voice play scene, and a game play scene.
  • the terminal can determine the current audio playing scenario by obtaining parameters such as a package name of the currently running application, an ID of the main thread, and the like.
  • the terminal can separately classify each application supporting audio playback into a corresponding audio play scene.
  • 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.
  • the terminal can periodically obtain the package name of the currently running application, and determine an audio play scenario to which the current terminal belongs according to the package name.
  • a storage unit may be disposed in the terminal for storing a flag bit (for example, a second flag bit) of the latest audio playing scene. Subsequently, each time the terminal determines the current audio playing scene, the terminal may determine The identifier of the output audio play scene is updated in the second flag bit, so that the subsequent terminal adjusts the play parameters when working to the speaker according to the audio play scene indicated in the second flag bit.
  • the terminal can also pre-set the priority order between different applications according to the requirements of the user for the sound quality. Since the general user has higher requirements on the sound quality when listening to music and voice, the requirements for the sound quality when watching the video are generally, and the game is played. The sound quality requirements during the game are lower, so applications that play music and voice can be set to have the highest priority, game applications have the lowest priority, and video applications have the highest priority.
  • the terminal can determine the audio play scene to which the highest priority application belongs as the current audio play scene of the terminal.
  • the terminal sets the playing parameter when the speaker plays the audio to the second playing parameter.
  • the requirement for the sound quality in the first play scene is lower than the sound quality in the second play scene, and the power consumption of the terminal when operating according to the first play parameter is smaller than the power consumption when the speaker works according to the second play parameter.
  • the terminal can reduce the playing parameters when the speaker plays audio, thereby reducing the power amplifier (AP) when playing audio.
  • the power consumption of peripheral devices such as amplifiers or speakers reduces the power consumption of the terminal.
  • the play parameter may be an EQ (equaliser) parameter or a volume parameter.
  • the volume parameter generally refers to the loudness when playing audio.
  • the function of the EQ parameter is to adjust the tone by gaining or attenuating one or more frequency bands of the sound. the goal of.
  • the EQ parameters include parameters of frequency, gain, and quantization.
  • the frequency can be used to set the frequency point of the audio
  • the gain can be used to adjust the gain or attenuation of the audio at the above frequency
  • the bandwidth is used to set the frequency band for gain or attenuation.
  • playing low-frequency components in audio is generally the main cause of power consumption. Therefore, reducing the low-frequency gain when playing audio in an audio playback scene where sound quality is not high can significantly reduce the power consumption of the terminal.
  • step S802 if it is detected in step S801 that the current audio playing scene is the first playing scene (such as a game playing scene) with lower sound quality requirements, the terminal may set the playing parameter when the speaker plays the audio to the value.
  • the lower first playing parameters 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 subsequent speakers can reduce the power consumed by the terminal when playing the audio using the playing parameters. Consumption.
  • step S803 if it is detected in step S801 that the current audio playing scene is a second playing scene with a higher sound quality requirement (for example, a music playing scene), the terminal may set the playing parameter of the to-be-played audio to a value. Higher second play parameters. In this way, the multimedia manager can call the speaker to play the to-be-played audio according to the second playing parameter, thereby ensuring the sound quality requirement of the second application when playing the audio in the second playing scene.
  • a higher sound quality requirement for example, a music playing scene
  • the scheduling module 301 of the framework layer is configured with a correspondence between different audio playback scenarios and different playback parameters. Then, after the scheduling module 301 determines that the current audio playing scene is the first playing scene, the playing parameter when the speaker plays the audio may be determined as the first playing parameter corresponding to the first playing scene, and The first play parameter is sent to a multimedia manager that provides an audio play function. In this way, when the subsequent multimedia manager receives the audio play request sent by the application (ie, the second application) that supports the audio play in the terminal, the multimedia manager can call the speaker to play the audio according to the first play parameter, thereby reducing the audio play time.
  • the power consumption overhead can also ensure the sound quality requirement of the second application when playing audio in the first playing scene.
  • the multimedia manager may request the acquisition module 301 to acquire and at this time.
  • the scheduling module 301 can determine a play parameter when the audio is played according to the play scene indicated by the second flag bit, and send the play parameter to the multimedia manager, so that the multimedia The manager can call the speaker to play the audio according to the playback parameters.
  • the multimedia manager when the second application sends an audio play request to the multimedia manager in the framework layer, the multimedia manager may also set the play parameters when the speaker plays the audio according to the package name or type of the second application.
  • the multimedia manager can set lower playback parameters such as loudness and low frequency gain, so that the vibration frequency of the speaker is reduced, thereby reducing the power consumption generated by the speaker;
  • the multimedia manager can set higher playback parameters such as loudness and low frequency gain to ensure better sound quality when the speaker is working.
  • a display device for example, an LCD
  • a method for managing a peripheral device is described in detail. As shown in FIG. 10, the method includes:
  • the terminal periodically detects a current display scenario of the terminal.
  • the display scene may be divided into four types of display scenes that require different display effects (ie, display scene 1 to display scene 4 in Table 1).
  • the display scene 4 is a display content in an image library application with a high display effect requirement
  • the display scene 3 is a display content in a UI, a video, a photo preview, or an e-book that requires a high display effect
  • the display scene 2 is a display effect.
  • display scene 1 is a display content in a browser, game, weather, or navigation application that requires less display.
  • Display scene Display content Display effect requirements Display scene 4 Gallery high Display scene 3 UI, video, photo preview, e-book Higher Display scene 2 Shopping, news, social, education general Display scene 1 Browser, game, weather, navigation low
  • the terminal may determine the current display content by using the specific display content in the current display, and determine the current display scenario according to the type of the currently running application. Display scene.
  • a flag for example, a third flag for storing the latest display scene may be set in the terminal. After the terminal determines the current display scene, the identifier of the determined display scene may be determined. The update is in the third flag bit, so that the subsequent terminal can adjust the display parameter when the display works according to the display scene indicated in the third flag bit.
  • the terminal sets the display parameter of the display to the second display parameter.
  • 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 when the display works using the first display parameter is smaller than the work when the display works using the second display parameter. Consumption.
  • the display scene (such as the display scene 4 in Table 1) that is not required for the display effect can lower the display parameter when the display is displayed, thereby lowering the display. Unnecessary power consumption consumed during work.
  • the display parameter may include one or more of a resolution, a brightness, or a contrast of the display, which is not limited in this embodiment of the present application.
  • a resolution, brightness or contrast When the resolution, brightness or contrast is higher, the power consumption generated by the display is higher, and the display effect is better. When the resolution, brightness or contrast is lower, the power consumption generated by the display is smaller, and the display effect is lower. It also declined.
  • the terminal can change the brightness of the display by adjusting the grayscale value of each pixel unit in the display, and can also change the brightness of the display by adjusting the grayscale values of different primary colors (such as red, blue, and green) in each pixel unit.
  • the embodiment of the present application does not impose any limitation on this.
  • step S1002 if it is detected in step S1001 that the current display scene is the display scene 1 (ie, the first display scene), since the requirement for the display effect in the display scene 1 is low, the terminal may display the current display.
  • the display parameter of the content is set to a first display parameter having a lower value, for example, the brightness of the display is adjusted from 85 to 70.
  • the graphics manager can invoke the display for display according to the first display parameter, thereby reducing the power consumption consumed by the display, and at the same time ensuring the display effect of the third application in the first display scene.
  • step S1003 if it is detected in the step S1001 that the current display scene is the display scene 4 (ie, the second display scene), since the display scene 4 has a high requirement for the display effect, the terminal may The display parameter of the display content is set to the second display parameter with a higher value. In this way, the graphics manager can invoke the display for display according to the second display parameter described above, thereby ensuring the display effect of the third application in the second display scene.
  • the scheduling module of the framework layer is provided with a correspondence between different display scenarios and different display parameters. Then, after the scheduling module determines the current display scenario by using the third flag bit, the display parameter corresponding to the current display scenario 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 any display request sent by the application supporting the image display (ie, the third application), the scheduling parameter may be invoked according to the determined display parameter. The display is displayed.
  • the graphics manager may request the scheduling module to acquire display parameters corresponding to the display scene at this time. Then, in response to the request sent by the graphics manager, the scheduling module may determine the display parameter of the display according to the display scenario indicated by the third flag bit, and send the display parameter to the graphics manager, so that the graphics manager can follow the The display parameters call the display for display.
  • the graphics manager may also set the display parameters of the display according to the package name or type of the third application. For example, for weather-critical applications with low image quality, the graphics manager can set lower brightness, resolution, and other display parameters to reduce the power consumption of the display; for cameras and libraries that require high image quality. Application, the graphics manager can set higher brightness, resolution and other display parameters to ensure better image quality when the monitor works.
  • the terminal can adjust parameters of the working time of the peripheral device (such as a speaker or a display) in real time according to the actual scene (such as an audio playing scene or a display scene).
  • the terminal can reduce the parameters required for the peripheral device to work, thereby reducing the power consumption overhead caused by excessive operation of the peripheral device, and satisfying the scenario. Sound quality requirements or display performance requirements.
  • a method for reducing power consumption of an application processor (AP) in a terminal is also provided. As shown in FIG. 12, the method includes:
  • S1201 The terminal periodically detects the current running data of the terminal.
  • the operation data may include the motion state detected in step S401, for example, rest, walking, running, low-speed traffic, high-speed traffic, etc., and may also include the audio play scene detected in step S801, for example, a music playing scene, a video.
  • the display scene, the voice play scene, and the game play scene may also include the display scene detected in step S1001, such as display scene 1 to display scene 4 in Table 1, or the operation data may further include the signal strength of the terminal.
  • the embodiment of the present application does not impose any limitation on the parameters of the user's current terminal requirements.
  • S1202 The terminal determines an operating mode of the AP according to the current running data.
  • the working mode of the AP may include an operating mode, a sleep mode, and an off mode.
  • the terminal may determine that the working mode of the AP is the operation mode;
  • the operation data detected in step S1201 reflects that the user's current use requirement for the terminal is low. For example, if the user is sleeping or flying, the terminal may determine that the AP's working mode is the sleep mode or the off mode.
  • the working mode of the AP may be divided according to the actual experience or the actual application scenario, and the embodiment of the present application does not impose any limitation on this.
  • the terminal can control peripheral devices (for example, Wi-Fi device, Bluetooth) in order to reduce unnecessary power consumption overhead caused by the peripheral device frequently waking up the AP reporting data.
  • peripheral devices for example, Wi-Fi device, Bluetooth
  • the device or the GPS device, etc. reduces the frequency of acquiring data, or intercepts the frequency at which the peripheral device reports the data acquired by the peripheral device to the AP, thereby reducing the power consumption overhead caused by frequently waking up the AP.
  • the scheduling module for managing the peripheral device may set the operating mode of one or more peripheral devices to the intercept mode.
  • the operating frequency of the peripheral device is lowered, so that the frequency of reporting data to the AP by the peripheral device is reduced, that is, the number of times the AP is woken up is also reduced, so that the power consumption of the AP and the peripheral device are both reduced.
  • the working mode of the Wi-Fi device includes two modes: data transparent transmission and data interception.
  • the scheduling module can set the working mode of the Wi-Fi device to data. Intercept mode.
  • the Wi-Fi device operates at a lower frequency than the Wi-Fi device in data pass-through mode, for example, a Wi-Fi device can reduce the operating frequency of data acquired every 1 second to every 10 Get the working frequency of the data once in seconds. Subsequently, after the Wi-Fi device obtains the data, the AP can still wake up the AP by interrupting, etc., and report the data to the AP.
  • the frequency of the Wi-Fi device reporting the data to the AP follows.
  • the decrease, that is, the number of times the AP is woken up, is also reduced, thereby achieving the effect of reducing AP power consumption.
  • a management module for managing data reporting to the AP may be provided in the peripheral device. Still using a Wi-Fi device as a peripheral device, as shown in FIG. 14, the Wi-Fi device can normally receive data according to the method in the prior art, but when the Wi-Fi device receives the data, if the Wi-Fi device The management module in the middle of the current module is in the sleep mode, and the management module can set the mode in which the Wi-Fi device uploads data to the AP to the intercept mode. In the interception mode, the Wi-Fi device can discard the received data, or the Wi-Fi device can buffer the received data until the management module queries the current AP's working mode and reports it to the AP.
  • the Wi-Fi device can periodically upload the received data to the AP. In this way, the Wi-Fi device does not need to wake up the AP to upload the data every time the data is received, thereby achieving the effect of reducing the power consumption of the AP.
  • the terminal can identify the current usage requirement of the user, and then intercept the frequency of receiving data by the peripheral device when the user's use requirement for the terminal is low, or intercept the peripheral device to report data to the AP.
  • the frequency which reduces the number of times the AP is woken up when the working demand is not high, and achieves the effect of reducing the power consumption of the AP.
  • the above terminal and the like include hardware structures and/or software modules corresponding to each function.
  • the embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
  • the embodiment of the present application may perform the division of the function modules on the terminal or the like according to the foregoing method example.
  • each function module may be divided according to each function, or two or more functions may be integrated into one processing module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
  • FIG. 15 is a schematic diagram showing a possible structure of a terminal involved in the foregoing embodiments, where the terminal is used to implement the method described in the foregoing method embodiments. Specifically, the detection unit 1501 and the processing unit 1502 are included.
  • the detecting unit 1501 is configured to support the terminal to perform the process S401 in FIG. 4, the pass 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 perform the process in FIG. Processes S402-S403, processes S802-S803 in FIG. 8, processes S1002-S1003 in FIG. 10, and processes S1202-S1203 in FIG. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
  • the above-described detecting unit 1501 and processing unit 1502 may be integrated into a processing module.
  • the terminal may further include a storage module, a communication module, and an input/output module.
  • FIG. 16 a possible schematic structural diagram of the terminal involved in the foregoing embodiment is shown, including 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 the action of the terminal.
  • the communication module 1602 is configured to support communication between the terminal and other network entities.
  • the input/output module 1603 is for receiving information input by a user or outputting information provided to the user and various menus of the terminal.
  • the storage module 1604 is configured to save program codes and data of the terminal.
  • the processing module 1601 may be a processor or a controller, for example, may be a central processing unit (CPU), a GPU, a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit. (Application-Specific Integrated Circuit, ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the communication module 1602 can be a transceiver, a transceiver circuit, an input/output device, a communication interface, or the like.
  • the communication module 1602 may specifically be a Bluetooth device, a Wi-Fi device, a peripheral interface, or the like.
  • the memory module 1604 can be a memory, which can include high speed random access memory (RAM), and can also include non-volatile memory, such as magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
  • RAM high speed random access memory
  • non-volatile memory such as magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
  • the input/output module 1603 can be an input/output device such as a touch screen, a keyboard, a microphone, and a display.
  • the display may specifically be configured in the form of a liquid crystal display, an organic light emitting diode or the like.
  • a touch panel can be integrated on the display for collecting touch events on or near the display, and transmitting the collected touch information to other devices (such as a processor, etc.).
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Abstract

Provided in embodiments of the present application are a management method for a peripheral device inside a terminal and the terminal, relating to the field of communication technologies, which, while satisfying the data precision required by an application, can reduce the use of peripheral devices, thereby reducing terminal power consumption. The method comprises: the terminal acquires a real-time running scenario in which the terminal is currently located; when the real-time running scenario is a first running scenario, the terminal instructs the peripheral device to operate according to a first working parameter; and when the real-time running scenario is a second running scenario, the terminal instructs the peripheral device to operate according to a second working parameter. The power consumption generated by the terminal when the peripheral device operates according to the first working parameter is smaller than the power consumption generated by the terminal when the peripheral device operates according to the second working parameter.

Description

一种终端内外围器件的管理方法及终端Management method and terminal of peripheral device in terminal 技术领域Technical field
本申请实施例涉及通信技术领域,尤其涉及一种终端内外围器件的管理方法及终端。The embodiments of the present invention relate to the field of communications technologies, and in particular, to a method and a terminal for managing a peripheral device in a terminal.
背景技术Background technique
手机等终端为了提供更加丰富的使用功能,通常在终端的主芯片之外集成越来越多的外围器件,例如,可用于定位的全球定位系统(global positioning system,GPS)器件,可用于显示的液晶显示器件(Liquid crystal display,LCD),可用于无线传输的无线保真(wireless-fidelity,Wi-Fi)器件和蓝牙(bluetooth,BT)器件等。In order to provide more abundant functions, terminals such as mobile phones usually integrate more and more peripheral devices outside the main chip of the terminal, for example, a global positioning system (GPS) device that can be used for positioning, which can be used for display. Liquid crystal display (LCD), which can be used for wireless transmission of wireless-fidelity (Wi-Fi) devices and Bluetooth (BT) devices.
终端内安装的应用可通过调用相关度的服务接口,请求从相关外围器件中获取该外围器件检测出的器件数据。例如,地图类应用在终端内运行时,可周期性的调用位置管理器(location manager)提供的应用程序编程接口(application programming interface,API)请求查询当前的位置数据,进而驱动GPS器件进行定位,并将本次定位得到的位置数据反馈给地图类应用。The application installed in the terminal can request the device data detected by the peripheral device from the relevant peripheral device by calling the service interface of the correlation. For example, when the map application is running in the terminal, the application programming interface (API) provided by the location manager can be periodically requested to query the current location data, thereby driving the GPS device to perform positioning. The position data obtained by this positioning is fed back to the map application.
有的应用在提供位置服务等功能时,为提高数据精度,会频繁请求外围器件提高器件数据,例如,每1秒请求GPS器件定位一次,那么GPS器件便会按照这个频率每1秒进行一次定位。但当用户处于数据精度要求不高的应用场景时,GPS器件按照这个频率进行定位将导致终端消耗无谓的电量。In some applications, when providing functions such as location services, in order to improve data accuracy, peripheral devices are frequently requested to improve device data. For example, if the GPS device is requested to be positioned once every 1 second, the GPS device will perform positioning every 1 second according to this frequency. . However, when the user is in an application scenario where the data accuracy is not high, the positioning of the GPS device according to this frequency will cause the terminal to consume unnecessary power.
发明内容Summary of the invention
本申请的实施例提供一种终端内外围器件的管理方法及终端,可在满足应用所需的数据精度的同时,减少对外围器件的使用,从而降低终端功耗。Embodiments of the present application provide a method and a terminal for managing a peripheral device in a terminal, which can reduce the use of peripheral devices while reducing the power consumption of the terminal while satisfying the data precision required by the application.
为达到上述目的,本申请的实施例采用如下技术方案:To achieve the above objective, 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: acquiring, by a terminal, a real-time running scenario in which the current terminal is located; and when the real-time running scenario is a first running scenario, the terminal instructing the peripheral device Working according to the first working parameter; when the real-time running scenario is the second running scenario, the terminal instructs the peripheral device to work according to the second working parameter; wherein, when the peripheral device works according to the first working parameter, the power consumption generated by the terminal is less than the The power consumption generated by the terminal when the peripheral device operates according to the second operating parameter.
也就是说,终端能够根据当前的实时运行场景控制该外围器件在不同工作参数下工作,以响应应用向外围器件发起的业务请求,使得终端可以在应用所需的数据精度不高时降低外围器件的功耗开销,从而节省终端功耗。That is to say, the terminal can control the peripheral device to work under different operating parameters according to the current real-time running scenario, in response to the service request initiated by the application to the peripheral device, so that the terminal can reduce the peripheral device when the data required by the application is not high. The power consumption overhead saves terminal power consumption.
在一种可能的设计方法中,上述外围器件为定位装置,上述工作参数为该定位装置的工作频率,其中,上述运行场景具体可以包括静止、步行、跑步、骑行、低速交通或高速交通中的一个运动状态;上述在第一运行场景中终端的移动速率小于在第二运行场景中终端的移动速率,上述第一工作参数小于第二工作参数。In a possible design method, the peripheral device is a positioning device, and the working parameter is an operating frequency of the positioning device, wherein the running scenario may specifically include static, walking, running, riding, low-speed traffic or high-speed traffic. a moving state; the moving speed of the terminal in the first running scenario is less than the moving speed of the terminal in the second running scenario, and the first operating parameter is smaller than the second operating parameter.
也就是说,终端向应用提供定位服务以及终端控制定位装置进行定位这两个过程是终端分别进行管控的,其中,应用仍然可以像现有技术中一样正常的向位置管理器请求和获取定位结果,而终端内的定位装置可以根据当前终端的运动状态在不同工作 频率下工作。这样,当终端处于对定位精度要求不高的运动状态时,可降低定位装置的工作频率,从而在保证定位精度的同时降低定位装置工作带来的功耗开销。That is to say, the terminal provides the positioning service to the application and the terminal controls the positioning device to perform the positioning. The two processes are separately controlled by the terminal, wherein the application can still request and obtain the positioning result from the location manager as in the prior art. And the positioning device in the terminal can work at different working frequencies according to the current state of motion of the terminal. In this way, when the terminal is in a motion state that does not require high positioning accuracy, the operating frequency of the positioning device can be reduced, thereby reducing the power consumption overhead caused by the positioning device operation while ensuring the positioning accuracy.
在一种可能的设计方法中,终端获取当前终端所处的实时运行场景,具体包括:终端检测终端的移动速率;终端根据该移动速率确定终端当前所处的运动状态。In a possible design method, the terminal acquires a real-time running scenario in which the current terminal is located, and specifically includes: the terminal detects a moving rate of the terminal; and the terminal determines, according to the moving rate, a current moving state of the terminal.
在一种可能的设计方法中,终端的框架层中包括用于管理该定位装置工作状态的调度模块,终端预设的第一标志位用于存储最近一次终端确定出的运动状态的标识。In a possible design method, the framework layer of the terminal includes a scheduling module for managing the working state of the positioning device, and the first flag set by the terminal is used to store the identifier of the motion state determined by the last terminal.
那么,终端指示该外围器件按照第一工作参数工作,具体包括:响应于第一应用对该定位装置的定位请求,终端内提供位置服务的位置管理器向该调度模块发送第一查询请求,该第一查询请求用于查询该定位装置的工作频率;响应于第一查询请求,该调度模块根据第一标志位指示的第一运动状态,确定与第一运动状态对应的第一工作频率;调度模块将第一工作频率发送给该位置管理器,使得该位置管理器按照第一工作频率驱动该定位装置进行定位。Then, the terminal instructs the peripheral device to work according to the first working parameter, and specifically includes: in response to the positioning request of the first application to the positioning device, the location manager that provides the location service in the terminal sends a first query request to the scheduling module, where The first query request is used to query the working frequency of the positioning device; in response to the first query request, the scheduling module determines the first working frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; The module transmits the first operating frequency to the location manager such that the location manager drives the positioning device to perform positioning according to the first operating frequency.
或者,终端指示该外围器件按照第一工作参数工作,具体包括:响应于第一应用对该定位装置的定位请求,终端内提供位置服务的位置管理器向该调度模块发送第二查询请求,第二查询请求用于请求查询是否允许驱动该定位装置定位;响应于第二查询请求,该调度模块根据第一标志位指示的第一运动状态,确定与第一运动状态对应的第一工作频率;若该定位请求距离该定位装置最近一次定位的时长小于第一工作周期,则该调度模块向该位置管理器发送不允许驱动该定位装置定位的消息;若该定位请求距离该定位装置最近一次定位的时长大于或等于第一工作周期,则该调度模块向该位置管理器发送允许驱动该定位装置定位的消息,第一工作周期为第一工作频率的倒数。Or the terminal instructs the peripheral device to work according to the first working parameter, and specifically includes: in response to the positioning request of the first application to the positioning device, the location manager that provides the location service in the terminal sends a second query request to the scheduling module, where The second query request is used to request whether the query is allowed to drive the positioning device to be located; and in response to the second query request, the scheduling module determines the first working frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; If the positioning request is less than the first working period from the positioning device, the scheduling module sends a message to the location manager that is not allowed to drive the positioning device; if the positioning request is located closest to the positioning device The scheduling module is greater than or equal to the first working period, and the scheduling module sends a message to the location manager that allows the positioning of the positioning device to be driven, and the first working period is a reciprocal of the first working frequency.
又或者,终端指示该外围器件按照第一工作参数工作,具体包括:当该调度模块中第一标志位指示的运动状态为第一运动状态时,该调度模块确定与第一运动状态对应的第一工作频率;该调度模块将第一工作频率发送给终端内提供位置服务的位置管理器,使得该位置管理器按照第一工作频率驱动该定位装置进行定位。Or the terminal instructs the peripheral device to work according to the first working parameter, specifically: when the motion state indicated by the first flag bit in the scheduling module is the first motion state, the scheduling module determines the first corresponding to the first motion state. a working frequency; the scheduling module sends the first working frequency to the location manager that provides the location service in the terminal, so that the location manager drives the positioning device to perform positioning according to the first working frequency.
在一种可能的设计方法中,上述工作参数为该扬声器播放音频时的播放参数;其中,上述运行场景具体可以包括音乐播放场景、视频播放场景、语音播放场景或游戏播放场景中的一项音频播放场景;上述第一运行场景对音质的要求小于第二运行场景对音质的要求。In a possible design method, the working parameter is a playing parameter when the speaker plays audio; wherein the running scenario may specifically include an audio in a music playing scene, a video playing scene, a voice playing scene or a game playing scene. The scene is played; the sound quality requirement of the first running scene is smaller than the sound quality of the second running scene.
也就是说,在本申请实施例中终端可以根据当前所处的实际音频播放场景,实时调整播放音频时外围器件的播放参数。这样,当终端处于对音质要求不高的场景时,终端可降低外围器件工作时所需的参数,从而降低外围器件过度工作带来的功耗开销,同时满足该场景下的音质要求或显示效果要求。That is to say, in the embodiment of the present application, the terminal can adjust the playing parameters of the peripheral device when playing the audio in real time according to the actual audio playing scene currently located. In this way, when the terminal is in a scene where the sound quality is not high, the terminal can reduce the parameters required for the peripheral device to work, thereby reducing the power consumption overhead caused by the excessive operation of the peripheral device, and satisfying the sound quality requirement or the display effect in the scene. Claim.
在一种可能的设计方法中,终端获取当前终端所处的实时运行场景,包括:终端根据当前运行的应用的信息确定当前的音频播放场景;或者,终端根据当前播放的音频内容确定当前的音频播放场景。In a possible design method, the terminal acquires a real-time running scenario in which the current terminal is located, including: determining, by the terminal, the current audio playing scenario according to information of the currently running application; or determining, by the terminal, the current audio according to the currently played audio content. Play the scene.
在一种可能的设计方法中,终端的框架层中包括用于管理该外围器件工作状态的调度模块,终端预设的第二标志位用于存储最近一次终端确定出的音频播放场景的标识。In a possible design method, the frame layer of the terminal includes a scheduling module for managing the working state of the peripheral device, and the second flag set by the terminal is used to store the identifier of the audio playing scene determined by the last terminal.
那么,终端指示该外围器件按照第一工作参数工作,具体包括:当该调度模块中第二标志位所指示的音频播放场景为第一音频播放场景时,该调度模块确定与第一音频播放场景对应的第一播放参数;该调度模块将第一播放参数发送给终端内提供音频播放服务的多媒体管理器,使得该多媒体管理器按照第一播放参数驱动该扬声器播放音频。Then, the terminal instructs the peripheral device to work according to the first working parameter, and specifically includes: when the audio playing scene indicated by the second flag bit in the scheduling module is the first audio playing scene, the scheduling module determines the first audio playing scene Corresponding first playing parameter; the scheduling module sends the first playing parameter to the multimedia manager that provides the audio playing service in the terminal, so that the multimedia manager drives the speaker to play the audio according to the first playing parameter.
或者,终端指示该外围器件按照第一工作参数工作,具体包括:响应于第二应用对该扬声器的播放请求,终端内提供音频播放服务的多媒体管理器向该调度模块发送第一获取请求,第一获取请求用于查询播放音频时的播放参数;响应于第一获取请求,该调度模块根据第二标志位指示的第一音频播放场景,确定与第一音频播放场景对应的第一播放参数;该调度模块将第一播放参数发送给该多媒体管理器,使得该多媒体管理器按照第一播放参数驱动该扬声器播放音频。Or the terminal instructs the peripheral device to work according to the first working parameter, specifically: in response to the second application playing the request for the speaker, the multimedia manager that provides the audio playing service in the terminal sends the first acquiring request to the scheduling module, a obtaining request is used to query a playing parameter when the audio is played; in response to the first obtaining request, the scheduling module determines a first playing parameter corresponding to the first audio playing scene according to the first audio playing scene indicated by the second flag bit; The scheduling module sends the first play parameter to the multimedia manager, so that the multimedia manager drives the speaker to play audio according to the first play parameter.
在一种可能的设计方法中,上述外围器件为显示器,上述工作参数为该显示器的显示参数;其中,该运行场景包括对画质要求不相同的多个显示场景;第一运行场景对画质的要求小于第二运行场景对画质的要求。In a possible design method, the peripheral device is a display, and the working parameter is a display parameter of the display; wherein the running scenario includes multiple display scenarios with different image quality requirements; The requirement is less than the quality requirement of the second running scene.
也就是说,在本申请实施例中终端可以根据当前所处的实际显示场景,实时调整显示器显示时的工作参数。这样,当终端处于对显示效果要求不高的场景时,终端可降低外围器件工作时所需的参数,从而降低外围器件过度工作带来的功耗开销,同时满足该场景下的音质要求或显示效果要求。That is to say, in the embodiment of the present application, the terminal can adjust the working parameters when the display is displayed in real time according to the actual display scene currently located. In this way, when the terminal is in a scene where the display effect is not high, the terminal can reduce the parameters required for the peripheral device to work, thereby reducing the power consumption overhead caused by excessive operation of the peripheral device, and satisfying the sound quality requirement or display in the scene. Performance requirements.
在一种可能的设计方法中,终端获取当前终端所处的实时运行场景,包括:终端根据当前运行的应用的信息确定当前的显示场景,或者,终端根据当前的显示内容确定当前的显示场景。In a possible design method, the terminal acquires the real-time running scenario in which the current terminal is located, and the terminal determines the current display scenario according to the currently running application information, or the terminal determines the current display scenario according to the current display content.
在一种可能的设计方法中,终端的框架层中包括用于管理该外围器件工作状态的调度模块,终端预设的第三标志位用于存储最近一次终端确定出的显示场景的标识。In a possible design method, the framework layer of the terminal includes a scheduling module for managing the working state of the peripheral device, and the third flag set by the terminal is used to store the identifier of the display scene determined by the last terminal.
那么,终端指示该外围器件按照第一工作参数工作,具体包括:当该调度模块中该第三标志位所指示的显示场景为第一显示场景时,该调度模块确定与第一显示场景对应的第一显示参数;该调度模块将第一显示参数发送给终端内提供显示服务的图形管理器,使得该图形管理器按照第一显示参数驱动该显示器进行显示。Then, the terminal instructs the peripheral device to work according to the first working parameter, and specifically includes: when the display scenario indicated by the third flag bit in the scheduling module is the first display scenario, the scheduling module determines, corresponding to the first display scenario, The first display parameter; the scheduling module sends the first display parameter to the graphic manager providing the 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 work according to the first working parameter, specifically: in response to the third application playing the display request, the graphics manager providing the display service in the terminal sends a second acquisition request to the scheduling module, and second Obtaining a display parameter for querying the display; in response to the second obtaining request, the scheduling module determines, according to the first display scenario indicated by the third flag bit, a first display parameter corresponding to the first display scenario; the scheduling module The first display parameter is sent to the graphics manager such that the graphics manager drives the display for display in accordance with the first display parameter.
在一种可能的设计方法中,上述运行场景包括AP的工作状态,上述工作状态包括运行模式、休眠模式以及关闭模式,那么,当上述第一运行场景为该AP处于休眠模式或关闭模式时,该工作参数为该外围器件的工作频率,第一工作参数小于第二工作参数。这样,外围器件向AP上报数据的频率随之降低,即AP被唤醒的次数也随之降低,使得AP和外围器件的功耗均下降。In a possible design method, the foregoing operating scenario includes an operating state of the AP, where the working state includes an operating mode, a sleep mode, and an off mode, then, when the first running scenario is that the AP is in a sleep mode or an off mode, The operating parameter is the operating frequency of the peripheral device, and the first operating parameter is less than the second operating parameter. In this way, the frequency at which the peripheral device reports data to the AP decreases, that is, the number of times the AP is woken up is also reduced, so that the power consumption of the AP and peripheral devices are both reduced.
第二方面,本申请的实施例提供一种终端内外围器件的管理方法,包括:终端获 取当前AP的工作状态,该工作状态包括运行模式、休眠模式以及关闭模式;当该工作状态为休眠模式时,终端指示外围器件丢弃接收到的数据,或指示外围器件缓存接收到的数据,或指示外围器件周期性向该AP上报接收到的数据。这样,外围器件无需在每次接收到数据时均唤醒AP上传该数据,从而达到降低AP功耗的效果。In a second aspect, an embodiment of the present application provides a method for managing a peripheral device in a terminal, including: acquiring, by a terminal, an operating state of a current AP, where the working state includes an operation mode, a sleep mode, and an off mode; and when the working state is a sleep mode The terminal instructs the peripheral device to discard the received data, or instructs the peripheral device to buffer the received data, or instructs the peripheral device to periodically report the received data to the AP. In this way, the peripheral device does not need to wake up the AP to upload the data every time the data is received, thereby achieving the effect of reducing the power consumption of the AP.
第三方面,本申请的实施例提供一种终端,包括:检测单元,用于获取当前终端所处的实时运行场景;处理单元,用于:当该实时运行场景为第一运行场景时,指示该外围器件按照第一工作参数工作;当该实时运行场景为第二运行场景时,指示该外围器件按照第二工作参数工作;其中,该外围器件按照第一工作参数工作时终端产生的功耗小于该外围器件按照第二工作参数工作时终端产生的功耗。In a third aspect, an embodiment of the present application provides a terminal, including: a detecting unit, configured to acquire a real-time running scenario in which the current terminal is located, and a processing unit, configured to: when the real-time running scenario is a first running scenario, indicating The peripheral device operates according to the first working parameter; when the real-time running scenario is the second operating scenario, the peripheral device is instructed to operate according to the second working parameter; wherein, the power consumption generated by the terminal when the peripheral device operates according to the first working parameter It is less than the power consumption generated by the terminal when the peripheral device operates according to the second operating parameter.
在一种可能的设计方法中,该外围器件为定位装置,该工作参数为该定位装置的工作频率,其中,该运行场景包括静止、步行、跑步、骑行、低速交通或高速交通中的一个运动状态;在第一运行场景中终端的移动速率小于在第二运行场景中终端的移动速率,第一工作参数小于第二工作参数。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 running scene comprises one of stationary, walking, running, riding, low speed traffic or high speed traffic. The motion state; the moving rate of the terminal in the first running scenario is smaller than the moving speed of the terminal in the second running scenario, and the first working parameter is smaller than the second working parameter.
在一种可能的设计方法中,该检测单元具体用于:检测终端的移动速率;根据该移动速率确定终端当前所处的运动状态。In a possible design method, the detecting unit is specifically configured to: detect a moving rate of the terminal; and determine, according to the moving rate, a current state of motion of the terminal.
在一种可能的设计方法中,该处理单元具体包括位于框架层中管理该定位装置工作状态的调度模块,以及提供位置服务的位置管理器;终端预设的第一标志位用于存储最近一次终端确定出的运动状态的标识。In a possible design method, the processing unit specifically includes a scheduling module that manages the working state of the positioning device in the framework layer, and a location manager that provides a location service; the first flag set by the terminal is used to store the last time. The identifier of the motion state determined by the terminal.
其中,该处理单元具体用于:位置管理器向该调度模块发送第一查询请求,第一查询请求用于查询该定位装置的工作频率;响应于第一查询请求,该调度模块根据第一标志位指示的第一运动状态,确定与第一运动状态对应的第一工作频率;该调度模块将第一工作频率发送给该位置管理器,使得该位置管理器按照第一工作频率驱动该定位装置进行定位。The processing unit is specifically configured to: the location manager sends a first query request to the scheduling module, where the first query request is used to query an operating frequency of the positioning device; and in response to the first query request, the scheduling module is configured according to the first flag Determining a first motion state of the bit, determining a first operating frequency corresponding to the first motion state; the scheduling module transmitting the first operating frequency to the location manager, such that the location manager drives the positioning device according to the first operating frequency Positioning.
或者,该处理单元具体用于:响应于第一应用对该定位装置的定位请求,该位置管理器向该调度模块发送第二查询请求,第二查询请求用于请求查询是否允许驱动该定位装置定位;响应于第二查询请求,该调度模块根据第一标志位指示的第一运动状态,确定与第一运动状态对应的第一工作频率;若该定位请求距离该定位装置最近一次定位的时长小于第一工作周期,则该调度模块向该位置管理器发送不允许驱动该定位装置定位的消息;若该定位请求距离该定位装置最近一次定位的时长大于或等于第一工作周期,则该调度模块向该位置管理器发送允许驱动该定位装置定位的消息,第一工作周期为第一工作频率的倒数。Alternatively, the processing unit is specifically configured to: in response to the positioning request of the first application to the positioning device, the location manager sends a second query request to the scheduling module, where the second query request is used to request whether the query is allowed to drive the positioning device Positioning; in response to the second query request, the scheduling module determines a first operating frequency corresponding to the first motion state according to the first motion state indicated by the first flag bit; if the positioning request is located from the positioning device last time If the first working period is less than the first working period, the scheduling module sends a message to the location manager that does not allow the positioning of the positioning device to be driven; if the positioning request is located for the last time of the positioning device is greater than or equal to the first working period, the scheduling is performed. The module sends a message to the location manager that allows the location of the positioning device to be driven, the first duty cycle being the reciprocal of the first operating frequency.
或者,该处理单元具体用于:当该调度模块中第一标志位指示的运动状态为第一运动状态时,该调度模块确定与第一运动状态对应的第一工作频率;该调度模块将第一工作频率发送给终端内提供位置服务的位置管理器,使得该位置管理器按照第一工作频率驱动该定位装置进行定位。Or the processing unit is configured to: when the motion state indicated by the first flag bit in the scheduling module is the first motion state, the scheduling module determines a first working frequency corresponding to the first motion state; A working frequency is sent to the location manager providing the location service in the terminal, so that the location manager drives the positioning device to perform positioning according to the first working frequency.
在一种可能的设计方法中,该工作参数为该扬声器播放音频时的播放参数;其中,该运行场景包括音乐播放场景、视频播放场景、语音播放场景或游戏播放场景中的一项音频播放场景;第一运行场景对音质的要求小于第二运行场景对音质的要求。In a possible design method, the working parameter is a playing parameter when the speaker plays audio; wherein the running scene includes an audio playing scene in a music playing scene, a video playing scene, a voice playing scene or a game playing scene. The first operating scenario requires less sound quality than the second operating scenario.
在一种可能的设计方法中,该检测单元具体用于:根据当前运行的应用的信息确 定当前的音频播放场景;或者,根据当前播放的音频内容确定当前的音频播放场景。In a possible design method, the detecting unit is specifically configured to: determine a current audio playing scene according to information of the currently running application; or determine a current audio playing scene according to the currently played audio content.
在一种可能的设计方法中,该处理单元具体包括位于框架层中管理该外围器件工作状态的调度模块,以及提供音频播放服务的多媒体管理器;终端预设的第二标志位用于存储最近一次终端确定出的音频播放场景的标识。In a possible design method, the processing unit specifically includes a scheduling module that manages the working state of the peripheral device in the framework layer, and a multimedia manager that provides an audio playback service; the second flag set by the terminal is used to store the latest The identifier of the audio playback scene determined by the terminal.
其中,该处理单元具体用于:当该调度模块中第二标志位所指示的音频播放场景为第一音频播放场景时,该调度模块确定与第一音频播放场景对应的第一播放参数;该调度模块将第一播放参数发送给该多媒体管理器,使得该多媒体管理器按照第一播放参数驱动该扬声器播放音频。The processing unit is configured to: when the audio play scene indicated by the second flag bit in the scheduling module is the first audio play scene, the scheduling module determines a first play parameter corresponding to the first audio play scene; The scheduling module sends the first play parameter to the multimedia manager, so that the multimedia manager drives the speaker to play the audio according to the first play parameter.
或者,该处理单元具体用于:响应于第二应用对该扬声器的播放请求,多媒体管理器向该调度模块发送第一获取请求,第一获取请求用于查询播放音频时的播放参数;响应于第一获取请求,该调度模块根据第二标志位指示的第一音频播放场景,确定与第一音频播放场景对应的第一播放参数;该调度模块将第一播放参数发送给该多媒体管理器,使得该多媒体管理器按照第一播放参数驱动该扬声器播放音频。Alternatively, the processing unit is configured to: in response to the second application applying the speaker to the speaker, the multimedia manager sends a first acquisition request to the scheduling module, where the first acquisition request is used to query a play parameter when the audio is played; a first obtaining request, the scheduling module determines a first playing parameter corresponding to the 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, The multimedia manager is caused to drive the speaker to play audio according to the first play parameter.
在一种可能的设计方法中,该外围器件为显示器,该工作参数为该显示器的显示参数;其中,该运行场景包括对画质要求不相同的多个显示场景;第一运行场景对画质的要求小于第二运行场景对画质的要求。In a possible design method, the peripheral device is a display, and the working parameter is a display parameter of the display; wherein the running scene includes multiple display scenes with different image quality requirements; The requirement is less than the quality requirement of the second running scene.
在一种可能的设计方法中,该检测单元具体用于:根据当前运行的应用的信息确定当前的显示场景,或者,根据当前的显示内容确定当前的显示场景。In a possible design method, the detecting unit is specifically configured to: determine a current display scene according to information of the currently running application, or determine a current display scene according to the current display content.
在一种可能的设计方法中,该处理单元具体包括位于框架层中管理该外围器件工作状态的调度模块,以及供显示服务的图形管理器;终端预设的第三标志位用于存储最近一次终端确定出的显示场景的标识。In a possible design method, the processing unit specifically includes a scheduling module for managing the working state of the peripheral device in the framework layer, and a graphics manager for displaying the service; the third flag set by the terminal is used to store the last time. The identifier of the display scene determined by the terminal.
其中,该处理单元具体用于:当该调度模块中该第三标志位所指示的显示场景为第一显示场景时,该调度模块确定与第一显示场景对应的第一显示参数;该调度模块将第一显示参数发送给该图形管理器,使得该图形管理器按照第一显示参数驱动该显示器进行显示。The processing unit is configured to: when the display scenario indicated by the third flag bit in the scheduling module is the first display scenario, the scheduling module determines a first display parameter corresponding to the first display scenario; the scheduling module The first display parameter is sent to the graphics manager such that the graphics manager drives the display for display in accordance with the first display parameter.
或者,该处理单元具体用于:响应于第三应用对该显示器的播放请求,该图形管理器向该调度模块发送第二获取请求,第二获取请求用于查询该显示器的显示参数;响应于第二获取请求,该调度模块根据该第三标志位指示的第一显示场景,确定与第一显示场景对应的第一显示参数;该调度模块将第一显示参数发送给该图形管理器,使得该图形管理器按照第一显示参数驱动该显示器进行显示。Alternatively, the processing unit is specifically configured to: in response to the third application applying a play request to the display, the graphics manager sends a second acquisition request to the scheduling module, where the second obtaining request is used to query display parameters of the display; a second acquisition request, the scheduling module determines a first display parameter corresponding to the first display scenario according to the first display scenario 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 for display in accordance with the first display parameter.
在一种可能的设计方法中,该运行场景包括应用处理器AP的工作状态,该工作状态包括运行模式、休眠模式以及关闭模式,当第一运行场景为该AP处于休眠模式或关闭模式时,该工作参数为该外围器件的工作频率,第一工作参数小于第二工作参数。In a possible design method, the running scenario includes an operating state of the application processor AP, where the working state includes an operating mode, a sleep mode, and an off mode, when the first running scenario is that the AP is in a sleep mode or an off mode, The operating parameter is the operating frequency of the peripheral device, and the first operating parameter is less than the second operating parameter.
第四方面,本申请的实施例提供一种终端,包括:检测单元,用于获取当前AP的工作状态,该工作状态包括运行模式、休眠模式以及关闭模式;处理单元,用于:当该工作状态为休眠模式时,指示外围器件丢弃接收到的数据,或指示外围器件缓存接收到的数据,或指示外围器件周期性向该AP上报接收到的数据。In a fourth aspect, an embodiment of the present application provides a terminal, including: a detecting unit, configured to acquire an operating state of a current AP, where the working state includes an operating mode, a sleep mode, and a shutdown mode; and a processing unit, configured to: when the work When the state is in the sleep mode, the peripheral device is instructed to discard the received data, or the peripheral device is instructed to buffer the received data, or the peripheral device is periodically reported to the AP to receive the received data.
第五方面,本申请的实施例提供一种终端,包括:处理器、存储器、通信接口和 显示器;该存储器用于存储计算机执行指令,该处理器与该存储器耦合,当终端运行时,该处理器执行该存储器存储的该计算机执行指令,以使终端执行上述任一项终端内外围器件的管理方法。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 configured to store a computer execution instruction, and the processor is coupled to the memory, and when the terminal is running, the processing The computer executes the computer-executed instructions stored in the memory to cause the terminal to execute the management method of the peripheral device in any of the above terminals.
第六方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在上述任一项终端上运行时,使得终端执行上述任一项终端内外围器件的管理方法。In a sixth aspect, the embodiment of the present application provides a computer readable storage medium, where the computer readable storage medium stores an instruction, when the instruction is run on any of the foregoing terminals, causing the terminal to execute any one of the foregoing terminals. The management method of peripheral devices.
第七方面,本申请实施例提供一种包含指令的计算机程序产品,当其在上述任一项终端上运行时,使得终端执行上述任一项终端内外围器件的管理方法。In a seventh aspect, an embodiment of the present application provides a computer program product, including an instruction, when the terminal runs on any of the foregoing terminals, causing the terminal to perform a management method of the peripheral device in any of the foregoing terminals.
本申请的实施例中,上述终端中各部件的名字对设备本身不构成限定,在实际实现中,这些部件可以以其他名称出现。只要各个部件的功能和本申请的实施例类似,即属于本申请权利要求及其等同技术的范围之内。In the embodiment of the present application, the names of the components in the terminal are not limited to the device itself, and in actual implementation, the components may appear under other names. As long as the functions of the various components are similar to the embodiments of the present application, they are within the scope of the claims and their equivalents.
另外,第二方面至第七方面中任一种设计方式所带来的技术效果可参见上述第一方面中不同设计方法所带来的技术效果,此处不再赘述。In addition, the technical effects brought by the design method of any one of the second aspect to the seventh aspect can be referred to the technical effects brought by different design methods in the above first aspect, and details are not described herein again.
附图说明DRAWINGS
图1为本申请实施例提供的一种终端的结构示意图一;FIG. 1 is a schematic structural diagram 1 of a terminal according to an embodiment of the present disclosure;
图2为本申请实施例提供的一种终端内操作系统的架构示意图;2 is a schematic structural diagram of an operating system in a terminal according to an embodiment of the present disclosure;
图3为本申请实施例提供的一种终端内外围器件的管理方法的架构示意图一;FIG. 3 is a schematic structural diagram 1 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图4为本申请实施例提供的一种终端内外围器件的管理方法的流程示意图一;4 is a schematic flowchart 1 of a method for managing a peripheral device in a terminal according to an embodiment of the present application;
图5为本申请实施例提供的一种终端内外围器件的管理方法的架构示意图二;FIG. 5 is a schematic structural diagram 2 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图6为本申请实施例提供的一种终端内外围器件的管理方法的架构示意图三;FIG. 6 is a schematic structural diagram 3 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图7为本申请实施例提供的一种终端内外围器件的管理方法的架构示意图四;FIG. 7 is a schematic structural diagram 4 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图8为本申请实施例提供的一种终端内外围器件的管理方法的流程示意图二;FIG. 8 is a second schematic flowchart of a method for managing peripheral devices in a terminal according to an embodiment of the present disclosure;
图9为本申请实施例提供的一种终端内外围器件的管理方法的架构示意图五;FIG. 9 is a schematic structural diagram 5 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图10为本申请实施例提供的一种终端内外围器件的管理方法的流程示意图三;FIG. 10 is a schematic flowchart 3 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图11为本申请实施例提供的一种终端内外围器件的管理方法的架构示意图六;FIG. 11 is a schematic structural diagram 6 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图12为本申请实施例提供的一种终端内外围器件的管理方法的流程示意图四;FIG. 12 is a schematic flowchart 4 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图13为本申请实施例提供的一种终端内外围器件的管理方法的架构示意图七;FIG. 13 is a schematic structural diagram 7 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图14为本申请实施例提供的一种终端内外围器件的管理方法的架构示意图八;FIG. 14 is a schematic structural diagram 8 of a method for managing a peripheral device in a terminal according to an embodiment of the present disclosure;
图15为本申请实施例提供的一种终端的结构示意图二;FIG. 15 is a schematic structural diagram 2 of a terminal according to an embodiment of the present disclosure;
图16为本申请实施例提供的一种终端的结构示意图三。FIG. 16 is a schematic structural diagram 3 of a terminal according to an embodiment of the present disclosure.
具体实施方式detailed description
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the following, the terms "first" and "second" are used for descriptive purposes only, and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first" and "second" may include one or more of the features either explicitly or implicitly. In the description of the embodiments of the present application, "multiple" means two or more unless otherwise stated.
本申请实施例提供的一种终端内外围器件的管理方法可应用于手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备、笔记本电脑、车载设备、超级移动个人计算机(ultra-mobile personal computer, UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等集成有外围器件的任意终端上,本申请实施例对此不作任何限制。The management method of the peripheral device in the terminal provided by the embodiment of the present application can be applied to a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (AR), a virtual reality (VR) device, and a notebook. The present embodiment does not impose any restrictions on any terminal that integrates peripheral devices, such as a computer, an in-vehicle device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and the like. .
如图1所示,本申请实施例中的终端可以为手机100。下面以手机100为例对实施例进行具体说明。应该理解的是,图示手机100仅是上述终端的一个范例,并且手机100可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。As shown in FIG. 1 , the terminal in the embodiment of the present application may be the 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 mobile phone 100 is only one example of the above terminal, and the mobile phone 100 may have more or fewer components than those shown in the figure, two or more components may be combined, or Has a different component configuration.
如图1所示,手机100具体可以包括:处理器101、射频(radio frequency,RF)电路102、存储器103、触摸屏104、蓝牙装置105、一个或多个传感器106、Wi-Fi装置107、定位装置108、音频电路109、外设接口110以及电源系统111等部件。这些部件可通过一根或多根通信总线或信号线(图1中未示出)进行通信。本领域技术人员可以理解,图1中示出的硬件结构并不构成对手机的限定,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。As shown in FIG. 1 , the mobile phone 100 may specifically include: a processor 101, a radio frequency (RF) circuit 102, a memory 103, a touch screen 104, a Bluetooth device 105, one or more sensors 106, a Wi-Fi device 107, and positioning. Components such as device 108, audio circuit 109, peripheral interface 110, and power system 111. These components can communicate over one or more communication buses or signal lines (not shown in Figure 1). It will be understood by those skilled in the art that the hardware structure shown in FIG. 1 does not constitute a limitation to a mobile phone, and the mobile phone 100 may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
下面结合图1对手机100的各个部件进行具体的介绍:The various components of the mobile phone 100 will be specifically described below with reference to FIG. 1 :
处理器101是手机100的控制中心,利用各种接口和线路连接手机100的各个部分,通过运行或执行存储在存储器103内的应用程序,以及调用存储在存储器103内的数据,执行手机100的各种功能和处理数据。在一些实施例中,处理器101可包括一个或多个处理单元;举例来说,处理器101可以是华为技术有限公司制造的麒麟960芯片。在本申请一些实施例中,上述处理器101还可以包括指纹验证芯片,用于对采集到的指纹进行验证。The processor 101 is a control center of the mobile phone 100, and connects various parts of the mobile phone 100 by using various interfaces and lines, and executes the mobile phone 100 by running or executing an application stored in the memory 103 and calling data stored in the memory 103. Various functions and processing data. In some embodiments, the processor 101 may include one or more processing units; for example, the processor 101 may be a Kirin 960 chip manufactured by Huawei Technologies Co., Ltd. In some embodiments of the present application, the processor 101 may further include a fingerprint verification chip for verifying the collected fingerprint.
射频电路102可用于在收发信息或通话过程中,无线信号的接收和发送。特别地,射频电路102可以将基站的下行数据接收后,给处理器101处理;另外,将涉及上行的数据发送给基站。通常,射频电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频电路102还可以通过无线通信和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统、通用分组无线服务、码分多址、宽带码分多址、长期演进、电子邮件、短消息服务等。The radio frequency circuit 102 can be used to receive and transmit wireless signals during transmission or reception of information or calls. In particular, the radio frequency circuit 102 can process the downlink data of the base station and then process it to the processor 101; in addition, transmit the data related to the uplink to the base station. Generally, radio frequency circuits include, but are 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 circuit 102 can also communicate with other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to global mobile communication systems, general packet radio services, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
存储器103用于存储应用程序以及数据,处理器101通过运行存储在存储器103的应用程序以及数据,执行手机100的各种功能以及数据处理。存储器103主要包括存储程序区以及存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等);存储数据区可以存储根据使用手机100时所创建的数据(比如音频数据、电话本等)。此外,存储器103可以包括高速随机存取存储器(ramdom access memory,RAM),还可以包括非易失存储器,例如磁盘存储器件、闪存器件或其他易失性固态存储器件等。存储器103可以存储各种操作系统,例如,苹果公司所开发的
Figure PCTCN2018080573-appb-000001
操作系统,谷歌公司所开发的
Figure PCTCN2018080573-appb-000002
操作系统等。上述存储器103可以是独立的,通过上述通信总线与处理器101相连接;存储器103也可以和处理器101集成在一起。
The memory 103 is used to store applications and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running applications and data stored in the memory 103. The memory 103 mainly includes a storage program area and a storage data area, wherein the storage program area can store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.); the storage data area can be stored according to the use of the mobile phone. Data created at 100 o'clock (such as audio data, phone book, etc.). Further, the memory 103 may include a high speed random access memory (RAM), and may also include a nonvolatile memory such as a magnetic disk storage device, a flash memory device, or other volatile solid state storage device. The memory 103 can store various operating systems, for example, developed by Apple.
Figure PCTCN2018080573-appb-000001
Operating system, developed by Google Inc.
Figure PCTCN2018080573-appb-000002
Operating system, etc. The above memory 103 may be independent and connected to the processor 101 via the above communication bus; the memory 103 may also be integrated with the processor 101.
触摸屏104具体可以包括触控板104-1和显示器104-2。The touch screen 104 may specifically include a touch panel 104-1 and a display 104-2.
其中,触控板104-1可采集手机100的用户在其上或附近的触摸操作(比如用户使用手指、触控笔等任何适合的物体在触控板104-1上或在触控板104-1附近的操作), 并将采集到的触摸信息发送给其他器件(例如处理器101)。其中,用户在触控板104-1附近的触摸操作可以称之为悬浮触控;悬浮触控可以是指,用户无需为了选择、移动或拖动目标(例如图标等)而直接接触触控板,而只需用户位于终端附近以便执行所想要的功能。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型来实现触控板104-1。The touch panel 104-1 can collect touch operations on or near the user of the mobile phone 100 (for example, the user uses a finger, a stylus, or the like on the touch panel 104-1 or on the touchpad 104. The operation near -1), and the collected touch information is transmitted to other devices (for example, the processor 101). The touch operation of the user in the vicinity of the touch panel 104-1 may be referred to as a hovering touch; the hovering touch may mean that the user does not need to directly touch the touchpad in order to select, move or drag a target (eg, an icon, etc.) And only the user is located near the terminal in order to perform the desired function. In addition, the touch panel 104-1 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
显示器(也可称为显示屏)104-2可用于显示由用户输入的信息或提供给用户的信息以及手机100的各种菜单。可以采用液晶显示器、有机发光二极管等形式来配置显示器104-2。触控板104-1可以覆盖在显示器104-2之上,当触控板104-1检测到在其上或附近的触摸操作后,传送给处理器101以确定触摸操作的类型,随后处理器101可以根据触摸操作的类型在显示器104-2上提供相应的视觉输出。虽然在图1中,触控板104-1与显示屏104-2是作为两个独立的部件来实现手机100的输入和输出功能,但是在某些实施例中,可以将触控板104-1与显示屏104-2集成而实现手机100的输入和输出功能。A display (also referred to as display) 104-2 can be used to display information entered by the user or information provided to the user as well as various menus of the handset 100. The display 104-2 can be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The touch panel 104-1 may be overlaid on the display 104-2, and when the touch panel 104-1 detects a touch operation thereon or nearby, the touch panel 104-1 transmits to the processor 101 to determine the type of the touch operation, and then the processor 101 may provide a corresponding visual output on display 104-2 depending on the type of touch operation. Although in FIG. 1, the touchpad 104-1 and the display 104-2 are implemented as two separate components to implement the input and output functions of the handset 100, in some embodiments, the touchpad 104- 1 is integrated with the display screen 104-2 to implement the input and output functions of the mobile phone 100.
可以理解的是,触摸屏104是由多层的材料堆叠而成,本申请实施例中只展示出了触控板(层)和显示屏(层),其他层在本申请实施例中不予记载。另外,触控板104-1可以以全面板的形式配置在手机100的正面,显示屏104-2也可以以全面板的形式配置在手机100的正面,这样在手机的正面就能够实现无边框的结构。It is to be understood that the touch screen 104 is formed by stacking a plurality of layers of materials. In the embodiment of the present application, only the touch panel (layer) and the display screen (layer) are shown, and other layers are not described in the embodiment of the present application. . In addition, the touch panel 104-1 may be disposed on the front surface of the mobile phone 100 in the form of a full-board, and the display screen 104-2 may also be disposed on the front surface of the mobile phone 100 in the form of a full-board, so that the front of the mobile phone can be borderless. Structure.
手机100还可以包括蓝牙装置105,用于实现手机100与其他短距离的终端(例如手机、智能手表等)之间的数据交换。本申请实施例中的蓝牙装置可以是集成电路或者蓝牙芯片等器件。The mobile phone 100 can also include a Bluetooth device 105 for enabling data exchange between the handset 100 and other short-range terminals (eg, mobile phones, smart watches, etc.). The Bluetooth device in the embodiment of the present application may be a device such as an integrated circuit or a Bluetooth chip.
手机100还可以包括至少一种传感器106,比如指纹采集器件112、光传感器、运动传感器以及其他传感器。具体地,可以在手机100的背面(例如后置摄像头的下方)配置指纹采集器件112,或者在手机100的正面(例如触摸屏104的下方)配置指纹采集器件112。又例如,可以在触摸屏104中配置指纹采集器件112来实现指纹识别功能,即指纹采集器件112可以与触摸屏104集成在一起来实现手机100的指纹识别功能;光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节触摸屏104的显示器的亮度,接近传感器可在手机100移动到耳边时,关闭显示器的电源。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机100还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset 100 can 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 collection device 112 can be configured on the back of the handset 100 (eg, below the rear camera) or on the front side of the handset 100 (eg, below the touch screen 104). For another example, the fingerprint collection device 112 can be configured in the touch screen 104 to implement the fingerprint recognition function, that is, the fingerprint collection device 112 can be integrated with the touch screen 104 to implement the fingerprint recognition function of the mobile phone 100; the light sensor can include an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display of the touch screen 104 according to the brightness of the ambient light, and the proximity sensor can turn off the power of the display when the mobile phone 100 moves to the ear. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc. As for the mobile phone 100 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here Let me repeat.
Wi-Fi装置107,用于为手机100提供遵循Wi-Fi相关标准协议的网络接入,手机100可以通过Wi-Fi装置107接入到Wi-Fi接入点,进而帮助用户收发电子邮件、浏览网页和访问流媒体等,它为用户提供了无线的宽带互联网访问。在其他一些实施例中,该Wi-Fi装置107也可以作为Wi-Fi无线接入点,可以为其他终端提供Wi-Fi网络接入。The Wi-Fi device 107 is configured to provide the mobile phone 100 with network access complying with the Wi-Fi related standard protocol, and the mobile phone 100 can access the Wi-Fi access point through the Wi-Fi device 107, thereby helping the user to send and receive emails, Browsing web pages and accessing streaming media, etc., it provides users with wireless broadband Internet access. In some other embodiments, the Wi-Fi device 107 can also function as a Wi-Fi wireless access point, and can provide Wi-Fi network access to other terminals.
定位装置108,用于为手机100提供地理位置。可以理解的是,该定位装置108具体可以是全球定位系统(global positioning system,GPS)或北斗卫星导航系统、俄 罗斯GLONASS等定位系统的接收器。定位装置108在接收到上述定位系统发送的地理位置后,将该信息发送给处理器101进行处理,或者发送给存储器103进行保存。在另外的一些实施例中,该定位装置108还可以是辅助全球卫星定位系统(assisted global positioning system,AGPS)的接收器,AGPS系统通过作为辅助服务器来协助定位装置108完成测距和定位服务,在这种情况下,辅助定位服务器通过无线通信网络与终端例如手机100的定位装置108(即GPS接收器)通信而提供定位协助。在另外的一些实施例中,该定位装置108也可以是基于Wi-Fi接入点的定位技术。由于每一个Wi-Fi接入点都有一个全球唯一的媒体介入控制(media access control,MAC)地址,终端在开启Wi-Fi的情况下即可扫描并收集周围的Wi-Fi接入点的广播信号,因此可以获取到Wi-Fi接入点广播出来的MAC地址;终端将这些能够标示Wi-Fi接入点的数据(例如MAC地址)通过无线通信网络发送给位置服务器,由位置服务器检索出每一个Wi-Fi接入点的地理位置,并结合Wi-Fi广播信号的强弱程度,计算出该终端的地理位置并发送到该终端的定位装置108中。当然,定位装置108也可以是基于基站的定位技术。手机100可用过调用系统服务中的电话服务(TelephonyManager)获取MCC(Mobile Country Code,移动国家代码)、MNC(Mobile Network Code,移动网络号码)、LAC(Location Area Code,位置区域码)、CID(Cell Identity,基站编号)以及BSSS(Base station signal strength,基站信号强度)等基站信息,进而通过基站信息确定基站的经纬度信息,此时,可将基站的经纬度信息作为手机100的定位结果。The positioning device 108 is configured to provide a geographic location for the mobile phone 100. It can be understood that the positioning device 108 can be specifically a receiver of a positioning system such as a global positioning system (GPS) or a Beidou satellite navigation system, Russian GLONASS. After receiving the geographical location transmitted by the positioning system, the positioning device 108 sends the information to the processor 101 for processing, or sends it to the memory 103 for storage. In still other embodiments, the positioning device 108 may also be an assisted global positioning system (AGPS) receiver, and the AGPS system assists the positioning device 108 in performing ranging and positioning services by acting as an auxiliary server. In this case, the secondary location server provides location assistance over a wireless communication network in communication with a location device 108, such as a GPS receiver, of the handset 100. In still other embodiments, the positioning device 108 can also be a Wi-Fi access point based positioning technology. Since each Wi-Fi access point has a globally unique media access control (MAC) address, the terminal can scan and collect the surrounding Wi-Fi access points when Wi-Fi is turned on. Broadcast signals, so the MAC address broadcasted by the Wi-Fi access point can be obtained; the terminal sends the data (such as the MAC address) capable of indicating the Wi-Fi access point to the location server through the wireless communication network, and is retrieved by the location server. The geographic location of each Wi-Fi access point, combined with the strength of the Wi-Fi broadcast signal, calculates the geographic location of the terminal and sends it to the location device 108 of the terminal. Of course, the positioning device 108 can also be a base station based positioning technology. The mobile phone 100 can obtain the MCC (Mobile Country Code), the MNC (Mobile Network Code), the LAC (Location Area Code), and the CID (Telephony Code) by calling the telephone service (TelephonyManager) in the system service. Base station information such as the cell identity (base station number) and BSSS (Base Station Signal Strength), and then the latitude and longitude information of the base station is determined by the base station information. At this time, the latitude and longitude information of the base station can be used as the positioning result of the mobile phone 100.
音频电路109、扬声器113、麦克风114可提供用户与手机100之间的音频接口。音频电路109可将接收到的音频数据转换后的电信号,传输到扬声器113,由扬声器113转换为声音信号输出;另一方面,麦克风114将收集的声音信号转换为电信号,由音频电路109接收后转换为音频数据,再将音频数据输出至RF电路102以发送给比如另一手机,或者将音频数据输出至存储器103以便进一步处理。The audio circuit 109, the speaker 113, and the microphone 114 can provide an audio interface between the user and the handset 100. The audio circuit 109 can transmit the converted electrical data of the received audio data to the speaker 113 for conversion to the sound signal output by the speaker 113; on the other hand, the microphone 114 converts the collected sound signal into an electrical signal by the audio circuit 109. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 102 for transmission to, for example, another mobile phone, or the audio data is output to the memory 103 for further processing.
外设接口110,用于为外部的输入/输出设备(例如键盘、鼠标、外接显示器、外部存储器、用户识别模块卡等)提供各种接口。例如通过通用串行总线(universal serial bus,USB)接口与鼠标连接,通过用户识别模块卡卡槽上的金属触点与电信运营商提供的用户识别模块卡(subscriber identification module,SIM)卡进行连接。外设接口110可以被用来将上述外部的输入/输出外围设备耦接到处理器101和存储器103。The peripheral interface 110 is used to provide various interfaces for external input/output devices (such as a keyboard, a mouse, an external display, an external memory, a subscriber identity module card, etc.). For example, it is connected to the mouse through a universal serial bus (USB) interface, and is connected with a subscriber identification module (SIM) card provided by the telecommunication operator through a metal contact on the card slot of the subscriber identification module. . Peripheral interface 110 can be used to couple the external input/output peripherals described above to processor 101 and memory 103.
手机100还可以包括给各个部件供电的电源装置111(比如电池和电源管理芯片),电池可以通过电源管理芯片与处理器101逻辑相连,从而通过电源装置111实现管理充电、放电、以及功耗管理等功能。The mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) that supplies power to the various components. The battery may be logically connected to the processor 101 through the power management chip to manage charging, discharging, and power management through the power supply device 111. And other functions.
尽管图1未示出,手机100还可以包括摄像头(前置摄像头和/或后置摄像头)、闪光灯、微型投影装置、近场通信(NFC near field communication,NFC)装置等,在此不予赘述。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 projection device, a near field communication (NFC) device, etc., and will not be described herein. .
其中,上述手机100中可与处理器101进行通信的这些器件均可称为手机100的外围器件,外围器件工作时得到的器件数据可支撑在操作系统中运行的应用实现导航、显示、播放、以及传输等服务功能。The devices in the mobile phone 100 that can communicate with the processor 101 can be referred to as peripheral devices of the mobile phone 100, and the device data obtained when the peripheral device works can support navigation, display, and playback of applications running in the operating system. And service functions such as transmission.
示例性的,上述手机100的操作系统可以为Android或IOS等操作系统,以 Android操作系统为例,如图2所示,Android操作系统可以划分为四层,从高层到低层分别是应用程序层201(即APP层)、应用程序框架层202(即framework层)、系统运行库层203(即Libraries或native层)和Linux内核层204。Exemplarily, the operating system of the mobile phone 100 may be an operating system such as Android or IOS, and the Android operating system is taken as an example. As shown in FIG. 2, the Android operating system may be divided into four layers, and the application layer is from the upper layer to the lower layer respectively. 201 (ie, the APP layer), the application framework layer 202 (ie, the framework layer), the system runtime layer 203 (ie, the Libraries or native layer), and the Linux kernel layer 204.
其中,Linux内核层204可用于控制手机100的安全(security),存储器管理(memory management),程序管理(process management),网络堆栈(network stack),驱动程序模型(driver model)等功能。Linux内核层204同时也作为硬件(例如,CPU、网卡以及内存等)和软件栈之间的抽象层,它可隐藏具体硬件细节从而为上层(系统运行库层203、应用程序框架层202以及应用程序层201)提供统一的服务。The Linux kernel layer 204 can be used to control the security, memory management, process management, network stack, driver model and the like of the mobile phone 100. The Linux kernel layer 204 also serves as an abstraction layer between hardware (eg, CPU, network card, memory, etc.) and the software stack, which hides specific hardware details for the upper layer (system runtime layer 203, application framework layer 202, and applications). Program layer 201) provides a unified service.
例如,仍如图2所示,Linux内核层204可以包括系统资源管理器321和/或设备驱动程序323。系统资源管理器321可以包括进程管理器(未示出)、存储器管理器(未示出)和文件系统管理器(未示出)。系统资源管理器321可以执行对系统资源的控制、分配、恢复等。设备驱动程序323可以包括例如显示器驱动程序(未示出)、相机驱动程序(未示出)、蓝牙驱动程序(未示出)、共享存储器驱动程序(未示出)、USB驱动程序(未示出)、键区驱动程序(未示出)、Wi-Fi驱动程序(未示出)和/或音频驱动程序(未示出)。此外,根据本申请公开的实施例,设备驱动程序323可以包括进程间通信(IPC)驱动程序(未示出)。For example, as shown in FIG. 2, the Linux kernel layer 204 can include a system resource manager 321 and/or a device driver 323. The system resource manager 321 can include a process manager (not shown), a memory manager (not shown), and a file system manager (not shown). The system resource manager 321 can perform control, allocation, recovery, and the like 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) And a keypad driver (not shown), a Wi-Fi driver (not shown), and/or an audio driver (not shown). Moreover, in accordance with embodiments disclosed herein, device driver 323 can include an interprocess communication (IPC) driver (not shown).
系统运行库层203中包含一些C/C++库,例如,媒体库、系统C库以及显示管理库(surface manager)等,这些库能被Android系统中不同的组件使用,使得应用在运行期间通过使用编程语言来添加新功能。根据本申请公开的实施例,系统运行库层203可以执行与输入和输出、存储器的管理、算术功能等相关的功能。The system runtime layer 203 includes some C/C++ libraries, such as a media library, a system C library, and a surface manager, which can be used by different components in the Android system, so that the application is used during operation. Programming language to add new features. According to an embodiment disclosed herein, the system runtime layer 203 can perform functions related to input and output, management of memory, arithmetic functions, and the like.
framework层202为开发人员提供了一个可以完全访问应用程序所使用的API框架。具体的,framework层202为开发应用程序提供了非常多的API,framework层202可以通过API向APP层201中的应用(APP)提供功能,以使应用能够高效地使用电子设备内的有限系统资源。The framework layer 202 provides developers with an API framework that can be used to fully access the application. Specifically, the framework layer 202 provides a very large number of APIs for developing applications, and the framework layer 202 can provide functions to an application (APP) in the APP layer 201 through an API, so that the application can efficiently use limited system resources in the electronic device. .
例如,如图2中所示,framework层202提供的API框架中包括以下至少一项:应用管理器341、窗口管理器342、多媒体管理器343、资源管理器344、电源管理器345、数据库管理器346、包管理器347、连接管理器348、通知管理器349、位置管理器340、图形管理器341、安全管理器352和任何其它合适和/或类似的管理器。For example, as shown in FIG. 2, the API framework provided by the framework layer 202 includes at least one of the following: an application manager 341, a window manager 342, a multimedia manager 343, a resource manager 344, a power manager 345, and a database management. 346, package manager 347, connection manager 348, notification manager 349, location manager 340, graphics manager 341, security manager 352, and any other suitable and/or similar manager.
应用管理器341可以管理例如至少一个应用的生命周期。窗口管理器342可以管理在屏幕上使用的图形用户界面(GUI)资源。多媒体管理器343可以检测用于再现各种媒体文件的格式,并可以通过使用适合于相关格式的编解码器对媒体文件进行编码或解码。资源管理器344可以管理至少一个应用的资源,如源代码、存储器、存储空间等。电源管理器345可以与基本输入/输出系统(BIOS)一起操作,可以管理电池或电源,并可以提供用于操作的电源信息等。数据库管理器346可以用以下方式来管理数据库:使得能够产生、搜索和/或改变将由至少一个应用使用的数据库。包管理器347可以管理对以包文件的形式分发的应用的安装和/或更新。连接管理器348可以管理诸如Wi-Fi和BT之类的无线连接。通知管理器349可以用不打扰用户的方式向用户显示或报告诸如到达消息、约会、接近警报等的事件。位置管理器340可以管理电子设备的位置信息。图形管理器341可以管理要向用户提供的图形效果和/或与图形效果相关的UI。 安全管理器352可以提供用于系统安全、用户认证等的各种安全功能。根据本申请公开的实施例,当电子设备(例如,手机100)具有电话功能时,中间件330还可以包括电话管理器(未示出),用于管理电子设备的语音电话呼叫功能和/或视频电话呼叫功能。The application manager 341 can manage, for example, the life cycle of at least one application. Window manager 342 can manage graphical user interface (GUI) resources used on the screen. The multimedia manager 343 can detect a format for reproducing various media files, and can encode or decode the media file by using a codec suitable for the relevant format. The resource manager 344 can manage resources of at least one application, such as source code, memory, storage space, and the like. The power manager 345 can operate with a basic input/output system (BIOS), can manage a battery or power source, and can provide power information for operation and the like. Database manager 346 can manage the database in a manner that enables generation, searching, and/or changing of a database to be used by at least one application. The package manager 347 can manage the installation and/or update of applications distributed in the form of package files. Connection manager 348 can manage wireless connections such as Wi-Fi and BT. The notification manager 349 can 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 can manage location information of the electronic device. The graphics manager 341 can manage graphics effects to be provided to the user and/or UIs related to the graphics effects. Security manager 352 can provide various security functions for system security, user authentication, and the like. According to an embodiment of the present disclosure, when an electronic device (eg, mobile phone 100) has a phone function, the middleware 330 may further include a phone manager (not shown) for managing voice phone call functions of the electronic device and/or Video call function.
应用程序层201主要包括使用java语言编写的APP,用户在操作APP上的操作界面时,通过调用framework层202中的相关API,可与系统运行库层203或Linux内核层204进行交互,实现与该操作界面相对应的功能。The application layer 201 mainly includes an APP written in the Java language. When the user operates the operation interface on the APP, the user can interact with the system runtime layer 203 or the Linux kernel layer 204 by calling the related API in the framework layer 202. The corresponding function of the operation interface.
示例性的,仍如图2所示,应用程序层201中可以包括系统级应用和/或第三方应用。例如,主页应用371、拨号应用372、SMS/MMS应用373、地图应用374、浏览器应用375、相机应用376、闹钟应用377、联系人应用378、语音拨号应用379、电子邮件应用380、日历应用381、媒体播放器应用382、相册应用383、时钟应用384以及任意其它合适和/或类似的应用。Exemplarily, as shown in FIG. 2, a system level application and/or a third party application may be included in the application layer 201. For example, home page application 371, dialing application 372, SMS/MMS application 373, map application 374, browser application 375, camera application 376, alarm application 377, contact application 378, voice dialing application 379, email application 380, calendar application 381. Media Player Application 382, Album Application 383, Clock Application 384, and any other suitable and/or similar applications.
以地图应用374举例,结合图1-图2所示,地图应用374在运行时为了向用户提供位置服务,需要定期(例如每1秒)向framework层202中的位置管理器350请求获取当前的位置数据。那么,位置管理器350接收到该请求后可调用Linux内核层204或者Android系统的HAL(Hardware Abstraction Layer,硬件抽象层)中的设备驱动程序323,以驱动定位装置108执行定位工作。后续,定位装置108得到定位结果后可向Linux内核层204上报该定位结果,Linux内核层204将该定位结果逐层封装后上报给发起位置请求的地图应用374,使得地图应用374可基于该定位结果为用户提供导航、路线规划等位置服务。As an example of the map application 374, in conjunction with Figures 1-2, the map application 374 requires a periodic (e.g., every 1 second) request to obtain the current location from the location manager 350 in the framework layer 202 at runtime to provide location services to the user. Location data. Then, after receiving the request, the location manager 350 may invoke the Linux kernel layer 204 or the device driver 323 in the HAL (Hardware Abstraction Layer) of the Android system to drive the positioning device 108 to perform the positioning operation. Subsequently, after the positioning device 108 obtains the positioning result, the positioning result can be reported to the Linux kernel layer 204, and the Linux kernel layer 204 encapsulates the positioning result layer by layer and reports it to the map application 374 that initiates the location request, so that the map application 374 can be based on the positioning. As a result, users are provided with location services such as navigation and route planning.
可以看出,现有技术中定位装置108等外围器件的工作状态完全依赖于APP层中应用发出的业务请求。那么,如果应用频繁向外围器件(例如上述定位装置108)发出业务请求,则定位装置108需要高频率工作从而带来巨大的功耗开销,但如果应用向定位装置108发出业务请求的频率过低,则有可能影响应用向用户提供定位服务时的定位精度,因此,如何在满足应用所需数据精度的同时,降低外围器件的功耗开销成为亟需解决的问题。It can be seen that the working state of the peripheral device such as the positioning device 108 in the prior art completely depends on the service request issued by the application in the APP layer. Then, if the application frequently sends a service request to a peripheral device (such as the above-described positioning device 108), the positioning device 108 needs to operate at a high frequency to bring about a huge power consumption overhead, but if the application sends a service request to the positioning device 108, the frequency is too low. , it may affect the positioning accuracy when the application provides the positioning service to the user. Therefore, how to reduce the power consumption of the peripheral device while satisfying the data precision required by the application becomes an urgent problem to be solved.
对此,在本申请实施例中,如图3所示,终端内设置有用于感知当前运行场景的检测模块,该检测模块可检测出终端当前具体所处的实时运行场景,例如,运动场景、音频播放场景、视频显示场景等。并且,如图3所示,framework层202中还可以设置用于管理外围器件工作状态的调度模块301。该调度模块301可获取检测模块检测出的实时运行场景,并针对不同运行场景确定出相关外围器件的工作参数。这样,当应用在APP层运行时有调用外围器件的需求(例如定位需求、播放需求或者显示需求等)时,framework层202中用于管理外围器件的外围器件管理器(例如图2中的位置管理器350等)可与调度模块301协商此时外围器件工作时的具体工作参数,例如定位装置的工作频率,音频播放的播放参数,显示器的显示参数等。后续,外围器件管理器可按照与调度模块301协商出的工作参数,控制外围器件在该工作参数下工作,使得终端能够根据当前的实时运行场景控制该外围器件在不同工作参数下工作,以响应应用向外围器件发起的业务请求,使得终端可以在应用运行时降低外围器件的功耗开销,从而节省终端功耗。In this embodiment, in the embodiment of the present application, as shown in FIG. 3, a detection module for sensing a current running scenario is set in the terminal, and the detecting module can detect a real-time running scenario in which the terminal is currently located, for example, a motion scene, Audio playback scenes, video display scenes, etc. Moreover, as shown in FIG. 3, a scheduling module 301 for managing the working state of the peripheral device may also be disposed in the framework layer 202. The scheduling module 301 can obtain a real-time running scenario detected by the detecting module, and determine working parameters of the related peripheral device for different operating scenarios. Thus, when the application has a need to invoke peripheral devices (such as positioning requirements, playback requirements, or display requirements, etc.) while the application is running, the peripheral device manager in the framework layer 202 for managing peripheral devices (eg, the location in Figure 2) The manager 350, etc. can negotiate with the scheduling module 301 the specific operating parameters of the peripheral device at the time, such as the operating frequency of the positioning device, the playing parameters of the audio playing, the display parameters of the display, and the like. Subsequently, the peripheral device manager can control the peripheral device to work under the working parameter according to the working parameter negotiated with the scheduling module 301, so that the terminal can control the peripheral device to work under different working parameters according to the current real-time running scenario, in response. Applying a service request initiated to a peripheral device enables the terminal to reduce the power consumption overhead of the peripheral device while the application is running, thereby saving terminal power consumption.
需要说明的是,上述调度模块301可以以独立软件模块的形式设置在framework 层202,也可以集成在framework层202内的任意系统服务中,例如,集成在图2所示的位置管理器340、多媒体管理器343或图形管理器341中。当然,本领域技术人员也可以根据实际经验或实际应用场景将上述调度模块301设置在APP层201与framework层202之间,或者,将上述调度模块301设置在framework层202与内核层204之间,本申请实施例对此不做任何限制,以下实施例中均以调度模块301独立设置在framework层202中为例进行说明。It should be noted that the scheduling module 301 may be disposed in the framework layer 202 in the form of an independent software module, or may be integrated into any system service in the framework layer 202, for example, integrated in the location manager 340 shown in FIG. In the multimedia manager 343 or the graphics manager 341. Of course, the scheduling module 301 can be disposed between the APP layer 201 and the framework layer 202 according to actual experience or actual application scenarios, or the scheduling module 301 can be disposed between the framework layer 202 and the kernel layer 204. The embodiment of the present application does not impose any limitation on this. In the following embodiments, the scheduling module 301 is independently disposed in the framework layer 202 as an example for description.
以下以终端内的定位装置作为外围器件举例,详细阐述本申请实施例提供的一种外围器件的管理方法,如图4所示,该方法包括:The method for managing a peripheral device provided by the embodiment of the present application is described in detail below by using a positioning device in the terminal as an example of a peripheral device. As shown in FIG. 4, the method includes:
S401、终端周期性检测终端当前的运动状态。S401. The terminal periodically detects the current motion state of the terminal.
示例性的,终端可以通过加速度传感器、重力传感器、陀螺仪或GPS装置中的一项或多项传感器测量终端当前所处的运动状态。Exemplarily, the terminal may measure the current state of motion of the terminal by one or more sensors of the acceleration sensor, the gravity sensor, the gyroscope or the GPS device.
例如,可以将终端的运动状态按照速度大小划分为静止、走路、跑步、低速交通以及高速交通等多种运动状态。当终端的移动速度等于或趋近于0时可确定终端当前的运动状态为静止,当终端的移动速度在(0,5km/h]时可确定终端当前的运动状态为走路,当终端的移动速度在(5km/h,20km/h]时可确定终端当前的运动状态为跑步(或骑行),当终端的移动速度在(20km/h,100km/h]时可确定终端当前的运动状态为低速交通,当终端的移动速度大于100km/h时可确定终端当前的运动状态为高速交通。For example, the motion state of the terminal can be divided into various motion states such as stationary, walking, running, low-speed traffic, and high-speed traffic according to the speed. When the moving speed of the terminal is equal to or close to 0, it may be determined that the current motion state of the terminal is stationary, and when the moving speed of the terminal is (0, 5 km/h), the current motion state of the terminal may be determined to be walking, when the terminal moves. When the speed is (5km/h, 20km/h), it can be determined that the current motion state of the terminal is running (or riding), and when the moving speed of the terminal is (20km/h, 100km/h), the current motion state of the terminal can be determined. For low-speed traffic, when the moving speed of the terminal is greater than 100km/h, it can be determined that the current state of motion of the terminal is high-speed traffic.
当然,终端的运动状态还可以按照终端所处的位置划分为室内和室外,室内又可以包括家、工作单位等地点;又或者,终端在检测当前的运动状态时还可以结合终端的速度和位置确定当前终端所处的运动状态,例如,在家中跑步、在地铁上使用终端、爬楼梯以及乘坐电梯等,本申请实施例对此不做任何限制。Of course, the motion state of the terminal can also be divided into indoor and outdoor according to the location of the terminal, and the indoor can also include a home, a work unit, etc.; or, the terminal can also combine the speed and position of the terminal when detecting the current motion state. The motion state of the current terminal is determined, for example, running in the home, using the terminal on the subway, climbing the stairs, and taking the elevator, etc., which is not limited in this embodiment.
另外,与上述调度模块301类似的,终端还可以在framework层中设置用于检测终端当前的运动状态的检测模块,用于执行上述步骤S401。进而,检测模块可将每次检测得到的终端当前运动状态的标识存储在预设的第一标志位中。后续,调度模块301通过读取第一标志位中的内容,可进一步为定位装置确定与终端当前运动状态对应的工作参数,例如定位装置的工作频率等。In addition, similar to the foregoing scheduling module 301, the terminal may further set a detection module for detecting a current motion state of the terminal in the framework layer, to perform the foregoing step S401. In addition, the detecting 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 can further determine the working parameters corresponding to the current motion state of the terminal, such as the working frequency of the positioning device, by reading the content in the first flag bit.
S402、若终端当前的运动状态为第一运动状态,则终端指示定位装置按照第一频率获取并更新上述定位结果。S402. If the current motion state of the terminal is the first motion state, the terminal instructs the positioning device to acquire and update the foregoing positioning result according to the first frequency.
S403、若终端当前的运动状态为第二运动状态,则终端指示定位装置按照第二频率获取并更新上述定位结果。S403. If the current motion state of the terminal is the second motion state, the terminal instructs the positioning device to acquire and update the foregoing positioning result according to the second frequency.
其中,上述第一运动状态中终端的移动速率低于第二运动状态中终端的移动速率,上述第一频率低于第二频率。此处,移动速率是指终端产生实际位移时的速度,例如用户携带终端从A点跑到B点这一过程中的速度,而当终端仅具有速度却没有产生位移时(例如用户携带终端在跑步机上跑步时虽然具有速度,但终端产生的位移很小,可以忽略不计),可认为终端此时不具有移动速率或移动速率为0。The moving rate of the terminal in the first motion state is lower than the moving rate of the terminal in the second motion state, and the first frequency is lower than the second frequency. Here, the moving rate refers to the speed at which the terminal generates the actual displacement, for example, the speed at which the user carries the terminal from the point A to the point B, and when the terminal only has the speed but does not generate the displacement (for example, the user carries the terminal at Although there is speed when running on the treadmill, the displacement generated by the terminal is small and can be ignored. It can be considered that the terminal does not have a moving rate or a moving rate of 0 at this time.
如图5所示,当用户打开百度地图这一第一应用(或者开启第一应用中需要提供位置服务的功能)时,正在运行的百度地图应用可向framework层中的位置管理器发送获取当前的定位结果的定位请求。由于这是位置管理器首次接收到的百度地图应用 发起的定位请求,因此,位置管理器接收到该定位请求后可调用Linux内核层或者HAL中定位装置的驱动,从而驱动定位装置开始进行定位工作,得到对当前终端的定位结果。As shown in FIG. 5, when the user opens the first application of Baidu map (or the function of providing location service in the first application), the running Baidu map application can send the current location to the location manager in the framework layer. Positioning request for the positioning result. Since this is the location request initiated by the Baidu map application received by the location manager for the first time, the location manager can call the driver of the Linux kernel layer or the positioning device in the HAL after receiving the positioning request, thereby driving the positioning device to start the positioning work. , get the positioning result of the current terminal.
又或者,位置管理器接收到上述百度地图应用发起的定位请求后,还可以请求上述调度模块301此时是否可驱动定位装置获取最新的定位结果。由于本次定位请求是百度地图应用首次发起的定位请求,因此,调度模块301可向位置管理器发送同意定位装置工作的响应消息。这样,位置管理器接收到该响应消息后可驱动定位装置开始进行定位工作,得到对当前终端的定位结果。Alternatively, after receiving the location request initiated by the Baidu map application, the location manager may further request whether the scheduling module 301 can drive the positioning device to obtain the latest positioning result. Since the positioning request is a positioning request initiated by the Baidu map application for the first time, the scheduling module 301 can send a response message to the location manager agreeing to the operation of the positioning device. In this way, after receiving the response message, the location manager can drive the positioning device to start the positioning work, and obtain the positioning result for the current terminal.
其中,上述第一应用为可以能够提供位置服务的一个或多个应用,例如地图类应用、天气类应用或者出行类应用等,本申请实施例对此不做任何限制。The first application is one or more applications that can provide a location service, such as a map application, a weather application, or a travel application, and the embodiment of the present application does not impose any limitation.
与上述第一标志位类似的,终端还可将每次定位装置定位后得到的最新定位结果存储在预设的存储单元中。那么,位置管理器可以通过读取存储单元中的内容,将存储单元中存储的定位结果上报给发起定位请求的百度地图应用。其中,该存储单元具体可以为寄存器或内存等器件,本申请实施例对此不做任何限制。Similar to the first flag bit, the terminal may also store the latest positioning result obtained after each positioning device is located in a preset storage unit. Then, the location manager can report the location result stored in the storage unit to the Baidu map application that initiates the location request by reading the content in the storage unit. The storage unit may be a device such as a register or a memory. The embodiment of the present application does not impose any limitation on this.
后续,定位装置每次进行定位时得到的定位结果均可更新在上述存储单元中,而第一应用(例如上述百度地图应用)后续再次向位置管理器发送定位请求时,位置管理器可通过与调度模块301交互,确定将此时存储单元中存储的定位结果上报给第一应用,或者重新驱动定位装置获取最新的定位结果上报给第一应用,使得第一应用完成定位服务。Subsequently, the positioning result obtained by the positioning device each time the positioning is performed may be updated in the storage unit, and when the first application (for example, the Baidu map application described above) subsequently sends the positioning request to the location manager again, the location manager may pass the The scheduling module 301 interacts, and determines that the positioning result stored in the storage unit is reported to the first application, or the positioning device is re-driven to obtain the latest positioning result and reported to the first application, so that the first application completes the positioning service.
需要说明的是,本申请实施例中涉及的定位装置可以是指能够提供定位功能的任意外围器件,例如GPS器件、Wi-Fi器件或者调制解调器件(Modem)中的一项或多项,本申请实施例对此不做任何限制。It should be noted that the positioning device involved in the embodiment of the present application may refer to any peripheral device capable of providing a positioning function, such as one or more of a GPS device, a Wi-Fi device, or a modem (Modem). The embodiment does not impose any restrictions on this.
当定位装置为GPS器件时,framework层中调用GPS器件提供位置服务的位置管理器具体可以为LBS(location based service,基于移动位置服务)模块;当定位装置为Wi-Fi器件时,framework层中调用Wi-Fi器件提供位置服务的位置管理器具体可以为Wi-Fi管理器(Wi-FiManager);当定位装置为Modem时,framework层中调用Modem提供位置服务的位置管理器具体可以为电话管理器(TelephonyManager)。When the positioning device is a GPS device, the location manager in the framework layer that calls the GPS device to provide the location service may specifically be an LBS (location based service) module; when the positioning device is a Wi-Fi device, the framework layer The location manager that invokes the Wi-Fi device to provide the location service may specifically be a Wi-Fi Manager (Wi-FiManager); when the location device is a Modem, the location manager in the framework layer that calls the Modem to provide the location service may specifically be the telephone management. (TelephonyManager).
在一种可能的设计方法中,如图6所示,终端的framework层中设置有用于管理上述定位装置工作状态的调度模块301。调度模块301可以通过读取第一标志位内存储的最近检测出的终端的运动状态,根据当前终端的运动状态为定位装置确定对应的工作频率。In a possible design method, as shown in FIG. 6, a scheduling module 301 for managing the working state of the positioning device is disposed in the framework layer of the terminal. The scheduling module 301 can determine the corresponding working frequency for the positioning device according to the motion state of the current terminal by reading the motion state of the most recently detected terminal stored in the first flag bit.
例如,如图7所示,当终端所处的运动状态的移动速率越高时,终端对定位服务所需的精度越高,因此,调度模块301可为定位装置确定较高的工作频率(例如每秒5次),此时定位装置进行定位的周期较小;相应的,如图7所示,当终端所处的运动状态的移动速率越低时,终端对定位服务所需的精度相对较低,因此,调度模块301可为定位装置确定较低的工作频率(例如每10秒1次),此时定位装置进行定位的周期较大,减少定位装置的工作次数,从而降低定位装置频繁定位导致的功耗开销。For example, as shown in FIG. 7, when the moving rate of the motion state in which the terminal is located is higher, the accuracy required by the terminal for the positioning service is higher, and therefore, the scheduling module 301 can determine a higher operating frequency for the positioning device (for example, 5 times per second), the positioning period of the positioning device is small at this time; correspondingly, as shown in FIG. 7, when the moving rate of the motion state of the terminal is lower, the accuracy required by the terminal for the positioning service is relatively higher. The scheduling module 301 can determine a lower operating frequency for the positioning device (for example, once every 10 seconds). At this time, the positioning device performs a positioning period, which reduces the number of times the positioning device works, thereby reducing the frequent positioning of the positioning device. The resulting power consumption overhead.
那么,当终端接收到第一应用首次发起的定位请求后,位置管理器可以周期性的 向调度模块301请求获取当前定位装置的定位频率。而调度模块301接收到位置管理器的请求后,如图6所示,可根据第一标志位中当前终端的运动状态,为定位装置确定对应的工作频率,并将该工作频率反馈给位置管理器,使得位置管理器可以按照该工作频率驱动定位装置工作。Then, after the terminal receives the location 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 device. After the scheduling module 301 receives the request of the location manager, as shown in FIG. 6, the corresponding working frequency is determined for the positioning device according to the motion state of the current terminal in the first flag bit, and the working frequency is fed back to the location management. The position manager can drive the positioning device to operate according to the operating frequency.
例如,如果终端的运动状态为移动速率较低的第一运动状态(例如走路状态),则说明用户此时的移动速率很低,即使频繁的调用定位装置进行定位(例如每秒定位10次),但得到的相邻若干次定位结果几乎没有变化,同时定位装置工作时会消耗大量无谓的功耗。因此,当终端的运动状态为走路状态时,调度模块301可为定位装置确定在走路状态下的工作频率为较低的第一频率(例如每秒触发定位装置定位1次),并将该第一频率发送给位置管理器。进而,位置管理器可以按照较低的第一频率触发定位装置进行定位,这样既可保证定位装置在第一运动状态下向第一应用提供的定位精度,同时可以降低定位装置的工作频率,节省定位装置的功耗开销。For example, if the motion state of the terminal is the first motion state with a lower moving rate (for example, the walking state), it indicates that the user's moving speed at this time is very low, even if the positioning device is frequently called for positioning (for example, positioning 10 times per second). However, the obtained positioning results of several adjacent positions hardly change, and the positioning device consumes a large amount of unnecessary power consumption when working. Therefore, when the motion state of the terminal is the walking state, the scheduling module 301 can determine, for the positioning device, that the operating frequency in the walking state is lower than the first frequency (eg, triggering the positioning device to locate once every second), and the first A frequency is sent to the location manager. Furthermore, the location manager can trigger the positioning device to perform positioning according to the lower first frequency, so that the positioning accuracy provided by the positioning device to the first application in the first motion state can be ensured, and the operating frequency of the positioning device can be reduced, thereby saving The power consumption of the positioning device.
又例如,如果终端的运动状态为移动速率较高的第二运动状态(例如高速交通状态),则说明用户此时的移动速率较高,需要通过较高频率的获取定位结果才能实现导航等定位服务的定位精度。因此,当终端的运动状态切换为高速交通状态时,调度模块301可为定位装置确定在高速交通状态下的工作频率为较高的第二频率(例如每秒触发定位装置定位10次),并将该第二频率发送给位置管理器。进而,位置管理器可以按照较高的第二频率触发定位装置进行定位,保证定位装置在第二运动状态下向第一应用提供的定位精度。For another example, if the motion state of the terminal is a second motion state with a high moving rate (for example, a high-speed traffic state), it indicates that the user has a high moving rate at this time, and the positioning result of the higher frequency is required to achieve navigation and the like. The positioning accuracy of the service. Therefore, when the motion state of the terminal is switched to the high-speed traffic state, the scheduling module 301 can determine, for the positioning device, that the operating frequency in the high-speed traffic state is higher than the second frequency (eg, triggering the positioning device to locate 10 times per second), and The second frequency is sent to the location manager. Furthermore, the location manager can trigger the positioning device to perform positioning according to the higher second frequency, and ensure the positioning accuracy provided by the positioning device to the first application in the second motion state.
同样,定位装置按照上述第一频率或第二频率每次测量出新的定位结果后,终端可将新的定位结果更新至上述存储单元中,使得位置管理器可以根据定位请求从存储单元中获取最新的定位结果发给发起定位请求的第一应用。Similarly, after the positioning device measures the new positioning result every 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 can obtain the storage unit from the storage unit according to the positioning request. The latest positioning result is sent to the first application that initiated the positioning request.
当然,位置管理器也可以在首次接收到第一应用发起的定位请求时,请求调度模块301根据当前终端的运动状态为定位装置确定出对应的工作频率,本申请实施例对此不做任何限制。Of course, the location manager may also determine the corresponding working frequency for the positioning device according to the motion state of the current terminal when the first application initiates the positioning request. The embodiment of the present application does not impose any restrictions on this. .
在另一种可能的设计方法中,由于调度模块301可以根据当前终端的运动状态为定位装置确定对应的工作频率,即调度模块可以确定出什么时候允许定位装置工作,以及什么时候不允许定位装置工作。那么,位置管理器每次接收到第一应用发起的定位请求时,均可向调度模块301查询此时是否允许驱动定位装置工作以获取新的定位结果。In another possible design method, since the scheduling module 301 can determine the corresponding working frequency for the positioning device according to the motion state of the current terminal, the scheduling module can determine when the positioning device is allowed to work, and when the positioning device is not allowed. jobs. Then, each time the location manager receives the location request initiated by the first application, the scheduling module 301 can query the scheduling module 301 whether to allow the driving location device to work to obtain a new positioning result.
例如,调度模块301通过读取第一标志位可确定出终端处于走路状态,进而调度模块可以进一步确定出在走路状态下定位装置的工作频率为每5秒定位一次,即定位装置的工作周期为5秒。那么,如果位置管理器本次接收到定位请求的时刻距离定位装置最近一次进行工作时的时间间隔小于5秒,则说明第一应用本次请求的定位结果与最近一次得到的定位结果几乎相同,因此,调度模块301可指示位置管理器将存储单元中存储的最近一次的定位结果反馈给第一应用,此时定位装置无需进行定位工作,可降低定位装置消耗的功耗。For example, the scheduling module 301 can determine that the terminal is in a walking state by reading the first flag bit, and the scheduling module can further determine that the working frequency of the positioning device is located once every 5 seconds in the walking state, that is, the working period of the positioning device is 5 seconds. Then, if the time interval when the location manager receives the location request from the location of the location device last time is less than 5 seconds, the location result of the first application is almost the same as the location result obtained last time. Therefore, the scheduling module 301 can instruct the location manager to feed back the most recent positioning result stored in the storage unit to the first application. At this time, the positioning device does not need to perform positioning work, and the power consumption consumed by the positioning device can be reduced.
相应的,如果位置管理器本次接收到定位请求的时刻距离定位装置最近一次进行工作时的时间间隔大于或等于5秒,则说明当前存储单元中存储的定位结果已经不能 满足在走路状态下第一应用的定位精度,那么,调度模块301可指示位置管理器驱动定位装置进行定位,以获取最新的定位结果反馈给第一应用。Correspondingly, if the time interval when the location manager receives the location request this time from the last time the positioning device works is greater than or equal to 5 seconds, it indicates that the positioning result stored in the current storage unit is no longer satisfied in the walking state. The positioning accuracy of an application, then, the scheduling module 301 can instruct the location manager to drive the positioning device to perform positioning to obtain the latest positioning result feedback to the first application.
在另一种可能的设计方法中,为了降低位置管理器与调度模块301频繁交互带来的功耗开销,还可以设置调度模块301周期性读取第一标志位中存储的运动状态,当第一标志位中存储的运动状态更新时,由调度模块主动确定此时定位装置的工作频率,并将该工作频率发送给位置管理器,使得位置管理器按照该工作频率驱动定位装置进行定位。In another possible design method, in order to reduce the power consumption overhead caused by the 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. When the motion state stored in a flag is updated, the scheduling module actively determines the operating frequency of the positioning device at this time, and sends the working frequency to the location manager, so that the location manager drives the positioning device to perform positioning according to the working frequency.
例如,当第一标志位从走路状态更新为跑步状态时,调度模块301可将定位装置的工作频率从较低的第一频率调整为较高的第二频率,并将该第二频率发送给位置管理器,使得位置管理器驱动定位装置按照第二频率进行定位,以满足在跑步状态下第一应用提供位置服务时的位置精度。For example, when the first flag is updated from the walking state to the running state, the scheduling module 301 can 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 position manager causes the position manager to drive the positioning device to perform positioning at the second frequency to satisfy the positional accuracy when the first application provides the location service in the running state.
另外,当检测到终端的运动状态为静止状态时,调度模块可指示定位装置进入休眠状态,从而最大程度的降低定位装置的功耗。此时,第一应用发起定位请求时可使用存储单元中缓存的定位结果实现定位服务。其中,静止状态可进一步包括绝对静止状态和相对静止状态,当终端在一段时间内既没有产生位移上的变化,也没有产生速度上的变化(例如终端放在桌上使用等)时,可确定终端处于绝对静止状态(例如坐着、站着或躺着使用终端);当终端在一段时间内没有产生位移上的变化,但产生了速度上的变化,(例如在跑步机上跑步时使用终端等)时,可确定终端处于相对静止状态。In addition, when it is detected that the motion state of the terminal is a stationary state, the scheduling module may instruct the positioning device to enter a sleep state, thereby minimizing the power consumption of the positioning device. At this time, when the first application initiates the location request, the location service may be implemented by using the location result cached in the storage unit. Wherein, the quiescent state may further comprise an absolute quiescent state and a relatively quiescent state, and when the terminal has neither a change in displacement nor a change in speed (for example, the terminal is placed on a table, etc.), it may be determined. The terminal is in an absolutely static state (for example, sitting, standing or lying down using the terminal); when the terminal does not change in displacement for a period of time, but a change in speed occurs (for example, using a terminal when running on a treadmill, etc.) When it is determined, the terminal is determined to be in a relatively stationary state.
又或者,当检测到终端的运动状态为室内状态时,由于GPS器件进行室内定位时的精度较低,因此,调度模块可指示GPS器件进入休眠状态,那么终端可以使用其他定位装置(例如Wi-Fi器件)进行定位。Or, when detecting that the motion state of the terminal is an indoor state, since the accuracy of the GPS device performing indoor positioning is low, the scheduling module may instruct the GPS device to enter a sleep state, and the terminal may use other positioning devices (eg, Wi- Fi device) for positioning.
需要说明的是,终端可以在第一应用首次发起定位请求后开始周期性检测终端当前的运动状态,也可以在第一应用首次发起定位请求之前开始周期性检测终端当前的运动状态,即本申请实施例对步骤S401的与步骤S402-S403之间的执行顺序不做限定。It should be noted that, after the first application initiates the location request for the first time, the terminal may periodically detect the current motion state of the terminal, or may start to periodically detect the current motion state of the terminal before the first application initiates the location request for the first time, that is, the present application. The embodiment does not limit the execution order between step S401 and steps S402-S403.
可以看出,在本申请实施例中,终端向应用提供定位服务以及终端控制定位装置进行定位这两个过程是终端分别进行管控的,其中,应用仍然可以像现有技术中一样正常的向位置管理器请求和获取定位结果,而终端的定位装置可以根据当前终端的运动状态在不同工作频率下工作。这样,当终端处于对定位精度要求不高的运动状态时,可降低定位装置的工作频率,从而在保证定位精度的同时降低定位装置工作带来的功耗开销。It can be seen that, in the embodiment of the present application, the terminal provides the positioning service to the application and the terminal controls the positioning device to perform the positioning, and the terminal is separately controlled, wherein the application can still be in the normal position as in the prior art. The manager requests and obtains the positioning result, and the positioning device of the terminal can work at different working frequencies according to the motion state of the current terminal. In this way, when the terminal is in a motion state that does not require high positioning accuracy, the operating frequency of the positioning device can be reduced, thereby reducing the power consumption overhead caused by the positioning device operation while ensuring the positioning accuracy.
以下以终端内的扬声器(speaker,SPK)作为外围器件举例,详细阐述本申请实施例提供的一种外围器件的管理方法,如图8所示,该方法包括:In the following, a speaker (SPK) in the terminal is used as an example of a peripheral device, and a method for managing a peripheral device according to an embodiment of the present application is described in detail. As shown in FIG. 8, the method includes:
S801、终端周期性检测终端当前的音频播放场景。S801. The terminal periodically detects a current audio playing scenario of the terminal.
具体的,上述音频播放场景可包括音乐播放场景、视频播放场景、语音播放场景以及游戏播放场景等。终端可通过获取当前运行的应用的包名(package name)、主线程的ID等参数,确定当前的音频播放场景。Specifically, the audio play scene may include a music play scene, a video play scene, a voice play scene, and a game play scene. The terminal can determine the current audio playing scenario by obtaining parameters such as a package name of the currently running application, an ID of the main thread, and the like.
示例性的,终端可预先将支持音频播放的各个应用分别划归为对应的音频播放场 景。例如,终端内安装有音乐应用、视频应用和游戏应用,其中,音乐应用属于音乐播放场景,视频应用属于视频播放场景,游戏应用属于游戏播放场景。Exemplarily, the terminal can separately classify each application supporting audio playback into a corresponding audio play scene. 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.
那么,终端可以周期性的获取当前运行的应用的包名,并根据该包名确定当前终端所属的音频播放场景。如图9所示,终端内可以设置一个存储单元用于存储最新音频播放场景的标志位(例如第二标志位),后续,当终端每次确定出当前的音频播放场景后,便可将确定出的音频播放场景的标识更新在第二标志位中,方便后续终端根据第二标志位中指示的音频播放场景调整向扬声器工作时的播放参数。Then, the terminal can periodically obtain the package name of the currently running application, and determine an audio play scenario to which the current terminal belongs according to the package name. As shown in FIG. 9, a storage unit may be disposed in the terminal for storing a flag bit (for example, a second flag bit) of the latest audio playing scene. Subsequently, each time the terminal determines the current audio playing scene, the terminal may determine The identifier of the output audio play scene is updated in the second flag bit, so that the subsequent terminal adjusts the play parameters when working to the speaker according to the audio play scene indicated in the second flag bit.
另外,终端还可以按照用户对音质的要求预先设置不同应用之间的优先级顺序,由于一般用户对听音乐和语音时的音质要求较高,对看视频时对音质的要求一般,而对玩游戏时的音质要求较低,因此,可设置播放音乐和语音的应用的优先级最高,游戏应用的优先级最低,视频应用的优先级居中。In addition, the terminal can also pre-set the priority order between different applications according to the requirements of the user for the sound quality. Since the general user has higher requirements on the sound quality when listening to music and voice, the requirements for the sound quality when watching the video are generally, and the game is played. The sound quality requirements during the game are lower, so applications that play music and voice can be set to have the highest priority, game applications have the lowest priority, and video applications have the highest priority.
这样,当终端内同时运行有多个应用时,终端可以将优先级最高的应用所属的音频播放场景确定为终端当前的音频播放场景。In this way, when multiple applications are running in the terminal at the same time, the terminal can determine the audio play scene to which the highest priority application belongs as the current audio play scene of the terminal.
S802、当终端当前的音频播放场景为第一播放场景时,终端将扬声器播放音频时的播放参数设置为第一播放参数。S802: When the current audio playing scene of the terminal is the first playing scene, the terminal sets the playing parameter when the speaker plays the audio to the first playing parameter.
S803、当终端当前的音频播放场景为第二播放场景时,终端将扬声器播放音频时的播放参数设置为第二播放参数。S803. When the current audio playing scene of the terminal is the second playing scene, the terminal sets the playing parameter when the speaker plays the audio to the second playing parameter.
其中,上述第一播放场景中对音质的要求低于第二播放场景中对音质的要求,终端按照上述第一播放参数工作时的功耗小于扬声器按照上述第二播放参数工作时的功耗。The requirement for the sound quality in the first play scene is lower than the sound quality in the second play scene, and the power consumption of the terminal when operating according to the first play parameter is smaller than the power consumption when the speaker works according to the second play parameter.
具体的,由于在不同音频播放场景下用户对音质的要求不同,因此,对于音质要求不高的音频播放场景,终端可以相应降低扬声器播放音频时的播放参数,从而降低播放音频时功率放大器(AP,amplifier)或扬声器等外围器件功耗,使得终端消耗的功耗减少。Specifically, since the user has different requirements on the sound quality in different audio playing scenarios, the terminal can reduce the playing parameters when the speaker plays audio, thereby reducing the power amplifier (AP) when playing audio. The power consumption of peripheral devices such as amplifiers or speakers reduces the power consumption of the terminal.
其中,上述播放参数可以为EQ(equaliser,均衡器)参数或音量参数。其中,音量参数一般是指播放音频时的响度,当响度越大时,功率放大器的功耗越大;EQ参数的作用是通过对声音某一个或多个频段进行增益或衰减,从而达到调整音色的目的。一般,EQ参数包括频率(frequency)、增益(gain)以及带宽(quantize)这三方面的参数。其中,频率可用于设定音频的频率点,增益可用于调整音频在上述频率上进行增益或衰减的大小,带宽用于设定进行增益或衰减的频段大小。通常,播放音频中的低频分量一般是耗费电量的主要原因,因此,在对音质要求不高的音频播放场景中降低播放音频时的低频增益可显著降低终端的功耗。The play parameter may be an EQ (equaliser) parameter or a volume parameter. Among them, the volume parameter generally refers to the loudness when playing audio. When the loudness is larger, the power consumption of the power amplifier is larger; the function of the EQ parameter is to adjust the tone by gaining or attenuating one or more frequency bands of the sound. the goal of. Generally, the EQ parameters include parameters of frequency, gain, and quantization. Among them, the frequency can be used to set the frequency point of the audio, the gain can be used to adjust the gain or attenuation of the audio at the above frequency, and the bandwidth is used to set the frequency band for gain or attenuation. In general, playing low-frequency components in audio is generally the main cause of power consumption. Therefore, reducing the low-frequency gain when playing audio in an audio playback scene where sound quality is not high can significantly reduce the power consumption of the terminal.
那么,在步骤S802中,如果步骤S801中检测出当前的音频播放场景为音质要求较低的第一播放场景(例如游戏播放场景),则终端可以将扬声器播放音频时的播放参数设置为取值较低的第一播放参数,例如,将终端默认的响度从75dB降低为62dB,将终端默认的低频增益从58dB降低为38dB,这样,后续扬声器使用该播放参数播放音频时可降低终端消耗的功耗。Then, in step S802, if it is detected in step S801 that the current audio playing scene is the first playing scene (such as a game playing scene) with lower sound quality requirements, the terminal may set the playing parameter when the speaker plays the audio to the value. The lower first playing parameters, 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 subsequent speakers can reduce the power consumed by the terminal when playing the audio using the playing parameters. Consumption.
相应的,在步骤S803中,如果步骤S801中检测出当前的音频播放场景为音质要求较高的第二播放场景(例如音乐播放场景),则终端可以将待播放音频的播放参数 设置为取值较高的第二播放参数。这样,多媒体管理器可按照上述第二播放参数调用扬声器播放该待播放音频,从而保证第二应用在第二播放场景中播放音频时的音质要求。Correspondingly, in step S803, if it is detected in step S801 that the current audio playing scene is a second playing scene with a higher sound quality requirement (for example, a music playing scene), the terminal may set the playing parameter of the to-be-played audio to a value. Higher second play parameters. In this way, the multimedia manager can call the speaker to play the to-be-played audio according to the second playing parameter, thereby ensuring the sound quality requirement of the second application when playing the audio in the second playing scene.
在一种可能的设计方法中,仍如图9所示,framework层的调度模块301中设置有不同音频播放场景与不同播放参数之间的对应关系。那么,调度模块301通过读取第二标志位确定出当前的音频播放场景为第一播放场景后,可将扬声器播放音频时的播放参数确定为与第一播放场景对应的第一播放参数,并将该第一播放参数发送给提供音频播放功能的多媒体管理器。这样,当后续多媒体管理器接收到终端内任意支持音频播放的应用(即第二应用)发送的音频播放请求时,多媒体管理器可按照上述第一播放参数调用扬声器播放音频,从而降低音频播放时的功耗开销,同时可以保证第二应用在第一播放场景中播放音频时的音质要求。In a possible design method, as shown in FIG. 9, the scheduling module 301 of the framework layer is configured with a correspondence between different audio playback scenarios and different playback parameters. Then, after the scheduling module 301 determines that the current audio playing scene is the first playing scene, the playing parameter when the speaker plays the audio may be determined as the first playing parameter corresponding to the first playing scene, and The first play parameter is sent to a multimedia manager that provides an audio play function. In this way, when the subsequent multimedia manager receives the audio play request sent by the application (ie, the second application) that supports the audio play in the terminal, the multimedia manager can call the speaker to play the audio according to the first play parameter, thereby reducing the audio play time. The power consumption overhead can also ensure the sound quality requirement of the second application when playing audio in the first playing scene.
在另一种可能的设计方法中,仍如图9所示,每次第二应用向framework层中的多媒体管理器发送音频播放请求时,多媒体管理器均可向调度模块301请求获取与此时的音频播放场景对应的播放参数。那么,响应于多媒体管理器发送的这一请求,调度模块301可根据第二标志位所指示的播放场景确定此时播放音频时的播放参数,并将该播放参数发送给多媒体管理器,使得多媒体管理器可按照该播放参数调用扬声器播放音频。In another possible design method, as shown in FIG. 9, each time the second application sends an audio play request to the multimedia manager in the framework layer, the multimedia manager may request the acquisition module 301 to acquire and at this time. The playback parameters corresponding to the audio playback scene. Then, in response to the request sent by the multimedia manager, the scheduling module 301 can determine a play parameter when the audio is played according to the play scene indicated by the second flag bit, and send the play parameter to the multimedia manager, so that the multimedia The manager can call the speaker to play the audio according to the playback parameters.
在本申请的另一些实施例中,当第二应用向framework层中的多媒体管理器发送音频播放请求时,多媒体管理器也可以根据第二应用的包名或类型设置扬声器播放音频时的播放参数。例如,对于音质要求较低的导航类型的应用,多媒体管理器可以设置较低的响度和低频增益等播放参数,使得扬声器工作时的震动频率降低,从而降低扬声器产生的功耗;而对于音质要求较高的音乐类型的应用,多媒体管理器可以设置较高的响度和低频增益等播放参数,保证扬声器工作时提供较好的音质。In other embodiments of the present application, when the second application sends an audio play request to the multimedia manager in the framework layer, the multimedia manager may also set the play parameters when the speaker plays the audio according to the package name or type of the second application. . For example, for navigation type applications with lower sound quality requirements, the multimedia manager can set lower playback parameters such as loudness and low frequency gain, so that the vibration frequency of the speaker is reduced, thereby reducing the power consumption generated by the speaker; For higher music type applications, the multimedia manager can set higher playback parameters such as loudness and low frequency gain to ensure better sound quality when the speaker is working.
需要说明的是,本领域技术人员可以根据实际经验或实际应用场景划分不同的音频播放场景,并设置在不同音频播放场景下播放参数的具体取值,本申请实施例对此不做任何限制。It should be noted that a person skilled in the art may divide different audio play scenes according to actual experience or actual application scenarios, and set specific values of play parameters in different audio play scenarios, which is not limited in this embodiment.
以下以终端内的显示器(例如LCD)作为外围器件举例,详细阐述本申请实施例提供的一种外围器件的管理方法,如图10所示,该方法包括:In the following, a display device (for example, an LCD) in a terminal is used as an example of a peripheral device, and a method for managing a peripheral device according to an embodiment of the present application is described in detail. As shown in FIG. 10, the method includes:
S1001、终端周期性检测终端当前的显示场景。S1001: The terminal periodically detects a current display scenario of the terminal.
示例性的,如表1所示,按照终端显示的具体内容,可预先将上述显示场景划分为4类对显示效果要求不同的显示场景(即表1中的显示场景1至显示场景4)。其中,显示场景4为显示效果要求很高的图库类应用中的显示内容,显示场景3为显示效果要求较高的UI、视频、拍照预览或电子书中的显示内容,显示场景2为显示效果要求一般的购物、新闻、社交或教育类应用中的显示内容,显示场景1为显示效果要求较低的浏览器、游戏、天气或导航类应用中的显示内容。Exemplarily, as shown in Table 1, according to the specific content displayed by the terminal, the display scene may be divided into four types of display scenes that require different display effects (ie, display scene 1 to display scene 4 in Table 1). The display scene 4 is a display content in an image library application with a high display effect requirement, and the display scene 3 is a display content in a UI, a video, a photo preview, or an e-book that requires a high display effect, and the display scene 2 is a display effect. Requires display content in a general shopping, news, social, or educational application, and display scene 1 is a display content in a browser, game, weather, or navigation application that requires less display.
表1Table 1
显示场景Display scene 显示内容Display content 显示效果要求Display effect requirements
显示场景4Display scene 4 图库Gallery high
显示场景3Display scene 3 UI、视频、拍照预览、电子书UI, video, photo preview, e-book 较高Higher
显示场景2Display scene 2 购物、新闻、社交、教育Shopping, news, social, education 一般general
显示场景1Display scene 1 浏览器、游戏、天气、导航Browser, game, weather, navigation low
那么,在步骤S1001中,终端可以通过获取当前显示器中的具体显示内容,结合上述表1确定当前所属的显示场景,或者,终端还可以根据当前运行的应用的类型,结合上述表1确定当前所属的显示场景。Then, in step S1001, the terminal may determine the current display content by using the specific display content in the current display, and determine the current display scenario according to the type of the currently running application. Display scene.
如图11所示,终端内可以设置一个用于存储最新显示场景的标志位(例如第三标志位),当终端每次确定出当前的显示场景后,便可将确定出的显示场景的标识更新在第三标志位中,方便后续终端根据第三标志位中指示的显示场景调整显示器工作时的显示参数。As shown in FIG. 11, a flag (for example, a third flag) for storing the latest display scene may be set in the terminal. After the terminal determines the current display scene, the identifier of the determined display scene may be determined. The update is in the third flag bit, so that the subsequent terminal can adjust the display parameter when the display works according to the display scene indicated in the third flag bit.
S1002、当终端当前的显示场景为第一显示场景时,若终端将显示器的显示参数设置为第一显示参数。S1002: When the current display scene of the terminal is the first display scene, if the terminal sets the display parameter of the display to the first display parameter.
S1003、当终端当前的显示场景为第二显示场景时,终端将显示器的显示参数设置为第二显示参数。S1003. When the current display scene of the terminal is the second display scene, the terminal sets the display parameter of the display to the second display parameter.
其中,上述第一显示场景中对显示效果的要求低于第二显示场景中对显示效果的要求,显示器使用上述第一显示参数工作时的功耗小于显示器使用上述第二显示参数工作时的功耗。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 when the display works using the first display parameter is smaller than the work when the display works using the second display parameter. Consumption.
由于在不同显示场景下用户对显示效果的要求不同,因此,对于显示效果要求不高的显示场景(例如表1中的显示场景4),终端可以相应降低显示器显示时的显示参数,从而降低显示器工作时消耗的不必要的功耗。Since the user has different requirements for the display effect in different display scenarios, the display scene (such as the display scene 4 in Table 1) that is not required for the display effect can lower the display parameter when the display is displayed, thereby lowering the display. Unnecessary power consumption consumed during work.
其中,上述显示参数可以包括显示器的分辨率、亮度或对比度中的一项或多项,本申请实施例对此不做任何限制。当分辨率、亮度或对比度越高时,显示器工作时产生的功耗越大,显示效果也更好;当分辨率、亮度或对比度越低时,显示器工作时产生的功耗越小,显示效果也随之下降。其中,终端可以通过调整显示器中每个像素单元的灰阶值改变显示器的亮度,也可通过调整每个像素单元内不同基色(例如红色、蓝色和绿色)的灰阶值改变显示器的亮度,本申请实施例对此不做任何限制。The display parameter may include one or more of a resolution, a brightness, or a contrast of the display, which is not limited in this embodiment of the present application. When the resolution, brightness or contrast is higher, the power consumption generated by the display is higher, and the display effect is better. When the resolution, brightness or contrast is lower, the power consumption generated by the display is smaller, and the display effect is lower. It also declined. The terminal can change the brightness of the display by adjusting the grayscale value of each pixel unit in the display, and can also change the brightness of the display by adjusting the grayscale values of different primary colors (such as red, blue, and green) in each pixel unit. The embodiment of the present application does not impose any limitation on this.
那么,在步骤S1002中,如果步骤S1001中检测出当前的显示场景为上述显示场景1(即第一显示场景),由于显示场景1中对显示效果的要求较低,因此,终端可以将当前显示内容的显示参数设置为取值较低的第一显示参数,例如,将显示器的亮度从85调整为70。这样,仍如图11所示,图形管理器可按照上述第一显示参数调用显示器进行显示,从而降低显示器消耗的功耗,同时可以保证第三应用在第一显示场景中的显示效果。Then, in step S1002, if it is detected in step S1001 that the current display scene is the display scene 1 (ie, the first display scene), since the requirement for the display effect in the display scene 1 is low, the terminal may display the current display. The display parameter of the content is set to a first display parameter having a lower value, for example, the brightness of the display is adjusted from 85 to 70. Thus, as shown in FIG. 11, the graphics manager can invoke the display for display according to the first display parameter, thereby reducing the power consumption consumed by the display, and at the same time ensuring the display effect of the third application in the first display scene.
相应的,在步骤S1003中,如果步骤S1001中检测出当前的显示场景为上述显示场景4(即第二显示场景),由于显示场景4中对显示效果的要求很高,因此,终端可以将当前显示内容的显示参数设置为取值较高的第二显示参数。这样,图形管理器可按照上述第二显示参数调用显示器进行显示,从而保证第三应用在第二显示场景中 的显示效果。Correspondingly, in step S1003, if it is detected in the step S1001 that the current display scene is the display scene 4 (ie, the second display scene), since the display scene 4 has a high requirement for the display effect, the terminal may The display parameter of the display content is set to the second display parameter with a higher value. In this way, the graphics manager can invoke the display for display according to the second display parameter described above, thereby ensuring the display effect of the third application in the second display scene.
示例性的,如图11所示,框架层的调度模块中设置有不同显示场景与不同显示参数之间的对应关系。那么,调度模块通过第三标志位确定出当前的显示场景后,可根据该对关系确定出与当前显示场景对应的显示参数。那么,调度模块可将确定出的显示参数发送给图形管理器,使得图形管理器后续接收到任意支持图像显示的应用(即第三应用)发送的显示请求时,可按照确定出的显示参数调用显示器进行显示。Exemplarily, as shown in FIG. 11, the scheduling module of the framework layer is provided with a correspondence between different display scenarios and different display parameters. Then, after the scheduling module determines the current display scenario by using the third flag bit, the display parameter corresponding to the current display scenario 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 any display request sent by the application supporting the image display (ie, the third application), the scheduling parameter may be invoked according to the determined display parameter. The display is displayed.
又或者,仍如图11所示,每次第三应用向framework层中的图形管理器发送显示请求时,图形管理器均可向调度模块请求获取与此时的显示场景对应的显示参数。那么,响应于图形管理器发送的这一请求,调度模块可根据第三标志位所指示的显示场景确定显示器的显示参数,并将该显示参数发送给图形管理器,使得图形管理器可按照该显示参数调用显示器进行显示。Alternatively, as shown in FIG. 11, each time the third application sends a display request to the graphics manager in the framework layer, the graphics manager may request the scheduling module to acquire display parameters corresponding to the display scene at this time. Then, in response to the request sent by the graphics manager, the scheduling module may determine the display parameter of the display according to the display scenario indicated by the third flag bit, and send the display parameter to the graphics manager, so that the graphics manager can follow the The display parameters call the display for display.
在本申请的另一些实施例中,当第三应用向framework层中的图形管理器发送显示请求时,图形管理器也可以根据第三应用的包名或类型设置显示器的显示参数。例如,对于画质要求较低的天气类的应用,图形管理器可以设置较低的亮度、分辨率等显示参数,从而降低显示器产生的功耗;而对于画质要求较高的相机、图库等应用,图形管理器可以设置较高的亮度、分辨率等显示参数,保证显示器工作时提供较好的画质。In still other embodiments of the present application, when the third application sends a display request to the graphics manager in the framework layer, the graphics manager may also set the display parameters of the display according to the package name or type of the third application. For example, for weather-critical applications with low image quality, the graphics manager can set lower brightness, resolution, and other display parameters to reduce the power consumption of the display; for cameras and libraries that require high image quality. Application, the graphics manager can set higher brightness, resolution and other display parameters to ensure better image quality when the monitor works.
需要说明的是,本领域技术人员可以根据实际经验或实际应用场景划分不同的显示场景,并设置在不同显示场景下显示参数的具体取值,本申请实施例对此不做任何限制。It should be noted that, the person skilled in the art can divide the different display scenarios according to the actual experience or the actual application scenario, and set the specific values of the display parameters in different display scenarios, which is not limited in this embodiment.
可以看出,在本申请实施例中终端可以根据当前所处的实际场景(例如音频播放场景或显示场景),实时调整外围器件(例如扬声器或显示器)工作时的参数。这样,当终端处于对音质要求不高或显示效果要求不高的场景时,终端可降低外围器件工作时所需的参数,从而降低外围器件过度工作带来的功耗开销,同时满足该场景下的音质要求或显示效果要求。It can be seen that, in the embodiment of the present application, the terminal can adjust parameters of the working time of the peripheral device (such as a speaker or a display) in real time according to the actual scene (such as an audio playing scene or a display scene). In this way, when the terminal is in a scene where the sound quality is not high or the display effect is not high, the terminal can reduce the parameters required for the peripheral device to work, thereby reducing the power consumption overhead caused by excessive operation of the peripheral device, and satisfying the scenario. Sound quality requirements or display performance requirements.
在本申请的另一些实施例中,还提供了一种用于降低终端中应用处理器(application processor,AP)的功耗开销的方法,如图12所示,该方法包括:In another embodiment of the present application, a method for reducing power consumption of an application processor (AP) in a terminal is also provided. As shown in FIG. 12, the method includes:
S1201、终端周期性检测终端当前的运行数据。S1201: The terminal periodically detects the current running data of the terminal.
其中,上述运行数据具体可以包括步骤S401中检测的运动状态,例如,静止、走路、跑步、低速交通以及高速交通等,也可以包括步骤S801中检测的音频播放场景,例如,音乐播放场景、视频播放场景、语音播放场景以及游戏播放场景等,还可以包括步骤S1001中检测的显示场景,例如上述表1中的显示场景1至显示场景4,又或者,上述运行数据还可以包括终端的信号强度、屏幕的亮灭或者用户的使用习惯等反映用户对当前终端需求的参数,本申请实施例对此不做任何限制。The operation data may include the motion state detected in step S401, for example, rest, walking, running, low-speed traffic, high-speed traffic, etc., and may also include the audio play scene detected in step S801, for example, a music playing scene, a video. The display scene, the voice play scene, and the game play scene may also include the display scene detected in step S1001, such as display scene 1 to display scene 4 in Table 1, or the operation data may further include the signal strength of the terminal. The embodiment of the present application does not impose any limitation on the parameters of the user's current terminal requirements.
S1202、终端根据当前的运行数据确定AP的工作模式。S1202: The terminal determines an operating mode of the AP according to the current running data.
例如,AP的工作模式可以包括运行模式、休眠模式以及关闭模式。那么,在步骤S1202中,如果步骤S1201中检测出的运行数据反映出用户当前对终端的使用需求较高,例如,用户正在终端上玩游戏,则终端可确定AP的工作模式为运行模式;如果 步骤S1201中检测出的运行数据反映出用户当前对终端的使用需求较低,例如,用户正在睡觉或者飞行,则终端可确定AP的工作模式为休眠模式或关闭模式。For example, the working mode 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 user currently has a high demand for the terminal, for example, the user is playing the game on the terminal, the terminal may determine that the working mode of the AP is the operation mode; The operation data detected in step S1201 reflects that the user's current use requirement for the terminal is low. For example, if the user is sleeping or flying, the terminal may determine that the AP's working mode is the sleep mode or the off mode.
当然,本领域技术人员可以根据实际经验或实际应用场景对AP的工作模式进行划分,本申请实施例对此不做任何限制。Certainly, the working mode of the AP may be divided according to the actual experience or the actual application scenario, and the embodiment of the present application does not impose any limitation on this.
S1203、当AP的工作模式为休眠模式时,终端将外围器件获取到的数据进行拦截。S1203: When the working mode of the AP is the sleep mode, the terminal intercepts the data acquired by the peripheral device.
在步骤S1203中,如果确定出AP的工作模式为休眠模式,那么,为了降低外围器件频繁唤醒AP上报数据带来的不必要功耗开销,终端可以控制外围器件(例如,Wi-Fi器件、蓝牙器件或者GPS器件等)降低获取数据的频率,或者,拦截外围器件向AP上报该外围器件获取到的数据的频率,从而减少频繁唤醒AP带来的功耗开销。In step S1203, if it is determined that the working mode of the AP is the sleep mode, the terminal can control peripheral devices (for example, Wi-Fi device, Bluetooth) in order to reduce unnecessary power consumption overhead caused by the peripheral device frequently waking up the AP reporting data. The device or the GPS device, etc.) reduces the frequency of acquiring data, or intercepts the frequency at which the peripheral device reports the data acquired by the peripheral device to the AP, thereby reducing the power consumption overhead caused by frequently waking up the AP.
在一种可能的设计方法中,当AP的工作模式为休眠模式时,用于管理外围器件的调度模块可以将一个或多个外围器件的工作模式设置为拦截模式。在拦截模式下,外围器件的工作频率降低,这样,外围器件向AP上报数据的频率随之降低,即AP被唤醒的次数也随之降低,使得AP和外围器件的功耗均下降。In one possible design method, when the operating mode of the AP is the sleep mode, the scheduling module for managing the peripheral device may set the operating mode of one or more peripheral devices to the intercept mode. In the intercept mode, the operating frequency of the peripheral device is lowered, so that the frequency of reporting data to the AP by the peripheral device is reduced, that is, the number of times the AP is woken up is also reduced, so that the power consumption of the AP and the peripheral device are both reduced.
例如,如图13所示,Wi-Fi器件的工作模式包括数据透传和数据拦截两种模式,当AP的工作模式为休眠模式时,调度模块可将Wi-Fi器件的工作模式设置为数据拦截模式。当Wi-Fi器件在数据拦截模式下的工作频率低于Wi-Fi器件在数据透传模式下的工作频率,例如,Wi-Fi器件可以从每1秒获取一次数据的工作频率降低为每10秒获取一次数据的工作频率。后续,Wi-Fi器件获取到数据后仍可正常通过中断等方式唤醒AP,向AP上报该数据,但由于Wi-Fi器件的工作频率降低,因此Wi-Fi器件向AP上报数据的频率随之降低,即AP被唤醒的次数也随之降低,从而达到降低AP功耗的效果。For example, as shown in FIG. 13, the working mode of the Wi-Fi device includes two modes: data transparent transmission and data interception. When the working mode of the AP is the sleep mode, the scheduling module can set the working mode of the Wi-Fi device to data. Intercept mode. When the Wi-Fi device operates at a lower frequency than the Wi-Fi device in data pass-through mode, for example, a Wi-Fi device can reduce the operating frequency of data acquired every 1 second to every 10 Get the working frequency of the data once in seconds. Subsequently, after the Wi-Fi device obtains the data, the AP can still wake up the AP by interrupting, etc., and report the data to the AP. However, since the working frequency of the Wi-Fi device is reduced, the frequency of the Wi-Fi device reporting the data to the AP follows. The decrease, that is, the number of times the AP is woken up, is also reduced, thereby achieving the effect of reducing AP power consumption.
在一种可能的设计方法中,可以在外围器件中设置一个用于管理向AP上报数据的管理模块。仍以Wi-Fi器件作为外围器件举例,如图14所示,Wi-Fi器件可以沿用现有技术中的方法正常接收数据,但是,当Wi-Fi器件接收到数据后,如果Wi-Fi器件中的管理模块查询出当前AP的工作模式为休眠模式,则该管理模块可以将Wi-Fi器件向AP上传数据的模式设置为拦截模式。在该拦截模式下,Wi-Fi器件可以将接收到的数据丢弃,或者,Wi-Fi器件可以将接收到的数据进行缓存,直到管理模块查询出当前AP的工作模式为后上报给AP,又或者,Wi-Fi器件还可以将接收到的数据周期性上传给AP。这样,Wi-Fi器件无需在每次接收到数据时均唤醒AP上传该数据,从而达到降低AP功耗的效果。In one possible design method, a management module for managing data reporting to the AP may be provided in the peripheral device. Still using a Wi-Fi device as a peripheral device, as shown in FIG. 14, the Wi-Fi device can normally receive data according to the method in the prior art, but when the Wi-Fi device receives the data, if the Wi-Fi device The management module in the middle of the current module is in the sleep mode, and the management module can set the mode in which the Wi-Fi device uploads data to the AP to the intercept mode. In the interception mode, the Wi-Fi device can discard the received data, or the Wi-Fi device can buffer the received data until the management module queries the current AP's working mode and reports it to the AP. Alternatively, the Wi-Fi device can periodically upload the received data to the AP. In this way, the Wi-Fi device does not need to wake up the AP to upload the data every time the data is received, thereby achieving the effect of reducing the power consumption of the AP.
可以看出,在本申请实施例中终端可以识别出用户当前对终端的使用需求,进而在用户对终端的使用需求较低时拦截外围器件接收数据的频率,或者拦截外围器件向AP上报数据的频率,从而降低AP在工作需求不高时被唤醒的次数,达到降低AP功耗的效果。It can be seen that, in the embodiment of the present application, the terminal can identify the current usage requirement of the user, and then intercept the frequency of receiving data by the peripheral device when the user's use requirement for the terminal is low, or intercept the peripheral device to report data to the AP. The frequency, which reduces the number of times the AP is woken up when the working demand is not high, and achieves the effect of reducing the power consumption of the AP.
可以理解的是,上述终端等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决 于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。It can be understood that, in order to implement the above functions, the above terminal and the like include hardware structures and/or software modules corresponding to each function. Those skilled in the art will readily appreciate that the embodiments of the present application can be implemented in a combination of hardware or hardware and computer software in combination with the elements and algorithm steps of the various examples described in the embodiments disclosed herein. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
本申请实施例可以根据上述方法示例对上述终端等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may perform the division of the function modules on the terminal or the like according to the foregoing method example. For example, each function module may be divided according to each function, or two or more functions may be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of the module in the embodiment of the present application is schematic, and is only a logical function division, and the actual implementation may have another division manner.
在采用对应各个功能划分各个功能模块的情况下,图15示出了上述实施例中所涉及的终端的一种可能的结构示意图,该终端用于实现以上各个方法实施例中记载的方法,其具体包括:检测单元1501和处理单元1502。FIG. 15 is a schematic diagram showing a possible structure of a terminal involved in the foregoing embodiments, where the terminal is used to implement the method described in the foregoing method embodiments. Specifically, the detection unit 1501 and the processing unit 1502 are included.
其中,检测单元1501用于支持终端执行图4中的过程S401、图8中的过S801、图10中的过程S1001以及图12中的过程S1201;处理单元S1502用于支持终端执行图4中的过程S402-S403、图8中的过程S802-S803、图10中的过程S1002-S1003以及图12中的过程S1202-S1203。其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。The detecting unit 1501 is configured to support the terminal to perform the process S401 in FIG. 4, the pass 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 perform the process in FIG. Processes S402-S403, processes S802-S803 in FIG. 8, processes S1002-S1003 in FIG. 10, and processes S1202-S1203 in FIG. All the related content of the steps involved in the foregoing method embodiments may be referred to the functional descriptions of the corresponding functional modules, and details are not described herein again.
在采用集成的单元的情况下,可将上述检测单元1501和处理单元1502集成为处理模块。当然,终端还可以包括存储模块、通信模块和输入/输出模块。此时,如图16所示,示出了上述实施例中所涉及的终端的一种可能的结构示意图,包括处理模块1601、通信模块1602、输入/输出模块1603以及存储模块1604。In the case of employing an integrated unit, the above-described detecting unit 1501 and processing unit 1502 may be integrated into 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 possible schematic structural diagram of the terminal involved in the foregoing embodiment is shown, including a processing module 1601, a communication module 1602, an input/output module 1603, and a storage module 1604.
其中,处理模块1601用于对终端的动作进行控制管理。通信模块1602用于支持终端与其他网络实体的通信。输入/输出模块1603用于接收由用户输入的信息或输出提供给用户的信息以及终端的各种菜单。存储模块1604用于保存终端的程序代码和数据。The processing module 1601 is configured to control and manage the action of the terminal. The communication module 1602 is configured to support communication between the terminal and other network entities. The input/output module 1603 is for receiving information input by a user or outputting information provided to the user and various menus of the terminal. The storage module 1604 is configured to save program codes and data of the terminal.
示例性的,处理模块1601可以是处理器或控制器,例如可以是中央处理器(Central Processing Unit,CPU),GPU,通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。Exemplarily, the processing module 1601 may be a processor or a controller, for example, may be a central processing unit (CPU), a GPU, a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit. (Application-Specific Integrated Circuit, ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure. The processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
通信模块1602可以是收发器、收发电路、输入输出设备或通信接口等。例如,通信模块1602具体可以是蓝牙装置、Wi-Fi装置、外设接口等等。The communication module 1602 can be a transceiver, a transceiver circuit, an input/output device, a communication interface, or the like. For example, the communication module 1602 may specifically be a Bluetooth device, a Wi-Fi device, a peripheral interface, or the like.
存储模块1604可以是存储器,该存储器可以包括高速随机存取存储器(RAM),还可以包括非易失存储器,例如磁盘存储器件、闪存器件或其他易失性固态存储器件等。The memory module 1604 can be a memory, which can include high speed random access memory (RAM), and can also include non-volatile memory, such as magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
输入/输出模块1603可以为触摸屏、键盘、麦克风以及显示器等输入输出设备。其中,显示器具体可以采用液晶显示器、有机发光二极管等形式来配置显示器。另外,显示器上还可以集成触控板,用于采集在其上或附近的触摸事件,并将采集到的触摸信息发送给其他器件(例如处理器等)。The input/output module 1603 can be an input/output device such as a touch screen, a keyboard, a microphone, and a display. The display may specifically be configured in the form of a liquid crystal display, an organic light emitting diode or the like. In addition, a touch panel can be integrated on the display for collecting touch events on or near the display, and transmitting the collected touch information to other devices (such as a processor, etc.).
在上述实施例中,可以全部或部分的通过软件,硬件,固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式出现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质,(例如,软盘,硬盘、磁带)、光介质(例如,DVD)或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it may occur in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.). The computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that includes one or more available media. The usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. . Therefore, the scope of protection of the present application should be determined by the scope of the claims.

Claims (22)

  1. 一种终端内外围器件的管理方法,其特征在于,包括:A method for managing peripheral devices in a terminal, comprising:
    终端获取当前所述终端所处的实时运行场景;The terminal acquires a real-time running scenario in which the terminal is currently located;
    当所述实时运行场景为第一运行场景时,所述终端指示所述外围器件按照第一工作参数工作;When the real-time running scenario is the first running scenario, the terminal instructs the peripheral device to work according to the first working parameter;
    当所述实时运行场景为第二运行场景时,所述终端指示所述外围器件按照第二工作参数工作;When the real-time running scenario is the second running scenario, the terminal instructs the peripheral device to work according to the second working parameter;
    其中,所述外围器件按照第一工作参数工作时所述终端产生的功耗小于所述外围器件按照第二工作参数工作时所述终端产生的功耗。The power consumption generated by the terminal when the peripheral device operates according to the first working parameter is smaller than the power consumption generated by the terminal when the peripheral device operates according to the second working parameter.
  2. 根据权利要求1所述的方法,其特征在于,所述外围器件为定位装置,所述工作参数为所述定位装置的工作频率,The method according to claim 1, wherein said peripheral device is a positioning device, and said operating parameter is an operating frequency of said positioning device,
    其中,所述运行场景包括静止、步行、跑步、骑行、低速交通或高速交通中的一个运动状态;Wherein the running scene includes a state of motion in still, walking, running, riding, low speed traffic or high speed traffic;
    在所述第一运行场景中所述终端的移动速率小于在所述第二运行场景中所述终端的移动速率,所述第一工作参数小于所述第二工作参数。The moving rate of the terminal in the first running scenario is smaller than the moving rate of the terminal in the second running scenario, and the first working parameter is smaller than the second working parameter.
  3. 根据权利要求2所述的方法,其特征在于,终端获取当前所述终端所处的实时运行场景,包括:The method according to claim 2, wherein the terminal obtains a real-time running scenario in which the terminal is currently located, including:
    所述终端检测所述终端的移动速率;The terminal detects a moving rate of the terminal;
    所述终端根据所述移动速率确定所述终端当前所处的运动状态。The terminal determines, according to the moving rate, a motion state currently in which the terminal is located.
  4. 根据权利要求2或3所述的方法,其特征在于,所述终端的框架层中包括用于管理所述定位装置工作状态的调度模块,所述终端预设的第一标志位用于存储最近一次所述终端确定出的运动状态的标识。The method according to claim 2 or 3, wherein the framework layer of the terminal includes a scheduling module for managing the working state of the positioning device, and the first flag preset by the terminal is used to store the latest An identifier of the motion state determined by the terminal at a time.
  5. 根据权利要求4所述的方法,所述终端指示所述外围器件按照第一工作参数工作,包括:The method according to claim 4, wherein the terminal instructs the peripheral device to operate according to the first operating parameter, including:
    所述终端内提供位置服务的位置管理器向所述调度模块发送第一查询请求,所述第一查询请求用于查询所述定位装置的工作频率;a location manager that provides a location service in the terminal sends a first query request to the scheduling module, where the first query request is used to query an operating frequency of the positioning device;
    响应于所述第一查询请求,所述调度模块根据所述第一标志位指示的第一运动状态,确定与所述第一运动状态对应的第一工作频率;In response to the first query request, the scheduling module determines a first operating frequency corresponding to the first motion state according to a first motion state indicated by the first flag bit;
    所述调度模块将所述第一工作频率发送给所述位置管理器,使得所述位置管理器按照所述第一工作频率驱动所述定位装置进行定位。The scheduling module sends the first working frequency to the location manager, so that the location manager drives the positioning device to perform positioning according to the first working frequency.
  6. 根据权利要求4所述的方法,所述终端指示所述外围器件按照第一工作参数工作,包括:The method according to claim 4, wherein the terminal instructs the peripheral device to operate according to the first operating parameter, including:
    响应于第一应用对所述定位装置的定位请求,所述终端内提供位置服务的位置管理器向所述调度模块发送第二查询请求,所述第二查询请求用于请求查询是否允许驱动所述定位装置定位;And in response to the first application requesting the positioning device, the location manager providing the location service in the terminal sends a second query request to the scheduling module, where the second query request is used to request whether the query is allowed to be driven. Positioning device positioning;
    响应于所述第二查询请求,所述调度模块根据所述第一标志位指示的第一运动状态,确定与所述第一运动状态对应的第一工作频率;In response to the second query request, the scheduling module determines a first operating frequency corresponding to the first motion state according to a first motion state indicated by the first flag bit;
    若所述定位请求距离所述定位装置最近一次定位的时长小于第一工作周期,则所述调度模块向所述位置管理器发送不允许驱动所述定位装置定位的消息;若所述定位 请求距离所述定位装置最近一次定位的时长大于或等于第一工作周期,则所述调度模块向所述位置管理器发送允许驱动所述定位装置定位的消息,所述第一工作周期为所述第一工作频率的倒数。If the positioning request is less than the first working period from the positioning device, the scheduling module sends a message to the location manager that is not allowed to drive the positioning device; if the positioning request distance The scheduling module sends a message to the location manager that allows the positioning of the positioning device to be driven, where the first working period is the first The reciprocal of the working frequency.
  7. 根据权利要求4所述的方法,所述终端指示所述外围器件按照第一工作参数工作,包括:The method according to claim 4, wherein the terminal instructs the peripheral device to operate according to the first operating parameter, including:
    当所述调度模块中所述第一标志位指示的运动状态为第一运动状态时,所述调度模块确定与所述第一运动状态对应的第一工作频率;When the motion state indicated by the first flag bit in the scheduling module is the 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 location manager in the terminal that provides a location service, so that the location manager drives the positioning device to perform positioning according to the first working frequency.
  8. 根据权利要求1所述的方法,其特征在于,所述外围器件为扬声器,所述工作参数为所述扬声器播放音频时的播放参数;The method according to claim 1, wherein the peripheral device is a speaker, and the operating parameter is a playing parameter when the speaker plays audio;
    其中,所述运行场景包括音乐播放场景、视频播放场景、语音播放场景或游戏播放场景中的一项音频播放场景;所述第一运行场景对音质的要求小于所述第二运行场景对音质的要求。The running scenario includes an audio playing scene in a music playing scene, a video playing scene, a voice playing scene, or a game playing scene; the first running scene has a lower sound quality than the second running scene. Claim.
  9. 根据权利要求8所述的方法,其特征在于,终端获取当前所述终端所处的实时运行场景,包括:The method according to claim 8, wherein the terminal acquires a real-time running scenario in which the terminal is currently located, including:
    所述终端根据当前运行的应用的信息确定当前的音频播放场景;或者,Determining, by the terminal, the current audio play scenario according to information of the currently running application; or
    所述终端根据当前播放的音频内容确定当前的音频播放场景。The terminal determines a current audio play scene according to the currently played audio content.
  10. 根据权利要求8或9所述的方法,其特征在于,所述终端的框架层中包括用于管理所述外围器件工作状态的调度模块,所述终端预设的第二标志位用于存储最近一次所述终端确定出的音频播放场景的标识。The method according to claim 8 or 9, wherein the frame layer of the terminal includes a scheduling module for managing the working state of the peripheral device, and the second flag bit preset by the terminal is used to store the latest The identifier of the audio play scene determined by the terminal once.
  11. 根据权利要求10所述的方法,其特征在于,所述终端指示所述外围器件按照第一工作参数工作,包括:The method according to claim 10, wherein the terminal instructs the peripheral device to operate according to the first operating parameter, including:
    当所述调度模块中所述第二标志位所指示的音频播放场景为第一音频播放场景时,所述调度模块确定与所述第一音频播放场景对应的第一播放参数;When the audio play scene indicated by the second flag bit in the scheduling module is the first audio play scene, the scheduling module determines a first play parameter corresponding to the first audio play scene;
    所述调度模块将所述第一播放参数发送给所述终端内提供音频播放服务的多媒体管理器,使得所述多媒体管理器按照所述第一播放参数驱动所述扬声器播放音频。The scheduling module sends the first play parameter to a multimedia manager that provides an audio play service in the terminal, so that the multimedia manager drives the speaker to play audio according to the first play parameter.
  12. 根据权利要求10所述的方法,其特征在于,所述终端指示所述外围器件按照第一工作参数工作,包括:The method according to claim 10, wherein the terminal instructs the peripheral device to operate according to the first operating parameter, including:
    响应于第二应用对所述扬声器的播放请求,所述终端内提供音频播放服务的多媒体管理器向所述调度模块发送第一获取请求,所述第一获取请求用于查询播放音频时的播放参数;And responding to the playing request of the second application by the second application, the multimedia manager providing the audio playing service in the terminal sends a first obtaining request to the scheduling module, where the first obtaining request is used to query playing when playing audio parameter;
    响应于所述第一获取请求,所述调度模块根据所述第二标志位指示的第一音频播放场景,确定与所述第一音频播放场景对应的第一播放参数;In response to the first obtaining request, the scheduling module determines a first playing parameter corresponding to the first audio playing scene according to the first audio playing scene indicated by the second flag bit;
    所述调度模块将所述第一播放参数发送给所述多媒体管理器,使得所述多媒体管理器按照所述第一播放参数驱动所述扬声器播放音频。The scheduling module sends the first play parameter to the multimedia manager, so that the multimedia manager drives the speaker to play audio according to the first play parameter.
  13. 根据权利要求1所述的方法,其特征在于,所述外围器件为显示器,所述工作参数为所述显示器的显示参数;The method of claim 1 wherein said peripheral device is a display and said operational parameter is a display parameter of said display;
    其中,所述运行场景包括对画质要求不相同的多个显示场景;所述第一运行场景 对画质的要求小于所述第二运行场景对画质的要求。The running scenario includes multiple display scenarios with different image quality requirements; the first running scenario requires less image quality than the second running scenario.
  14. 根据权利要求13所述的方法,其特征在于,终端获取当前所述终端所处的实时运行场景,包括:The method according to claim 13, wherein the terminal acquires a real-time running scenario in which the terminal is currently located, including:
    所述终端根据当前运行的应用的信息确定当前的显示场景,或者,Determining, by the terminal, the current display scenario according to information of the currently running application, or
    所述终端根据当前的显示内容确定当前的显示场景。The terminal determines a current display scenario according to the current display content.
  15. 根据权利要求13或14所述的方法,其特征在于,所述终端的框架层中包括用于管理所述外围器件工作状态的调度模块,所述终端预设的第三标志位用于存储最近一次所述终端确定出的显示场景的标识。The method according to claim 13 or 14, wherein the frame layer of the terminal includes a scheduling module for managing the working state of the peripheral device, and the third flag bit preset by the terminal is used to store the latest The identifier of the display scene determined by the terminal once.
  16. 根据权利要求15所述的方法,其特征在于,所述终端指示所述外围器件按照第一工作参数工作,包括:The method according to claim 15, wherein the terminal instructs the peripheral device to operate according to the first operating parameter, including:
    当所述调度模块中所述第三标志位所指示的显示场景为第一显示场景时,所述调度模块确定与所述第一显示场景对应的第一显示参数;When the display scenario indicated by the third flag bit in the scheduling module is the first display scenario, the scheduling module determines a first display parameter corresponding to the first display scenario;
    所述调度模块将所述第一显示参数发送给所述终端内提供显示服务的图形管理器,使得所述图形管理器按照所述第一显示参数驱动所述显示器进行显示。The scheduling module sends the first display parameter to a graphics manager that provides a display service in the terminal, such that the graphics manager drives the display to display according to the first display parameter.
  17. 根据权利要求15所述的方法,其特征在于,所述终端指示所述外围器件按照第一工作参数工作,包括:The method according to claim 15, wherein the terminal instructs the peripheral device to operate according to the first operating parameter, including:
    响应于第三应用对所述显示器的播放请求,所述终端内提供显示服务的图形管理器向所述调度模块发送第二获取请求,所述第二获取请求用于查询所述显示器的显示参数;And in response to the third application applying the display to the display, the graphics manager providing the display service in the terminal sends a second acquisition request to the scheduling module, where the second acquisition request is used to query display parameters of the display ;
    响应于所述第二获取请求,所述调度模块根据所述第三标志位指示的第一显示场景,确定与所述第一显示场景对应的第一显示参数;In response to the second obtaining request, the scheduling module determines, according to the first display scenario indicated by the third flag bit, a first display parameter corresponding to the first display scenario;
    所述调度模块将所述第一显示参数发送给所述图形管理器,使得所述图形管理器按照所述第一显示参数驱动所述显示器进行显示。The scheduling module sends the first display parameter to the graphics manager, such that the graphics manager drives the display to display according to the first display parameter.
  18. 根据权利要求1所述的方法,其特征在于,所述运行场景包括应用处理器AP的工作状态,所述工作状态包括运行模式、休眠模式以及关闭模式,The method according to claim 1, wherein the running scenario comprises an operating state of an application processor AP, the working state comprising an operating mode, a sleep mode, and an off mode,
    当所述第一运行场景为所述AP处于休眠模式或关闭模式,所述第二运行场景为所述AP处于运行模式时,所述工作参数为所述外围器件的工作频率,所述第一工作参数小于所述第二工作参数。When the first running scenario is that the AP is in a sleep mode or an off mode, and the second running scenario is that the AP is in an operating mode, the working parameter is an operating frequency of the peripheral device, the first The operating parameter is less than the second operating parameter.
  19. 一种终端内外围器件的管理方法,其特征在于,包括:A method for managing peripheral devices in a terminal, comprising:
    终端获取当前应用处理器AP的工作状态,所述工作状态包括运行模式、休眠模式以及关闭模式;The terminal acquires an operating state of the current application processor AP, where the working state includes an operating mode, a sleep mode, and an off mode;
    当所述工作状态为休眠模式时,所述终端指示外围器件丢弃接收到的数据,或指示外围器件缓存接收到的数据,或指示外围器件周期性向所述AP上报接收到的数据。When the operating state is the sleep mode, the terminal instructs the peripheral device to discard the received data, or instructs the peripheral device to buffer the received data, or instructs the peripheral device to periodically report the received data to the AP.
  20. 一种终端,其特征在于,包括:处理器、显示器、存储器和通信接口;A terminal, comprising: a processor, a display, a memory, and a communication interface;
    所述存储器用于存储计算机执行指令,所述处理器与所述存储器耦合,当所述终端运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述终端执行如权利要求1-18或19中任一项所述的终端内外围器件的管理方法。The memory is for storing a computer to execute instructions, the processor is coupled to the memory, and when the terminal is running, the processor executes the computer-executed instructions stored by the memory to cause the terminal to execute A method of managing a peripheral device in a terminal according to any one of claims 1 to 18 or 19.
  21. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,其特征在于,当所述指令在终端上运行时,使得所述终端执行如权利要求1-18或19中任一 项所述的终端内外围器件的管理方法。A computer readable storage medium having stored therein instructions, wherein when the instructions are run on a terminal, causing the terminal to perform any of claims 1-18 or 19 The method for managing peripheral devices in the terminal described in the section.
  22. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在终端上运行时,使得所述终端执行如权利要求1-18或19中任一项所述的终端内外围器件的管理方法。A computer program product comprising instructions, wherein when the computer program product is run on a terminal, causing the terminal to perform the peripheral device of the terminal according to any one of claims 1-18 or 19 Management method.
PCT/CN2018/080573 2018-03-26 2018-03-26 Management method for peripheral device in terminal and terminal WO2019183783A1 (en)

Priority Applications (2)

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
CN201880078982.2A CN111434154A (en) 2018-03-26 2018-03-26 Management method for internal and peripheral devices of terminal and terminal

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
WO2019183783A1 true WO2019183783A1 (en) 2019-10-03

Family

ID=68062412

Family Applications (1)

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

Country Status (2)

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

Cited By (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 (5)

* 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
CN103327585A (en) * 2013-05-27 2013-09-25 深圳市中兴移动通信有限公司 Communication terminal and communication method thereof
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

Family Cites Families (5)

* 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
CN104183227B (en) * 2013-05-20 2018-10-23 南京中兴软件有限责任公司 The display processing method and device of application program
CN105100411A (en) * 2015-05-27 2015-11-25 努比亚技术有限公司 Display control method and device
CN105223593B (en) * 2015-09-17 2018-01-23 北京奇虎科技有限公司 Terminal positioning frequency adjustment method, system and positioning interval adjusting method, system
CN107562602B (en) * 2017-09-13 2021-11-16 Oppo广东移动通信有限公司 Log information reporting method and device, storage medium, ADSP and terminal

Patent Citations (5)

* 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
CN103327585A (en) * 2013-05-27 2013-09-25 深圳市中兴移动通信有限公司 Communication terminal and communication method thereof
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

Cited By (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

Also Published As

Publication number Publication date
CN111434154A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
US11809705B2 (en) Touch control method and apparatus
WO2019036942A1 (en) Display method and device
WO2019183785A1 (en) Frame rate adjustment method and terminal
US11928312B2 (en) Method for displaying different application shortcuts on different screens
AU2018414730B2 (en) Application window display method and terminal
WO2020211705A1 (en) Contact person recommendation method and electronic device
WO2018209635A1 (en) Search method and apparatus
WO2018171105A1 (en) Alarm notification method and terminal device
WO2019071619A9 (en) Application management method and terminal
KR20180110517A (en) An elelctronic device and a coverrage compensation method for a shortrange communication in the elelctronic device
WO2021082931A1 (en) Method for displaying message and terminal device
WO2021042881A1 (en) Message notification method and electronic device
WO2019183783A1 (en) Management method for peripheral device in terminal and terminal
CN114168873B (en) Method and device for processing page popup frame, terminal device and storage medium
WO2021000778A1 (en) Uplink transmission discarding method, uplink transmission discarding configuration method and related device
CN111093148A (en) Signal frequency adjusting method and device, storage medium and terminal
WO2024060017A1 (en) Paging method, communication device, and storage medium
WO2018133313A1 (en) Motion recording method and electronic device
CN116009742A (en) Cross-equipment file display method, equipment and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18912650

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18912650

Country of ref document: EP

Kind code of ref document: A1